Skip to content

Instantly share code, notes, and snippets.

View philipperemy's full-sized avatar
🇨🇵
Solving AI together.

Philippe Rémy philipperemy

🇨🇵
Solving AI together.
View GitHub Profile
@dmfigol
dmfigol / asyncio_loop_in_thread.py
Last active April 21, 2024 17:32
Python asyncio event loop in a separate thread
"""
This gist shows how to run asyncio loop in a separate thread.
It could be useful if you want to mix sync and async code together.
Python 3.7+
"""
import asyncio
from datetime import datetime
from threading import Thread
from typing import Tuple, List, Iterable
@goodhamgupta
goodhamgupta / yolo_to_voc.py
Last active January 24, 2024 12:05
Convert yolo coordinates to VOC format
# Script to convert yolo annotations to voc format
# Sample format
# <annotation>
# <folder>_image_fashion</folder>
# <filename>brooke-cagle-39574.jpg</filename>
# <size>
# <width>1200</width>
# <height>800</height>
# <depth>3</depth>
@philipperemy
philipperemy / pickle_view.py
Created March 14, 2017 05:52
Pickle viewer in command line! Put it here /usr/bin/pickle_view.py
#!/usr/bin/env python
import pickle
import sys
if __name__ == '__main__':
argv = sys.argv
if len(argv) <= 1:
print 'Specify pickle file as parameter.'
@nickoala
nickoala / 0_python_email.md
Last active April 29, 2024 05:54
Use Python to send and receive emails

Use Python to:

  • send a plain text email
  • send an email with attachment
  • receive and filter emails according to some criteria
from __future__ import print_function
import numpy as np
from keras.callbacks import Callback
from keras.layers import Dense
from keras.layers import LSTM
from keras.models import Sequential
from numpy.random import choice
from utils import prepare_sequences
@daleroberts
daleroberts / kde.png
Last active August 12, 2022 17:15
Two-dimensional kernel density estimate: comparing scikit-learn and scipy
kde.png
@squadbox
squadbox / cool_gpu2.sh
Last active December 6, 2023 05:34
A script to control Nvidia GPU fan speed on headless (non-X) linux nodes
#!/bin/bash
# cool_gpu2.sh This script will enable or disable fixed gpu fan speed
#
# Description: A script to control GPU fan speed on headless (non-X) linux nodes
# Original Script by Axel Kohlmeyer <akohlmey@gmail.com>
# https://sites.google.com/site/akohlmey/random-hacks/nvidia-gpu-coolness
#
# Modified for newer drivers and removed old work-arounds
@rtt
rtt / tinder-api-documentation.md
Last active April 20, 2024 17:01
Tinder API Documentation

Tinder API documentation

Note: this was written in April/May 2014 and the API may has definitely changed since. I have nothing to do with Tinder, nor its API, and I do not offer any support for anything you may build on top of this. Proceed with caution

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

@qwo
qwo / google-tips
Last active January 24, 2024 19:27
Google Recruiter Candidate Tips ..
xxx,
Thanks again for taking the time to speak with me and for sending me your information. I'm excited to tell you that we would like to move forward in the process!
One of our coordinators will be emailing you within the next week from an @google.com domain with the date and time of your phone interview. In the meantime, I've included some preparation materials (below.)
Please note this will be a technical interview that will last for approximately 45 minutes. Google takes an academic approach to the interviewing process. This means that we are interested in your thought process, your approach to problem solving as well as your coding abilities. You may be asked questions that relate to technical knowledge, algorithms, coding, performance, how to test solutions, and perhaps your interest in Google products. The best advice that I can give you is to treat the interview like a conversation, talk through the problems, and please feel free to ask the interviewer if you are not clear with any of the questio
@dmglab
dmglab / git_bible.md
Last active March 9, 2024 02:59
how to git

Note: this is a summary of different git workflows putting together to a small git bible. references are in between the text


How to Branch

try to keep your hacking out of the master and create feature branches. the [feature-branch workflow][4] is a good median between noobs (i have no idea how to branch) and git veterans (let's do some rocket sience with git branches!). everybody get the idea!

Basic usage examples