Skip to content

Instantly share code, notes, and snippets.

@Ankowa
Ankowa / example.py
Last active April 26, 2024 12:15
MIA_example
import torch
from torch.utils.data import Dataset
from typing import Tuple
import numpy as np
import requests
import pandas as pd
#### LOADING THE MODEL
from torchvision.models import resnet18
@ei-grad
ei-grad / conda.conf
Created March 21, 2020 20:07
Nginx caching proxy for conda
# /etc/nginx/conf.d/conda.conf
proxy_cache_path /var/cache/nginx/conda levels=2:2 keys_zone=conda:100m inactive=14d max_size=10g;
upstream conda.anaconda.org {
server 104.17.92.24:443;
server 104.17.93.24:443;
}
server {
listen 80;
@DMeechan
DMeechan / word-list.js
Last active April 21, 2024 12:32
BIP39 mnemonic phases word list (2048 words)
const WORDLIST = ["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse",
"access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act",
"action","actor","actress","actual","adapt","add","addict","address","adjust","admit",
"adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent",
"agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert",
"alien","all","alley","allow","almost","alone","alpha","already","also","alter",
"always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger",
"angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique",
"anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic",
"area","arena","argue","arm","armed","armor","army","around","arrange","arrest",
@jd7h
jd7h / script.py
Created February 3, 2020 16:11 — forked from efonte/script.py
Disco Elysium texts
import re
strings = set()
with open('texts.txt', mode='r', encoding='utf-8') as file_input:
content = file_input.read()
regExStr = r'^\s*\d string title = "(?:tooltip\d+|Name|Dialogue Text)"\n\s*\d string value = "((?!(START|input|\w+\(\)|\!\(\w+\(\)\))).+)"$'
compiled = re.compile(regExStr, re.MULTILINE)
matched = compiled.finditer(content)
@efonte
efonte / script.py
Created October 18, 2019 17:57
Disco Elysium texts
import re
strings = set()
with open('texts.txt', mode='r', encoding='utf-8') as file_input:
content = file_input.read()
regExStr = r'^\s*\d string title = "(?:tooltip\d+|Name|Dialogue Text)"\n\s*\d string value = "((?!(START|input|\w+\(\)|\!\(\w+\(\)\))).+)"$'
compiled = re.compile(regExStr, re.MULTILINE)
matched = compiled.finditer(content)
@bmaupin
bmaupin / free-database-hosting.md
Last active April 26, 2024 12:12
Free database hosting
@paalfe
paalfe / CiscoKeyGen.py
Created May 17, 2015 20:45
Cisco IOU License Generator. Originally found at http://www.routingloops.co.uk/cisco/gns3-v1-1-install-on-ubuntu-14-04-lts/, I have done a few changes to it. Make the file executable with " chmod +x CiscoKeyGen.py " and execute it " ./CiscoKeyGen.py ".
#! /usr/bin/python
print "\n*********************************************************************"
print "Cisco IOU License Generator - Kal 2011, python port of 2006 C version"
import os
import socket
import hashlib
import struct
# get the host id and host name to calculate the hostkey
hostid=os.popen("hostid").read().strip()
hostname = socket.gethostname()
@henkman
henkman / go.mod
Created July 17, 2023 19:39
go + fiber + jwt keycloak
module gojwtkeycloak
go 1.20
require (
github.com/coreos/go-oidc/v3 v3.6.0
github.com/gofiber/fiber/v2 v2.48.0
github.com/golang-jwt/jwt/v4 v4.5.0
)
@HarishChaudhari
HarishChaudhari / country-code-to-currency-code-mapping.csv
Last active April 26, 2024 12:10
Country, Country Code, Currency code mapping in CSV format Taken from https://gist.github.com/304261 Contains 249 countries.
Country CountryCode Currency Code
New Zealand NZ New Zealand Dollars NZD
Cook Islands CK New Zealand Dollars NZD
Niue NU New Zealand Dollars NZD
Pitcairn PN New Zealand Dollars NZD
Tokelau TK New Zealand Dollars NZD
Australian AU Australian Dollars AUD
Christmas Island CX Australian Dollars AUD
Cocos (Keeling) Islands CC Australian Dollars AUD
Heard and Mc Donald Islands HM Australian Dollars AUD
@pmkay
pmkay / top-brew-packages.txt
Last active April 26, 2024 12:09 — forked from r5v9/top-brew-packages.txt
Top homebrew packages
node: Platform built on V8 to build network applications
git: Distributed revision control system
wget: Internet file retriever
yarn: JavaScript package manager
python3: Interpreted, interactive, object-oriented programming language
coreutils: GNU File, Shell, and Text utilities
pkg-config: Manage compile and link flags for libraries
chromedriver: Tool for automated testing of webapps across many browsers
awscli: Official Amazon AWS command-line interface
automake: Tool for generating GNU Standards-compliant Makefiles