Skip to content

Instantly share code, notes, and snippets.

View MacHu-GWU's full-sized avatar

Sanhe Hu MacHu-GWU

  • Amazon Web Service Data Lab
  • Maryland, USA
View GitHub Profile
@MacHu-GWU
MacHu-GWU / 0_reuse_code.js
Created August 22, 2017 00:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@MacHu-GWU
MacHu-GWU / upsert.py
Created June 9, 2017 18:21 — forked from timtadh/upsert.py
How to compile an INSERT ... ON DUPLICATE KEY UPDATE with SQL Alchemy with support for a bulk insert.
#!/usr/bin/env python
# Copyright (c) 2012, Tim Henderson
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# - Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.