Skip to content

Instantly share code, notes, and snippets.

View NicolaiSchmid's full-sized avatar
💭
🤌🛎️

Nicolai Schmid NicolaiSchmid

💭
🤌🛎️
View GitHub Profile
@Krilecy
Krilecy / XLNet_seq_class_example.py
Last active April 5, 2021 21:58
Hugging Face Sequence Classification Example with XLNet
from transformers import AutoTokenizer, AutoModelForSequenceClassification, XLNetTokenizer
import torch
tokenizer = XLNetTokenizer.from_pretrained("ynie/xlnet-large-cased-snli_mnli_fever_anli_R1_R2_R3-nli")
model = AutoModelForSequenceClassification.from_pretrained("ynie/xlnet-large-cased-snli_mnli_fever_anli_R1_R2_R3-nli")
classes = ["not paraphrase", "is paraphrase"]
sequence_0 = "The company HuggingFace is based in New York City"
sequence_1 = "Apples are especially bad for your health"

babel-plugin-transform-mui-imports npm

A plugin to make authoring with MUI components efficient, both for humans and bundlers.

Here's why:

@byk0t
byk0t / docker-compose.yml
Last active January 26, 2024 16:08
Docker compose for odoo:14 and PostgreSQL:13
version: '3'
services:
db:
image: postgres:13
volumes:
- db-data:/var/lib/postgresql/data/pgdata
ports:
- 5432:5432/tcp
environment:
- POSTGRES_PASSWORD=odoo
@johnstcn
johnstcn / ethminer_ubuntu_nvidia.md
Last active October 1, 2022 16:34
NVIDIA/CUDA ethminer setup under Ubuntu Server 16.04

Headless Ethminer (nVidia) Setup Guide

Cian Johnston, July 2017

WARNING: THESE WORDS ARE OLD AND MAY NOT WORK FOR YOU IN THESE NEW AND INTERESTING TIMES.

A couple of weeks ago, I decided I should put my gaming rig to work crypto mining. I did not expect to make any significant profit on this, it was more of a fun project to set up. However, there were a large number of tutorials and guides already out there, and many were more than a year out of date.

This guide assumes the reader already has a crypto wallet set up, is comfortable with Linux and the command line, and knows how to use Google if they run into problems.

The end result is an Ubuntu 16.04 LTS headless server running CUDA ethminer via systemd.

@NicolaiSchmid
NicolaiSchmid / cloudSettings
Last active July 21, 2021 11:33
Visual Studio Code Sync Settings Gist
{"lastUpload":"2021-07-21T11:33:45.864Z","extensionVersion":"v3.4.3"}
@timofurrer
timofurrer / gist:83a313a0b0a79c740d2598349670b639
Last active June 13, 2018 20:31
URL to find issues I participated in
https://github.com/search?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+involves%3Atimofurrer&type=Issues&ref=searchresults
@blueset
blueset / README.md
Last active October 21, 2022 02:56
Download/Print StuDocu.com documents without watermark

Usage

Add StuDocu Extracter to your Browser favorites, and click on it after you open the StuDocu document.

How it works

javascript:(function(){var a = "", x = document.getElementsByTagName("svg"); for(var i = 0; i < x.length; i++){a += x[i].outerHTML;} document.getElementsByTagName("body")[0].innerHTML = a;var a = document.getElementsByTagName("svg");for (var i = 0; i < a.length; i++){a[i].style.width="99.8%";a[i].style.height="auto";a[i].style.position="inherit";a[i].style.display="block";a[i].style.boxShadow="0 3px 3px rgba(0,0,0,0.3)";a
@JonathanPorta
JonathanPorta / setpin.sh
Last active January 4, 2021 13:32
Change Yubikey PIN/PUK
#!/bin/bash
set -e # bail on errors
# Make sure your shell history isn't saved
hsback=$HISTFILE
unset HISTFILE
echo "Enter you current PIN - leave blank if default:"
read oldpin
@guifromrio
guifromrio / nodejs-ubuntu-bind-port-80.md
Last active January 10, 2024 22:47
Allow Node.js to bind to privileged ports without root access on Ubuntu

How to: Allow Node to bind to port 80 without sudo

TL;DR

Only do this if you understand the consequences: all node programs will be able to bind on ports < 1024

sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/node

Important: your node location may vary. Use which node to find it, or use it directly in the command: