Skip to content

Instantly share code, notes, and snippets.

View kykosic's full-sized avatar

Kyle Kosic kykosic

View GitHub Profile
@kykosic
kykosic / tensorflow-evcxr.md
Created July 31, 2020 19:40
Setup Tensorflow rust to work in Jupyter evcxr kernel

Setup Tensorflow with evcxr

MacOS

Get the libtensorflow libraries in the LD_LIBRARY_PATH

  • Clone the tensorflow/rust repository
  • Build
cargo build --release
@kykosic
kykosic / Python-Development-Setup.md
Last active October 6, 2021 17:18
Instructions on how to setup a Python development environment using Conda.

Setting up a Python Development Environment

This guide explains how to setup a computer for effective Python development, while maintaining organized environments supporting multiple Python versions (if necessary). There are several Python environment managers out there; for this guide we will use Conda. Conda is a general-purpose environment manager that can be used for more than just Python, is cross-platform compatible, and integrates nicely with common terminals.

Install the Conda environment manager

The installation we will use is called "miniconda". It just comes with bare-bones Python without a bunch of unnecessary fluff (as opposed to full Anaconda). For all installs, I will assume you have a 64-bit system since it's not 2001.

Windows

On Windows, you have the option to install natively, which will give you the Anaconda Prompt command line to access python. If you're already familiar with Command Prompt syntax, this will be fine. **However, I highly suggest installing the Ubuntu subsystem

SETTINGS
{
"files.trimTrailingWhitespace": true,
"workbench.tree.indent": 20,
"window.nativeTabs": true,
"window.restoreFullscreen": true,
"window.openFoldersInNewWindow": "on",
"editor.rulers": [
100
],
@kykosic
kykosic / keras_profiler.py
Last active December 15, 2018 22:44
Save timeline traces of hardware metadata in Keras model.fit() calls.
"""
Keras Callback object for creating model run hardware profile timelines.
This callback is very slow, and should only be used for debugging.
"""
import os
import json
import logging
import tensorflow as tf
from tensorflow.python.client.timeline import Timeline
@kykosic
kykosic / artifact_scrape.py
Created November 30, 2018 12:06
Scrape current Artifact card prices from Steam Market
#!/usr/bin/env python
"""
Scrape artifact card prices
"""
from __future__ import division
import os
import time
import logging
from io import StringIO
from datetime import datetime
CONFIG - MAC
{
"auto_complete": false,
"color_scheme": "Packages/Color Scheme - Default/Monokai.sublime-color-scheme",
"font_size": 12,
"ignored_packages":
[
"Vintage"
],
"rulers":
@kykosic
kykosic / clearmem.sh
Created May 1, 2018 15:13
Clear memory caches of Ubuntu machine
sysctl -w vm.drop_caches=3
date
# Git branch labeling
find_git_branch() {
local branch
if branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null); then
if [[ "$branch" == "HEAD" ]]; then
branch='detached*'
fi
git_branch="($branch)"
else
git_branch=""
@kykosic
kykosic / .vimrc
Last active February 21, 2019 13:56
my vimrc
set term=xterm-256color
syntax enable
set number
set ts=4
set softtabstop=4
set expandtab
let python_highlight_all = 1
set noundofile
set autoindent
set colorcolumn=80