Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bathtimefish
bathtimefish / Finetuning_Rinna3_6b.ipynb
Last active July 17, 2023 04:38
Finetuning Rinna3.6b the LLM for Japanese on WSL Ubuntu 22.04 LTS with CUDA 12.1 on Windows 11
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bathtimefish
bathtimefish / install-cuda-on-wsl.sh
Last active July 17, 2023 04:13
WSL Ubuntu22.04 LTS に CUDA 12.2 をセットアップするためのスクリプト https://astherier.com/blog/2021/07/windows11-cuda-on-wsl2-setup/ に掲載のものを更新
#!/bin/bash
# Copyright (c) 2021 astherier
# This software is released under the MIT License.
# http://opensource.org/licenses/mit-license.php
#
#install-cuda-on-wsl.sh
#WSL2のUbuntu側で行うCUDA on WSLのセットアップスクリプト
#最終更新:2021/07/17
#https://astherier.com/blog/2021/07/windows11-cuda-on-wsl2-setup/
#
@bathtimefish
bathtimefish / clovaocr_infer_requestbody.json
Last active February 18, 2022 08:32
A request body sample for Clova OCR Infer API
This file has been truncated, but you can view the full file.
{
"version": "V2",
"requestId": "test1",
"timestamp": 0,
"lang": "ja",
"images": [
{
"format": "jpeg",
"name": "test-voucher",
"data": "iVBORw0KGgoAAAANSUhEUgAACiAAAAeYCAYAAACi643mAAAAAXNSR0IArs4c6QAAIABJREFUeF503WmPJUtyJubIPbOqbtXthQQpDsjhMhSbnCYB6aOEkfj/f8Ho0wgaLjPsbnbfpZZchdfMnwjLw2IBhcw8J8LD3dzstdfMzT3O/v7v/vzl6elpu7y62h4eH7bLy8v6//Hjx+3s7Gy7urraLs4vtpfn5+38/Hy7vrrcXp6etsfHx+3y4qI+e35+3q6uLrdte6n/Z2fb9nD/ZdteXrbr66vt2w/fbH/3y7/e/uD3f2972R63N3fX293t9XZ29rx9+9Nvt5ub6+3y8mr7b//t/90+ffpcz708P98ury62h4cv29nWzz4/O6u+vH37bru+vtkeHh62y7Otnvfykmf3z/T/+vq6vk8/8zN/5/d8f3FxsX369Kl+PzvftvPzs/o91+TZZ2fn28P9Y13XY7uqn2knPyOvXF99ujirMefafJZn5F/6kH+5xme5Ju1r4+npebu8ut6vyz3kmWvy+69//et6Xv6lf2nj/v6+Pku/vnz6vN3e3tb3P/744/b585Lf9VU9K/++fPmyvXnzpu59eLivucp3ef7j/VPJMt/leWk319/d3VX7kerzy/Pex4yRDCO3XPvy8lyf5Z60W7pxednyrec8VdvkuMvj8nJ7fH7aHp+etpubm11+6Uv+uS/3kmfay3jz99PjY81jfr57967kkr9vb++2q8ur7erquvqX/2k/zzVP6Vtk8i//8i8l1/xL/6L3rssc5HnkYs7pUdrMNfpGLvkZXfG3Oc9nuSf/09fM
@bathtimefish
bathtimefish / file0.txt
Last active September 3, 2019 12:58
restify + TypeScript + Jestの開発環境をセットアップしてみる ref: https://qiita.com/bathtimefish/items/82f886f6d2353af14e7a
npm i -g typescript webpack webpack-cli
We can't make this file beautiful and searchable because it's too large.
created,d1,d2,d3,d4,d5,d6,d7,d8
2019-07-16T15:00:10.766Z,27.67,60,1008.068,0,41.87,97,1038,
2019-07-16T15:00:40.748Z,27.66,59.99,1008.063,0,37.3,99,1050,
2019-07-16T15:01:10.650Z,27.64,60.07,1008.057,0,43.65,99,1056,
2019-07-16T15:01:41.800Z,27.67,60.15,1008.058,0,39.84,99,1050,
2019-07-16T15:02:10.836Z,27.62,60.46,1008.074,0,46.57,100,1060,
2019-07-16T15:02:40.887Z,27.66,60.3,1008.072,0,40.09,97,1041,
2019-07-16T15:03:10.756Z,27.63,60.59,1008.065,0,38.68,93,1014,
2019-07-16T15:03:40.698Z,27.71,60.64,1008.053,0,39.66,95,1029,
2019-07-16T15:04:10.739Z,27.79,60.31,1008.064,0,38.84,83,951,
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
selector:
matchLabels:
app: nginx
replicas: 2
template:
@bathtimefish
bathtimefish / get_sliding_window.py
Last active January 8, 2019 05:20
配列からスライス窓を生成する
import numpy as np
def getSlidingWindow(a, size, step=1):
if not ((type(size) == type(0)) and (type(step) == type(0))):
raise Exception("type(size) and type(step) must be int.")
if step > size:
raise Exception("step must not be larger than size.")
if size > len(a):
raise Exception("size must not be larger than array length.")
a = np.asarray(a)
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF8">
<title>Send mail when webpage opened</title>
</head>
<body>
<script>
window.onload = function() {
var event_name = 'webpage_opened';
var bleacon = require('bleacon');
var uuidSeed = 'e279e48e-5b42-401d-b3ac-8289017070e6';
var uuid = uuidSeed.replace(/-/g,'');
var major = 0;
var minor = 0;
var measuredPower = -59;
console.log('Start iBeacon...');
bleacon.startAdvertising(uuid, major, minor, measuredPower);