Skip to content

Instantly share code, notes, and snippets.

View pewho's full-sized avatar

Pewho Lewok pewho

View GitHub Profile
@pewho
pewho / tmux.conf
Created May 6, 2019 08:35
nord artic tmux conf
###################################################################
# General
###################################################################
# Appropriate terminal colors
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
# Start tabs at index 1
set -g base-index 1
@pewho
pewho / README.md
Created February 5, 2016 14:05
Responsive Navbar with susy

Responsive Navbar with suzy / scss

Works fine with pewho/browserSyncSuzy for testing

@pewho
pewho / logger-rails.sublime-snippet
Last active February 8, 2016 09:36
Sublime text 3 Snippet : Rails Tagged Log
<snippet>
<content><![CDATA[
Rails.logger.tagged('${1}') { Rails.logger.${2:info} "${3}" }
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>log</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.ruby</scope>
</snippet>
def extract_unique_row_for_col(df, colname):
with_col = df[df[colname].isnull() == False]
whithout_col = df[df[colname].isnull() == True]
grouped = with_col.groupby(colname)
index_unique = [grp_keys[0] for grp_keys in grouped.groups.values() if len(grp_keys) == 1]
index_non_unique = [groupkey for grp_keys in grouped.groups.values() for groupkey in grp_keys if len(grp_keys) > 1]
unique = with_col.reindex(index_unique)
@pewho
pewho / SFIdConverter
Created January 14, 2015 16:37
Sf Id converter in Python (15 > 18 char)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Parse as SF id 15 to 18
"""
__author__ = pewho