Skip to content

Instantly share code, notes, and snippets.

View noirmist's full-sized avatar

Jungwoo noirmist

  • HCI Lab
  • Seoul.KR
View GitHub Profile
@eknight7
eknight7 / BUILD
Last active February 8, 2023 06:24
Multi-Hand Tracking via Live Webcam on CPU on Desktop: Shows how to extract landmarks on desktop.
// Copyright 2019 The MediaPipe Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@jcheong0428
jcheong0428 / openface_shared.ipynb
Last active March 7, 2024 15:53
OpenFace_Shared.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shoark7
shoark7 / python-print-advanced.md
Last active November 8, 2022 08:39
Python의 print 함수에 대해 좀더 알아봅니다.

먼저 오늘도 고생 많으셨습니다.

오늘 들으신 내용은 거의 모든 언어에서 처음 배우기 마련인 출력에 대한 함수입니다. 파이썬에서는 대표적으로 print를 배우게 되는데요. 이 print라는 함수에 대해 보다 심화된 내용을 소개드리려고 합니다.

먼저 시작에 앞서 다음과 같이 입력해보겠습니다.

help(print)
@noirmist
noirmist / collate.py
Created March 5, 2019 04:44 — forked from rkaplan/collate.py
PyTorch example of a custom collate function that uses shared memory when appropriate
import functools
def my_collate(batch, use_shared_memory=False):
r"""Puts each data field into a tensor with outer dimension batch size"""
error_msg = "batch must contain tensors, numbers, dicts or lists; found {}"
elem_type = type(batch[0])
if isinstance(batch[0], torch.Tensor):
out = None
if use_shared_memory:
@rkaplan
rkaplan / collate.py
Last active June 4, 2020 00:54
PyTorch example of a custom collate function that uses shared memory when appropriate
import functools
def my_collate(batch, use_shared_memory=False):
r"""Puts each data field into a tensor with outer dimension batch size"""
error_msg = "batch must contain tensors, numbers, dicts or lists; found {}"
elem_type = type(batch[0])
if isinstance(batch[0], torch.Tensor):
out = None
if use_shared_memory:
from torch import *
import torch.nn.functional as F
import torch.nn as nn
class RNNModel(nn.Module):
"""
Neural Network Module with an embedding layer, a recurent module and an output linear layer
Arguments:
rnn_type(str) -- type of rnn module to use options are ['LSTM', 'GRU', 'RNN_TANH', 'RNN_RELU']
@lantiga
lantiga / README.md
Created February 6, 2018 08:25
Indexed convolution

Indexed convolutions

A convolution operator over a 1D tensor (BxCxL), where a list of neighbors for each element is provided through a indices tensor (LxK), where K is the size of the convolution kernel. Each row of indices specifies the indices of the K neighbors of the corresponding element in the input. A -1 is handled like for zero padding.

Note that the neighbors specified in indices are not relative, but rather absolute. They have to be specified for each of the elements of the output.

A use case is for convolutions over non-square lattices, such as images on hexagonal lattices coming from Cherenkov telescopes (http://www.isdc.unige.ch/%7Elyard/FirstLight/FirstLight_slowHD.mov).

Example:

@Geoyi
Geoyi / install virtualenv ubuntu 16.04.md
Created September 16, 2017 12:19 — forked from frfahim/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@Sitin
Sitin / install.sh
Last active February 1, 2022 19:35
Install Autodesk's Python FBX SDK for Homebrew Python 2.7 & 3.x
function link_fbx_sdk() {
INTERPRETER=$1
SITE_PACKAGES=`$INTERPRETER -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"`
PYTHON_LIB="${2}"
echo "[Installing] '$PYTHON_LIB' to '$SITE_PACKAGES'"
pushd $SITE_PACKAGES
for file in "${PYTHON_LIB}"/*
do
@Musinux
Musinux / install-packages.sh
Last active March 29, 2021 12:49
VNC xstartup for unity WARNING ! THIS WAS WRITTEN A LONG TIME AGO (2018), IT MAY NOT BE RELEVANT ANYMORE
#!/bin/bash
# WARNING ! THIS WAS WRITTEN A LONG TIME AGO (2018), IT MAY NOT BE RELEVANT ANYMORE
sudo apt-get install vnc4server ubuntu-desktop
sudo apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal