Skip to content

Instantly share code, notes, and snippets.

View cppxaxa's full-sized avatar
💭
(Additional user cppxaxa-1)

Christ Prateek Prasanna Xaxa cppxaxa

💭
(Additional user cppxaxa-1)
View GitHub Profile
@cppxaxa
cppxaxa / expose-kubernetes-dashboard.sh
Created October 5, 2023 04:25
A script to expose the microk8s kubernetes-dashboard and bind the clusterIP:443 with host 443 port on all IPs
clusterIp=$(microk8s kubectl get service kubernetes-dashboard -n kube-system -o yaml | grep clusterIP: | awk '{print $2}')
echo "Found clusterIp=$clusterIp, now $clusterIp:443 port is forwarded to 0.0.0.0:443"
redir --lport 443 --laddr=0.0.0.0 --cport 443 --caddr=$clusterIp
@aqzlpm11
aqzlpm11 / ahk_record.ahk
Created June 4, 2020 11:01
Recording script for AHK
;-----------------------------------
; Macro Recorder v2.1 By FeiYue
;
; Description: This script records the mouse
; and keyboard actions and then plays back.
;
; F1 --> Record(Screen) (CoordMode, Mouse, Screen)
; F2 --> Record(Window) (CoordMode, Mouse, Window)
; F3 --> Stop Record/Play
; F4 --> Play LogFile

Installing AllenNLP on Windows

This is not guaranteed to work, but it might be worth trying. (If it doesn't work, it's doubtful I can help you any further than this.)

  1. Make sure you have a lot of hard drive space
  2. Install Anaconda and create a python 3.7 environment
  3. Follow the instructions at pytorch.org to install the appropriate pytorch
  4. Install the Visual C++ Build Tools https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017
  5. install cython: conda install cython
  6. pip install allennlp==0.6.0
@acdha
acdha / simple_cors_server.py
Last active May 3, 2024 22:08
Python 3: serve the current directory as HTTP while setting CORS headers for XHR debugging
#!/usr/bin/env python3
# encoding: utf-8
"""Use instead of `python3 -m http.server` when you need CORS"""
from http.server import HTTPServer, SimpleHTTPRequestHandler
class CORSRequestHandler(SimpleHTTPRequestHandler):
def end_headers(self):
self.send_header('Access-Control-Allow-Origin', '*')