Skip to content

Instantly share code, notes, and snippets.

View CLRafaelR's full-sized avatar
🏗️
Las vacaciones de verano con boleto de ida(片道切符の夏休み)

Masataka Ogawa CLRafaelR

🏗️
Las vacaciones de verano con boleto de ida(片道切符の夏休み)
  • ههههههههههههههههههههه
View GitHub Profile
@kmaed
kmaed / numeric-ja-examples.bib
Created February 5, 2012 18:44
biblatex で日本語を使ってみる
@article{piyo,
title="The world of {PIYO}",
author="Piyo, T.",
journal="J. Piyo",
volume="1",
pages="1--10",
year="2012",
publisher="Piyopiyo"
}
@arcaravaggi
arcaravaggi / update_migrate.R
Last active July 4, 2024 12:57
Update R and migrate R packages to new installation from within the console
#From https://stackoverflow.com/questions/1401904/painless-way-to-install-a-new-version-of-r
# Run in the old version of R (or via RStudio)
setwd("C:/Temp/")
packages <- installed.packages()[,"Package"]
save(packages, file="Rpackages")
# INSTALL NEW R VERSION
if(!require(installr)) { install.packages("installr"); require(installr)} #load / install+load installr
# See here for more on installr: https://www.r-statistics.com/2013/03/updating-r-from-r-on-windows-using-the-installr-package/
@tacigar
tacigar / lpeg_test.lua
Last active July 4, 2022 14:27
Lua製PEG「LPeg」を触ってみた.
--[[
LPegはPEG(Parsing Expression Grammar)のLua実装.
文脈自由文法と違いPEGでは「これらのうちどれか」ではなく,「最初の解析が
うまくいったらそれを, 失敗なら次を順に試してゆき, 成功したものを採用」する.
install: `luarocks install lpeg`.
]]--
LPeg = require "lpeg"
-- SはSetのSで, 文字列内のどれかの文字にマッチ.
-- patt^0はpatt*と同じ.
@gadenbuie
gadenbuie / xaringan-decouple-code-plot.Rmd
Last active November 22, 2021 16:54
Decouple code and plots (or results) in xaringan slides
---
title: "Decouple Code and Output in xaringan slides"
subtitle: "Demo Slides for <a href='https://garrickadenbuie.com/blog/2018/08/14/decouple-code-and-output-in-xaringan-slides/'>Related Blog Post</a>"
author: "Garrick Aden-Buie"
date: "`r Sys.Date()`"
output:
xaringan::moon_reader:
lib_dir: libs
nature:
ratio: 16:9
@zhensongren
zhensongren / uninstall_python3.MD
Last active July 24, 2024 17:17
How to uninstall python3 from Ubuntu

To list all python versions in default locations

ls /usr/bin/python*

To remove just python3 package

sudo apt-get remove python3.5

plus it's dependent packages

sudo apt-get remove --auto-remove python3.5

plus configuration and/or data files of python3

sudo apt-get purge python3.5

USER_OPTIM_FLAGS= -pipe -fPIC -O3 -mtune=native -march=native
# I couldn't tell whether the opencl headers we use existed in `StanHeaders` on cran
# So I do a
# git clone --recursive https://github.com/stan-dev/rstan
# and then include the OpenCL headers
USER_OPENCL_FLAGS= -I"/path_to_rstan/rstan/StanHeaders/inst/include/mathlib/lib/opencl_2.1.0"
# You can get these with clinfo -l
USER_OPENCL_FLAGS+= -DSTAN_OPENCL=1 -DOPENCL_DEVICE_ID=1 -DOPENCL_PLATFORM_ID=2 -lOpenCL
# Some extra bits we need
USER_OPENCL_FLAGS+= -DCL_HPP_TARGET_OPENCL_VERSION=120 -DCL_HPP_MINIMUM_OPENCL_VERSION=120 -DCL_HPP_ENABLE_EXCEPTIONS -Wno-ignored-attributes
@idiotWu
idiotWu / u-jap.tex
Created June 9, 2020 12:32
biblatex で日本語文献をサポート
% 日本語文献サポート
\AtEveryBibitem{
% langid={Japanese} で識別
\iffieldequalstr{langid}{Japanese} {
% コンマで区切り
\DeclareDelimFormat{finalnamedelim}{%
\ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
\addspace\multinamedelim
}
% 名前を「姓 名」の順に
@yjunechoe
yjunechoe / P_lab_ggplot2.Rmd
Last active December 8, 2021 10:22
{ggplot2} flipbook for Phonetics Lab (10/23/20) - style guide & showcasing
---
title: "Visualizing Data (in R)"
subtitle: "An opinionated style guide"
author: "<br><br>June Choe<br><br>Phonetics Lab"
date: '2020-10-23'
output:
xaringan::moon_reader:
lib_dir: libs
css: [default, hygge, ninjutsu]
nature:
\usepackage[top=2cm, bottom=3cm, left=2cm, right=2cm]{geometry}
\newlength{\abstractwidth}
\setlength{\abstractwidth}{15cm}
\renewcommand{\baselinestretch}{0.9}
\pagestyle{empty}
\thispagestyle{empty}
@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active July 25, 2024 02:47
ローカルLLMはこーやって使うの💢
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.