Posts

    Day 940


    Day 935

    https://drive.google.com/drive/folders/1NkH5D0hJ7k7FAq_dhPtGFcOxLWI0C1Wk


    Day 930

    Notes about a presentation about privacy

    Basic outline: First academic, then the meat and examples - all interleaved with rl stories

    • Why you should care about privacy - academic part
    • Show an ad targeting screen screenshot
    • Why you should care about privacy - start by showing google’s saved history
    • Use Facebook’s screens and suggestions as guideline to show how/when can it go wrong
      • Mention that the screenshots I show are the companies operating within a legal framework that show all this
    • List of remaining potentially surprising things about supercookies etc
    • Basic ways to protect yourself
    • At the end, using happy music, leave running the list of permissions facebook asks for

    Why care about privacy - academic

    • First philosophical/academic discussion, “Nothing to hide”
    • Mention jews filling out religion forms back when it was just statistics
    • Changing laws and changing social atmosphere - the internet never forgets
    • Dark patterns that show how much companies care about the data
    • Trust - how much do you trust? How long? Conversation partners, server admins, workers of companies, now, in the future? 1

    Examples where it goes badly:

    • Target(?) knowing you are pregnant before you do
    • (And being unable to tell the internet when you stop)
    • Getting letters about illnesses you don’t have
    • The story about catholic priest and triangulation
    • Cambridge analytica and hypertargeted advertising
    • Insta/FB targeting teens who feel worthless

    Surprising examples:

    • Cross-device tracking via audio
      • Mention bad sdk
      • Mention apps from google play that ask for microphone permissions
      • Menion web browser extensions changing hands and how updating them is intransparent
    • Various supercookies
    • Getting list of sites visited via pixel color, using cache hits
    • Google using wifi to triangulate
    • Standard browser fingerprinting
    • You don’t turn location on, but upload geotagged pictures to FB - it cleans the pics, but retains the geotags
    • Unmasking bitcoin transactions

    Basic ways to protect yourself - possibly using the Iceberg meme, or using captchas as measure

    • Cookies
      • And chrome not deleting their own
      • And supercookies
    • Ad blocking, browser, especially third-party scripts
    • Network level / router
    • Mention TrackerControl for android and how it’s blocked by google play
    • Turn off all privacy settings in Android, Google, Linkedin, Facebook, …
      • Mention how Google intentionally made it hard with unclear settings
    • Mention how VPNs won’t help you much, but worse than expected if they are free
    • Mention captchas appearing when you start doing the above
    • Mention that clicking okay and then still removing all cookies doesn’t get rid of other tracking technologies

    General thoughts:

    • More about sharing potentially surprising information than having an agenda or convincing people or something
    • “Why you should care” as main thing.
    • Ask people to unlock their phones
    • Lawyers/medics have rules, but currently a lot of IT people deal with a lot of data without being bound by anything
    • Mention threat models
    • Once it’s gone a lot of things get harder - journalists can’t safely talk to their sources, becomes hard to write stuff the gov’t doesn’t like

    Random quotes:

    • “The best minds of my generation are thinking about how to make people click ads.” –Jeff Hammerbacher (one of the earlier Facebook employees)
    • “Privacy protects us from abuses by those in power, even if we’re doing nothing wrong at the time of surveillance.” (Schnneier) 2

    • The Why and How of Privacy and Security — This Too Shall Grow
      • My message is: the Internet never forgets, cultures change, and retroactive laws exist.

    • The Eternal Value of Privacy | WIRED
      • A lot of parallels of RL stuff when we seek privacy - bathroom, diaries, etc. “Ask them to unlock their phone”

    Day 924

    Pycharm/intellij debugging adding watchers

    You can add things like someObject.someFunction() and basically any python code there! And it starts getting evaluated immediately after adding, even without stepping through or anything similar! This will save me a lot of “Eval code” - whose last remaining purpose can then be .. is “exploratory debugging” a thing?

    Pycharm/intellij “Go back”

    There’s a “Go back” action, <C-A-Left> is the default mapping on my installation - does what it says on the box. Handy for going back after looking at the implementation of something etc etc etc. Can’t find it in the ideavim actionlist though :( Though found <C-O> to jump to the last edited line which is very handy too:

     * |CTRL-O|               {@link com.maddyhome.idea.vim.action.motion.mark.MotionJumpPreviousAction}
    

    Life keeps telling me to learn the tools I use daily, to read the entire help/manual etc - maybe one day I’ll learn to do this.

    Pycharm / intellij refactoring

    If you refactor a loop variable, such as for t in ..., if you choose to replace strings in comments, it might replace that letter outside tokens - the “t” in “won’t”, for example. (Not that clicking “Refactor” without looking at the suggestions is ever a good idea).


    Day 923

    Python imports paths handling

    Object-Detection-Metrics/_init_paths.py at master · rafaelpadilla/Object-Detection-Metrics doesn’t use a main function in the files it runs, but has this neat snippet to add the library to PATH. TODO - at which point does this file get run and using what mechanism?


    Day 920

    qutebrowser undo last closed tab OR WINDOW

    Add :undo –window by toofar · Pull Request #4807 · qutebrowser/qutebrowser adds this ability, mapped to U by default. Works for windows!

    qutebrowser reopen all tabs and windows on startup

    In general with autosave set, if I’m disciplined enough to close it with :quit or something mapped to it, it should reopen all of them.

    Object detection metrics blues

    So, again:

    • AP is Average Precision, basically area of the PR curve.
    • mAP is Mean Average Precision, so additionally averaged over classes and IoU thresholds depending on context (according to my reading of the COCO rules).

    Day 915

    Daily/weekly/… cron jobs

    Adding the files to /etc/cron.hourly/daily/weekly/… makes them executed at least once a X. Better than standard way for instances where the computer can be turned off during the planned time, and then it won’t execute - the way above makes sure it will.


    Day 913

    jq-like tool for CSV

    Miller (mlr) is a tool for doing stuff to csvs like jq is for jsqn: Quick examples — Miller 5.10.2 documentation


    Day 909

    Python formatted strings for fun and profit

    cocoapi/pycocoDemo.ipynb at master · cocodataset/cocoapi has a nice example of a use case that’s not printlns:

    dataDir='..'
    dataType='val2017'
    annFile='{}/annotations/instances_{}.json'.format(dataDir,dataType)
    

    Nested tqdm loops and pycharm

    Nothing was working, neither tqdm nor atpbar, till I used “emulate terminal” in the running config. As soon as I did all bars started working!

    Nested loops - for tqdm, nothing needed except just calling it twice. The inner loop, tqdm(iterator, leave=False) removes the 100% completed inner bar and restarts from 0, so only two bars are seen at the same time.

    atpbar (alphatwirl/atpbar: Progress bars for threading and multiprocessing tasks on terminal and Jupyter Notebook) is basically like tqdm. Can’t find an option similar to leave=True (though didn’t look), and output looks juuust a bit nicer than vanilla tqdm.


    Day 905

    Estimate internet connection speed from CLI

    Since speedtest-cli is dead, this is an option that works:

    curl -o /dev/null http://speedtest-blr1.digitalocean.com/100mb.test
    

    Run vim without any config

    vim -u NONE. vim -u filenaem reads only that filename as .vimrc, NONE is a key to not use anything.


    Day 899

    vim magic / nomagic / verymagic

    Finally decided to undertand this part: Vim documentation: pattern

    • \m is magic, \M is nomagic. \m/magic is the default.
    • \v is verymagic, \V is very nomagic
    Read more...

    Day 898

    linux pkill

    pkill aw- kills all processes whose name starts with aw-!

    Read more...

    Day 896

    Day 895

    timewarrior :fill

    :fill works not just for moving stuff, but also tracking!

    Read more...

    Day 892

    Intellij marking folders as roots

    A top-level folder can be excluded, but any of the folders inside it can be marked as something else and that will override the parent! Very sensible decision actually, when I think about it

    Read more...

    Day 889

    General DVC notes

    • Access:
      • Can directly get stuff from a repo when not inside a dvc project environment
        • Such as from within ML or code
        • Git repo has to be accessible ofc
      • DVC import - same as above, but also gets the metadata
        • Needs to be inside a DVC repo
          • Or have to do git init & dvc init first
      • Python bindings exist
    • Stages:
      • Nice and neat
      • parameters.yaml
      • See parametrization below for maybe easier ways to pass parameters
      • Otherwise you just have your script read parameters.yaml, and version parameters.yaml too
    Read more...

    Day 888

    Day 883

    Awesome Quantified Self

    What do I need?

    • Something self-hosted to:
    • … transparently and seamlessly track stuff, kinda like android Nomie in the good old days, but with web and android support
    • … easily send/receive stuff using an API for my own visualizations
    Read more...

    Day 882

    Docker mounting when developing, so as not to rebuild the image after each change

    You Don’t Need to Rebuild Your Development Docker Image on Every Code Change · vsupalov.com

    Read more...

    Day 881

    python glances

    Glances · PyPI is a htop-like monitoring thingy.




Subscribe