Skip to content

Instantly share code, notes, and snippets.

View i-amgeek's full-sized avatar
🏠
Working from home

Deepak Mangla i-amgeek

🏠
Working from home
View GitHub Profile
@ibmua
ibmua / face-crop-extractor.py
Last active February 22, 2021 14:17
extract-1adrianb-crop-face-alignment
# for use with https://github.com/1adrianb/face-alignment
import cv2
import numpy as np
import face_alignment
imread = cv2.imread
_DEAFAULT_JPG_QUALITY = 99
imwrite = partial(cv2.imwrite, params=[int(cv2.IMWRITE_JPEG_QUALITY), _DEAFAULT_JPG_QUALITY])
fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._3D, device='cuda')
@andres-fr
andres-fr / flask__server__client.py
Last active June 25, 2023 18:41
Flask client/server to exchange compressed numpy arrays:
################################################################################
### server.py
################################################################################
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Dummy server, interacts with the client receiving, altering and returning
@ChrisBarker-NOAA
ChrisBarker-NOAA / conda_compare.py
Created September 19, 2018 08:14
Python Script to compare two conda environments
#!/usr/bin/env python2
"""
quicky script that compares two conda environments
can be handy for debugging differences between two environments
This could be made much cleaner and more flexible -- but it does the job.
Please let me know if you extend or improve it.
@samoshkin
samoshkin / toggle_keybindings.tmux.conf
Last active February 5, 2024 02:26
tmux.conf excerpt to toggle on/off session keybindings and prefix handling
bind -T root F12 \
set prefix None \;\
set key-table off \;\
set status-style "fg=$color_status_text,bg=$color_window_off_status_bg" \;\
set window-status-current-format "#[fg=$color_window_off_status_bg,bg=$color_window_off_status_current_bg]$separator_powerline_right#[default] #I:#W# #[fg=$color_window_off_status_current_bg,bg=$color_window_off_status_bg]$separator_powerline_right#[default]" \;\
set window-status-current-style "fg=$color_dark,bold,bg=$color_window_off_status_current_bg" \;\
if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\
refresh-client -S \;\
bind -T off F12 \
@eatnumber1
eatnumber1 / renameat2.c
Last active November 3, 2023 17:24
Command-line tool to call renameat2(2)
/*
* Copyright (c) 2023 Russell Harmon
*
* 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
* furnished to do so, subject to the following conditions:
*