Skip to content

Instantly share code, notes, and snippets.

View GitHub30's full-sized avatar
🌴
On vacation

GitHub30

🌴
On vacation
  • Osaka, Japan
View GitHub Profile
@okohs
okohs / whitelist.md
Last active September 7, 2019 22:57
20180122_定時前に帰宅できた企業

はじめに

書き方

該当する各社の対応欄に企業名を書いてください。備考があれば適宜カッコ書きしてください。

目的

  • 定時前に帰宅させてくれるホワイトな会社のりすとを気軽に作りたい
  • 定時前に帰宅させてくれるホワイトな会社がホワイトアピールできる場があれば良いな

@GitHub30
GitHub30 / install.sh
Last active April 5, 2018 11:12
Install Adobe Reader on Linux
set -xe \
&& sudo apt install -y libxml2:i386 libstdc++6:i386 \
&& wget 'ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i386linux_enu.deb' \
&& sudo gdebi --non-interactive AdbeRdr9.5.5-1_i386linux_enu.deb
@sakage24
sakage24 / shutdown.py
Last active May 4, 2019 07:21
Chromeのダウンロード後に自動でシャットダウンするスクリプト
import os, sys
from time import sleep
TARGET_PATH = os.path.expanduser("~") + "\\Desktop" # ダウンロード先のフォルダを指定
STAND_BY_INIT = 120 # 再実行までの待機時間
TARGET_EXEC = [".crdownload", ".mega"]
MIN = 60
SEC = MIN - STAND_BY_INIT # 現在の待機秒数
def shutdown():
@kaityo256
kaityo256 / hpl.md
Last active November 18, 2020 09:34
HPLについて

HPLについて

これは以前Twitterに連投したものと、Qiitaに書いたものをまとめて加筆修正したものです。

はじめに

だいぶ前に一世を風靡し、今はもはや風化し始めている「2位じゃダメなんでしょうか?」という言葉がありました。ここで1位とか2位とか言っているのは、狭義にはスパコンのランキングTOP500の順位のことを指します。TOP500は、HPLというベンチマークによりスパコンの性能を測定し、そのランキングを決めるもので、年に2回ランキングが更新されます。以前、初代地球シミュレータが5期連続でトップを守りましたが、これは5年ではなく、2年半トップであった、というものです。

HPLとは、一言でいえば馬鹿でかい連立一次方程式を解くベンチマークです。問題サイズは自由に決められます。問題サイズが大きいほど性能を出しやすいですが、その分計算時間がかかるようになるため、実際には数時間〜数十時間程度で実行できる範囲のサイズが選ばれることが多いようです。問題が連立一次方程式なので、解いたあとに実際に代入して答えが合っているかどうかを確認します。実際には計算誤差などがあるため、その誤差が規定範囲内に収まっていれば合格となり、その時の演算性能がTOP500への報告値となります。

@vivahiraj
vivahiraj / button_line_send.rb
Created December 28, 2017 05:15
ダイソーのリモートシャッターを押すとLINEへメッセージを送るサンプル。rootで実行する必要あり
require 'device_input'
require 'rest-client'
require 'json'
class LineBot
TOKEN = "Channel Access Token"
TO = "送信先のID"
def self.send(msg)
headers = {
@santisbon
santisbon / Search my gists.md
Last active May 5, 2025 21:07
How to search gists.

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@kazuki
kazuki / rnnoise.py
Created November 25, 2017 01:39
Python Bindings for RNNoise(https://github.com/xiph/rnnoise/)
from ctypes import byref, c_float, c_void_p, CDLL
class RNNoise(object):
def __init__(self):
self._native = CDLL('./librnnoise.so')
self._native.rnnoise_process_frame.restype = c_float
self._native.rnnoise_process_frame.argtypes = (
c_void_p, c_void_p, c_void_p)
self._native.rnnoise_create.restype = c_void_p
@ksasao
ksasao / Program.cs
Last active June 10, 2022 19:04
Windows 10 組み込みのOCRを利用するサンプル。UWP の Windows.Media.Ocr が OCR に関するクラス。
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.Graphics.Imaging;
using Windows.Media.Ocr;
using Windows.Storage.Streams;
@tanaikech
tanaikech / submit.md
Last active January 5, 2025 06:32
Uploading Local Files to Google Drive without Authorization using HTML Form

Uploading Local Files to Google Drive without Authorization using HTML Form

This is a sample script for uploading local file to Google Drive without the authorization using HTML form. A selected file in your local PC using HTML form is uploaded to Google Drive and saved to Google Drive.

When you use this, at first, please deploy Web Apps. The script is doPost() of following scripts.

Script : Google Apps Script

function doPost(e) {
 var data = Utilities.base64Decode(e.parameters.data);
@SpotlightKid
SpotlightKid / test.sh
Last active August 30, 2024 08:46
Making a POST request with url or form-encoded params with MicroPython
$ micropython uget.py key1=value1 key2=value2 key2=value3
{'url': 'http://httpbin.org/get?key2=value3&key1=value1', 'headers': {'Host': 'httpbin.org', 'Connection': 'close'}, 'args': {'key2': 'value3', 'key1': 'value1'}, 'origin': 'XXX.XXX.XXX.XXX'}
$ micropython upost.py foo=bar spamm=42
{'files': {}, 'headers': {'Host': 'httpbin.org', 'Content-Length': '16', 'Content-Type': 'application/x-www-form-urlencoded', 'Connection': 'close'}, 'args': {}, 'form': {'spamm': '42', 'foo': 'bar'}, 'origin': 'XXX.XXX.XXX.XXX', 'data': '', 'json': None, 'url': 'http://httpbin.org/post'}