Skip to content

Instantly share code, notes, and snippets.

View ugo-nama-kun's full-sized avatar
🧠
@CogDevRobo

naoto yoshida ugo-nama-kun

🧠
@CogDevRobo
View GitHub Profile
@tuelwer
tuelwer / pytorch-lbfgs-example.py
Last active March 25, 2024 14:12
pytorch-L-BFGS-example
import torch
import torch.optim as optim
import matplotlib.pyplot as plt
# 2d Rosenbrock function
def f(x):
return (1 - x[0])**2 + 100 * (x[1] - x[0]**2)**2
@arthurmensch
arthurmensch / lbfgs.py
Last active October 20, 2023 06:33
LBFGS wrapper for Pytorch
"""
Copyright (c) 2017 Arthur Mensch
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@nyk510
nyk510 / Gpy_vs_sklearn.ipynb
Last active January 12, 2023 10:18
GPy と Scikit-learn のガウス過程の比較
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Suzeep
Suzeep / UniUtil.cs
Last active November 12, 2019 16:39
Unity用の汎用メソッド集
using UnityEngine;
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using System.Linq;
//================================================================================
// Unity用 汎用ライブラリ
//================================================================================
@kscottz
kscottz / mp32np.py
Created July 1, 2013 04:29
Convert mp3 to numpy array. Ugly, but it works.
import os
import scipy.io.wavfile as wav
# install lame
# install bleeding edge scipy (needs new cython)
fname = 'XC135672-Red-winged\ Blackbird1301.mp3'
oname = 'temp.wav'
cmd = 'lame --decode {0} {1}'.format( fname,oname )
os.system(cmd)
data = wav.read(oname)
# your code goes here
@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)