Category Archives: Uncategorized

“Fun” with Git: How to ignore locally deleted files (in git status) if you’re running out of hard drive space

Oh god I wasted hours on this probably

I have a huge 3 GB git repository that the class I am grading for, uses to track all the student submissions and our grading. My hard drive is constantly teetering below 1 GB of free space so I started having git pull’s fail due to lack of hard drive space (and it’s a PAIN to recover from that issue when half the files are around and half aren’t).

I naturally tried removing the files locally. This does work if I am religious about only using git add -u . in the specific folder (HW0/my_name) that I was working in.

However I rely in constantly looking at git status and it was totally unusable since it would just have 100s of lines of “deleted: “.

After trying out various combinations of .gitignore, git update-index --skip-worktree, git update-index --assume-unchanged -- graders/HW5/ etc., sparse-checkout, .git/info/exclude, etc. The solution is just a single line (but one that may have to be run repeatedly):

rm -rf HW1 HW2 HW3
git ls-files --deleted -z | git update-index --assume-unchanged -z --stdin

This ignores ALL files listed as “deleted” under “git status” prior to running the above line.

Hurray!

Thanks to: https://stackoverflow.com/questions/4589333/git-ignore-locally-deleted-folder

Side note: I bought myself a 2 TB SSD and hopefully that should alleviate some of this, eventually, when I get around to all of the time consuming exporting files from the existing hard drive etc. Hopefully it goes smoothly, wish me luck!

Pandemic Diary #29 – 22 Nov 2020 – Senate, health, fall leaves, cdrama

Scattered thoughts –

A few days got the first flier for voting absentee, and the texts are starting to ramp up as well.

Also got first text about getting tested for Thanksgiving – first piece of advertising I’ve gotten about the pandemic, EVER. And saw finally a communications toolkit. https://www.covidtestingtoolkit.org/about/why-this-toolkit/

Just the amount of advertising and money for the politics was sickening compared to amount of time spent on this deadly disease.

This was also something we dreamed about at the beginning of the pandemic. Cool to see we’ve figured out so much more about the virus that we can make more precise estimates about danger of enclosed space vs touching things. microcovid.org

Went and saw the fall leaves the last two weekends. Once to bell gardens, once on a 10 hr drive around the natalanha scenic highway area.

Understanding campaign jobs:

  • https://fairfight.com/wp-content/uploads/2019/09/TheAbramsPlaybook.pdf
    “In 2017 and 2018, Abrams ran for governor and diverted from the normal Southern Democrat strategy of centering a campaign on winning as many white swing voters as possible. Abrams did try to win white swing voters, but also invested heavily in boosting turnout among voters of all races in the Atlanta area and among Black people in particular in the state’s more rural areas”
  • https://www.bluebonnetdata.org/post/persuasion-vs-gotv-a-key-to-campaign-strategy
  • https://www.bluebonnetdata.org/post/so-you-want-to-work-in-political-data

I wanted to hold high school registration drive. But losing energy to do so. Also wanted to make a QR app for canvassing so people can literally sign up on the spot. I think people know they should vote but may not have plan yet. What if there was a voter drive at high school? A democracy club? Voting was definitely a huge learning curve, not just show up and circle something. But somehow we have so many elections a year, and you have to fill out this form, and there’s actually like 20 positions up for voting, where to find information about this stuff, the websites for checking status, etc.

Spent last two weekends seeing the fall colors, last weekend fixed upstairs shower. This weekend did yard chores, pine straw.

CDrama – recently just finished third drama of the pandemic. I guess I am becoming something of a cdrama person. Have I actually watched a complete drama before this year? I don’t think so actually. Watching: Joy of Life (impressed at tight plot, excited for 2nd season, ended on cliff hanger), Oh My General (gender bender, general is the lady and a lot of strong female leads), the Untamed (basically no strong female leads, story is pretty uneven and a little nonsensical TBH, but the lead characters are memorable). Then I got sucked in since there’s a giant fandom, so there’s behind the scenes, and then you get to see just HOW MUCH WORK goes into filming a drama that I kind of knew but had no idea the scale (kind of passed over it since there’s just SO MANY palace dramas). It just has an unending amount of extra content lol. Pretty shocking at first / totally unrecognizable out of costume. But yea, cool to see the cable system used for all the flying stunts etc. Even if the story made little sense. EDIT: right what I wanted to write down is, it feels like the writer had a few cool scenes in mind, and cool character interactions in like a fanfic sort of characters, and kind filled in the rest rather haphazardly to get to specific moments in time. So characters seem suddenly all powerful and can’t be taken down, until suddenly they are, why wouldn’t they just be destroyed in the first episode, why are the elders so easy to kill, etc. Yea… Suspension of disbelief is one thing, but this kind of thing where the suspense and tension is caused by clans fighting, the power/magic structure is actually important. Joy of Life plot was way tighter… And in general, cdrama esp. these historical dramas have pretty disappointing female leads sigh.

The “excuse” for these dramas is to learn Chinese. I think my Chinese is improving a bit, some days I’ll use more Chinese terms for things I’d use English for before. But definitely not nearly as much if I had spent 150 hours hard core studying / spaced repetition etc. learning Chinese, I think. IDK.

IRL I have a TON of work on my plate. I don’t know how I spend so much time grading, it really sucks. Read two terry pratchett books. Putzgiving is happening over zoom? Need to finish ISER revision, contract work site redesign, ACTUALLY DO RESEARCH on both the scraping and labeling fronts, figure out where I will be in February? I’m so upset that the pandemic just keeps getting worse and people care less and less. I want to make a website just showing daily life returning to normal for countries that locked down early and hard.

Still slowly working on Russian, but poorly. Still can’t have a 2 sentence conversation…

Still want to set up lasercutter and do some actual hardware projects. Maybe next weekend…

Pandemic Diary #28 – 13 Nov 2020 – Yes!!

It was a squeaker at first, but Biden won GA by at first 1k votes for a while… then slowly trickled in and up to 14k lead. (0.3)

Pretty funny watching the national folks saying “oh, Biden would have to hit 64% of remaining ballots, tough” and I’m like uh it’s absentee ballots in Dem districts, going to be 70-80%.

On Wed. night I bet it’d be Biden flipping GA and up by 6k. Pleasantly surprised!

Okay, but it’s dumb that SoS GA is ordering a manual recount which will be paid for BY THE COUNTIES instead of the trump campaign.

It’s really repugnant and alarming watching these people (e.g. Senators who called for their own person, SoS, to resign) care so much about their power and careers over just basic decency and fighting against autocracy and lies. Depressing.

That first day after, and the headlines were all about Biden’s new team forming etc. What a relief!!

Then after that started hearing about Trump Trump Trump again, but it was such a beautiful relieving moment.

Of course we are off to the GA Senate runoffs… I don’t have much hope, but going to put in as much as I can.

Goals for the next few years: Do that living abroad for 2 years thing, take some language classes (French, Arabic, and Russian) beforehand, sail down ICW and across the ocean.

I’m stressed to be making little progress in research. But in the end it is my own life, and I am only stressed because other people around me are stressed. If I look inside I’m totally happy to be taking this semester a little easy, and I have pretty good confidence that I will get these two papers published and graduate within the next year and a half or so, including a summer internship. I’ll find contract work if I can’t find funding. And hopefully still get to take those classes I always wanted to… sigh. I guess the goal is to pass quals… then enroll in all the classes ever, while TAing two sections…

I’ve sort of lost enthusiasm about Russian as I hit the parts where it’s clear I should be learning the grammar / conjugations. And still can’t even just have a 3 sentence conversation. So losing motiviation… feel like I need to take a class somehow. Do homework.

The virus is just out of control in the US. Depressing. 100k+ new cases a day a week ago… now we’re at 160k+ new cases. It’s crazy. Yet still barely see it on the news. Or the comparisons to Australia / how well things *could* be.

The wave in Europe is kind of shocking to me. But I guess there must be two cohorts at play: individual responsibility and government responsibility. And like a forest fire, a small spark can grow rapidly out of control…

I really want to go back to my own life soon, but with the way cases are going… vs January… the peak in April looked so scary at the time – exponential growth – but the growth right now is insane compared to that, just a sheer straight line up. Why is news about the stock market mixed into the coronavirus section of washingtonpost. It’s easy I guess to cover businesses and harder to cover the impact on individuals? Not sure what’s going on there.

I scraped a bunch of poll waiting time data. I ought to do EDA on that.