Skip to content

Instantly share code, notes, and snippets.

View zainmehdi's full-sized avatar
😀

Zain zainmehdi

😀
View GitHub Profile
@dupuy
dupuy / README.rst
Last active June 4, 2025 14:19
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

@bradley219
bradley219 / .gitignore
Last active May 12, 2025 21:43
PID C++ implementation
.DS_Store
@kevinhughes27
kevinhughes27 / opencv_blackfly.cpp
Last active January 24, 2024 19:39
A simple program showing how to capture from a Point Grey Research Camera and display the image using OpenCV
#include "FlyCapture2.h"
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace FlyCapture2;
int main()
@mik30s
mik30s / webcam_capture.cpp
Last active October 26, 2024 01:20
Simple C++ program to capture a webcam frame in Linux
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <linux/ioctl.h>
#include <linux/types.h>
#include <linux/v4l2-common.h>
#include <linux/v4l2-controls.h>
#include <linux/videodev2.h>
#include <fcntl.h>
#include <unistd.h>
@darkguy2008
darkguy2008 / UDPSocket.cs
Last active January 21, 2025 23:49
Simple C# UDP server/client in 56 lines
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
namespace UDP
{
public class UDPSocket
{
private Socket _socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
@fm4dd
fm4dd / gcc compiler optimization for arm systems.md
Last active April 11, 2025 08:11
GCC compiler optimization for ARM-based systems

GCC compiler optimization for ARM-based systems

2017-03-03 fm4dd

The gcc compiler can optimize code by taking advantage of CPU specific features. Especially for ARM CPU's, this can have impact on application performance. ARM CPU's, even under the same architecture, could be implemented with different versions of floating point units (FPU). Utilizing full FPU potential improves performance of heavier operating systems such as full Linux distributions.

-mcpu, -march: Defining the CPU type and architecture

These flags can both be used to set the CPU type. Setting one or the other is sufficient.

@syneart
syneart / OpenCV3.2withContrib.sh
Last active January 22, 2025 11:06
OpenCV 3.2 with Contrib install script [CUDA supported]
######################################
# INSTALL OPENCV ON UBUNTU OR DEBIAN #
######################################
# Use below command to install OpenCV 3.2 with Contrib at Ubuntu or Debian on your own operating system.
# wget -O - https://gist.githubusercontent.com/syneart/3e6bb68de8b6390d2eb18bff67767dcb/raw/OpenCV3.2withContrib.sh | bash
# | THIS SCRIPT IS TESTED CORRECTLY ON |
# |-----------------------------------------------------------|
# | OS | OpenCV | CUDA | Test | Last test |
@ialhashim
ialhashim / fill_depth_colorization.py
Last active September 5, 2024 05:27
Python implementation of depth filling from NYU Depth v2 toolbox
# Original Matlab code https://cs.nyu.edu/~silberman/datasets/nyu_depth_v2.html
#
#
# Python port of depth filling code from NYU toolbox
# Speed needs to be improved
#
# Uses 'pypardiso' solver
#
import scipy
import skimage
@Tiryoh
Tiryoh / ros_melodic_install_raspizero.bash
Created October 16, 2019 03:33
ROS Melodic installation on Raspberry Pi Zero/Raspberry Pi Zero W
#!/usr/bin/env bash
set -eu
# (C) 2019 Daisuke Sato
# https://tiryoh.mit-license.org/2019
# Special thanks to @nomumu
sudo apt update
sudo apt install -y build-essential gdebi
mkdir -p ~/tmp && pushd ~/tmp
@mirzak
mirzak / mender-client.sh
Last active April 20, 2020 05:44
A fake Mender client implemented in bash
#!/bin/bash
MENDER_SERVER_URL="https://hosted.mender.io"
MENDER_TENANT_TOKEN=""
MENDER_DEVICE_TYPE=""
# This variable is mutable
MENDER_ARTIFACT_NAME="release-v1"
function show_help() {