Skip to content

Instantly share code, notes, and snippets.

Jon Crall Erotemic

Block or report user

Report or block Erotemic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:244890e27b37aa2219ac2f3414f8c302
(py36) joncrall@Ooo:~/code/netharn$ python setup.py build
--------------------------------------------------------------------------------
-- Trying "Ninja" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
@Erotemic
Erotemic / gist:1f9b19ad1d116c9731ce7f446f020ce4
Created Feb 9, 2019
cant find numpy error with pip install
View gist:1f9b19ad1d116c9731ce7f446f020ce4
(py36) joncrall@Ooo:~/code/netharn$ ./setup.py clean && pip install -e .
Deleting directory="./__pycache__"
Deleting directory="./_skbuild"
Not deleting non-existant path="./__pycache__/skbuild_pr.cpython-36.pyc"
Obtaining file:///home/joncrall/code/netharn
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: torch in /home/joncrall/.local/conda/envs/py36/lib/python3.6/site-packages (from netharn==0.1.8.dev0) (1.0.0)
Requirement already satisfied: tqdm in /home/joncrall/.local/conda/envs/py36/lib/python3.6/site-packages (from netharn==0.1.8.dev0) (4.23.4)
View ggr_matching.py
# -*- coding: utf-8 -*-
"""
This module can be used as both a script and an importable module.
Run `python ggr_matching.py --help` for more details.
See docstring in fit for more details on the importable module.
conda install opencv
conda install pytorch torchvision -c pytorch
@Erotemic
Erotemic / ubuntu_setup_venv3_standalone.sh
Last active Dec 19, 2018
The setup_venv3 bash command sets up a python3 virtual environment on a fresh ubuntu install. The file contains quite a few helper functions that make the actual implementation of setup_venv3 rather short.
View ubuntu_setup_venv3_standalone.sh
__heredoc__(){ NOOP=; }
has_pymodule(){
__heredoc__ '''
Check if a python module is installed. Echos "True" or "False" to the
command line depending on the result.
Example:
source $HOME/local/init/utils.sh
View scale_space.py
import scipy
import scipy.ndimage
import numpy as np
import ubelt as ub
def g(f, s, **kw):
"""
Apply a gaussian filter to an input signal
View benchmark_pandas.py
def benchmark_pandas():
import timerit
import pandas as pd
import numpy as np
column_data = {
key: np.random.rand(1000)
for key in map(chr, range(ord('a'), ord('z')))
}
View gist:27f80be9eca982aa51518770b826b6a4
Timer unit: 1e-06 s
Pystone time: 0.026254 s
File: /home/joncrall/code/netharn/netharn/models/yolo2/light_region_loss.py
Function: _build_targets_tensor at line 382
Line # Hits Time Per Hit % Time Line Contents
==============================================================
382 @profiler.profile
View gist:e6be4658bad9fa28a56bf4e7c516a820
Timer unit: 1e-06 s
Pystone time: 0.05441 s
File: /home/joncrall/code/netharn/netharn/models/yolo2/light_postproc.py
Function: _get_boxes at line 202
Line # Hits Time Per Hit % Time Line Contents
==============================================================
202 @profiler.profile
View gist:c94cfc71c6054329a254df43bb377eb8
Timer unit: 1e-06 s
Pystone time: 0.034663 s
File: /home/joncrall/code/netharn/netharn/models/yolo2/light_postproc.py
Function: _clip_boxes at line 139
Line # Hits Time Per Hit % Time Line Contents
==============================================================
139 @profiler.profile
View gist:79804dbadaeffad103e8d140f57bb6a2
# This is the CMakeCache file.
# For build in directory: /home/joncrall/code/caffe2/build_py3
# It was generated by CMake: /home/joncrall/.local/bin/cmake
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
You can’t perform that action at this time.