import os
import pandas as pd
= x.round(decimals = 12)
@@ -358,7 +358,7 @@ x Problems
'x.pkl', compression = None)
pd.DataFrame(x).to_pickle(print(f"{str(os.path.getsize('x.pkl')/1e6)} MB")
30.777135 MB
+30.778352 MB
16.000572 MB
From 399fd026f52b4b4086e4ac64682e86eaf7261276 Mon Sep 17 00:00:00 2001 From: joao <> Date: Fri, 6 Sep 2024 11:59:37 -0700 Subject: [PATCH] Built site for gh-pages --- .nojekyll | 2 +- howtos/submitPS.html | 13 - labs/lab0-setup.pdf | Bin 16253 -> 16248 bytes data.html => labs/lab1-submission.html | 149 +++- labs/lab1-submission.pdf | Bin 0 -> 36205 bytes ps/ps1.html | 4 +- ps/ps1.pdf | Bin 43352 -> 43278 bytes search.json | 1087 ++++++++++++------------ site_libs/bootstrap/bootstrap.min.css | 4 +- sitemap.xml | 86 +- units/test.html | 787 ----------------- units/test.pdf | Bin 52194 -> 0 bytes units/test3.pdf | Bin 14648 -> 0 bytes units/unit1-intro.pdf | Bin 53998 -> 53995 bytes units/unit2-dataTech.pdf | Bin 174820 -> 174829 bytes units/unit3-bash.pdf | Bin 69030 -> 69032 bytes units/unit4-goodPractices.pdf | Bin 110673 -> 110677 bytes 17 files changed, 733 insertions(+), 1399 deletions(-) rename data.html => labs/lab1-submission.html (62%) create mode 100644 labs/lab1-submission.pdf delete mode 100644 units/test.html delete mode 100644 units/test.pdf delete mode 100644 units/test3.pdf diff --git a/.nojekyll b/.nojekyll index 62581a1..862d634 100644 --- a/.nojekyll +++ b/.nojekyll @@ -1 +1 @@ -ee8a1eaf \ No newline at end of file +d6e4fb9b \ No newline at end of file diff --git a/howtos/submitPS.html b/howtos/submitPS.html index 5703bab..cc37ffe 100644 --- a/howtos/submitPS.html +++ b/howtos/submitPS.html @@ -334,19 +334,6 @@
Problem set solutions should be written in Quarto Markdown (.qmd) source files, interspersing explanatory text with Python (and in some cases bash) code chunks. Please do not use Jupyter notebook (.ipynb) files as your underlying source file for your solutions. In some cases we will ask that you put function definitions for more complicated functions into one or more Python code (.py) file(s) and show us the code in the appendix of your main solution file by using inspect.getsource()
.
We’ll use data from several real world situations in class.
-By now you should already have access to the following 5 basic tools:
+Today we will use all these tools together to submit a solution for Problem Set 0 (not a real problem set) to make sure you know how to submit solutions to upcoming (real) problem sets.
+Here is a selection of some basic reference tutorials and documentation for unix, bash and unix commands, git & GitHub, quarto, python and VS Code
+ +Discussion: - Why is git so damn complicated? - What do you need to remember when working with collaborators on the same repository?
+Refer to this guide and please ask questions if something is not clear.
+If we finish early, We will also take today’s lab as an opportunity to get familiar with the basic use of all the 5 basic tools listed above.
+For git and quarto, very basic knowledge should be sufficient for now, but for unix commands and python, the more you learn the more effective you will be at solving the problem sets (and at any computational task you take on after that). You will need to learn more advanced use of git and github towards the end of the semester when you start working with other team members on the same project.
+Like RMarkdown, quarto allows for several execution options to be set per document and per chunk. Spend some time getting familiar with the various options, and keep this link handy when you are working on the first few problem sets.
+Depending on what’s required in the problem sets, you may need to set eval to false (just print out code) or error to true (print errors and don’t halt rendering of the document). Some of the other options may be useful for controlling how the code gets printed.
Install tinytex via quarto install tinytex
If you are using the knitr engine, you should be able to tag your code chunks in quarto with {bash}
and use verbatim bash commands. If you are using the Jupyter engine, the {python}
tag should be used instead and every line containing a bash command should be prefixed with an exclamation mark (!).
You can go to the settings in your IDE and point it to the specific python installation that you find when you execute which python in the terminal.
+you can fix the quarto configuration by setting the environment variable QUARTO_PYTHON
to the correct python path or by running quarto check
. Restarting the IDE may also help if you had just installed something in the other environment.
zatA5cBpad^k_^AN-P@MfBw P6U=Mz~_w+G^*kdg=x#Q&)mbpy2nskpL^7tjD{pj$q;Spw_Apw;?R
z Generate a numpy array (named Explain the sizes of the two files created below. In discussing the CSV text file, how many characters do you expect to be in the file (i.e., you should be able to estimate this reasonably accurately from first principles without using L%v7vVC
z*z!h7O)5mPxxGd*O^hUpG^?LQ`cClN$%ufM_{{zJ;=CUywBMAm_K@wVL0x41QnGQs
z4Ywm-rG((6ZzQ{0oDd%ny2iPrRS2M;z&HcuVSRA>_yA)L5x`qCt~Xtvnjp*`aC~madKW7;Cgn-f7$y
zm9n4wJprrLMP_67Sbhj#EdbQ3WJ#e=t3?
K}(_6G
LHwaG4;bXqM3Byyvk0dTWProblems
x
) of random numbers from a standard normal distribution with 20 columns and as many rows as needed so that the data take up about 16 MB (megabytes) in size. As part of your answer, show the arithmetic (formatted using LaTeX math syntax) you did to determine the number of rows.wc
or any explicit program that counts characters). Hint: what do we know about numbers drawn from a standard normal distribution?import os
import pandas as pd
= x.round(decimals = 12)
@@ -358,7 +358,7 @@ x
Problems
'x.pkl', compression = None)
pd.DataFrame(x).to_pickle(print(f"{str(os.path.getsize('x.pkl')/1e6)} MB")30.777135 MB
+
30.778352 MB
16.000572 MB
xh#9pfDYj{s|jDCAeR52C1lZR&|p8_
zcBfdknc|>zN2-F90ct&w#X;H0S(w|))8W#cmeb?Mw5bEjZ;S6<6C8k`(1M%JF)<>)
z`L`TX<#~CZ9We3BN~L+XKjFA$-=fANZTFF|t?rAgLiVwJcxuM2o@eYw5PzKvf>|uA
z1Z#s)SrUdMH6Bq2DOe(OUdYjM>C~5Y92rZix+2esVENeG7m>4l$T$S$tawJwn7k}A
z3wx?;E_jJFAbju5tbhgJrMK$*$+$zw#dY1rvQvMkD|7q(gH1`2(pBrubb1zkc)zxp
zNG35$%K>;*{k%6{3<*A8?qh!gKeMozO&=VxuwK(sWK2i+snWL$M+V|r1`cmV_&YbG
zqcJ!b`-4{={quc`Od>%nD(x!@aJgvYSX(W_(tWN!m@bsUQxAbGCKsIfZhKF1M%x=!
z#y>Ugjes@&Hth994em&9l>htR>Rf_U8W;=asmW^e9t)yz3DiA%qW8-4V@u8;D9TQ`
z{bH~ZS~;Vh-kvZ@-815zdHZ7f3yY#y7TUoomFqwETlNLP3}JDkc9DVIcCWyCISp*m
z-ehTSX|tMO3@lJ=UnV%ncDTtb