Skip to content

Instantly share code, notes, and snippets.

View jsherer's full-sized avatar

Jordan Sherer jsherer

View GitHub Profile
@s-macke
s-macke / gpt-4-tokens.txt
Last active February 23, 2024 17:58
All 100k GPT-4 Tokens. New lines are replaced with \n and carriage returns with \r. The index of the token is (index=line-1). The list is extracted using https://github.com/openai/tiktoken
!
"
#
$
%
&
'
(
)
*
@mixxorz
mixxorz / graphene.py
Last active February 15, 2024 16:18
Get requested fields from ResolveInfo. Graphene python.
"""
MIT License
Copyright (c) 2018 Mitchel Cabuloy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@dansimau
dansimau / pglag.sh
Created January 9, 2012 11:58
Calculate the replication lag between postgresql master and one or more slaves in streaming replication mode.
#!/bin/bash
#
# Show replication lag for one or more postgresql slaves in streaming replication.
#
# dsimmons@squiz.co.uk
# 2012-01-09
#
psql="which psql"
psql_extra_opts=""