Sometimes you have to move data from one table to a different one. You usually use
insert into target select * from source
This works but have several problems:
- materialized columns are not properly copied
- it's slow
// ==UserScript== | |
// @name Dowmload VSIX | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0.0 | |
// @description This userscript allows you to download VSIX files directly from the Visual Studio Marketplace | |
// @updateURL https://gist.githubusercontent.com/Sigmanor/8e367568ba3dd88b8a2c30fb7ec083e3/raw/script.user.js | |
// @downloadURL https://gist.githubusercontent.com/Sigmanor/8e367568ba3dd88b8a2c30fb7ec083e3/raw/script.user.js | |
// @author sigmanor | |
// @homepageURL https://github.com/Sigmanor | |
// @match https://marketplace.visualstudio.com/* |
Sometimes you have to move data from one table to a different one. You usually use
insert into target select * from source
This works but have several problems:
import sentry_sdk | |
from scrapy.exceptions import NotConfigured | |
class SentryLogging(object): | |
""" | |
Send exceptions and errors to Sentry. | |
""" | |
@classmethod | |
def from_crawler(cls, crawler): |
0-00.usa.cc | |
0-180.com | |
0-30-24.com | |
0-420.com | |
0-900.com | |
0-aa.com | |
0-mail.com | |
0-z.xyz | |
0.pl | |
00.pe |
/* | |
See https://twitter.com/renschler/status/1081666886377619457 for context, | |
this gist contains JS snippets you can use one after another to download a csv with your liked tweets. | |
*/ | |
/* ***************************************************************************** */ | |
/* | |
Scroll to load liked tweets... | |
Fist go to your likes page : https://twitter.com/i/likes |
pipenv install ipykernel jupyter | |
pipenv shell | |
python -m ipykernel install --user --name=$(basename $(pwd)) | |
jupyter notebook | |
# then in UI, switch kernel to the one matching your pipenv shell name |
jq — https://jqlang.org/ — "like sed for JSON data"
There are several options available for installing jq.
I prefer to use Homebrew: brew install jq
from sqlalchemy.dialects import postgresql | |
def bulk_upsert(session: Session, | |
items: Sequence[Mapping[str, Any]]): | |
session.execute( | |
postgresql.insert(MyModel.__table__) | |
.values(items) | |
.on_conflict_do_update( | |
index_elements=[MyModel.id], | |
set_={MyModel.my_field.name: 'new_value'}, |
This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.
Convert .mov/.MP4 to .gif
As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.
This is not limited to developer, anyone has this need can use this method to convert the files.