Skip to content

Instantly share code, notes, and snippets.

View sarsamurmu's full-sized avatar

Sarsa Murmu sarsamurmu

View GitHub Profile
@sarsamurmu
sarsamurmu / 1by1.html
Last active December 31, 2023 16:32
Image Occlusion Enhanced One by One
<script>
var mask = document.querySelector('#io-overlay > img');
var svg = null
var nFill = '#FFF'
var qFill = '#FF7E7E'
var maskGroup = null
var occs = null
var currOccIdx = 0
async function swapToSvg() {
@sarsamurmu
sarsamurmu / card.html
Last active February 17, 2024 09:59
Highlight partly matched word
<script>
{
let s = `{{Reading_Sentence}}`
const targets = `{{Morph}}`
/** Mark part for highlighting later */
const hl = (s, partial = false) => partial ? `{#(${s})}` : `{(${s})}`
s = s.replace(/\s+/g, ' ')
let output = null
@sarsamurmu
sarsamurmu / README.md
Last active April 25, 2024 18:47
New Image Occlusion with Auto Occlude server

Setting up server

  • First install python in your system and make sure that these commands (run in terminal) give no error
python --version
pip --version
  • Then save the server.py file to a directory and run these commands in terminal to install dependencies