1,369 Matching Annotations
  1. Last 7 days
    1. Your weekly reminder that1. You should not have your development process on a centralized platform, at least not if you're doing anything that smells of copyright issues2. If you do host on a centralized platform, have regular, decentralized backups of code and issue tracking.3. Also, avoid US-centric hosting for this kind of thing. But really, refer to 1.

      3 things to keep in mind while hosting your code

    1. Junior school is great because you don’t learn to find a job. You’re at school to grow as a citizen, not to prepare to your future life, and actually you’re better not to think about your future if you don’t want to question yourself about the meaning of your existence. This is the same thing for side projects. See them as a way to discover a new topic and enlarge your horizon, not as something that you could action in your current position or to find a new job.

      Comparing school to side projects

    2. Even from a purely technical point of view, you will not really understand a library or a framework by just sticking to the tutorial or its basic features. You’ll have to dig into and to face its most painful aspects to deeply understand it.

      Way to deeply learn technologies

    3. Today, I recommend not hiding your side projects, but to not displaying them as a primary part of your identity, to not scare the recruiter and let him feel that you have a secondary plan.

      Why not to talk too much about your personal projects

    4. You can generally assume that a developer coming from a cutting-edge company has better chances to be a great developer than a developer coming from a Java 1.4 shop. He may not be smarter, but he has been hired by a company with a most demanding hiring process, and has been surrounded by some of the smartest developers.
    5. First, most recruiters don’t care about your personal projects or how many meetups you went during the year. What matters the most is your current company - and by that I mean the name of your current company.

      True in most cases

  2. Oct 2020
    1. suite of over 30 separate packages of React visualization primitives that fall into several categories (Figure 2). It is un-opinionated on state management, animation, and styling so it can integrate with any React codebase, and its emphasis on modularity (similar to D3) lets you keep your bundle sizes down by only using the packages you need to create your reusable chart library or a custom one-off chart.

      Short definition of visx

    2. In our research (Figure 1), we found that existing React visualization libraries are often high-level abstractions and optimized for ease of use (i.e., fewer lines of code) at the expense of expressivity. None offer the expressivity of D3 primitives and many don’t allow for the optimization we want in production because computation, animations, state management, styles, and rendering are all encapsulated.

      Comparison of data visualisation libraries:

    3. because D3 and React both want to own DOM manipulation, we’ve found that it’s best to only use D3 for the math and React for the DOM because two mental models for updating the DOM opens the door for bugs to sneak in. However, using D3 solely for math means a significant amount of its (DOM-based) functionality is not available for use: selection.join, zoom, drag, brush, and transitions. Additionally, as mentioned above, D3 has its own learning curve and we would like developers to feel like they are writing native React code with standard APIs and familiar patterns.

      You can use D3 inside a React app, but...

    4. Leveraging React and its ecosystem would provide learnability and performance, and a low-level, modular API would deliver expressivity.

      Thanks to React, visx achieved all: learnability, performance and expressivity

    5. After 3 years of development, 2.5 years of production use at Airbnb, and a rewrite in TypeScript we are excited to announce the official 1.0 release of visx (formerly vx). You can find the project on GitHub and browse documentation and examples on airbnb.io.

      visx - collection of reusable low-level visualization components. visx combines the power of d3 to generate your visualization with the benefits of react for updating the DOM


    1. Using The clamp() CSS function we can create a responsive website with only one property



      h1 {
        font-size: clamp(16px, 5vw, 34px);
      • (minimum value, flexible value and maximum value)
    1. Counterintuitively, people love reading about and engaging in what they consider "stupidity".Internet companies capitalize on this by bringing an optimized stream of stupidity for your viewing pleasure. Take a look at the front page of Reddit (logged out, default subs): Half of the content highlights stupidity of others: /r/IdiotsInCars shows the worst drivers from around the world, /r/insanepeoplefacebook shows the most bizarre clips from social media, /r/choosingbeggars highlights the dumbest negotiation attempts, /r/trashy and /r/iamatotalpieceofshit are selected stories of bad behavior, /r/whatcouldgowrong and /r/instantkarma are videos of people making bad decisions and suffering the consequences, /r/publicfreakout is videos of people fighting. Contributors hunt for the most egregious examples to post to Reddit in the hopes of getting upvotes.Twitter isn't much better: Topics spread on Twitter when they promote outrage or allow the reader to feel smugly superior to someone.If you spend your days online consuming this content day in and day out, you're going to become convinced that the world is "stupid" and getting stupider. In reality, you're simply tapping into stupidity concentrators, getting bite-sized views of stupidity so you can react in astonishment and feel superior to stupid people doing stupid things.I think COVID quarantine has worsened this, as people are getting even more of their worldview through social media feeds instead of actually interacting with people in the real world. If 90% of your insight into social interactions comes from clickbait social media sites selecting the most egregious stories and videos from around the world, of course you're going to think "stupidity is expanding". In reality, it's a sign that you need to revaluate your sources of information and move to platforms and networks where people are talking about something other than other people's stupidity.

      Worth point to consider when you think that there are more and more stupid people. tldr; you might spend too much time on the internet

    1. The total complexity of a system is a constant. If you make a user’s interaction with a system simpler, the complexity behind the scenes increases.

      Why life can't be simpler? (HN)

    1. I see this all around me. People are fixated on careers, hobbies (FOMO), spread thin by family obligations and errands. The truth is, happiness does not derive from these things. This "busyness" is an invention. Life is simple, and happiness actually derives from having cats.

      Why life can't be simpler? :D

    1. Daydreaming at Work Can Fuel Creativity

      Summary of the article:

      • We spend nearly half of each day daydreaming, and usually think that it’s a bad thing, but it turns out that highly demanding tasks make us daydream more.
      • It allows us to turn off our surroundings, and can be a way of imagining solutions to the problem at hand.
      • To find this out, researchers did two studies of employees and managers in South America, including mainly surveys about daydreaming.
      • Daydreaming turned out to happen more when the tasks required a lot of focus - it can boost creative problem-solving as long as we’re personally invested in our work.
      • However, for people who don’t identify with their work, daydreaming was linked to worse performance.
    1. Sprawdźmy który rodzaj modelu daje najlepszą skuteczność: Python sns.boxplot(data=models_df, x='score', y='model') 1 sns.boxplot(data=models_df, x='score', y='model')

      After comparing the pipelined ML models, we can easily display a comparison boxplot.

      Well working ML models: 1) XGBoost 2) LightGBM 3) CatBoost.

    2. Przy tych danych wygląda, że właściwie nie ma większej różnicy (nie bijemy się tutaj o 0.01 punktu procentowego poprawy accuracy modelu). Może więc czas treningu jest istotny? Python sns.boxplot(data=models_df, x='time_elapsed', y='model') 1 sns.boxplot(data=models_df, x='time_elapsed', y='model')

      Training time of some popular ML models. After considering the performance, it's worth using XGBoost and LightGBM.

    3. Teraz w zagnieżdżonych pętlach możemy sprawdzić każdy z każdym podmieniając klasyfikatory i transformatory (cała pętla trochę się kręci):

      Example (below) of when creating pipelines with scikit-learn makes sense. Basically, it's convenient to use it while comparing multiple models in a loop

    1. First, you'll need to clone your own copy of the template Google Sheet by clicking here, then pressing Use Template in the top right. This will add the sample spreadsheet to your personal Google account. Once you've done that, click here to open the starter app in Autocode. Poke around the source code if you'd like, then install the app to your Autocode account by pressing the green button. When prompted to link a Google Sheet, follow the instructions in the flow to link your Google account, then select the spreadsheet you just cloned.

      Solution (Autocode) to the scalability limits of Google Sheets

    2. Queries became impractically slow around the 500,000 cell mark, but were still below 2 seconds for a 100,000 cell query. Therefore, if you anticipate a dataset larger than a few hundred thousand cells, it would probably be smart to choose a more scalable option.

      Scalability of Google Sheets. They have a hard limit of 5,000,000 cells (including blank ones)

    1. What the question does is that it creates a powerful anchoring effect. A candidate who gives this information away will typically ask for only a bit more than what she is currently getting. The human resources dude will then have a big internal smile: the candidate's expected salary is below the range that was decided for that position. He will then happily give the candidate 3.000 dollars more than what the candidate asks for.

      Why it's not worth answering "what's your current salary" question

    1. Fractal learning is ultimately about balance and flexibility. It's about: keeping the big picture in your mind even when digging into the details, whilst simultaneously paying close attention to the details even when you are just skimming choosing the appropriate level of abstraction for what you're trying to do, whilst simultaneously zooming in and out of different levels of abstraction.

      Further explanation of fractal learning

    2. When you are new to a field and trying to get an overall sense of how the field works, it might be a waste of time to fall down any rabbit holes as you don't have the experience to know which lines of questioning are relevant. So a breadth-centric approach might serve you well. In this case, you should form appropriate abstractions for the concepts you are encountering so that you can dig deeper into them later if you need.

      When you're new to a field, it's better to use the BFS (Breadth-First Search) learning

    3. Fractal learning is essentially a strategy used to make sense of complex systems without getting too lost in the details. It's about being in that Goldilocks zone of not wasting your time learning too much (you have other things to do) while at the same time getting an overall understanding of how things fit together.

      Fractal learning

    1. use code to parameterize calls:

      You can write Python code to parametrize calls:

      python -c "
      from mymodule import set_dragon_feeding_schedule, Creatures, Date
          feeding_times=['10:00', '14:00', '18:00'],
          dishes={Creatures.Tiger: 2, Creatures.Human: 1},

      instead of:

      python -m mymodule \
          set_dragon_feeding_schedule \
          --feeding-times ['10:00','14:00','18:00'] # hopefully this way it gets recognized \
          # how will you define parsing a dict with enum to integer mapping? 
          --dishes=Creatures.Tiger:2 \
          --dishes=Creatures.Human:1 \
          --start-day=1020-03-21 # BTW bash allows no comments in multiline calls
    2. That’s it. Types are parsed, checked and converted. Defaults and description are picked from function itself. Even provides bash completions you can install. You wrote no code for that!

      Good example of writing CLI interfaces in Python with typer:

      import typer
      from pathlib import Path
      app = typer.Typer()
      def find_dragon(name: str, path: Path, min_age_years: int = 200):
          <implementation goes here>
      def feed_dragon(dragon_name: str, n_humans: int = 3):
          <implementation goes here>
      if __name__ == "__main__":

      later we can call it that way:

      python example.py find_dragon 'Drake' --path /on/my/planet
    1. NestedText is a file format for holding data that is to be entered, edited, or viewed by people. It allows data to be organized into a nested collection of dictionaries, lists, and strings. In this way it is similar to JSON, YAML and TOML, but without the complexity and risk of YAML and without the syntactic clutter of JSON and TOML.

      NestedText - new format similar to JSON, YAML and TOML

    1. Merge (|) and update (|=) operators have been added to the built-in dict class. Those complement the existing dict.update and {**d1, **d2} methods of merging dictionaries.

      From Python 3.9 it's much more convenient to:

      • merge dictionaries with the | (pipe) operator, e.g. x | y
      • update them with |=
    1. Playing video games as a child can improve working memory years later
      • Studies have shown that playing video games can lead to brain structure changes, but new study shows changes can happen even years after people stop playing.
      • The study lasted a month, and involved 27 people between 18 and 40 years old, with and without experience in gaming.
      • Those who played a lot before becoming adults performed better with working memory tasks, which require you to mentally hold and manipulate information.
      • They also did better at processing 3D objects, but after a period of video game training, non-gamers were able to catch up in this area.
      • Video games are great to strengthen mental skills, however these improvements have limited effect on activities not linked to gaming
    1. Use Streamlit if you want to get going as quickly possible and don’t have strong opinions or many custom requirements.Use Dash if you need something more flexible and mature, and you don’t mind spending the extra engineering time.

      Streamlit vs Dash

    2. Here’s a table showing the tradeoffs:

      Comparison of dashboard tech stack as of 10/2020:

    1. Tabular Comparison Between All Deployment Methods:

      Tabular comparison of 4 deployment options:

      1. Travis-CI/Circle-CI
      2. Cloud + Jenkins
      3. Bitbucket Pipelines/Github Actions
      4. Automated Cloud Platforms
    1. Today we begin the Early Access Program for Code With Me, a tool for remote collaborative development and pair programming that you have long been waiting for.

      Code With Me - new feature from JetBrains for collaborative programming. Unfortunately, soon it won't be free.

      >GIF explaining its work<

  3. Sep 2020
    1. "Dorks" are search lines that utilize the search engine different features, with targeted search strings to pinpoint results. Here's a fun list of Google searches from the exploit DB.

      Database of Google's Dorks: Google Hacking Database

    2. The internet archive, also known as the "Wayback Machine" holds periodic scans of websites all over the internet for years and years back. This is a mining field for hackers with a target. With tools like waybackcurls (based on waybackcurls.py) one can scan any target of old files. This means that even if you've found and removed a key but did not rotate it, a hacker might still find it in an old version of your website and use it against you.

      Hackers do use Wayback machine to find specific security flaws on your website

    3. Enforce MFA everywhere - Google, GitHub, Cloud providers, VPNs, anywhere possible. If it's not optional, reconsider the system in use Rotate keys and passwords constantly, employ and enforce rotation policies Scan your code regularly. Preferably as part of the release process Delegate login profiles and access management to one central system where you control and monitor

      20% actions for 80% of effect to protect your API keys/passwords/SSH encrypted keys/certificates

    1. Spending more time looking for a solution rather than thinking about it.

      Stack Overflow Antipattern:

      1. Encounter a problem you can’t immediately solve
      2. Google the problem
      3. Find a seemingly-satisfying solution (usually on Stack Overflow)
      4. Copy-paste the solution and test it out
      5. If it works, move on; otherwise, go back to step 2.
    1. DuckDB is an embeddable SQL OLAP database management system

      Database not requiring a server like SQLite and offering advantages of PostgreSQL

    1. The <output> tag represents the result of a calculation. Typically this element defines a region that will be used to display text output from some calculation.

      How <output> tag can be used in HTML5

    1. The best data scientists are just people who try to understand the ins and outs of business processes and look at problems with healthy suspicion and curiosity. The ability to explain the nuances of manifolds in SVMs is not something that comes into it outside these contrived interviews. I prefer to ask candidates how they would approach solving a problem I’m facing at that moment rather than these cookie cutter tests which are easy to game and tell me nothing

      Interesting approach from an experienced data scientist to interview new professionals

    1. What do you think the most important things we should be doing over the next year? What will get in the way of us doing that? What’s going well, i.e. what should we make sure we don’t change? Is there anything you think I should know about?

      Good questions to ask as a new PM

    1. Face To Face with MIKE SHINODA


      Mike Shinoda discussing the idea from Stephen King's book "On Writing":

      "You should write every day, even if it's torturous, even if you hate it, you sit down and say: "this is not what I wanna be doing, I'm not in the mood, I've got too many things going on". But you should do it anyway, cause it keeps your creative muscles strong, and eventually, even on the bad day, you can come up with something that's remarkable and surprising that you can use later."

    1. Tribuo is a machine learning library in Java that provides multi-class classification, regression, clustering, anomaly detection and multi-label classification.

      Tribuo - Java ML library from Oracle

    1. ‘Viking’ was a job description, not a matter of heredity, massive ancient DNA study shows
      • By looking closely at viking-related archeological sites, researchers uncovered that non-Scandinavian people joined the vikings as they raided Europe.
      • 442 Viking Age genomes were sequenced, showing that Vikings were more likely to have black hair, and that being a Viking was a job, not a genetic inheritance.
      • Additionally, the routes of Swedish, Danish and Norwegian Vikings were traced using DNA data, uncovering new details about where they traveled.
      • Swedes moved to the Baltics, Poland, then Russia and Ukraine; Danes headed towards England; Norwegians sailed to Ireland, Iceland and Greenland.
    1. Increase in alcohol-industry funded research is a cause for concern, study suggests
      • Since 2009, alcohol companies have been funding increasingly more research - evidenced by almost 13,500 studies funded by the alcohol industry.
      • There are many legitimate fields for research, however there’s a group of these studies that claim health benefits of alcohol, or that substance abuse is a choice.
      • Another problem is that the alcohol industry funds this research through affiliate organisations, and the funding source is often not shown in those papers.
      • Researchers believe that the alcohol industry is too deeply involved, and certain studies should be conducted by independent academics.
    1. Ten minutes of massage or rest will help your body fight stress
      • Short-term treatments like a massage, or just resting for a bit, reduce stress by boosting the parasympathetic nervous system (PNS).
      • Relaxation therapies show promise as a way to treat stress, but so far scientists haven’t developed a standardised method to test them - until now.
      • This study is the first standardised approach, and the results show that both rest and a massage increase heart rate variability (HRV) - higher HRV = greater relaxation.
      • Researchers say this shows we don’t need professional treatment in order to relax, even a 10-minute rest can boost our PNS and calm us down.
      • These conclusions will enable further experiments to study how different relaxation methods can help people with stress-related conditions like depression
    1. With your passport number, someone could: Book an international flight as youFootnote 2626. Apply for anything that requires proof of identity documentation with the government, e.g. Working with children check Activate a SIM card (and so get an internet connection that’s traceable to you, not them, hiding them from the government) Create a fake physical passport from a template, with the correct passport number (which they then use to cross a border, open a bank account, or anything) who knows what else, not me, bc i have never done a crime

      What can be done with out passport number

    2. I’d now found Tony Abbott’s: Passport details Phone number Weird Qantas staff comments.

      What information can be found on the "Manage Booking" page inside the website code

    1. 3.5 PEP 478 security 2015-09-13 2020-09-13 Larry Hastings

      All Python versions less than 3.6 are now EOL

    1. To be reliably able to focus on something, you need to be intuitively, emotionally invested in the outcome.

      Without emotions, you might not get the right focus level on the problem

    2. The output of knowledge workers is extremely skewed based on focus. The productivity tiers seem to be:<10% focused on the job at hand: meaningful risk of getting fired.10-50% focus: “meets expectations,” gets regular raises.50%+ focus: superstar, 10x engineer, destined for greatness.

      3 focus levels in a career

    1. What you actually need from an ML/Data Science person:- Experience with data cleaning (this is most of the gig)- A solid understanding of linear and logistic regression, along with cross-validation- Some reasonable coding skills (in both R and Python, with a side of SQL).

      Basic skills to seek for in Data Scientists

    2. deep learning is good in some scenarios and not in others, so anyone who's just a deep learning developer is not going to be useful to most companies.
    3. Having worked with researchy vs more product/business driven teams, I found that the best results came when a researchy person took the time to understand the product domain, but many of them believe they're too good for business (in which case you should head back to academia).

      Problem of PhD profiles in business

    4. Imagine what it must be like for the senior leadership of an established company to actually become data-driven. All of a sudden the leadership is going to consent to having all of their strategic and tactical decision-making be questioned by a bunch of relatively new hires from way down the org chart, whose entire basis for questioning all that expertise and business acumen is that they know how to fiddle around with numbers in some program called R? And all the while, they're constantly whining that this same data is junk and unreliable and we need to upend a whole bunch of IT systems just so they can rock the boat even harder? Pffft.

      Reality of becoming a data-driven company

    5. but companies will discover that ML is (for the vast majority) a shiny object with no discernible ROI. Like Big Data, I think we'll see a few companies execute well and actually get some value, while most will just jump to the next shiny thing in a year or two.

      As long as ROI isn't clearly visible in ML, as long it might not bring more ML positions

    1. I think a lot of educational Youtube channels aren't that great in actually teaching you anything. What they are great at is sparking the interest and planting the seed for your own work. At least my experience is that actually doing things is how I learn them. Youtube can be a great springboard for that.

      Well said

    1. "We find essentially no evidence for climate-driven extinctions during the past 126,000 years Instead, we find that human impact explains 96% of all mammal extinctions during that time"
      • In a new study, researchers found no evidence of climate-driven extinctions in the past 126,000 years—human impact explains 96% of mammal extinctions.
      • The conclusion comes from analysing a data set of fossils from 351 mammal species that have gone extinct.
      • Extinctions happened in bursts that correlated to the time when humans first reached new areas, and recently human-driven extinctions have sped up on a global scale.
      • If current trends in human behaviour and biodiversity loss continue, we might reach a level of extinction 30,000 times larger than natural by the year 2100.
      • To prevent this, we need targeted and efficient conservation strategies, but first people need to become aware of this looming biodiversity crisis
    1. This command will give you the top 25 stocks that had the highest anomaly score in the last 14 bars of 60 minute candles.

      Supriver - find high moving stocks before they move using anomaly detection and machine learning. Surpriver uses machine learning to look at volume + price action and infer unusual patterns which can result in big moves in stocks

    1. Autorzy najnowszych badań skupili się na języku i odkryli, że dzieci podczas przetwarzania języka mówionego używają obu półkul mózgu.

      In comparison, almost all adults use only the left hemisphere of the brain

    1. Analyses replicated those from past research using the PEW data, showing that beardedness was more frequent under prevailing conditions of lower health and higher economic disparity.ConclusionsThese findings contribute to evidence that men’s decision to augment their masculinity via full beardedness occurs under conditions characterised by stronger inter-sexual and intra-sexual selection.
      • Men are more likely to wear beards in countries where they have to compete with each other for women.
      • The data comes from the Pew Research Center’s World’s Muslims’ project, which collected information from 14,032 men in 25 countries.
      • The authors conclude that beards make men look more masculine, which helps them with sexual selection, but the authors couldn’t confirm if beards contributed to higher reproductive success
    1. It turns out that during a meeting, he asked them how long it would take to remove staff cars from the lot and start digging the first hole for the Boring Company tunnel. The answer: two weeks. Musk asked why, and when he gathered the necessary information, he concluded, “Let’s get started today and see what’s the biggest hole we can dig between now and Sunday afternoon, running 24 hours a day.” Within three hours, the cars were gone and there was a hole in the ground.

      The way Elon Musks motivates his employees

    1. An fMRI-based study of error-monitoring shows that students who are focused on monitoring their own learning process, rather than on getting right answers, learn better over time.

      The study adds evidence that education focused on correctness is less beneficial to education focused on deeply engaging with content

  4. Aug 2020
    1. Would you really forget to push your code if that triggers a rocket launch?

      Git-rocket (VS Code extension).

      Lol :D

    1. Once TPOT is finished searching (or you get tired of waiting), it provides you with the Python code for the best pipeline it found so you can tinker with the pipeline from there.

      After all, magically you get the right Python snippet (based on scikit-learn)

    2. TPOT is a Python Automated Machine Learning tool that optimizes machine learning pipelines using genetic programming

      TPOT automates the following:

      • feature selection
      • feature preprocessing
      • feature construction
      • model selection
      • parameter optimisation
    1. The Splitgraph DDN is a single SQL endpoint that lets you query over 40,000 public datasets hosted on or proxied by Splitgraph.You can connect to it from most PostgreSQL clients and BI tools without having to install anything else. It supports all read-only SQL constructs, including filters and aggregations. It even lets you run joins across distinct datasets.

      Splitgraph - efficient DDN (Data Delivery Network):

      • connect to it from most PostgreSQL clients and BI tools without having to install anything else
      • you can queory +40k public datasets hosten on or proxied by Splitgraph
      • supports all SQL constructs (even SQL joins between tables)
    1. Fastprogress is a clean, well-designed progress bar library brought to you by the fastai family.

      Might come in handy for tracking progress of long executions:

      ! pip install fastprogress
      from fastprogress import master_bar, progress_bar
    2. Remote in through VSCode using SSH and ngrok
      • You can connect to Colab remotely through VSCode with SSH and ngrok
      • Benefits: terminal access, not having to reenter github password, being able to edit .py files locally inside of VSCode
      • You might want to pay $10/month to have a static TCP (ngrok pro) to prevent disconnections
    3. Don’t forget to tell Git who you are, add this cell so you don’t have to answer every time you commit during a new session!

      Authenticate yourself with GitHub:

      !git config --global user.email <YOUR EMAIL>
      !git config --global user.name <YOUR NAME>
    4. This will allow you to grab both public and private repos without leaving your password exposed in the notebook.

      Connecting your GitHub:

      import os
      from getpass import getpass
      import urllib
      user = 'rbracco'
      password = getpass('Password: ')
      repo_name = 'fastai2_audio'
      # your password is converted into url format
      password = urllib.parse.quote(password)
      cmd_string = 'git clone https://{0}:{1}@github.com/{0}/{2}.git'.format(user, password, repo_name)
      cmd_string, password = "", "" # removing the password from the variable
      # Bad password fails silently so make sure the repo was copied
      assert os.path.exists(f"/content/{repo_name}"), "Incorrect Password or Repo Not Found, please try again"

      GIF workflow

    5. Gdown is a nice library for downloading large files from drive to colab.

      Use Gdown library to download large files, if:

      • the dataset is public
      • it's more than 10 GB
      • you're downloading it multiple times a day
    6. due to weird Google Drive quota issues, you are better off copying the archive to colab and decompressing it there than you are decompressing the archive while it is hosted on your drive

      Decompress your archives on Google Colab, not on the host machine

    7. I learned and did to make it possible to do Automated Speech Recognition research on a Colab instance.

      It's possible to do Automated Speech Recognition with Google Colab.

      Notebook instance of this post

    8. It has been an open secret that you can avoid getting disconnected on Colab by opening the console and entering JavaScript to click the reconnect button for you. It gets very old pressing Ctrl-Shift-I, finding this snippet, and pasting it in every time you start a new session, but Colab gives you the ability to run JavaScript from a cell using the %%javascript magic. Add this cell before your training loop and run it when you plan to do a long training run to avoid getting disconnected mid-training.
      • You can add JavaScript to Colab with %%javascript
      • It's worth to add the following snippet before training to avoid getting disconnected:
      function ClickConnect(){
    9. As you know, Colab deletes any files you’ve downloaded or created when you end a session. The best option is to use Github to store your code(details below), and Google Drive to store datasets, logs, and anything else that would normally reside on your filesystem but wouldn’t be tracked by git.
      • That's why you might want to run the code:

        from google.colab import drive
      • After running it you'll click a link and follow a 30 seconds process

      • Afterwards, all your files will be available at /contant/drive
    10. Uploads from your computer to google drive can be incredibly slow, especially when dealing with multiple GBs of data. Download speeds are much faster, so take advantage with the command ! wget -c -P save_path url This allows you to download the data only once saving you time and saving bandwidth for the generous owners of publicly hosted datasets.

      It's more efficient to get your datasets with ! whet -c -P save_path_url rather than uploading it:

      ! wget -c -P '/content/drive/My Drive/Colab Notebooks/data/' http://www.openslr.org/resources/12/train-clean-100.tar.gz
    1. Towarzystwo mruczącego kota na kolanach jest niezastąpionym lekarstwem na depresję. Kot odwraca uwagę od problemu, dotrzymuje towarzystwa, okazuje uczucia bez względu na stan psychiczny właściciela i pokazuje, że jest on niezastąpiony. Ponadto pomaga człowiekowi w wyrobieniu odpowiedzialnej postawy i rytualnych odruchów, jak regularne karmienie. Co więcej, spokój kotów udziela się także choremu właścicielowi.

      Cats help with depression

    2. Obserwowali oni 40 dzieci z autyzmem. Okazało się, że te, które miały w domach zwierzęta, w tym koty, były spokojniejsze i łatwiej się komunikowały z otoczeniem, niż dzieci bez domowych pupili. Owa otwartość u dzieci ma związek ze wzrostem poziomu oksytocyny (hormonu szczęścia), która wydziela się podczas głaskania futra. Pieszczoty wzmacniają też uczucia zaufania i miłości.

      Cats help kids with autism to communicate

    3. wystarczy 20 minut oglądania śmiesznych filmów z kotami, by dostatecznie spadł poziom kortyzolu we krwi (hormonu stresu) i poprawiła się pamięć krótkotrwała u osób starszych. Ponadto śmiech wspomaga pracę serca i układu immunologicznego.

      Cats are funny (healthy) to watch ;)

    4. O zbawiennym wpływie mruczenia na poziom ciśnienia we krwi i nastrój pisało już wielu naukowców. Co więcej, koty potrafią modulować częstotliwość dźwięków od 20 do 140 Hz, a niektóre rejestry działają na ludzki organizm skuteczniej niż niejedna terapia.

      Cats get rid of your stress

    5. Naukowcy zajmujący się chorobami naczyniowymi na Uniwersytecie w Minosocie dowiedli, że właściciele kotów przejawiają mniejsze skłonności do zawałów. Przez 10 lat obserwowali ok. 4,5 tys. osób, spośród których 3/5 było właścicielami futrzaka. Okazało się, że u miłośników kotów ryzyko ataku serca było o 30 proc. niższe niż u ludzi, którzy nie posiadali żadnego zwierzęcia futerkowego.

      Cats save your heart

    1. Chattanooga most likely. My company is doing 85% base salary with no adjustment to RSUs. Tennessee is a great place to save money due to 1) no state income tax, 2) no capital gains taxes, and 3) low cost of living. I estimate I’ll be able to save ~$100k more per year than I currently am in the Bay Area. Plus Chattanooga is known for having some of the fastest internet in the country, rolled out by the city a few years ago. Signal Mountain has great schools for when my kids are older, and it doesn’t hurt that it’s a naturally beautiful place

      Chattanooga - great place for a remote work

    1. Instead of avoiding anything hard, let's turn down the difficulty dial by focusing on small steps.

      If you lack the ability to do something hard, break it into smaller steps

    2. The important part is not only to know the reason, but to feel it, to get excited about it. How to do that? Link the task to a personal goal that you want to achieve. Attach exciting reasons to the task.

      Bad example: Write a thesis

      Good examples:

      • Write a thesis to successfully complete a degree and do cutting-edge research.
      • Write a thesis to deepen your understanding of a subject and get recognized by others in your field.
      • Write a thesis to help others see things more clearly and make progress.
    3. We feel motivated when we viscerally feel how an action is meaningful, or valuable to us and when we believe we can take it

      Where motivation comes from.

      If you don't feel motivated, remind yourself why you planned to do this task

    4. According to FBM, there are three things we need to do something

      Fogg Behavior Model says that we need 3 things at the same time to do something

      • motivation
      • ability
      • trigger

    1. search the site itself for codes

      Trickt to quickly find discount codes on a website:

      site:curology.com ("coupon" | "referral code" | "affiliate code" | "discount code" | "VIP")

    2. find every email on a web page that you're on. The big kahuna - this works for every website. Inject it into a site with Chrome DevTools (more here)

      Use this code below to find every e-mail on a webpage:

      var elems = document.body.getElementsByTagName("*");
      var re = new RegExp("(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)");
      for (var i = 0; i < elems.length; i++) {
          if (re.test(elems[i].innerHTML)) {
    1. An Image is an ordered collection of root filesystem changes and the corresponding execution parameters for use within a container runtime

      Official definition of a container image

    1. VANDERTRAMP verbs use être as opposed to avoir when placed into the past tense.

      Devenir (to become) past participle: devenu

      Revenir (to come back) past participle: revenu

      Monter (to climb) past participle: monté

      Rester (to stay) past participle: resté

      Sortir (to leave) past participle: sorti

      Passer (to pass) past participle: passé .

      Venir (to come) past participle: venu

      Aller (to go) past participle: allé

      Naître (to be born) past participle: né

      Descendre (to descend) past participle: descendu

      Entrer (to enter) past participle: entré

      Rentrer (to re-enter) past participle: rentré

      Tomber (to fall) past participle: tombé

      Retourner (to turn around) past participle: retourné

      Arriver (to arrive / to come) past participle: arrivé

      Mourir (to die) past participle: mort

      Partir (to leave) past participle: parti

    1. heightparent’s heightwidthparent’s widthtopparent’s heightleftparent’s widthmargin-topparent’s widthmargin-leftparent’s widthpadding-topparent’s widthpadding-leftparent’s widthtranslate-topself’s heighttranslate-leftself’s width

      What % means in different CSS elements

    1. If there were no miracles, what then? Well the answer is really quite boring: notes. I would keep notes religiously of everything, detailed accounts of debugging and records of conversations throughout the day, if even a few words. If it happend I was going to have some recording of it somewhere.

      Notes are what helped the autistic developer to improve his memory problem

    1. “Blogging” has a poor brand within many high status employers, whereas “memos” and “essays” do not. Try to categorize your writing as these things rather than a blog post.

      Interesting alternatives for the word "blogging"

    1. Why [[Tyler Cowen]] still responds to every [[Email]] and loves it. He finds time for this because of what he doesn’t do: he hardly watches [[TV]], **his social life is basically the same as his intellectual life **- his social life is geared towards thinking, discussing, exploring ideas. With no TV, you end up with a lot of [[time]]. #[[unproductive internet activities]] Isn’t [[email]] a low leverage use of his time? **He learns a lot from people that email him, and has filtered his audience so it’s mostly smart people. **He does this by being "sufficiently weird". He’s not even sure it’s highly leveraged. He met [[Patrick Collison]] that way. He doesn’t care if it’s highly leveraged if he’s learning from it. #[[Audience Building]]

      By not watching TV you will have more time for activities like responding to every e-mail. You don't have to think that it's unproductive if you exchange thoughts with smart people

    2. As you get older and more successful, it’s harder to get critical [[feedback]] from people. Hang out with critical people and hope you can get benefits. It’s hard to do this. If you are around people that are above you in the hierarchy, you should be critical too. #aging

      On being critical

    3. Just keep [[writing]] and re-writing. A book will typically be reworked 10 times. Effort and application – there are no tricks.

      Indeed, I agree with that technique

    4. Advantages of people in [[Silicon Valley]]:** super smart but not necessarily highly educated so they don’t just believe what everyone else does. **They think outside the box. They’re thinkers as well as people that have had to do things and pass [[reality]] tests. The only test most academics face is "can I publish this piece?"

      What differs people in Silicon Valley and typical students

  5. Jul 2020
    1. Libra is a machine learning API designed for non-technical users. This means that it assumes that you have no background in ML whatsoever.

      With Libra you can write your ML code much faster:

      For example, that's how it compares to Keras.

    1. To facilitate the TDI protocol, an interdisciplinary team at the Media Lab designed and developed Dormio, a sleep-tracking device that can alter dreams by tracking hypnagogia and then delivering audio cues based on incoming physiological data, at precise times in the sleep cycle, to make dream direction possible. Upon awakening, a person’s guided dream content can be used to complete tasks such as creative story writing, and compared experimentally to waking thought content.

      Dormio - new device to achieve TDI protocol

    2. Previous neuroscience studies from researchers such as sleep and cognitive sciences expert Stickgold show that hypnagogia (the earliest sleep stage) is similar to the REM stage in terms of brainwaves and experience; however, unlike REM, individuals can still hear audio during hypnagogia while they dream. 

      Hypnagogia vs REM phase of your dream

    3. In a new paper, researchers from the Media Lab’s Fluid Interfaces group introduce a novel method called “Targeted Dream Incubation” (TDI). This protocol, implemented through an app in conjunction with a wearable sleep-tracking sensor device, not only helps record dream reports, but also guides dreams toward particular themes by repeating targeted information at sleep onset, thereby enabling incorporation of this information into dream content. The TDI method and accompanying technology serve as tools for controlled experimentation in dream study, widening avenues for research into how dreams impact emotion, creativity, memory, and beyond.

      TDI - new protocol to record your dreams and guide them toward particular themes

    1. Return sends a specified value back to its caller whereas Yield can produce a sequence of values. We should use yield when we want to iterate over a sequence, but don’t want to store the entire sequence in memory. Yield are used in Python generators. A generator function is defined like a normal function, but whenever it needs to generate a value, it does so with the yield keyword rather than return. If the body of a def contains yield, the function automatically becomes a generator function.

      Simple explanation of a difference between return and yield in Python

    1. Kiedy zastanawiamy się nad czymś w języku obcym, to albo więcej myślimy, albo mniej czujemy. Moim jednak zdaniem bardziej prawdopodobne jest wytłumaczenie, że w języku obcym wszystko mnie mniej pobudza, w związku z tym emocje mniej mnie rozpraszają w racjonalnym myśleniu
    2. Język obcy - w porównaniu z ojczystym - sprawia więc, że kiedy napotykamy problem, jesteśmy bardziej skłonni, by rozwiązać go w sposób racjonalny. A mniej bierzemy pod uwagę, jakie normy etyczne rozwiązanie to nagina.
    3. Kiedy myślimy w języku, który znamy słabiej, ważniejsze staje się osiągnięcie założonego efektu, a mniej ważny jest wymiar moralny działań
    1. Obiecujący, zwłaszcza w kontekście młodszych pokoleń, wydaje się też właśnie wkraczający do Polski coliving, czyli formuła mieszkania polegająca na dzieleniu się z innymi wszystkim tym, czym podzielić się da. Współlokatorzy mają własne sypialnie z łazienkami, korzystają jednak z przestronnych i funkcjonalnie zaaranżowanych części wspólnych. Zyskują dzięki temu przestrzeń, która umożliwia im integrację i spędzanie wolnego czasu choćby na oglądaniu filmów czy grze w planszówki.

      Coliving as a solution to staying alone

    2. Do jeszcze bardziej przytłaczających wniosków doszła Julianne Holt-Lunstad, która, posiłkując się wynikami 70 badań naukowych, ogłosiła, że samotność zwiększa śmiertelność w takim samym stopniu co otyłość czy wypalanie 15 papierosów dziennie. Z kolei Nicole Valtorty z Uniwersytetu Newcastle ustaliła, że prawdopodobieństwo ataku serca u osób osamotnionych rośnie o 29 proc., a zagrożenie udarem – o 32 proc. „To niezależny czynnik przyczyniający się do śmierci. Może cię po prostu zabić. Znajduje się na tej samej liście co choroby serca i rak – twierdzi dr Josh Klapow, psycholog kliniczny z Uniwersytetu Alabamy.

      Data on health consequences of being alone

    3. powszechna plaga nie oszczędza młodych. Poczucie izolacji wpływa u nich na sen, zwiększa poziom stresu, powoduje spadek odporności, redukuje funkcje poznawcze, wywołując objawy podobne do otępienia oraz zwiększa ryzyko depresji.

      Health consequences of being alone as a young person

    4. Naukowcy odkryli, że samotność ma na nas wyniszczający wpływ, i to już na poziomie komórkowym. Profesor Steve Cole, dyrektor laboratorium UCLA Social Genomics Core dowiódł nawet, że z powodu izolacji społecznej w ludzkim organizmie dochodzi do tworzenia się przewlekłego, niedającego jawnych objawów stanu zapalnego.

      Health consequences of being alone

    5. Z danych GUS-u i tych zebranych przez portale randkowe wynika, że w Polsce w ciągu ostatnich 10 lat liczba osób żyjących samotnie wzrosła o 34 proc.
    6. Wśród krajów europejskich w niechlubnym rankingu zwycięża jednak Szwecja, w stolicy której samotnie mieszka aż 58 proc.(!) populacji. Z kolei w Stanach Zjednoczonych odsetek ten wynosi 27 proc. (w Nowym Jorku prawie 50 proc.) i cały czas rośnie – dla porównania w roku 1920 jednoosobowe gospodarstwo domowe prowadziło tam 5 proc. obywateli.

      Percentage of people living alone

    1. the market size: the global note-taking management software market is estimated to reach $1.35 billion by 2026, growing at a CAGR of 5.32% from 2019 to 2026greater scope for innovation: eg., be it creating a task list, a roadmap, or a design repository, Notion can handle it alllack of satisfaction: it’s noted that people always use a combination of note-taking apps and hardly stick to one for a long time

      Three reasons why we constantly see more note-taking apps, which in return increase our paradox of choice

    1. if you’re looking for a tool to increase your metacognition, try Roam Research.

      Roam Research is one of the tool suggestions to improve your metacognition

    2. Metacognition, put simply, is “thinking about thinking” or “knowing about knowing.” It’s being aware of your own awareness so you can determine the best strategies for learning and problem-solving, as well as when to apply them. The word “metacognition” literally means “above cognition”—it’s one of the most powerful forms of self-monitoring and self-regulation. It’s a fancy word for something fairly simple once you break it down.


    1. An end-user (resource owner 👤) grants a printing service (app 📦) access to their photo (resource 🖼) hosted in a photo-sharing service (resource server 📚), without sharing their username and password. Instead, they authenticate directly with a server trusted by the photo-sharing service (authorization server 🛡), which issues the printing service delegation-specific credentials (access token 🔑).

      Clear OAuth flow example

    1. For this study, researchers conducted technical interviews of 48 computer science undergraduates and graduate students. Half of the study participants were given a conventional technical interview, with an interviewer looking on. The other half of the participants were asked to solve their problem on a whiteboard in a private room. The private interviews did not require study participants to explain their solutions aloud, and had no interviewers looking over their shoulders. Researchers measured each study participant’s interview performance by assessing the accuracy and efficiency of each solution. In other words, they wanted to know whether the code they wrote would work, and the amount of computing resources needed to run it. “People who took the traditional interview performed half as well as people that were able to interview in private,” Parnin says. “In short, the findings suggest that companies are missing out on really good programmers because those programmers aren’t good at writing on a whiteboard and explaining their work out loud while coding.”

      Interesting experiment focused on recruitment. "Candidates" who are able to solve the challenge alone in quiet rooms perform better

    1. (This is why writing is important. It’s harder to fool yourself that you understand something when you sit down to write about it and it comes out all disjointed and confused. Writing forces clarity.)

      This is why I like to repeat that writing shapes your understanding of the topic

    2. (This is why writing is important. It’s harder to fool yourself that you understand something when you sit down to write about it and it comes out all disjointed and confused. Writing forces clarity.)

      This is why I like to repeat that writing shapes your understanding of the topic

    3. One component of it is energy: thinking hard takes effort, and it’s much easier to just stop at an answer that seems to make sense, than to pursue everything that you don’t quite get down an endless, and rapidly proliferating, series of rabbit holes.

      To think in an intelligent way, you need to take effort (energy)

    4. What this means is that you can internalize good intellectual habits that, in effect, “increase your intelligence”. ‘Intelligence’ is not fixed.

      Fix your intelligence with the right habits

    5. Intelligent people simply aren’t willing to accept answers that they don’t understand — no matter how many other people try to convince them of it, or how many other people believe it, if they aren’t able to convince them selves of it, they won’t accept it.

      Question authority

    6. The smartest person I’ve ever known had a habit that, as a teenager, I found striking. After he’d prove a theorem, or solve a problem, he’d go back and continue thinking about the problem and try to figure out different proofs of the same thing. Sometimes he’d spend hours on a problem he’d already solved.

      Take your time and ponder

    1. So in brief, for our application service, if we understand the access patterns very well, they’re repeatable, they’re consistent, and scalability is a big factor, then NoSQL is a perfect choice.

      When NoSQL is a perfect choice

    2. Comparison Time … 🤞

      Brief comparison of 8 aspects between SQL vs NoSQL

    1. The lessons you learn from chess are generalizable only at a high level (e.g. a bad plan is better than no plan). But if you have games that are (a) fun and (b) accurate for some aspects of reality, such as KSP or Factorio, you do get learning that is real and transferable. The challenge is in making games that satisfy both constraints.

      Chess to be a good educator misses the accuracy for some aspects of reality

    1. Although the impact will not be distributed evenly, digital transformation will touch virtually every corner of the global workforce — from food production (324,000 new jobs) to healthcare (2 million) and the automotive industry (6 million).

      The main industries affected:

      • automotive (6 million)
      • healthcare (2 million)
      • food production (324k)

      check the PowerBI visualisation below for more info

    2. Over the next five years, we estimate that the global workforce can absorb around 149 million new technology-oriented jobs. Software development accounts for the largest single share of this forecast, but roles in related fields like data analysis, cyber security, and privacy protection are also poised to grow substantially.

      It is estimated that 2025 will require 4.6 times more IT profiles than 2020.

      Data source: Microsoft Data Science utilising LinkedIn data

  6. Jun 2020
    1. Most of the discourse is about how AI will “replace” humans. I prefer the Licklider school of thought: human-computer symbiosis. AI will make humans vastly more effective by automating tedious tasks. For example, humans can use text AI such as GPT-3 to generate ideas/boilerplate writing to get around the terror of the blank page, and then simply pick the best ones and refine/iterate on those. (AI Dril, which was based on GPT-2, was an early example of this). As AI gets better, “assistive creativity” will become a bigger thing, enabling humans to create sophisticated artifacts (including video games!) easier and better than ever.

      Why AI is important for human productivity

    2. So it makes sense that video games would be the primary educational environment of the future: they are the best way we have of (a) creating simulations of reality (b) with fast feedback loops (c) accessible at low cost.

      Games as the future of learning

    3. Video games will become a core component of education. This sounds absurd, but consider that simulations are already used widely for learning
      • Kerbal Space Program
      • Flight simulators
      • Factorio
      • Programming environments
    4. When you understand something very well it’s almost as though you can play around with it using all your senses — touch, feeling, space.
    5. The fundamental principle of education is to give students an environment, and tools, where they can make discoveries themselves. This requires space, and time, and autonomy.
    1. Wyróżniamy 2 podstawowe metody wykrywania malware(można mówić o większej ilości, jednak na potrzeby przybliżenia podstaw wspomnę tylko o dwóch):

      2 ways antiviruses detect malware:

      • Signature-Based Detection - based on signatures (known byte sequences) updated continuously. For example, the method deletes software immediately after it's downloaded
      • Heuristic and Behavioral-Based Detection - based on malware's "behaviour" (each of its instructions)
    1. How to prevent the environment from being “invalidated”?Docker containers (Rocker)


    2. SAS, R, Stata, SPSS may return different results even for quantiles, or due to floating number representation! The results should be maximally close to each other, but what about resampling methods (SAS and R gives different random numbers for the same seed)?

      Different results between SAS, R, Stata, SPSS

    3. Typical software requirements specify the following
      • All software system inputs
      • All software system outputs
      • All functions that the software system will perform
      • All performance requirements that the software will meet, (e.g., data throughput, reliability, and timing)
      • The definition of all external and user interfaces, as well as any internal software-to-system interfaces
      • How users will interact with the system
      • What constitutes an error and how errors should be handled
      • Required response times
      • The intended operating environment for the software, if this is a design constraint (e.g. hardware platform, operating system)
      • All ranges, limits, defaults, and specific values that the software will accept
      • All safety related requirements, specifications, features, or functions that will be implemented in software
    4. 99.9% open-source. 0.1% is licensed (free for non-commercial use)

      License of libraries in R

    5. Status of R on the Clinical Research market
      • In general bioscience and academia, S ---> R has built over years its position of one of the industry standards
      • In clinical research, however, SAS reigns par excellence
      • Pharmaceutical companies, CROs and even FDA do use R “internally”.But they resist (or hesitate) to use it in submissions (to FDA)
      • Clinical Programmer or Biostatistician ≝ SAS Programmer. Period
    6. Differences in

      Differences between R and SAS:

      • origin of dates
      • default contrasts
      • used sum of squares
      • calculation of quantiles
      • generation of random numbers
      • implementation of advanced model
      • representation of floating point numbers
    7. Tospeeduptheprocesswithoutsacrificingaccuracy,theteamalsousesRevolutionRanalyticproducts

      Revolution R

    1. The results suggest that, in addition to a distinct beginning and end to the unprecedented bloodshed of 1910-1950, there was another abrupt shift towards a greater level of peace in the early 1990s.
    1. The brain uses the same area to save coding as it does to save our speech. They found that programming is like talking. The research found out that the brain regions that are most active during coding are those that are also relevant in the processing of natural language.
      • Study shows that programming knowledge is stored in the same area of the brain as speech.
      • Using fMRIs, researchers analysed which parts of the brain are activated during programming.
      • The results essentially show that programming is like talking - the same regions that are active when processing natural language are active during programming.
      • In the study, professional programmers were asked to repeatedly write some code and check other chunks of code for mistakes.
    1. Estimates say that 83% of us will be hit with a mental health crisis in our lives, we can all make the choices to invest wisely in this area to improve our ‘mental durability’ to deal with it properly.
    1. in Python - setting up basic logger is very simple

      Apart from printing the result, it is better to debug with logging.

      Sample logger:

      import logging
          format= '[%(asctime)s] {%(pathname)s:%(lineno)d} %(levelname)s - %(message)s',
      logging.error("Some serious error occurred.")
      logging.warning('Function you are using is deprecated.')

      the sample result:

      [12:52:35] {<stdin>:1} ERROR - Some serious error occurred.
      [12:52:35] {<stdin>:1} WARNING - Function you are using is deprecated.

      to find its location, type:

    1. This advertising system is designed to enable hyper-targeting, which has many unintended consequences that have dominated the headlines in recent years, such as the ability for bad actors to use the system to influence elections, to exclude groups in a way that facilitates discrimination, and to expose your personal data to companies you’ve never even heard of.

      Where your Google data goes to

    2. if you search for something on Google, you may start seeing ads for it everywhere.

      In comparison to DuckDuckGo, Google presents you ads everywhere, not just in the search results

    3. Alarmingly, Google now deploys hidden trackers on 76% of websites across the web to monitor your behavior and Facebook has hidden trackers on about 25% of websites, according to the Princeton Web Transparency & Accountability Project. It is likely that Google and/or Facebook are watching you on most sites you visit, in addition to tracking you when using their products.

    4. When you search on DuckDuckGo, we can show you an ad based on the keywords you type in. That’s it. And it works.

      Simple model how DuckDuckGo makes its business

    5. Almost all of the money search engines make (including Google) is based on the keywords you type in, without knowing anything about you, including your search history or the seemingly endless amounts of additional data points they have collected about registered and non-registered users alike. In fact, search advertisers buy search ads by bidding on keywords, not people. It makes intuitive sense, too. If you search for ‘car’, you are more likely to respond to a car ad than something you searched for last week.

      Search engines do most of the business on keywords

    1. If you want a fast website without breaking the bank, go for GitHub Pages. It’s completely free and super fast. It does, however, require you to open source your site. If that’s not doable, CloudFront is a good alternative, but its price depends on how much bandwidth you push around. For most personal sites, CloudFront won’t cost more than a couple of dollars per month. The same thing goes for Google Cloud Storage.

      Advice for a personal use regarding the static webhosting benchmark (2020 May)

    2. The best all-around performer is AWS CloudFront, followed closely by GitHub Pages. Not only do they have the fastest response times (median), they’re also the most consistent. They are, however, closely followed by Google Cloud Storage. Interestingly, there is very little difference between a regional and multi-regional bucket. The only reason to pick a multi-regional bucket would be the additional uptime guarantee. Cloudflare didn’t perform as well I would’ve expected.

      Results of static webhosting benchmark (2020 May):

      1. AWS CloudFront
      2. GitHub Pages
      3. Google Cloud Storage
    1. Some free, digital Zettelkastens include zettelkasten.de, zettlr, and roamresearch. I use Roam.

      One of the best solutions to implement Zettelkastens: Roam. However, in my case OneNote is doing fine. Maybe I can switch to Roam if I will start working on a specific research problem?

    2. The key is to make connections between ideas during note-taking, way before you need to review them for your work. This forces you to actively connect the dots (during note-taking) and lets you find relevant ideas with ease in future.

      How Zettelkasten works:

      • Write each idea you come across on a card.
      • Link idea cards to other relevant idea cards (idea -> idea link).
      • Sort cards into broader topic boxes (idea -> topic link)
    3. German sociologist Niklas Luhmann. One thing you should know about Luhmann—he was extremely productive. In his 40 years of research, he published more than 70 books and 500 scholarly articles. How did he do accomplish this? He credits it to his Zettelkasten which focuses on connections between notes.

      To be super productive, Niklas Luhmann used to take notes relating to each other

    1. it allows each new key to be given a default value based on the type of dictionary being created

      Difference between defaultdict and dict

    2. Memoization can be achieved through Python decorators

      Example of memoization in Python:

      import timeit
      def memoize_fib(func):
          cache = {}
          def inner(arg):
              if arg not in cache:            
                  cache[arg] = func(arg)
              return cache[arg]
          return inner
      def fib(num):
          if num == 0:
              return 0
          elif num == 1:
              return 1
              return fib(num-1) + fib(num-2)
      fib = memoize_fib(fib)
      print(timeit.timeit('fib(30)', globals=globals(), number=1))
      print(timeit.timeit('fib(30)', globals=globals(), number=1))
      print(timeit.timeit('fib(30)', globals=globals(), number=1))


    3. A deep copy refers to cloning an object. When we use the = operator, we are not cloning the object; instead, we reference our variable to the same object (a.k.a. shallow copy).

      Difference between a shallow copy (=) and a deep copy:

    4. Python 2 is entrenched in the software landscape to the point that co-dependency between several softwares makes it almost impossible to make the shift.

      Shifting from Python 2 to 3 isn't always straight to the point

    5. The @property decorator allows a function to be accessed like an attribute.

      @property decorator

    6. var = true_val if condition else false_val

      Example of a ternary operator (one-line version of if-else):

      to_check = 6
      msg = "Even" if to_check%2 == 0 else "Odd"

      Usual if-else:

      msg = ""
      if(to_check%2 == 0):
        msg = "Even"
        msg = "Odd"
    7. This method is automatically called to allocate memory when a new object/ instance of a class is created.

      __init__ method in Python (which essentially all classes have)

    8. decorator is a design pattern in Python that allows a user to add new functionality to an existing object without modifying its structure


    9. The philosophy behind Flask is that it gives only the components you need to build an app so that you have the flexibility and control. In other words, it’s un-opinionated. Some features it offers are a build-int dev server, Restful request dispatching, Http request handling, and much more.

      Flask isn't as full of features as Django (which makes him lighter), but it still offers:

      • build-int dev server
      • Restful request dispatching
      • HTTP request handling
      • much more...
    10. The only difference is that range returns a Python list object and xrange returns an xrange object. This means that xrange doesn’t actually generate a static list at run-time like range does.

      Difference between range() and xrange()

    11. NumPy is not just more efficient; it is also more convenient. You get a lot of vector and matrix operations for free, which sometimes allow one to avoid unnecessary work. And they are also efficiently implemented.

      Main advantage of NumPy arrays over (nested) Python lists

    12. process of retrieving original Python objects from the stored string representation


    13. Pickle module accepts any Python object and converts it into a string representation and dumps it into a file by using dump function


    14. The beauty of lambda functions lies in the fact that they return function objects. This makes them helpful when used with functions like map or filter which require function objects as arguments.

      When to use lambdas

    15. In Python, the term monkey patch only refers to dynamic modifications of a class or module at run-time.

      Monkey patching in Python

    16. Python has a multi-threading package but if you want to multi-thread to speed your code up, then it’s usually not a good idea to use it. Python has a construct called the Global Interpreter Lock (GIL). The GIL makes sure that only one of your ‘threads’ can execute at any one time. A thread acquires the GIL, does a little work, then passes the GIL onto the next thread.

      Multi-threading is available in Python but it;s often not a good idea

    1. the only meditation I have EVER found effective in my life. 1:19:57 Intro and explanation + 1:27:51 Meditation start

      Meditation with triphasic breathing (you won't fight with your thoughts)

      It focuses on 6 steps (feel a stop between each phase):


      • The place doesn't matter. You can do it anywhere, such as in front of your computer
      • Sit up straight and close your eyes


      1. Breathe in with your belly (try to put your belly button far from your spine)
      2. Breathe in with your chest
      3. Raise your shoulders up and breathe in the last time
      4. Relax your shoulders (bring them down)
      5. Contract the chest (let it relax)
      6. Move your navel towards your spine


      • For around 1 minute, relax and let your breath do whatever it wants to (observe what your breath is doing)
      • Now, let your eyes stay closed and let yourself (your mind) come back
        • put your palms in front of you
        • rub them together to feel the heat
        • put the hands over your eyes
        • as you breathe in and out, let your eyes open with your palms over them
        • when the breath is complete, let your hands come down
      • After the meditation you shall normally feel joy

      Video material

  7. May 2020
    1. - High-level modules should not depend on low-level modules. Both should depend on the abstraction.- Abstractions should not depend on details. Details should depend on abstractions.


      Dependency Inversion