Skip to content

Instantly share code, notes, and snippets.

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

Muhammad Irfan mirfan899

🏠
Working from home
View GitHub Profile
@mirfan899
mirfan899 / RasaNLU.php
Created April 30, 2020 16:35 — forked from mpociot/RasaNLU.php
RasaNLU middleware for BotMan
<?php
namespace App\BotMan\Middleware;
use Mpociot\BotMan\Message;
use Mpociot\BotMan\Http\Curl;
use Mpociot\BotMan\Interfaces\HttpInterface;
use Mpociot\BotMan\Interfaces\DriverInterface;
use Mpociot\BotMan\Interfaces\MiddlewareInterface;
@mirfan899
mirfan899 / gist:488e994055bb9b18f0065641f6fbe060
Created November 21, 2019 11:59 — forked from jwebcat/gist:5122366
Properly download from github using wget and curl
wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1
# --no-check-cerftificate was necessary for me to have wget not puke about https
curl -LJO https://github.com/joyent/node/tarball/v0.7.1
@mirfan899
mirfan899 / Install NVIDIA Driver and CUDA.md
Created June 27, 2019 09:37 — forked from zhanwenchen/Install NVIDIA Driver and CUDA.md
Install NVIDIA CUDA 9.0 on Ubuntu 16.04.4 LTS
apt-get update && apt-get install -y \
sox \
curl \
libicu-dev \
g++ \
git \
python \
python-dev \
python-setuptools \
@mirfan899
mirfan899 / cuda_installation_on_ubuntu_18.04
Created May 29, 2019 16:31 — forked from Mahedi-61/cuda_11.8_installation_on_Ubuntu_22.04
cuda 9.0 complete installation procedure for ubuntu 18.04 LTS
#!/bin/bash
## This gist contains step by step instructions to install cuda v9.0 and cudnn 7.2 in ubuntu 18.04
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
# Keras==1.0.6
import numpy as np
from keras.models import Sequential
from keras.layers.recurrent import LSTM
from keras.layers.core import TimeDistributedDense, Activation
from keras.preprocessing.sequence import pad_sequences
from keras.layers.embeddings import Embedding
from sklearn.cross_validation import train_test_split
from sklearn.metrics import confusion_matrix, accuracy_score, precision_recall_fscore_support
@mirfan899
mirfan899 / sound_recorder.py
Created April 29, 2019 17:02 — forked from mabdrabo/sound_recorder.py
Simple script to record sound from the microphone, dependencies: easy_install pyaudio
import pyaudio
import wave
FORMAT = pyaudio.paInt16
CHANNELS = 2
RATE = 44100
CHUNK = 1024
RECORD_SECONDS = 5
WAVE_OUTPUT_FILENAME = "file.wav"
@mirfan899
mirfan899 / mic_client.py
Created April 29, 2019 16:59 — forked from fopina/mic_client.py
microphone streaming with pyAudio
#!/usr/bin/env python
import pyaudio
import socket
import sys
FORMAT = pyaudio.paInt16
CHANNELS = 1
RATE = 44100
CHUNK = 4096