Skip to content

Instantly share code, notes, and snippets.

View panzerstadt's full-sized avatar
:octocat:
editing status

Tang Li Qun panzerstadt

:octocat:
editing status
View GitHub Profile
from nltk.stem.lancaster import LancasterStemmer
from nltk.corpus import stopwords
from nltk import word_tokenize
from many_stop_words import get_stop_words
import re
def normalize_sentences(sentence, language='en', debug=False):
stemmer = LancasterStemmer()
@panzerstadt
panzerstadt / index.js
Last active November 30, 2018 05:40
starter code, with a simple example function, labelled for quick start
// this code is edited from the original:
// https://medium.com/iotforall/build-your-first-custom-alexa-skill-in-10-minutes-2d27485727ed
// import
var alexa = require("alexa-app");
// 1. DEFINE APP
// -------------
// your app, on the first time it opens, does this
const App = (request, response) => {
@panzerstadt
panzerstadt / twelce-days-of-christmas.js
Created February 8, 2020 08:04
generate the song "Twelve days of Christmas"
const gifts = {
first: "a Partridge in a Pear Tree.",
second: "two Turtle Doves",
third: "three French Hens",
fourth: "four Calling Birds",
fifth: "five Gold Rings",
sixth: "six Geese-a-Laying",
seventh: "seven Swans-a-Swimming",
eighth: "eight Mails-a-Milking",
ninth: "nine Ladies Dancing",
@panzerstadt
panzerstadt / README.md
Last active June 17, 2024 14:50
QMK keycode to open a program

most of the above file is copied from the default keymap.c file from the hifumi keymap. the above file is a full copy pasted keymap.c, ready for use on a hifumi 6-key macropad, keymaps doing:

first col second col third col
page down up arrow start steam
left arrow down arrow right arrow

TLDR: on your keymap:

<template>
<div>
{{ count }}
<button @click="count++">increment</button>
<button @click="reset">reset</button>
<br>
<br>
<strong v-if="count === 0">Please increment</strong>
<em v-else-if="count === 1">That's {{ count }}. Go on</em>
@panzerstadt
panzerstadt / package.json
Created May 30, 2020 06:03
package.json that sets up Deno global namespace intellisense. run `npm run setup`, make an app.ts file, and get to work!
{
"name": "deno-with-setup",
"version": "1.0.0",
"description": "",
"main": "app.ts",
"scripts": {
"start": "deno run app.ts",
"setup": "npm run setup:tsconfig && npm run setup:deno",
"setup:tsconfig": "echo {\"compilerOptions\": { \"types\": [\"./deno.d.ts\"] }} > tsconfig.json",
"setup:deno": "deno types > deno.d.ts"
@panzerstadt
panzerstadt / HHKB KLE data with 7u spacebar : Happy Hacking Keyboard layout raw data
Last active August 24, 2023 21:40
HHKB KLE data with 7u spacebar : Happy Hacking Keyboard layout raw data (http://www.keyboard-layout-editor.com/)
["esc","!\n1","@\n2","#\n3","$\n4","%\n5","^\n6","&\n7","*\n8","(\n9",")\n0","_\n-","+\n=","|\n\\","~\n`"],
[{w:1.5},"Tab","Q","W","E","R","T","Y","U","I","O","P","{\n[","}\n]",{w:1.5},"Delete"],
[{w:1.75},"Ctrl","A","S","D","F","G","H","J","K","L",":\n;","\"\n'",{w:2.25},"Return"],
[{w:2.25},"Shift","Z","X","C","V","B","N","M","<\n,",">\n.","?\n/",{w:1.75},"Shift","Fn"],
[{x:1.5,w:1},"Option",{w:1.5},"⌘",{a:7,w:7},"",{a:4,w:1.5},"⌘",{w:1},"Option"]