shawntschwartz / eeb-c177-w20 Goto Github PK
View Code? Open in Web Editor NEWlab section materials for eeb c177/c234 @ucla (winter 2020) 🐻
Home Page: https://shawnschwartz.com/eeb-c177-w20/
License: Other
lab section materials for eeb c177/c234 @ucla (winter 2020) 🐻
Home Page: https://shawnschwartz.com/eeb-c177-w20/
License: Other
My code for the temp converter worked for the first two questions, but turning it into a function is proving difficult. I did def tempconverter() and the two variable names for the temp and unit in the parentheses, but when I tested it I got the message:
"NameError: name 'C' is not defined"
Has anyone else run into this issue?
Hi! so dumb question, but I completely forgot how I previously accessed the python book for homework? I tried searching the website but couldn't find it.
Hello all,
Firstly, I seem to be having an issue with finding things that are associated with something else while excluding that something else. For example, for the first question for part 2, I wrote \ss\w+ to look for collections of characters that start with a space and end with at least one alphanumeric character. This gives me the words that start with s as well as the spaces before them. According to the tutorial, putting parentheses around (s\w+) should exclude the space before the word, but that didn't seem to work in Sublimetext.
Secondly, are regex searches supposed to be case-sensitive? In class and in the Regexone activities that appeared to be the case, but I'm using Sublimetext and it seems to interpret A and a equivalently.
Thank you so much!
For the extra credit on the lab assignment due tomorrow, is it ok if we have an expression that highlights the beginning word of all sentences except the first one and just use "Natural" to highlight that one as well. I currently have both the expression and natural in a pipe. Is this ok or do I need to figure a way to not have the word Natural in my expression?
The error says "On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working tree clean"
If I try git push origin master I get an error:
"error: failed to push some refs to 'https://github.com/motazb/eeb-c177-homework.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details."
For the first question on the Darwin’s Theory text, I was able to highlight all the words starting with an s, but my command line is also highlighting the s after the apostrophe in the word “man’s” and I can’t understand why at all.
Here is my command line:
\bs\w*\b
Hi @ShawnTylerSchwartz ,
I went to add to my food log using the same process I have been doing but I am now getting an error message. The code along with my origin code is below. I realized my week-one directory is not under lab-assignments. My edits to the food log are saved in the terminal, it is just the commit part that is failing.
week-one$ git commit error: object file .git/objects/23/0b451271a47450014bb798d99942462108cdfe is empty error: object file .git/objects/23/0b451271a47450014bb798d99942462108cdfe is empty fatal: loose object 230b451271a47450014bb798d99942462108cdfe (stored in .git/objects/23/0b451271a47450014bb798d99942462108cdfe) is corrupt (base) eebc177student@eebc177student-VirtualBox:~/Developer/repos/robertrenyhwk/week-one$ git config --list --show-origin file:/home/eebc177student/.gitconfig user.name=robertreny file:/home/eebc177student/.gitconfig [email protected] file:/home/eebc177student/.gitconfig credential.helper=cache --timeout=3600 file:.git/config core.repositoryformatversion=0 file:.git/config core.filemode=true file:.git/config core.bare=false file:.git/config core.logallrefupdates=true file:.git/config remote.origin.url=https://github.com/robertreny/robertrenyhwk.git file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* (base) eebc177student@eebc177student-VirtualBox:~/Developer/repos/robertrenyhwk/week-one$
Hi!
I'm having trouble understanding what we're supposed to do for number 4...
I really don't understand how we'll find the most occurrences of each category after 1901
Can someone please guide me?
After running the command I get this error message:
error: object file .git/objects/44/92309858f0267fb9dd34d5847c903f083f722a is empty
error: object file .git/objects/44/92309858f0267fb9dd34d5847c903f083f722a is empty
fatal: loose object 4492309858f0267fb9dd34d5847c903f083f722a (stored in .git/objects/44/92309858f0267fb9dd34d5847c903f083f722a) is corrupt
Any idea what caused it & how to fix it?
I'm working through question 2a right now in lecture homework #8, but I can't think of any solutions to solve it. I assume I have to use a function to search each line of the Dalziel2016_data.csv file to find lines that match the year 1920, but I don't recall learning any. I have read about using regular expressions within Python in the textbook and online, but I can't find any help that I can understand and apply to this specific problem. Has anyone had any success with this problem? I can't move on to the rest of the homework because the problems are very similar to 2a (searching the file for key words).
If I try to use $3 to make the delimiter dynamic, I get an error saying "cut: the delimiter must be a single character."
Is there a different way to set the delimiter to be dynamic?
If we create a multilevel dictionary and want to want to add another key with its own distinct values, do we just use the append function with the name of the multilevel dictionary to add it to the list? Or is it that we just use the multi dictionary name then put ['Insert Key here']= 'value'? Thank you
When trying to solve this I get an error saying "can only concatenate str ( not "int") to str.
This is what I tried:
numbers = range(10)
for numbers in range(10):
print('Got ' + numbers)
For making the command more dynamic, has anyone else run into the issue where it works fine for the Pacifici file but not for the other ones?
I get a new file with the name I make up in the command, but that csv file does not get formatted in the way that the Pacifici info did.
Thanks for your time!
I keep trying to push my commits to github, but when I type in my user and password after "git push origin master" it says:
remote: Permission to StefanoAllesina/CSB.git denied to soniavsd (my user). fatal: unable to access 'https://github.com/StefanoAllesina/CSB.git/'
How to fix this?
Do spaces count as characters for the octopus's garden question?
I've got two questions:
1.) Is the homework for tomorrow just the "Working with Files and Directories" thing or do we also have to do the whole tutorial?
2.) I got a notification today about updating Virtualbox. Should we do that or should we stay with the version we downloaded at the start of the quarter?
Thanks in advance!
I'm having trouble downloading the book from the VPN. Can anyone help?
I did all the steps to push the eeb-c177-project new repository, but it says: remote: Not Found
fatal: repository 'https://github.com/soniavsd/' not found
whenever I git push -u origin master.
Ive already committed it for a timestamp, but I dont know how to fix this.
Do we have to consider the situations in which "y" is a vowel for this exercise?
I was wondering if you could possibly post the Jupyter Notebook for today's lab (2/10) as my computer ran out of battery during lab and I could not practice the code myself.
Thanks,
Steven
Hi Shawn,
I am trying to open my file in jupiter notebook and its giving me an error because not every row or column has the same number of values. How can I fix this?
Hi Shawn I'm having issues cloning the hwk repo in lab 1. I have /home/eebc177student/Developer/repos as my path. When I try to do git clone it asks me for username and password which I have tried to input but ultimately says that the repository is not found. I also tried to change the "username" term in //github.com/username/eeb-c177-homework.git to your username to no avail.
Hi all, I'm questioning my interpretation of the last question in our lab homework:
- How would you find the largest change in inflammation for each patient?
Is this asking for the largest difference between max and min across each row (i.e. largest overall change in inflammation per patient)?
Or is it looking for the largest sequential difference between adjacent values in each row (largest change in inflammation from one day to the next per patient)?
I finished the assignment but I was looking over the first question in part 2 and I noticed that if I do grep -c EX European_Red_List.csv I get an output of 67 but if I do grep -w EX European_Red_List.csv | wc -l I get an output of 29.
Shouldn't both those strings give the same output? What is the difference between those two strings?
So I am most of the way through this assignment, but I am stuck on the last problem. I am able to find the number of entries for each order or birds, and I could finish the assignment by using head and tail to extract the data from each order and find the number in each category that way, but I feel like there should be a more efficient way to do this. Can anyone offer some insight that might be helpful?
So I just tried to clone the CSB repository and it looked like it worked. I then tried "ls" when that was done and saw the eeb-c177-homework repository that is on my Github account and then another one called "csb." Does that mean I did this right? Also, should I be seeing this repository as one of mine on my Github account because I don't currently.
For chapter 8, they mention creating a dictionary using dict()
. They said it has some limitations such as the key cannot be name used for something else. Do the same limitations apply to defaultdict()
? Since defaultdict()
is less error prone for a key not having a value, is it better to have defaultdict()
in all cases?
Hello!
So I finished my text file with my solutions: I added a folder named 1-16-20 to my class-assignments folder and created the text file for tomorrow's assignment in there.
after, I cd'd al the way into this folder and did:
git add -A
git commit -m "added commands and explanations to text file"
git push origin master
It said done after I put my username and password and everything but when I check GitHub it's not there.
Wondering why this is happening.
Thank you in advance!
I'm having trouble finding a difference in the code I would be using for questions 1 and 4, and I assume two questions wouldn't require the same input. In question 1, the question asks to find the number of winners for each Nobel prize category which I think I completed successfully. Questions 4 asks to find the Nobel prizes that were awarded the most and least, but wouldn't that be the same code as question 1 (finding the number of each prize would tell me which one was awarded the most and least)? Or am I misunderstanding one of these questions?
Hi I try to add my homework #4 of the ExtractBodyM.sh script with my comments to my git and I keep getting this output. I looked online but can't figure out a way to fix it. Has anyone encountered this? Thank you!
"object file .git/objects/54/c4ca52b8e4175777b498fcbed5c2a68780abc5 is empty
error: object file .git/objects/54/c4ca52b8e4175777b498fcbed5c2a68780abc5 is empty
fatal: loose object 54c4ca52b8e4175777b498fcbed5c2a68780abc5 (stored in .git/objects/54/c4ca52b8e4175777b498fcbed5c2a68780abc5) is corrupt"
I am a little confused on what to do for question 5 on part 2. I understand it wants me to use a loop and the enumerate function, but I'm not sure what the output should be.
Should the output be the same as:
x = 5
coefs = [2, 4, 3]
y = coefs[0] * x0 + coefs[1] * x1 + coefs[2] * x**2
print(y)
which is 97
or does it want me to try each coef number and give an output for each of them?
Or something else?
Hi everyone!
I'm sure I am missing a step but I can't quite remember what to do. I opened the terminal after shutting it down and tried to enter a directory by entering cd Developer (the one we created in class). However, it keeps saying that No such file or directory exists. What step did I miss??
I am having trouble copying the first 25 lines from the Pacifici2013_data.csv file in the /Developer/repos/CSB/unix/data into the Pacifici-25lines.txt in my class-assignments/homework-two.
I have tried:
head -n 25 Pacifici2013_data.csv ~/Developer/repos/eeb-c177-homework/class-assignments/homework-two/Pacifici-25lines.txt
I have also tried
head 25 Pacifici2013_data.csv | cp ~/Developer/repos/eeb-c177-homework/class-assignments/homework-two/Pacifici-25lines.txt
Please tell me what I'm doing wrong
I am working on 2a and 2b and think that I wrote the code correctly to create an outfile. I used the following code and when I run the code, there are no errors but when I push to github, there are no new outfiles. Is anyone else having trouble with this?
for column in csv_file:
if word == column[2]:
print (column)
data2= column
for col in range (4):
output_file.write(data2[col] + ",")
output_file.write(data2[4] + "\n")
output_file.close()
Hi All,
I am having an issue pushing inside of the CSB repo. I removed and re-cloned the repo and still get the same message:
remote: Permission to CSB-book/CSB.git denied to robertreny.
fatal: unable to access 'https://github.com/CSB-book/CSB.git/': The requested URL returned error: 403
Hey y'all
I have not been able to clone the repository. In my many attempts I tried restarting ubuntu and not sure what happened, but I cannot get back to the desktop.
It now looks something like this.
I was wondering if
thanks!
For the 10 records we extract to Pacifici-ten.txt, are they just the family column or all the columns?
I'm trying to push the assignment from lab today and am getting this message:
error: object file .git/objects/89/(bunch of letters and numbers) is empty
error: object file .git/objects/89/(bunch of letters and numbers) is empty
fatal: loose object 89(followed by the bunch of letters and numbers) is corrupt
I am just trying to push a jupyter notebook file like always but it isn't letting me. I didn't do anything differently
I am having trouble running my python script from the command line. I have taken a function directly from my previous final project assignment and copied it into a text file in Atom, saving it as a .py file called project-analysis-script.py. I included all the required library imports (e.g. import pandas as pd) in the text file, and at the end of the script I have a line that runs the function with the desired input csv file I want to analyze.
visualize_occurrences_by_season('iNaturalist-birds-LARW.csv')
However, when I run $ python project-analysis-script.py
in the command line, I get an error that says my csv file could not be found. I tried two solutions: using the full file path in the .py file and copying the csv to the same directory as the python script. Neither have worked and return the same error. Any help would be appreciated, thanks!
I accidentally created a submodule (I think that my analyses was made into a submodule somehow) and do not understand how to work around this.
I've attempted to move all my files within analyses to developer.
Then deleted analyses directory and made a new one within the repository.
Even after moving all my files back into the new analyses directory, when I try to push to github, I get:
"fatal: in unpopulated submodule 'analyses'"
pls help
Is there any way in which I can post a markdown file for the homework on chapters 6-8?
I tried to copy the markdown text to the comment but it is very difficult to read the codes and solutions like that.
I could only push it but couldn't upload it here.
All -
Has anyone encountered this error during "git commit -m"? I tried committing my code and data last night/this morning (3GBs worth) and keep getting this error. After restarting, it says everything is up to date.
Is there a better way to commit large data sets?
J
I know we are not supposed to share data online, but, just so that I am 100% clear, is it some sort of breach of academic integrity to have help from non-classmate friends? The reason I ask is that I asked a minor question about today's assignment to a CS major friend of mine, so he saw my terminal briefly.
Sorry if this is a dumb question! I get very paranoid about making sure I'm not breaking rules.
I'm not sure what number 4 is asking. Is our regular expression supposed to include the phrase "struggle for existence" or are we supposed to put in a regular expression that matches that whole sentence?
Thank you!
Hello! I've been working on the stacking arrays portion of the homework, but I cannot get the correct answer. I have the line:
print("first and last column of A=", (A[1:-1]))
but it gives me the middle row (4,5,6)
what am I doing wrong?
I am trying to use the pipe command, but I keep getting an error saying that Permission is denied.
I have tried:
This is for Q1 at the end of Part 2 of Homework 2. Thank you in advance!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.