Skip to content

Instantly share code, notes, and snippets.

View k4ml's full-sized avatar
🏠
Working from home

Kamal Mustafa k4ml

🏠
Working from home
View GitHub Profile
@k4ml
k4ml / LLM.md
Created April 17, 2023 23:51 — forked from rain-1/LLM.md
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@k4ml
k4ml / admin.py
Last active October 6, 2021 07:25
Le-Wagon Workshop
from django.contrib import admin
from mysite.models import Survey, Question, Choice
class QuestionInline(admin.TabularInline):
model = Question
show_change_link = True
class ChoiceInline(admin.TabularInline):
model = Choice
@k4ml
k4ml / main.go
Last active October 14, 2018 05:37
Reading input from console in Go
// https://tutorialedge.net/golang/reading-console-input-golang/
package main
import (
"bufio"
"fmt"
"os"
"strings"
)
@k4ml
k4ml / bootstrap.py
Created November 3, 2017 12:12
Bootstrap python environment ready for use with buildout
import os
import sys
import subprocess
import functools
run = functools.partial(subprocess.call, shell=True)
run('virtualenv -p python3 .env')
run('.env/bin/pip install --upgrade setuptools')
@k4ml
k4ml / list.md
Created November 1, 2017 08:58
Nested list
  • list one
    • nested list
    • nested list 2
  • list two
@k4ml
k4ml / slacktg_bridge.py
Last active March 22, 2020 22:36
2 way bridge between Slack and Telegram.
"""
Copyright 2017 k4ml@twitter.com.
Permission to use, copy, modify, and/or distribute this software
for any purpose with or without fee is hereby granted, provided
that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
@k4ml
k4ml / cherrypy-intro.md
Created March 5, 2017 08:06
Python web programming with cherrypy

This assuming you are on Linux or OSX machine. Make sure python version is 3.5 and above.

Create your project directory, let say we're building application named webby:-

mkdir webby
cd webbpy

Create new virtualenv that will be the PYTHON that we will use going forward in this project:-

@k4ml
k4ml / install-python.md
Created March 4, 2017 08:44
Installing Python from source

This is on Ubuntu 14.04, but should work in any Linux/OSX system:-

mkdir -p $HOME/python/3.6
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
tar xzf Python-3.6.0.tgz
cd Python-3.6.0/
./configure --prefix=$HOME/python/3.6
make
make test
@k4ml
k4ml / keybase.io
Created February 11, 2017 02:08
keybase id proof
### Keybase proof
I hereby claim:
* I am k4ml on github.
* I am k4ml (https://keybase.io/k4ml) on keybase.
* I have a public key ASCZeLsQwrBVZescEQhSO6a9e0jJxvGbB0p9mw8_7epr_Ao
To claim this, I am signing this object:
@k4ml
k4ml / button.elm
Created October 29, 2016 23:16
Elm intro
import Html exposing (Html, button, div, text)
import Html.App as App
import Html.Events exposing (onClick)
main =
App.beginnerProgram { model = model, view = view, update = update }
-- MODEL