Skip to content

Instantly share code, notes, and snippets.

@salehjg
salehjg / 70-huawei-e3.conf
Created July 27, 2021 00:53 — forked from smarek/70-huawei-e3.conf
Raspberry / Banana Huawei E3372 network interface name
# /etc/udev/rules.d/70-huawei-e3.conf
# Necessary for network interface name
SUBSYSTEM=="net", ACTION=="add", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14dc", NAME="usb0"
# Might be duplicate to usb_modeswitch config, however it's good to have it there
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1f01", RUN+="/usr/sbin/usb_modeswitch -c /etc/usb_modeswitch.d/huawei_e3.conf"
void myfunc(
int *inputTn1,
int *inputTn2,
int *outputTn,
int len) {
#pragma HLS INLINE
for(int idx=0; idx<len; idx++){
#pragma HLS PIPELINE II=1
#include <stdio.h>
#define DATA_SIZE 17
#define VEC_SIZE 16
struct _float16{
float vec[VEC_SIZE];
};
@salehjg
salehjg / ROS_on_ArchLinux.md
Last active October 5, 2019 14:27
Getting ROS Up and Running on ArchLinux
  1. install yay or pikaur, DO NOT use pacaur as it does not handle version specific dependecies well(github issue).

  2. install libpgm-git from aur

  3. set MAKEFLAGS option to -j8 in /etc/makepkg.conf

  4. increase sudo session timeout in /etc/sudoers :
    Defaults timestamp_timeout=600

  5. start with: yay -S ros-melodic-desktop-full

import numpy as np
a = np.zeros(shape=[33052, 10225], dtype=np.float32)
b = np.zeros(shape=[7086, 10225], dtype=np.float32)
print "Shape_a: ", a.shape
print "Shape_b: ", b.shape
print "\nProcessing..."
@salehjg
salehjg / tf_gpu_py3.py
Created June 19, 2018 15:10
Simple test script for TF GPU with python 3.x
import tensorflow as tf
mat1 = [0,1,2]
mat2 = [2,1,0]
with tf.device('/gpu:0'):
tn1 = tf.placeholder(dtype= tf.int32, shape=[3])
tn2 = tf.placeholder(dtype= tf.int32, shape=[3])
tn3 = tn1 + tn2
# Modified evaluation script of PointNet for DGCNN
# (unofficial)
import argparse
import math
import h5py
import numpy as np
import tensorflow as tf
import socket
import importlib