HICT Routine

  1. Jumping jacks Total body

    ArticleViewerPreview@2.00135124-201305000-00005.T3-5ArticleViewerPreview@2.00135124-201305000-00005.T3-5

  2. Wall sit Lower body

    ArticleViewerPreview@2.00135124-201305000-00005.T4-5ArticleViewerPreview@2.00135124-201305000-00005.T4-5

  3. Push-up Upper body

    ArticleViewerPreview@2.00135124-201305000-00005.T5-5ArticleViewerPreview@2.00135124-201305000-00005.T5-5

  4. Abdominal crunch Core

    ArticleViewerPreview@2.00135124-201305000-00005.T6-5ArticleViewerPreview@2.00135124-201305000-00005.T6-5

  5. Step-up onto chair Total body

    ArticleViewerPreview@2.00135124-201305000-00005.T7-5ArticleViewerPreview@2.00135124-201305000-00005.T7-5

  6. Squat Lower body

    ArticleViewerPreview@2.00135124-201305000-00005.T8-5ArticleViewerPreview@2.00135124-201305000-00005.T8-5

  7. Triceps dip on chair Upper body

    ArticleViewerPreview@2.00135124-201305000-00005.T9-5ArticleViewerPreview@2.00135124-201305000-00005.T9-5

  8. Plank Core

    ArticleViewerPreview@2.00135124-201305000-00005.T10-5ArticleViewerPreview@2.00135124-201305000-00005.T10-5

  9. High knees/running in place Total body

    ArticleViewerPreview@2.00135124-201305000-00005.T11-5ArticleViewerPreview@2.00135124-201305000-00005.T11-5

  10. Lunge Lower body

    ArticleViewerPreview@2.00135124-201305000-00005.T12-5ArticleViewerPreview@2.00135124-201305000-00005.T12-5

  11. Push-up and rotation Upper body

    ArticleViewerPreview@2.00135124-201305000-00005.T13-5ArticleViewerPreview@2.00135124-201305000-00005.T13-5

  12. Side plank Core

    ArticleViewerPreview@2.00135124-201305000-00005.T14-5ArticleViewerPreview@2.00135124-201305000-00005.T14-5


uid: 202006241209 tags: #workout

February 22, 2023

Wwdc Thoughts

  • Virtualization technologies (like running Linux and Docker) improvements are cool
  • Foundation TV show - exciting
  • Running iOS and iPadOS apps locally on the new Mac Silicon didn’t get as much attention as I thought it would
  • Not too impressed with the Mac OS changes - design changes didn’t stick with me, and they’re trying to make everything even more simple” and minimalist”, but if Apple breaks stuff or make things more inconvenient along the way I’m going to be super mad.
  • Really happy with iOS widgets, seems like that’s going to be an interesting feature.
  • It’s pretty stupid that they’re making this brand new app library thing because they realize that their current UI for sorting apps is fucking pathetic, instead of just fixing their UI. Lol.
  • They’re taking every opportunity to expand their Neural Engine - whether it’s for optimizing battery life, detecting when you’re washing your hands or dancing with Apple Watch, detecting when and how you’re sleeping, etc. I guess it’s the field with the most potential for innovation”.
  • I would probably care about the Messages changes if I talked to more people, but I don’t, so it’s not too relevant to me.
  • The AirPods feature where it automatically changes from your phone to iPad to Mac as you shift between devices is pretty cool, I’m kind of jealous of that.
  • The surround sound AirPods thing is the type of thing where Apple puts in a shit ton of development but people don’t even care about it. I really don’t see a world where that feature is even slightly relevant for most people.
  • I’m a fan of the changes where incoming calls / Siri don’t take up the whole screen. In general, better multitasking capabilities are good. Also a fan of the Picture in a Picture thing coming to iOS.
  • Take a shot for each time they called something incredibly fluid”
  • The CarPlay = car keys thing is pretty cool. But what are you going to do if you lose your phone, especially if it’s your phone + wallet + car keys? We need better ways of safekeeping phones, and better memory devices to make sure we don’t forget them somewhere.
  • I do want to set up the Apple Home stuff up someday 202006221506, but it’s not relevant to me currently.
  • Apple is exploiting the privacy angle so hard to build up Goodwill. It’s hard to disagree with the new App Store privacy awareness features being anything apart from strictly good though.
  • I’m a fan of App Clips. In general, seems like the introduced features are very practical-leaning, which is good.

uid: 202006221140 tags:

February 22, 2023

Removing files from .git folder that you thought you deleted

  1. git filter-branch --index-filter 'git rm -rf --cached --ignore-unmatch FOLDER_NAME' --prune-empty --tag-name-filter cat -- --all

```

  • The filter-branch command allows you to rewrite the Git history.
  • The –index-filer option is the filter for rewriting the index. Some people use the –tree-filter option, which rewrites the tree and its contents, but the –index-filter is faster because it does not check out the tree.
  • This option is used with git rm -rf –cached –ignore-unmatch for optimal results, which removes (rm) the file recursively and forcefully (-rf).
  • –cached is used to unstage and remove paths from the index.
  • –ignore-unmatch will prevent the command from failing if the file is absent from the tree of a commit.
  • –prune-empty allows the filter-branch command to ignore empty commits generated by the filters applied.
  • –tag-name-filter cat will update the relevant tags by rewriting them.
  • – simply separates the filter-branch options from the revision options and –all will rewrite ALL branches and tags
  1. git prune
  • This prunes all unreachable objects from the object database.
  1. rm -rf .git/refs/original/
  • This removes any old references to the unwanted folder/file.
  1. git reflog expire --expire=now --all
  • According to the documentation, reflog is the mechanism to record when the top of branches are updated so git reflog manges the information recorded. expire is used to prune older reflog entries and `–expire=now specifies how far behind these older entries should be, in this case, right now.
  1. git gc --prune=now
  • This command cleans up unnecessary files and optimises the local repository. –prune=now prunes objects older than the date specified, in this case, right now.

After all that, I cloned this into a new local repo using:

git clone --no-hardlinks file://PATH/TO/OLD-REPO NEW-REPO

This gave me a clean” repository, with the history rewritten to remove the target folder, but with all the other commits still intact.


uuid: 202006172328 tags: #programming

February 22, 2023

Volkswagen Scandal

Just watched the first episode of Dirty Money, which is what inspired this note.

Volkswagen:

  • Put defeat devices in clean diesel” cars, so that the cars would pass all lab tests, but would produce 40-80x the legal limit of pollutants (NOx) on the road.
  • Lied and cheated every step of the way about this, even when they were fessing” up — the head of Volkswagen in America and the CEO of Volkswagen in Germany both claimed that they knew nothing about what was going on, and that it was the fault of a couple of software engineers”. Bitch, why are you blaming your own greed and profiteering on software engineers? Not saying that the engineers weren’t complicit in all of this, but to claim that engineers just magically added this piece of code in without the corporate higher-ups knowing is laughable.
  • Made a mockery of the scientific process when they duped a research group in Albuquerque to run a study” for them showing that Volkswagen cars (newer technology) were indeed cleaner than old Ford cars (older technology). They manually overrode the engine controls for the test so that the Volkswagen cars would only produce test emissions, so the entire study was a sham anyways.
    • Not only that, they wanted to test this study” on real humans on exercise bikes, to see how they would react to the fumes from each car. They didn’t end up running the study on humans thankfully, but they did something nearly as bad — put monkeys in cages and piped in these noxious fumes, and then shoved tubes down their throat to see how affected their lungs were. What the fuck?
  • The German government was completely complicit in all of this — Mercedes, BMW, VW, were all getting off the hook, because they claimed that they had to do this stuff for the health and safety of the engine”.
  • European car manufacturers in general were seeking out the European countries with the loosest regulations - Luxembourg, Malta, etc - thinking that they wouldn’t mind the factories and influx of jobs, so they would turn a blind eye to the cheating that was going on.

uid: 202006162303 tags: #knowledge #history

February 22, 2023

Collections In Javascript

Objects

Objects are good for static information, something like this:

const colors = {
    red: '#d10202',
    green: '#19d836',
    blue: '#0e33d8'
}

Not good for dynamic information though. They’re useful if you’re not mutating a specific object — like if you’re building an object in a function and then passing it to another function.

Object.assign

const defaults = {
    author: '',
    title: '',
    year: 2017,
    rating: null,
};

const book = {
    author: 'Joe Morgan',
    title: 'Simplifying JavaScript',
};

function addBookDefaults(book, defaults) {
    return Object.assign(defaults, book);
}

The first object gets updated with the values of the following objects!

How to avoid mutating the first object? Start with an empty object!

const updated = Object.assign({}, defaults, book);

Object.assign doesn’t deep copy.

Object Spread Operator

const book = {
    title: 'Reasons and Persons',
    author: 'Derek Parfit',
};
const update = { ...book, year: 1984 };
console.log(update);

Output:

{ title: 'Reasons and Persons',
  author: 'Derek Parfit',
  year: 1984 }

This works really well! It’s also accepted as part of ECMAScript 2018, so it’s officially part of JS.

Object.entries

Object.entries works, like it does in Python! You can do something like this:

for (let [key, value] of Object.entries(object1)) {
  console.log(`${key}: ${value}`);
}

Map

Key lookups for objects are linear, but when maps are implemented natively, their lookup time can be logarithmic.

They also don’t automatically convert all key names into strings - they be properly used as HashMaps.

They also have a unified API for things like setting keys, deleting keys, and resetting the dictionary, versus doing these things with the default object notation looks something like this:

function addFilters(filters, key, value) {
    filters[key] = value;
}

function deleteFilters(filters, key) {
    delete filters[key];
}

function clearFilters(filters) {
    filters = {};
    return filters;
}

Which uses a bunch of different ideas and isn’t very clean or predictable.

Map Syntax

let filters = new Map();
filters.set('breed', 'labrador'); // key, value pair
filters.get('breed') // 'labrador'

Shortcuts for setting data

Method chaining:

let filters = new Map()
    .set('breed', 'labrador')
    .set('size', 'large')
    .set('color', 'chocolate');

Array syntax:

let filters = new Map(
    [
        ['breed', 'labrador'],
        ['size', 'large'],
        ['color', 'chocolate'],
    ]
)

Deletion:

filters.delete('color');

Clearing the map:

filters.clear()

MapIterator

Cool generator like thing for iterating over the keys of a map. Way better than using an array.

const filters = new Map()
    .set('color', 'black')
    .set('breed', 'labrador');

function checkFilters(filters) {
    for (const entry of filters) {
        console.log(entry);
    }
}

checkFilters(filters);

Result:

[ 'color', 'black' ]
[ 'breed', 'labrador' ]

Spread Notation in MapIterator

You can do something like this:

const filters = new Map()
    .set('color', 'black')
    .set('breed', 'labrador');
console.log([...filters]);

Output:

[ [ 'color', 'black' ], [ 'breed', 'labrador' ] ]

Returning an updated map (copy)

Spread notation to the rescue again!

function applyDefaults(map, defaults) {
    return new Map([...defaults, ...map]);
}

Spread notation is pretty awesome tbh.

Sets

Convert from a list to a set:

function getUniqueColors(dogs) {
   return [...dogs.reduce((colors, { color }) => colors.add(color), new Set())];
}

The { color } part is pretty interesting: if you have an object with multiple keys, if you want to specifically extract a certain key and then do some operations on it, you can do something like that.

Created from: Modern Javascript Course 202006070113


uid: 202006142245 tags: #programming #javascript

February 22, 2023

Manan-Akaash-Lucas 06-05-20

I’m going to keep working on the planning model for now

  • Try to investigate something more exotic than a vanilla LSTM
    • Don’t have a very clear idea of what that would be
    • Just look into time series prediction model
    • Propose a better model, and try it
    • LSTM w/Attention
      • Lucas started it, but doesn’t think that the evolutionary mechanism part of it was best.
      • Probably just to output an attention component
    • Fourier transform data
      • Never actually removed the preceding 10 datapoints, could be improved
  • Shifting towards models that are less data intensive - techniques that need less data 202006051627
  • Bayesian Optimization could be a cool thing to explore for hyper parameter training 202006051628
  • Bayesian optimization could be a good framework for neural networks as well
    • Propagate uncertainty through the net, get a good spread for points that you’re not really sure about
  • Auto ML stuff 202006051630
    • Tries different instances of models for prediction problems that we’re using, and different hyperparameter for those instances
  • Take the next week to explore 2-3 of the things that we just spoke about, can measure by comparing RMSE, plots, etc.
    • Then continue it, delve into it.
    • At the end of the week, doesn’t seem like it’s going anywhere, then I can switch to something
  • We want to have uniformity in all the planning models that we are testing, to make sure they are uniformly comparable
  • Stay away from: feeding in information from other points, so that we have a shrinking effect
  • Make sure that the points vector that’s being explicitly fed in to the model (points vector at time t), is the only points vector that’s being fed in, not points vectors corresponding to different time predictors
  • Look into approaches for the baseline energy calculation, so we can easily separate the energy from before the experiment starts, and during the experiment, and how we can structure our planning model to decompose the impact of the points on the baseline energy effectively.

uid: 202006051619 tags: #raise #meetings

February 22, 2023