Debuggers and icons meaning.
- Resume script execution until the next breakpoint if any
- Step over line of code
- Step into line of code
## Pre-requisite: You have to know your last commit message from your deleted branch. | |
git reflog | |
# Search for message in the list | |
# a901eda HEAD@{18}: commit: <last commit message> | |
# Now you have two options, either checkout revision or HEAD | |
git checkout a901eda | |
# Or | |
git checkout HEAD@{18} |
Debuggers and icons meaning.
Draft for Issue 152
Before being able to freeze and reduce parts of the browser User Agent string, we need to clearly lay down the different ways the user agent strings is being used on the Web by users and developers.
The User Agent String detection is the mechanism by which a piece of software will change its behavior according to the interpretation of the value of the User Agent String.
// convert from date string to date object | |
function convert_to_date(date_str) { | |
var timestamp = Date.parse(date_str); | |
var date_obj = new Date(timestamp); | |
return date_obj; | |
} | |
// Create a label string of two dates for each week starting with the beginning date. | |
function make_labels(date_start) { | |
var date_obj = date_start.timestamp; | |
date_str_start = date_obj.toLocaleDateString("en-US", date_options); |
(function (containerId, opts) { | |
if (!('querySelector' in document)) return; | |
var container = document.getElementById(containerId); | |
var nameSpace = opts.namespace || ''; | |
var onResize = throttle(update, 200); | |
var waiting = !!window.IntersectionObserver; | |
var observer; | |
update(); | |
document.addEventListener('DOMContentLoaded', update); |
products = """A,10,20 | |
B,50,30 | |
C,10,10 | |
D,50,40 | |
E,60,10""" | |
product_lines = [product.split(',') for product in products.splitlines()] | |
# sorting by INCREASING price | |
per_price = sorted(product_lines, key = lambda product: product[2]) | |
# [['C', '10', '10'], ['E', '60', '10'], ['A', '10', '20'], ['B', '50', '30'], ['D', '50', '40']] |
With lxml 4.5.0
❯ python
Python 3.9.1 (default, Feb 5 2021, 17:04:50)
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from lxml import etree
>>> from io import StringIO
>>> etree.parse(StringIO('<h2>👺</h2>'))
<div class="news-entry__item-content"><p><span class="word trans-in onscreen" style="transition-delay: 0.03s;">Waste</span> <span class="word trans-in onscreen" style="transition-delay: 0.06s;">continues</span> <span class="word trans-in onscreen" style="transition-delay: 0.09s;">to</span> <span class="word trans-in onscreen" style="transition-delay: 0.12s;">be</span> <span class="word trans-in onscreen" style="transition-delay: 0.15s;">high</span> <span class="word trans-in onscreen" style="transition-delay: 0.18s;">on</span> <span class="word trans-in onscreen" style="transition-delay: 0.21s;">the</span> <span class="word trans-in onscreen" style="transition-delay: 0.24s;">agenda</span> <span class="word trans-in onscreen" style="transition-delay: 0.27s;">for</span> <span class="word trans-in onscreen" style="transition-delay: 0.3s;">Asda</span> <span class="word trans-in onscreen" style="transition-delay: 0.33s;">particularly</span> <span class="word trans-in onscreen" style="transition-delay: 0.36s;">with |
from datetime import datetime | |
from glob import glob | |
import locale | |
import re | |
from textwrap import dedent | |
import mistune | |
from PIL import Image | |