Skip to content

Instantly share code, notes, and snippets.

View gijigae's full-sized avatar

Sangmin Ahn gijigae

View GitHub Profile
@gijigae
gijigae / iframe.html
Created June 19, 2022 12:46
iframe code for Logseq
<iframe src="URL" scrolling="YES" style="width: 100%; height: 800px" ><iframe/>
@gijigae
gijigae / custom.css
Created June 18, 2022 01:32
Toggle the size of YouTube video player in Logseq
/* YouTube Video */
iframe[id^='youtube-player'] {
height: 200px !important;
width: 400px !important;
}
div.ls-wide-mode iframe[id^='youtube-player'] {
height: 600px !important;
width: 100% !important;
}
/* YouTube Video */
@gijigae
gijigae / n2l.js
Last active August 25, 2022 11:27
Bookmarklet to copy Newsela articles to Logseq
javascript:void function(){const a=document.querySelector("%23article-title").textContent,b=document.querySelector("h2[data-qa-selector=article_label_text]").textContent,c=document.querySelector("div span[data-qa-selector=word_count]").textContent,d=document.querySelector("%23toggle-level-menu-button > span.css-1kpr3n6-Yo > span.css-1xa972w-Yo > span").textContent,e=document.querySelector("article img").getAttribute("src"),f=document.evaluate("//span[text()='Published:']",document,null,XPathResult.ANY_TYPE,null),g=f.iterateNext(),h=new Date(g.nextElementSibling.textContent),i=(a=>{const b=a.getFullYear(),c=a.toLocaleString("en-us",{month:"long"}),d=(a=>a+(0<a%3F["th","st","nd","rd"][3<a%26%2621>a||3<a%2510%3F0:a%2510]:""))(a.getDate());return`${c} ${d}, ${b}`})(h),j=document.querySelectorAll("div[data-qa-selector=article_text] p,div[data-qa-selector=article_text] h2");let k=location.href;try{k=document.querySelector("link[rel='canonical']").getAttribute("href")}catch(a){console.log("canonical url is not found
@gijigae
gijigae / hello-python.ipynb
Created September 16, 2021 11:51
hello-python.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gijigae
gijigae / AAAMLP.py
Created September 9, 2021 11:50
AAAMLP
# IMPORTANT: RUN THIS CELL IN ORDER TO IMPORT YOUR KAGGLE DATASETS
# TO THE CORRECT LOCATION (/kaggle/input) IN YOUR NOTEBOOK,
# THEN FEEL FREE TO DELETE CELL.
import os
import sys
from tempfile import NamedTemporaryFile
from urllib.request import urlopen
from urllib.parse import unquote
from urllib.error import HTTPError
@gijigae
gijigae / untitled3.ipynb
Created August 13, 2021 15:39
Untitled3.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
The Japan Sumo Association is in trouble regarding baseball gambling. It is said that some sumo wrestlers and a stable master have bet illegally on baseball games. I guess that the gambles have been doing for a long time as a practice among some sumo wrestlers. Especially, an Ozeki sumo wrestler was reportedly threatened by a gangster. The gangster demanded hush money to the wrestler regarding his betting baseball games. Baseball gambles are conducted by gangsters. Therefore, they become their fund to act. To participate the gambles helps such antisocial groups. There are many other problems in the Sumo Association which are revealed in these days. I hope that it will regenerate.
@gijigae
gijigae / index.html
Last active February 25, 2016 12:47
index.html for botkit
<html>
<head>
<title>Dot Bot</title>
<meta id="viewport" name="viewport" content ="width=device-width, initial-scale=1.0, overflow:hidden, user-scalable=no" />
<link href='https://fonts.googleapis.com/css?family=Unica+One|Lato:400,100,700' rel='stylesheet' type='text/css'>
<style>
.flexbox-container {
display: flex;
flex-direction: column;
align-items: center;
@gijigae
gijigae / package.js
Created February 25, 2016 11:48
Package for botkit
{
"name": "miraibot",
"version": "0.0.1",
"description": "Slack bot scaffolding",
"main": "miraibot.js",
"scripts": {
"start": "node miraibot.js"
},
"author": "Sangmin Ahn",
"license": "MIT",