Articles in category «tip» :

q - Text as Data

in «tip» by Michael Beard
Tags: , , ,

Interesting tool. Haven't had a need for it yet, but I might. You never know.

q - Text as Data

Anyway, here is the blurb from their site:

q is a command line tool that allows direct execution of SQL-like queries on CSVs/TSVs (and any other tabular text files).

q …

Python Dictdiffer - diff between two dictionaries

in «tip» by Michael Beard
Tags: , , , ,

Get a rational difference between two dictionaries

Dictdiffer is a helper module that helps you to diff and patch dictionaries.

Dictdiffer

from dictdiffer import diff, patch, swap, revert

first = {
    "title": "hello",
    "fork_count": 20,
    "stargazers": ["/users/20", "/users/30"],
    "settings": {
        "assignees": [100, 101, 201],
    }
}

second = {
    "title": "hellooo",
    "fork_count": 20,
    "stargazers": ["/users …

Don't use functions as callbacks unless they're designed for it (JavaScript)

in «tip» by Michael Beard
Tags: , , , , , ,

Some really good tips and things to think about in general. Here is a general overview of the article. Read it for the full affect!

From the article:

Watch out for functions being used as callbacks, and objects being used as options, unless they were designed for those purposes. Unfortunately …

WAI ARIA in 5 steps

in «tip» by Michael Beard

Here is a really good overview from Lisa Seeman that covers how to achieve better accessibility for your website.

WAI ARIA in 5 steps by Lisa Seeman, who seems to be an expert on accessibility stuff.

She has other articles and videos out there.

This video was a good overview …

marshmallow: simplified object serialization

in «tip» by Michael Beard
Tags: , , , , , , , ,

marshmallow is an ORM/ODM/framework-agnostic library for converting complex datatypes, such as objects, to and from native Python datatypes.

Tip Description:

In short, marshmallow schemas can be used to:

  • Validate input data.
  • Deserialize input data to app-level objects.
  • Serialize app-level objects to primitive Python types. The …

Create interactive dashboards with Streamlit and Python

in «tip» by Michael Beard
Tags: , , , , , ,

In Data Visualization, Dashboard is the great Graphical User Interfaces that helps you to display the information in a highly interactive and informative way. It helps to visualize the key indicators and trends of the data.

Create Interactive Dashboards with Streamlit and Python

Streamlit

Streamlit is gaining popularity in Machine …

Getting Belkin's Usb-c docking station working - get both main displays working on my laptop

in «tip» by Michael Beard
Tags: , , , , , ,

This solved the very annoying problem with the docking station choosing the Dell monitor (usb-c interface) instead of the Thunderbolt-3 adapter (to my Thunderbolt 2 Display). In short, if it chooses anything but the Thunderbolt display first, it makes it so that the display will not work (oddly, all of …

bash - remove duplicates from PATH w/o changing the declared order

in «tip» by Michael Beard
Tags: , , , , ,

Useful to put in your .bash_profile file to remove all of the churn that gets added to your PATH environment variable.

#### -------------------
#### remove any duplicates in PATH - w/o changing order
#### -- https://stackoverflow.com/questions/11650840/remove-redundant-paths-from-path-variable
#### -------------------
export PATH="$(echo "$PATH" | awk 'BEGIN{RS=":";}
{sub(sprintf("%c$",10),"");if(A[$0 …

Learned a new work -- kakistocracy!

in «tip» by Michael Beard
Tags: ,

From an opinion article today describing our current situation in the government, I found this.

kakistocracy
government by the least suitable or competent citizens of a state.
"the danger is that this will reduce us to kakistocracy"
a state or society governed by its least suitable or competent citizens. plural …