Skip to content

Instantly share code, notes, and snippets.

Kowloon walled city (coin) kwccoin

View GitHub Profile
kwccoin / match.c
Created Aug 2, 2020 — forked from ianmackinnon/match.c
C Regex multiple matches and groups example
View match.c
# gcc -Wall -o match match.c && ./match
#include <stdio.h>
#include <string.h>
#include <regex.h>
kwccoin /
Created Jun 11, 2020 — forked from linstantnoodles/
Get amazon prime information on Roger Ebert Great Movies
import requests
import csv
import os
import json
import re
from bs4 import BeautifulSoup
import mechanize
from random import choice
user_agents = ['Mozilla/5.0 (X11; U; Linux; i686; en-US; rv:1.6) Gecko Debian/1.6-7','Konqueror/3.0-rc4; (Konqueror/3.0-rc4; i686 Linux;;datecode)','Opera/9.52 (X11; Linux i686; U; en)']
random_user_agent = choice(user_agents)
View Python Wake on LAN
# A Wake on LAN program that allows you to send magic packets over the Internet
import socket, struct
class Waker():
def makeMagicPacket(self, macAddress):
# Take the entered MAC address and format it to be sent via socket
splitMac = str.split(macAddress,':')
# Pack together the sections of the MAC address as binary hex
kwccoin / .env.sample
Created Dec 20, 2019 — forked from manrajgrover/.env.sample
Quick Docker Environment for TensorFlowJS Node
View .env.sample
# Card Game
# In this game, you have to find matching pairs of cards.
# This scene consists entirely of layers and demonstrates some
# interesting animation techniques.
from scene import *
from random import shuffle
from functools import partial
import sound
kwccoin /
Created Jul 31, 2019 — forked from gillibrand/
An Air Hockey game for Pythonista on iPad and iPhone. Yes, I typed this all on my iPad. A little painful.
# Hockey
# A air hockey game for two players. First to
# seven wins.
# Most of the game is drawn with the scene
# module. Goal and winner messages are animated
# with layers.
from scene import *
from sound import *
View gist:8309db2b79c3691b32f7250eb2b7e483
/** @jsx React.DOM */
var GameStatus = {
var Suits = ['H', 'D', 'C', 'S'];
var Cards = [];
View fraud-testing.clj
(defn f-beta
"F-beta score, default uses F1"
([precision recall] (f-beta precision recall 1))
([precision recall beta]
(let [beta-squared (* beta beta)]
(* (+ 1 beta-squared)
(try ;; catch divide by 0 errors
(/ (* precision recall)
(+ (* beta-squared precision) recall))
(catch ArithmeticException e
View Visual Studio Code(VS Code)用 WordStarライクなKeyboard Shortcuts
// Place your key bindings in this file to overwrite the defaults
//---- 他の方のを流用 ----
// ↑up
{ "key": "ctrl+e", "command": "cursorUp",
"when": "editorTextFocus" },
{ "key": "shift+ctrl+e", "command": "cursorUpSelect",
"when": "editorTextFocus" },
You can’t perform that action at this time.