Skip to content

Instantly share code, notes, and snippets.

View alierkan's full-sized avatar

Ali Erkan alierkan

  • Bogazici University
View GitHub Profile
@alierkan
alierkan / [FEDORA] gitkraken
Created October 26, 2017 11:00 — forked from aelkz/[FEDORA] gitkraken
How to install gitkraken on Fedora 25 + launcher icon
#!/bin/bash
# Download GitKraken
wget https://release.gitkraken.com/linux/gitkraken-amd64.tar.gz
# copy the downloaded file into /opt directory
cp gitkraken-amd64.tar.gz /opt/gitkraken
cd /opt
@alierkan
alierkan / Convolutional Neural Network For Sentence Classification.md Summary of paper "Convolutional Neural Network For Sentence Classification"

Convolutional Neural Network For Sentence Classification

Introduction

Architecture

@alierkan
alierkan / intel-nvidia.md
Created December 22, 2019 14:42 — forked from wangruohui/intel-nvidia.md
Intel for display, Nvidia for computing

Intel for display, NVIDIA for computing

This guide will show you how to use Intel graphics for rendering display and NVIDIA graphics for CUDA computing on Ubuntu 18.04 desktop.

I made this work on an ordinary gaming PC with two graphics devices, an Intel UHD Graphics 630 plus an NVIDIA GeForce GTX 1080 Ti. Both of them can be shown via lspci | grep VGA.

00:02.0 VGA compatible controller: Intel Corporation Device 3e92
01:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1)
@alierkan
alierkan / w2v.ipynb
Created December 10, 2020 13:42 — forked from mbednarski/w2v.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Written by Luis Mesas
import threading
import time
import cv2
# Define video capture class
class VideoCaptureAsync:
def __init__(self, src=0, width=640, height=480, driver=None):
self.src = src
if driver is None:
import cv2
# Import the video capturing function
from video_capture import VideoCaptureAsync
import time
#Specify width and height of video to be recorded
vid_w = 1280
vid_h = 720
#Intiate Video Capture object
capture = VideoCaptureAsync(src=0, width=vid_w, height=vid_h)
@alierkan
alierkan / main.py
Created December 24, 2020 12:41 — forked from ammani-prop/main.py
# Import the recording process
from camera_record import record_video
# set recording duration
record_time = 20
# To run this as part of a bigger program, use mutltiprocessing to create a seperate process
# for video recording using the following lines.
from multiprocessing import Process
# The line above can go to the top of your file and the following lines should be placed
# where ever you need to record a video
# Create the process thread object
@alierkan
alierkan / posdef.py
Created December 25, 2020 18:26 — forked from fasiha/posdef.py
Python/Numpy port of John D’Errico’s implementation (https://www.mathworks.com/matlabcentral/fileexchange/42885-nearestspd) of Higham’s 1988 paper (https://doi.org/10.1016/0024-3795(88)90223-6), including a built-in unit test. License: whatever D’Errico’s license, since this is a port of that.
from numpy import linalg as la
def nearestPD(A):
"""Find the nearest positive-definite matrix to input
A Python/Numpy port of John D'Errico's `nearestSPD` MATLAB code [1], which
credits [2].
[1] https://www.mathworks.com/matlabcentral/fileexchange/42885-nearestspd
@alierkan
alierkan / autoencoder.py
Created December 25, 2020 18:34 — forked from AFAgarap/autoencoder.py
PyTorch implementation of a vanilla autoencoder model.
class AE(nn.Module):
def __init__(self, **kwargs):
super().__init__()
self.encoder_hidden_layer = nn.Linear(
in_features=kwargs["input_shape"], out_features=128
)
self.encoder_output_layer = nn.Linear(
in_features=128, out_features=128
)
self.decoder_hidden_layer = nn.Linear(
@alierkan
alierkan / autoencoder-pytorch.ipynb
Created May 17, 2021 11:49 — forked from AFAgarap/autoencoder-pytorch.ipynb
PyTorch implementation of an autoencoder.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.