Skip to content

Instantly share code, notes, and snippets.

View namhkoh's full-sized avatar
💻
Processing...

Namho Koh namhkoh

💻
Processing...
View GitHub Profile
@granoeste
granoeste / EachDirectoryPath.md
Last active November 4, 2024 06:16
[Android] How to get the each directory path.

System directories

Method Result
Environment.getDataDirectory() /data
Environment.getDownloadCacheDirectory() /cache
Environment.getRootDirectory() /system

External storage directories

@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active November 16, 2024 19:48
Conventional Commits Cheatsheet

Conventional Commit Messages starline

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

from __future__ import print_function
import argparse
import os
import random
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.optim as optim
import torch.utils.data
def reduce_to_k_dim(M, k=2):
""" Reduce a co-occurence count matrix of dimensionality (num_corpus_words, num_corpus_words)
to a matrix of dimensionality (num_corpus_words, k) using the following SVD function from Scikit-Learn:
- http://scikit-learn.org/stable/modules/generated/sklearn.decomposition.TruncatedSVD.html
Params:
M (numpy matrix of shape (number of corpus words, number of corpus words)): co-occurence matrix of word counts
k (int): embedding size of each word after dimension reduction
Return:
M_reduced (numpy matrix of shape (number of corpus words, k)): matrix of k-dimensioal word embeddings.
public class NetworkManager : MonoBehaviour {
private void Start() {
StartCoroutine(MakeRequests());
}
private IEnumerator MakeRequests() {
// GET
var getRequest = CreateRequest("https://jsonplaceholder.typicode.com/todos/1");
yield return getRequest.SendWebRequest();