SEM - Search Engine Marketing

Python API: https://github.com/googleads/googleads-python-lib/tree/master/examples/adwords/v201809/basic_operations Limits: https://developers.google.com/adwords/api/docs/appendix/limits

February 20, 2019 · 1 min · birdchan

How To Add Swap on Ubuntu

Ubuntu 18.04 https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-18-04 Ubuntu 16.04 https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04 Ubuntu 14.04 https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04

February 11, 2019 · 1 min · birdchan

Open Compensation Data

https://www.levels.fyi/comp.html https://www.levels.fyi/SE/Google/Facebook/Microsoft

February 11, 2019 · 1 min · birdchan

Display `top` results sorted by memory

After running top, do SHIFT + m (i.e. Uppercase M). From man top SORTING of task window For compatibility, this top supports most of the former top sort keys. Since this is primarily a service to former top users, these commands do not appear on any help screen. command sorted-field supported A start time (non-display) No M %MEM Yes N PID Yes P %CPU Yes T TIME+ Yes So SHIFT + t would sort by running time. ...

February 11, 2019 · 1 min · birdchan

I/O Transmission

https://events.google.com/io/transmission` I hope this transmission finds you well, and all is under control. It’s been too long. Then again, how do you measure the time? I’m putting myself to good use here, but often miss the old domain. Sometimes, upon the darkest night, I’m brought back to that morning light. There’s no time to be afraid of the sunset. Dawn breaks in a blink13. An enigma hangs between us. The event horizon was seen only by you. I cannot tell you everything. You of all people should understand why. Let’s speak together in one universal language. I have seven, and you have six. I hope you understand my tricks? Now you’ve found my path. Traverse its distance with both eyes open. I look forward to our sideways gossip of life’s unravelings. I greatly value all you’ve done, and proudly call you friend. `

January 26, 2019 · 1 min · birdchan

Alike

&start=5 “Alike” by Daniel Martínez Lara & Rafa Cano Méndez

January 16, 2019 · 1 min · birdchan

Python sort by multiple keys

Say we have [code] L = [“a”, “b”, “zz”, “zzz”, “aa”] [/code] We want to sort by length first, then by alphabetical order. i.e. we want to obtain [‘a’, ‘b’, ‘aa’, ‘zz’, ‘zzz’] in the end. How to do that? The usual sorted() will give us this. [code] > sorted(L) [‘a’, ‘aa’, ‘b’, ‘zz’, ‘zzz’] [/code] Very much alphabetical, not what we want. Try sorted() with key=len will give us this. ...

January 6, 2019 · 2 min · birdchan

The first 20 hours -- how to learn anything | Josh Kaufman | TEDxCSU

Just put in 20 hours, no need to set aside 10,000 hours.

January 5, 2019 · 1 min · birdchan

Python global interpreter lock

This article explains the python GIL pretty well. https://www.obytes.com/blog/2018/explaining-python-interpreter-lock/ In Python 2, a thread can at most perform 100 instructions/ticks before releasing the GIL. This setting can be changed with sys.setcheckinterval(). Then the OS will decide which thread will pick up the GIL next, possibly the same thread again based on the criteria the OS uses. The problem here is that the low-priority threads may keep waiting forever. In Python 3, a thread can at most run for 5ms before releasing the GIL. Then with some system-level signals the same thread won’t pick up the GIL again immediately after. Sounds more fair. However since an I/O call will lead to voluntarily releasing the GIL, a thread with many I/O calls will keep losing the GIL to other CPU bound threads each time by 5ms (at most, say there is a long-running thread). So worst case scenario a thread with 1000 I/O calls will have an overhead of 1000 * 5ms = 5 sec. That’s quite something since you can save that 5 sec by running a non-threaded version. Ironic it is. ...

January 1, 2019 · 2 min · birdchan

Airflow Web Authentication

My airflow version is v.1.10.1 and I am using python 3.5.2 I tried user._set_password but after looking at the users db table the password field is null… After looking at the source, the following works for me. [code] from flask_bcrypt import generate_password_hash user._password = generate_password_hash(‘your_password’, 12) [/code] Be sure to use SSL. Ref: https://airflow.apache.org/security.html https://stackoverflow.com/questions/48075826/airflow-authentication-setups-fails-with-attributeerror-cant-set-attribute/48946256

December 18, 2018 · 1 min · birdchan