Skip to content

Instantly share code, notes, and snippets.

View cagbal's full-sized avatar
:atom:
Hacking

cagatay odabasi cagbal

:atom:
Hacking
View GitHub Profile
@cagbal
cagbal / MySuperSmartPtr.cpp
Last active September 11, 2018 12:47
Just practicing, don't take it too serious: Amazingly, Suprisingly and Super Smart Pointer Practice
#include <iostream>
using namespace std;
template<class T>
class MySuperSmartPtr
{
public:
@cagbal
cagbal / custom_std_vector_implementation.cpp
Last active September 9, 2018 21:53
Just practicing, don't take it too serious: mini std::vector implementation with move semantics
#include <iostream>
#include <memory>
#include <vector>
using namespace std;
template<class T>
class MyVector
{
# -*- coding: utf-8 -*-
"""
markovify kütüphanesi deneme
"""
!pip install markovify
from google.colab import files
uploaded = files.upload()
@cagbal
cagbal / install.sh
Created July 5, 2017 07:12
Script for installing dependencies of Openface
#!/usr/bin/env bash
set -ex
# Make it "0" if you have already OpenCV
INSTALL_OPENCV=0
# Make it "0" if you have already Dlib
INSTALL_DLIB=0
# Make it "0" if you have already Torch, but you need to install
# Torch packages manually
INSTALL_TORCH=0
# This script is taken from http://stackoverflow.com/a/31396229/3244341
# This script installs Caffe and pycaffe on Ubuntu 14.04 x64 or 14.10 x64. CPU only, multi-threaded Caffe.
# Usage:
# 0. Set up here how many cores you want to use during the installation:
# By default Caffe will use all these cores.
NUMBER_OF_CORES=8
# 1. Execute this script, e.g. "bash compile_caffe_ubuntu_14.04.sh" (~30 to 60 minutes on a new Ubuntu).
# 2. Open a new shell (or run "source ~/.bash_profile"). You're done. You can try
# running "import caffe" from the Python interpreter to test.
// Go to additional drivers
// Install tested version of NVIDIA Driver
// Reboot PC
// http://www.r-tutor.com/gpu-computing/cuda-installation/cuda7.5-ubuntu
// Download https://developer.nvidia.com/cuda-downloads
sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb
sudo apt-get update
sudo apt-get install cuda
"""Utility functions"""
import os
import pandas as pd
def symbol_to_path(symbol, base_dir="data"):
"""Return CSV file path given ticker symbol."""
return os.path.join(base_dir, "{}.csv".format(str(symbol)))
@cagbal
cagbal / QTR-8RC
Last active August 29, 2015 14:24
QTR-8RC Kullanım Örneği
while(1) // sonsuz döngü açıyoruz
{
digitalOutput(Pin0,Pin1,Pin2,Pin3,Pin4,Pin5,Pin6,Pin7); // Pinlerin hepsini output yapıyoruz.
digitalHIGH(Pin0,Pin1,Pin2,Pin3,Pin4,Pin5,Pin6,Pin7); // Bütün pinleri HIGH yapıyoruz.
Delay_us(10); // 10 mikro saniye sensörün kapasitörünün dolmasını bekliyoruz.