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
// ==UserScript==
// @name AutoNextUdemy
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.udemy.com/course/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=udemy.com
// @grant none
// ==/UserScript==
const temp1 = await fetch("https://api.accredible.com/v1/credential-net/spotlight_directories/26/user_profiles/search", {
"headers": {
"content-type": "application/json"
},
"body": JSON.stringify({
"page": 1,
"page_size": 10000,
"groups": [],
"skills": [],
"availability": null,
@GitHub30
GitHub30 / broadcast.server.py
Last active May 28, 2022 04:33
pip install websockets
#!/usr/bin/env python
import asyncio
import websockets
connected = set()
async def broadcast(websocket):
connected.add(websocket)
async for message in websocket:
websockets.broadcast(connected, message)
chrome.storage.onChanged.addListener(function(changes, namespace) {
console.log('changes', changes)
if (changes.youtube.newValue === '再生' || changes.youtube.newValue === '一時停止') document.querySelector(`[title="${changes.youtube.newValue}(k)"]`).click()
});
chrome.storage.local.set({youtube: '再生'})
chrome.storage.local.set({youtube: '一時停止'})
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 3 columns, instead of 4 in line 6.
緯度,経度,ラベル
35.173396,136.884284,Aerial View Meieki Testing Center/aerialview 名駅テスト
36.323295,139.006797,Takasaki-Aramachi Test Center
43.0692,141.347513,Sapporo Testing Center/イーエデュケーションズ札幌テスティングセンター
33.589744,130.392672,Tenjin Test Center / 天神会場
39.700598,141.143853,Morioka Saien Test Center
35.577432,139.659372,Breakthrough Co., Ltd_Musashikosugi
35.467716,139.61863,Breakthrough Co., Ltd_Yokohama/ブレイクスルー 横浜テストセンター
35.697177,139.776405,Akihabara Showadoriguchi Test Center/テストセンター秋葉原昭和通
35.682132,139.7723,iSERVE Yaesu Nihonbashi Test Center/iSERVE 八重洲日本橋テ
const url = 'https://www.cloudskillsboost.google/course_templates/8'
const doc = await fetch(url).then(r=>r.text()).then(html=>new DOMParser().parseFromString(html,'text/html'))
const modules = JSON.parse(doc.querySelector('ql-course').getAttribute('modules'))
const types = [...new Set(modules.flatMap(m=>m.steps).flatMap(s=>s.activities).map(a=>a.type))]
modules.flatMap(m=>m.steps).flatMap(s=>s.activities).map(a=>a.duration).reduce((a,b) => a+b)/1000/60/60
console.table(types.map(type => [type, modules.flatMap(m=>m.steps).flatMap(s=>s.activities).filter(a=>a.type === type).map(a=>a.duration).reduce((a,b) => a+b)/1000/60/60]))
@GitHub30
GitHub30 / Hellowork_Osaka_Free_Wi-Fi.md
Last active May 10, 2022 03:36
Hellowork_Osaka_Free_Wi-Fi Hellowork Osaka Free Wi-Fi umeda27020

Hellowork_Osaka_Free_Wi-Fi

WPA

umeda27020

false

await fetch('https://www.cloudskillsboost.google/profile/activity').then(r=>r.text()).then(html=>new DOMParser().parseFromString(html,'text/html')).then(doc=>JSON.parse(doc.querySelector('ql-table').getAttribute('data')))
@GitHub30
GitHub30 / mecab-unidic-neologd-neologd-google-colaboratory.ipynb
Created May 7, 2022 06:05
mecab-unidic-neologd NEologd Google Colaboratory
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
translate = lambda text, table: [text := text.replace(k, table[k]) for k in table][-1]
translate("Lorem ipsum dolor sit amet", {'amet': '','a': '','e': '','i': '','o': '','u': ''})