Skip to content

Instantly share code, notes, and snippets.

View jeffshek's full-sized avatar
🎯
Pomodoros?!

Jeffrey Shek jeffshek

🎯
Pomodoros?!
View GitHub Profile
@jirfag
jirfag / component.tsx
Last active April 10, 2022 18:33
React/Gatsby Table of Contents
View component.tsx
import React, { createRef } from "react"
import throttle from "lodash/throttle"
// Import styled components (see the Styles section below).
import {
TocDiv,
TocLink,
TocIcon,
TocTitle,
TocToggleOpener,
@shawwn
shawwn / ai.md
Last active September 5, 2019 05:34
Generated by writeup.ai
View ai.md

The following is a summary of the Code of Conduct.

The Code of Conduct is a set of rules, guidelines, and policies that govern the conduct of all members of the team (including staff, volunteers, and members of the public) that we maintain. It is designed to help ensure the integrity of the project and the community.

The Code of Conduct is designed to:

Promote the spirit of open communication, cooperation, and collaboration, and to encourage a positive work environment for all;

Promote the development of a team culture that encourages a positive work environment for all;

@omoindrot
omoindrot / tensorflow_finetune.py
Last active February 25, 2024 15:00
Example TensorFlow script for fine-tuning a VGG model (uses tf.contrib.data)
View tensorflow_finetune.py
"""
Example TensorFlow script for finetuning a VGG model on your own data.
Uses tf.contrib.data module which is in release v1.2
Based on PyTorch example from Justin Johnson
(https://gist.github.com/jcjohnson/6e41e8512c17eae5da50aebef3378a4c)
Required packages: tensorflow (v1.2)
Download the weights trained on ImageNet for VGG:
```
wget http://download.tensorflow.org/models/vgg_16_2016_08_28.tar.gz
@kunanit
kunanit / pandas_postgres.py
Created April 24, 2017 14:36
Read postgres database table into pandas dataframe
View pandas_postgres.py
import pandas as pd
from sqlalchemy import create_engine
# follows django database settings format, replace with your own settings
DATABASES = {
'production':{
'NAME': 'dbname',
'USER': 'user',
'PASSWORD': 'pass',
'HOST': 'rdsname.clqksfdibzsj.us-east-1.rds.amazonaws.com',
@pandafulmanda
pandafulmanda / Python3 Virtualenv Setup.md
Last active February 12, 2024 21:10 — forked from akszydelko/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac
View Python3 Virtualenv Setup.md

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
View folder-structure.md

Folder Structure

Please note

While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.

Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.

@toddself
toddself / measures.py
Created December 22, 2012 16:28
A system for converting between measurement systems
View measures.py
#!/usr/bin/env python
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active February 16, 2024 04:32 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
View pedantically_commented_playbook.yml
This playbook has been removed as it is now very outdated.