Skip to content

Instantly share code, notes, and snippets.

View ma1onso's full-sized avatar
💜

Alonso ma1onso

💜
View GitHub Profile
@niuware
niuware / django_stream_queryset_to_csv.md
Created October 18, 2019 03:41
How to stream a CSV file from a large QuerySet using Django's StreamingHttpResponse

Stream a CSV file from a QuerySet using StreamingHttpResponse

This is a sample on how to stream the results of a large QuerySet into a CSV file using Django StreamingHttpResponse class.

  1. Add the CSVStream class in your project, for example a writers.py file:
import csv
from django.http import StreamingHttpResponse
@raulqf
raulqf / Install_OpenCV4_CUDA11_CUDNN8.md
Last active April 18, 2024 19:53
How to install OpenCV 4.5 with CUDA 11.2 in Ubuntu 22.04

How to install OpenCV 4.5.2 with CUDA 11.2 and CUDNN 8.2 in Ubuntu 22.04

First of all install update and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Then, install required libraries:

@peteruithoven
peteruithoven / quarter-tiler
Last active March 2, 2023 06:31
Crude quarter tiling tool for elementary OS
#!/bin/bash
# Crude quarter tiling tool
# Installation:
# Move file to: /usr/local/bin/quarter-tiler
# Make executable: sudo chmod +x /usr/local/bin/quarter-tiler
# Assign keyboard shortcuts to commands like "quarter-tiler topleft"
# Margins around windows (elementary OS native apps) (HiDPI)
MARGIN_TOP=130
@feiss
feiss / copy-selection-coordinates.py
Last active March 24, 2021 22:00
GIMP plugin in Python for copying current selection coordinates to clipboard
#!/usr/bin/python
from gimpfu import *
import os
def plugin_main(timg, tdrawable):
non_empty, x1, y1, x2, y2 = pdb.gimp_selection_bounds(timg)
if (non_empty):
os.system('echo {}, {}, {}, {} | xsel --clipboard'.format(x1, y1, x2 - x1, y2 - y1))
else:
os.system('echo "no selection" | xsel --clipboard')
@gnysek
gnysek / gms2-roadmap.txt
Last active August 8, 2022 12:55
Game Maker Studio 2 Roadmap
The tables below show the Roadmap for GameMaker Studio 2. This is a rough guide to what features and progresses we hope to make over the coming year, but the dates and contents may change as we advance.
2019
The roadmap for 2019 is still in the works. Once it is more established we will share it with you here.
2018
Q1 Q2 Q3 Q4
@filitchp
filitchp / OpenCV-3.1-Ubuntu-16.04-Cuda-8.md
Last active December 12, 2019 21:36
Installing OpenCV 3.1 on Ubuntu 16.04 with Cuda 8 support

This is a guide for installing OpenCV 3.1 on Ubuntu 16.04 with Cuda 8 support. This has been tested using a system with a GeForce GTX 1060 and on one with a GeForce GTX 1080.

Nvidia Drivers with Compiz

Install Nvidia drivers

# Start clean
sudo apt purge nvidia-*
# Add the PPA
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
# coding: utf-8
# FILE:
# -----
# /mnt/Vancouver/apps/Webcam-Face-Detect/webcam_cv3_v2_fps_v3.py
# FUNCTIONALITY:
# --------------
# * outputs webcam to screen and finds faces, eyes
# * writes webcam video to *.avi file (MJPG codec) via OpenCV/FourCC
@EvgenyOrekhov
EvgenyOrekhov / A simple Docker and Docker Compose install script for Ubuntu.md
Last active May 1, 2024 00:37
A simple Docker and Docker Compose install script for Ubuntu

A simple Docker and Docker Compose install script for Ubuntu

Usage

  1. sh install-docker.sh
  2. log out
  3. log back in

Links

@GilLevi
GilLevi / README.md
Last active July 25, 2023 18:05
Age and Gender Classification using Convolutional Neural Networks
@wenzhixin
wenzhixin / ubuntu14.04-command-line-install-android-sdk
Last active January 16, 2024 21:15
Ubuntu 14.04 command line install android sdk
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages