Skip to content

Instantly share code, notes, and snippets.

View aniketmaithani's full-sized avatar
🏠
Working from home

Aniket Maithani aniketmaithani

🏠
Working from home
View GitHub Profile
# Core Stuff
# -------------------------------------
Django==2.0.3
# Configuration
# -------------------------------------
argon2-cffi==18.1.0
django-environ==0.4.4
django-sites==0.10
python-dotenv==0.8.2
class VideoCamera(object):
def __init__(self):
self.video = cv2.VideoCapture(0)
def __del__(self):
self.video.release()
def get_frame(self):
ret, image = self.video.read()
ret, jpeg = cv2.imencode('.jpg', image)

Setup GITLAB

  • Since your GitLab is already setup we'll skip this part. For those interested they can refer to the following doc : Setting Up GitLab

  • Once GitLab for CI/CD you have to configure the RUNNER.

  • SSH into your system where your GitLab is running.

  • Add GitLab offical repo :

# For Debian/Ubuntu/Mint

The following script install CV2 from scratch.

Please remove the packages which you don't want pre-installation

Script :

#!/bin/bash
echo "Installing Dependencies"
sudo apt-get update

Getting WiFi adapter running on the Raspberry Pi

Plug the USB WiFi adapter into one of the free USB ports on the Raspberry Pi. Power up the Raspberry Pi. At this point you need to either connect to the Raspberry Pi via an Ethernet cable or use a keyboard and a monitor to access the Raspberry Pi.

If you need help connecting to the Raspberry Pi look at this post remotely using a wired network connection.

After booting and logging-in you want to make sure that the Raspberry Pi found your new wireless adapter. To look at which peripherals the operating system found when booting run the following command:

dmesg | more

@aniketmaithani
aniketmaithani / osx-10.11-setup.md
Created February 1, 2016 08:02 — forked from kevinelliott/osx-10.11-setup.md
Mac OS X 10.11 El Capitan Setup

Mac OS X 10.11 El Capitan

Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

@aniketmaithani
aniketmaithani / traceback.txt
Created December 30, 2015 08:47
Import Error : Heroku
Delta compression using up to 4 threads.
Compressing objects: 100% (191/191), done.
Writing objects: 100% (232/232), 80.60 KiB | 0 bytes/s, done.
Total 232 (delta 32), reused 2 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: -----> Installing runtime (python-3.4.3)
remote: -----> Installing dependencies with pip