Skip to content

Instantly share code, notes, and snippets.

View P3GLEG's full-sized avatar
💭
I may be slow to respond.

Pegleg P3GLEG

💭
I may be slow to respond.
View GitHub Profile
@P3GLEG
P3GLEG / zap.go
Created August 16, 2017 05:41
Colored Logging Zap logger
//Enable colored output using Zap Logger https://github.com/uber-go/zap/
config := zap.NewDevelopmentConfig()
config.EncoderConfig.EncodeLevel = zapcore.CapitalColorLevelEncoder
logger, _ := config.Build()
defer logger.Sync()
sugar = logger.Sugar()
@P3GLEG
P3GLEG / jupyter.service
Last active August 26, 2017 20:16 — forked from whophil/jupyter.service
A systemd script for running a Jupyter notebook server.
# After Ubuntu 16.04, Systemd becomes the default.
# It is simpler than https://gist.github.com/Doowon/38910829898a6624ce4ed554f082c4dd
# Ensure WorkDirectory exists otherwise the service won't launch correctly.
[Unit]
Description=Jupyter Notebook
[Service]
Type=simple
PIDFile=/var/run/jupyter.pid
@P3GLEG
P3GLEG / checkTrustStoreMac.py
Last active November 2, 2024 03:23
Checks your Certificate trust store within Mac OS X to find unknown certificates
#!/usr/bin/env python3
"""
Checks your Certificate trust store within Mac OS X to find unknown certificates for High Sierra
"""
__author__ = 'Pegleg <[email protected]>'
__license__ = 'MIT'
import requests
from bs4 import BeautifulSoup
class Certificate(object):
@P3GLEG
P3GLEG / gist:09c7732cfff06cf2ec36c18f5e563ae9
Created February 10, 2025 09:45
Hacky script to test model optimal settings on local device
#!/bin/bash
# Variables to iterate for
BATCH_SIZES=(512 1024 2048 4096)
CTX_SIZES=(4096 8192 16384 32768 65536 131072)
ROPE_SCALINGS=("linear" "yarn")
ROPE_SCALES=(1 1.5 2)
ROPE_FREQ_BASE=1000000
ROPE_FREQ_SCALE=1