Skip to content

Instantly share code, notes, and snippets.

View jamais's full-sized avatar

Emre Akbudak jamais

View GitHub Profile
@iamaziz
iamaziz / LLM-from-scratch.ipynb
Created July 23, 2023 17:02
Building a large language model (LLM) from scratch (for learning and fun - inspired by Llama2).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@adrienbrault
adrienbrault / llama2-mac-gpu.sh
Last active July 1, 2024 05:32
Run Llama-2-13B-chat locally on your M1/M2 Mac with GPU inference. Uses 10GB RAM. UPDATE: see https://twitter.com/simonw/status/1691495807319674880?s=20
# Clone llama.cpp
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
# Build it
make clean
LLAMA_METAL=1 make
# Download model
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin
//: ## Demo
struct User: CustomStringConvertible {
let name: String
let age: Int
var description: String { "\(name) (\(age))" }
}
let users = [
User(name: "Bob", age: 22),
@codediodeio
codediodeio / config.js
Last active July 6, 2024 10:12
Snippets from the Firestore Data Modeling Course
import * as firebase from 'firebase/app';
import 'firebase/firestore';
var firebaseConfig = {
// your firebase credentials
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
@aparrish
aparrish / predictive-models.ipynb
Created July 9, 2018 19:47
Predictive text and text generation notebook. Written for Code Societies at SFPC, summer 2018. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ethaizone
ethaizone / redirect_mobile_to_app_store.php
Last active May 24, 2022 17:56
[PHP] Auto redirect to app store. (Android/IOS)
<?php
// android store
if (preg_match('#android#i', $_SERVER ['HTTP_USER_AGENT'])) {
header('Location: market://details?id=com.google.android.apps.maps');
exit;
}
// ios
if (preg_match('#(iPad|iPhone|iPod)#i', $_SERVER ['HTTP_USER_AGENT'])) {
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active July 14, 2024 19:55
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@phynet
phynet / Setting-spaces-between-characters-Swift.md
Last active March 10, 2022 09:15
Setting spaces between characters with Swift

##Setting spaces between characters with Swift (iOS)

###UIButton

    @IBOutlet weak var button: UIButton!

    button.titleLabel?.attributedText = NSAttributedString(string: string, attributes:[ NSKernAttributeName: 1.3])
@emre
emre / cointellect.sh
Created December 22, 2014 12:08
cointellect installer
sudo aptitude install git -y
git clone https://github.com/pooler/cpuminer
cd cpuminer
sudo aptitude install automake -y
sudo aptitude install pkg-config -y
sudo aptitude install gcc -y
sudo aptitude install make -y
sudo aptitude install libcurl3-gnutls-dev -y
./autogen.sh
./configure CFLAGS="-O3"
@pjv
pjv / hhvm.conf
Last active January 18, 2016 18:04
Ubuntu 14.04 upstart script for HHVM
# hhvm - HipHop VM
#
# The HipHopVM server provides a high performance PHP stack and web server.
# modified by pjv from original found here: http://stackoverflow.com/questions/19013516/upstart-script-for-hhvm-hiphop
description "HHVM server"
author "pjv https://gist.github.com/pjv/2e9ab32d8d9884bf79a4"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]