Skip to content

Instantly share code, notes, and snippets.

View milannedic's full-sized avatar
🎯
Focusing

Milan Nedić milannedic

🎯
Focusing
View GitHub Profile
@ct3huang
ct3huang / mmap_zcopy
Created March 12, 2020 05:54 — forked from laoar/mmap_zcopy
an example of kernel space to user space zero-copy via mmap, and also the comparing mmap with read/write
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <asm/uaccess.h>
#define MAX_SIZE (PAGE_SIZE * 2) /* max size mmaped to userspace */
#define DEVICE_NAME "mchar"
@dibmartins
dibmartins / install-git-kraken-ubuntu
Last active March 22, 2023 11:52
install-git-kraken-ubuntu
wget https://release.gitkraken.com/linux/gitkraken-amd64.deb
sudo dpkg -i gitkraken-amd64.deb
#!/bin/bash
################################################################################
### OpenCV2 Installation Script ###
################################################################################
# Source code at https://github.com/arthurbeggs/scripts #
################################################################################
# #
# Feel free to copy and modify this file. Giving me credit for it is your #
# choice, but please keep references to other people's work, which I don't #

This is unmaintained, please visit Ben-PH/spacemacs-cheatsheet

Useful Spacemacs commands

  • SPC q q - quit
  • SPC w / - split window vertically
  • SPC w - - split window horizontally
  • SPC 1 - switch to window 1
  • SPC 2 - switch to window 2
  • SPC w c - delete current window
@baraldilorenzo
baraldilorenzo / readme.md
Last active June 13, 2024 03:07
VGG-16 pre-trained model for Keras

##VGG16 model for Keras

This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman

@WarrenWeckesser
WarrenWeckesser / remez_examples.py
Last active April 20, 2021 15:58
Examples of designing a FIR filter with scipy.signal.remez.
from __future__ import division, print_function
import numpy as np
from scipy import signal
import matplotlib.pyplot as plt
def plot_response(fs, w, h, title):
plt.figure()
plt.plot(0.5*fs*w/np.pi, 20*np.log10(np.abs(h)))
@EmranAhmed
EmranAhmed / 1. main.css
Last active January 11, 2024 01:29
CSS Responsive breakpoint, Media Query break point
/*==================================================
= Bootstrap 3 Media Queries =
==================================================*/
/*========== Mobile First Method ==========*/
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
@hanshoglund
hanshoglund / memdump.c
Created January 15, 2013 20:32
C memdump
void memdump(void* s, size_t n)
{
for (size_t i = 0; i < n; ++i)
printf("%x ", *((unsigned char*) (s + i)) );
printf("\n");
}
@austinmarton
austinmarton / recvRawEth.c
Created June 3, 2012 07:55
Receive raw Ethernet frames in Linux
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <linux/ip.h>
@maxrice
maxrice / us-state-names-abbrevs.php
Created May 23, 2012 18:32
US State Names & Abbreviations as PHP Arrays
<?php
/* From https://www.usps.com/send/official-abbreviations.htm */
$us_state_abbrevs_names = array(
'AL'=>'ALABAMA',
'AK'=>'ALASKA',
'AS'=>'AMERICAN SAMOA',
'AZ'=>'ARIZONA',
'AR'=>'ARKANSAS',