2023-11-28
You are a research analyst and you are required to summarize the key insights of given numerical tables.
2023-11-28
You are a research analyst and you are required to summarize the key insights of given numerical tables.
A very biased collection of quotes and ideas from the book Deep Work by Cal Newport (2016).
flowchart LR
A((Deep Work)) -->|Versus| B(Shallow Work)
B --> B1[Shallow work promotes more shallow work]
import MySQLdb | |
conn = MySQLdb.connect(host=\"localhost\", user=\"root\", passwd=\"nobodyknow\", db=\"amit\") | |
cursor = conn.cursor() | |
stmt = \"SELECT * FROM overflows\" | |
cursor.execute(stmt) | |
# Fetch and output | |
result = cursor.fetchall() |
-- HOWTO: | |
-- after saving it, open with Script Editor (default) and run it | |
-- PREREQUISITES: | |
-- make sure your Keynote presentation is open in the background | |
-- AFTER EXPORT: | |
-- if you can't open the file due to encoding errors, open with Sublime (or another a text editor) and then "File / Save with encoding / UTF8" | |
tell application "Keynote" |
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
""" | |
Forked from https://gist.github.com/fedir/5466075 | |
Changes: | |
- allows to import Github gists into a local DASH database (https://kapeli.com/dash) | |
- gists are added to any existing snippet already in database | |
- filetypes are added, but support is very basic |
import string | |
def make_color_tuple( color ): | |
""" | |
turn something like "#000000" into 0,0,0 | |
or "#FFFFFF into "255,255,255" | |
""" | |
R = color[1:3] | |
G = color[3:5] | |
B = color[5:7] |
#!/usr/bin/env python | |
""" | |
# Version | |
2021-08-31 | |
# Tested on | |
Python 3.9 | |
# To strip/remove HTML tags from an existing string we can use the strip_tags function. | |
# import the strip_tags | |
from django.utils.html import strip_tags | |
# simple string with html inside. | |
html = '<p>paragraph</p>' | |
print html # will produce: <p>paragraph</p> | |
stripped = strip_tags(html) |
# from http://soledadpenades.com/2009/10/29/fastest-way-to-generate-wav-files-in-python-using-the-wave-module/ | |
import wave | |
import random | |
import struct | |
import datetime | |
SAMPLE_LEN = 44100 * 300 # 300 seconds of noise, 5 minutes | |
print "Create file using wave and writeframes twice in each iteration" |