Skip to content

Instantly share code, notes, and snippets.

View initialkommit's full-sized avatar

bright initialkommit

  • Kakao Entertainment
  • Pangyo
View GitHub Profile
# https://hakibenita.com/fast-load-data-python-postgresql
from typing import Iterator, Dict, Any, Optional
from urllib.parse import urlencode
import datetime
#------------------------ Profile
import time
@cicdw
cicdw / post_standup_flow.py
Created February 25, 2019 01:02
complete code of the standup Prefect flow
import datetime
from google.cloud.firestore import Client
import random
import requests
import prefect
from prefect import Flow, Parameter, task
from prefect.client import Secret
from prefect.schedules import CronSchedule
@wronk
wronk / python_environment_setup.md
Last active November 27, 2023 16:18
Setting up your python development environment (with pyenv, virtualenv, and virtualenvwrapper)

Overview of Python Virtual Environments

This guide is targetted at intermediate or expert users who want low-level control over their Python environments.

When you're working on multiple coding projects, you might want a couple different version of Python and/or modules installed. This helps keep each workflow in its own sandbox instead of trying to juggle multiple projects (each with different dependencies) on your system's version of Python. The guide here covers one way to handle multiple Python versions and Python environments on your own (i.e., without a package manager like conda). See the Using the workflow section to view the end result.


h/t @sharkinsspatial for linking me to the perfect cartoon

@ncrash
ncrash / Brewfile
Last active April 30, 2024 09:57
맥 신규 셋팅할때 사용하는 Brewfile, 2번째 Brewfile 파일은 맥앱스토어 한국계정에 구입이력이 있는 프로그램 설치, Brewfile - https://github.com/Homebrew/homebrew-bundle 링크참고
# preperation install
sudo softwareupdate --install-rosetta
# how to install
# > brew bundle
# tap brew
tap "homebrew/bundle"
tap "homebrew/services"
tap "hashicorp/tap"
@bhtucker
bhtucker / upsert.py
Last active April 3, 2024 15:56
A demonstration of Postgres upserts in SQLAlchemy
"""
Upsert gist
Requires at least postgres 9.5 and sqlalchemy 1.1
Initial state:
[]
Initial upsert:
@montanaflynn
montanaflynn / setup.sh
Last active July 26, 2017 00:11
Shell script to setup OSX yosemite
#!/usr/bin/env bash
# Ask for sudo up front
echo "Some steps require sudo so please enter your password"
sudo -v
# Check for and install developer tools
xcode-select -p
if [ $? -ne 0 ]; then
# Install dev tools
@leevigraham
leevigraham / gist:922bcd86ebd30dd861d0
Last active July 21, 2018 03:59
OSX install Script
# Ask for the administrator password upfront
sudo -v
mkdir -p /Volumes/Sites/Work/Clients
mkdir -p /Volumes/Sites/Work/Internal
mkdir -p /Volumes/Sites/Personal
mkdir -p ~/Downloads/Torrents
xcode-select --install
@cornchz
cornchz / scraper.py
Last active May 1, 2018 12:13
[PyConKR 2014] 30분만에 따라하는 동시성 스크래퍼
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from gevent import monkey; monkey.patch_all()
import re
from urlparse import urljoin
from gevent.pool import Pool
import requests
@JesseBuesking
JesseBuesking / logging.yaml
Created April 14, 2014 18:54
Testing MultiProcessingLog on both Windows 7 Enterprise and Ubuntu Developers Version 10.04_20121120.
---
version: 1
disable_existing_loggers: False
formatters:
simple:
format: "%(name)-20s%(levelname)-8s%(message)s"
handlers:
console:
class: logging.StreamHandler
level: DEBUG
@ronaldsuwandi
ronaldsuwandi / config.fish
Last active July 30, 2021 07:54
My personal fish shell config for OS X. Supports git branch (fast git checks), virtualenv (if installed) and Kubernetes current context
function ls --description 'List contents of directory'
command ls -lFG $argv
end
function subl --description 'Launches sublime text in a new window'
command subl -n $argv
end
function code --description 'Launches visual code studio in a new window'
command code -n $argv