Skip to content

Instantly share code, notes, and snippets.

View omarmhaimdat's full-sized avatar
:octocat:
Focusing

Omar MHAIMDAT omarmhaimdat

:octocat:
Focusing
View GitHub Profile
/graphql/30bHSx-YYMzaygsBwfhftA/AddRemoveUserFromList
/graphql/xIZJPQBK0Zz62_BDLNLHKw/AddSuperFollowPrivacy
/graphql/R1ks8NLVisD-416R3mAk_w/AllSubscribedListsTimeline
/graphql/nxtTgq_TxeEDm0gmsGqK_Q/ArticleTweetsTimeline
/graphql/zacmhLyVLzFAKvH-yia8OA/AudiospaceAddSharing
/graphql/IZ1drq74xph2Gym7gGgtRw/AudiospaceBrowseSpaceTopicsQuery
/graphql/N80MQ7fkrpuq1-kCWVSvzQ/AudiospaceByRestId
/graphql/PTAe3LYPhlCcPJtwpyyx-w/AudiospaceDeleteSharing
/graphql/NiYfwFZDe-90MSqpGEI16w/AudiospaceGiveawayTickets
/graphql/g1mB1D5y3z_NkFsN-FwZdA/AudiospaceIsSubscribedQuery
@omarmhaimdat
omarmhaimdat / llama_sizes.txt
Created March 21, 2023 14:40 — forked from shawwn/llama_sizes.txt
The size of each file distributed with LLaMA, for reference. See https://github.com/shawwn/llama-dl
./tokenizer_checklist.chk 50
./tokenizer.model 499723
./7B/checklist.chk 100
./7B/consolidated.00.pth 13476939516
./7B/params.json 101
./13B/checklist.chk 154
./13B/consolidated.00.pth 13016334699
./13B/consolidated.01.pth 13016334699
./13B/params.json 101
./30B/checklist.chk 262
@omarmhaimdat
omarmhaimdat / squid.conf
Last active April 9, 2022 23:23 — forked from praveenkumar/squid.conf
squid proxy file (/etc/squid/squid.conf)
#
# Recommended minimum configuration:
#
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
# Auth
auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/squid_passwd
version: "3"
services:
chrome5:
image: selenium/node-chrome:4.0.0-alpha-7-prerelease-20201009
volumes:
- /dev/shm:/dev/shm
shm_size: 4gb
environment:
- SE_EVENT_BUS_HOST=192.168.1.20
- SE_EVENT_BUS_PUBLISH_PORT=4442
version: "3"
services:
selenium-event-bus:
image: selenium/event-bus:4.0.0-alpha-7-prerelease-20201009
container_name: selenium-event-bus
ports:
- "4442:4442"
- "4443:4443"
- "5557:5557"
//@ui {"widget":"separator"}
// @input Component.Text text
// @input Component.Image xboxImage
// @input Component.Image ps5Image
// @input vec4 ps5Color {"widget":"color"}
// @input vec4 xboxColor {"widget":"color"}
var classLabels = ["Nothing", "Xbox enthousiast", "PS5 enthousiast"]
if(!script.text) {
func colorizeImages() {
let imageDataBase64 = inputImage.image!.jpegData(compressionQuality: 1)!.base64EncodedString(options: .lineLength64Characters)
let parameters: Parameters = ["image": imageDataBase64]
AF.request(URL.init(string: self.apiEntryPoint)!, method: .post, parameters: parameters, encoding: JSONEncoding.default, headers: .none).responseJSON { (response) in
switch response.result {
case .success(let value):
if let JSON = value as? [String: Any] {
let base64StringOutput = JSON["output_image"] as! String
func addSubviews() {
view.addSubview(inputImage)
view.addSubview(saveImage)
view.addSubview(dissmissButton)
}
func setupLayout() {
inputImage.topAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.topAnchor).isActive = true
inputImage.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
inputImage.widthAnchor.constraint(equalToConstant: view.frame.width).isActive = true
lazy var saveImage: CustomButton = {
let button = CustomButton()
button.translatesAutoresizingMaskIntoConstraints = false
button.addTarget(self, action: #selector(buttonToSaveImage(_:)), for: .touchUpInside)
button.setTitle("Download", for: .normal)
let icon = UIImage(systemName: "square.and.arrow.down")?.resized(newSize: CGSize(width: 35, height: 35))
let tintedImage = icon?.withRenderingMode(.alwaysTemplate)
button.setImage(tintedImage, for: .normal)
return button
}()
lazy var inputImage: UIImageView = {
let image = UIImageView()
image.translatesAutoresizingMaskIntoConstraints = false
image.contentMode = .scaleAspectFit
image.layer.masksToBounds = true
image.clipsToBounds = false
return image
}()