Skip to content

Instantly share code, notes, and snippets.

View ozturkib's full-sized avatar

Ibrahim Ozturk ozturkib

View GitHub Profile
# Take the difference of only the time portion of timestamps ignoring the date portion through dataframe columns.
import pandas as pd
import numpy as np
import datetime as dt
import datetime
from datetime import timedelta, datetime, date
df3 = pd.read_csv("combine.csv", parse_dates=['bl.start','bl.end','ex.start','ex.end','ExamStart','ScrathcpadStart'])
# extracting time from timestamp
#include "main.h"
unsigned char LedYak(unsigned char sira, unsigned int yanmaSure);
int main(void)
{
HAL_Init(); // After HAL_Init(), System is running on default HSI clock (16MHz). PLL is disabled. The clock to APB1 bus is 16Mhz (HSI clock).
SystemClock_Config();
// Kodunuz buraya!
@ozturkib
ozturkib / adc.c
Last active December 17, 2019 12:24
#include "main.h"
/*
Projede Drivers/STM32F4xx_HAL_Driver altinda kullanilacak .c dosyasinin bulunmamasinin adimlari (adc icin):
Oncesinde uygun yerlere asagidakileri indir.
stm32f4xx_hal_adc.c
stm32f4xx_hal_adc_ex.c
stm32f4xx_hal_adc.h
stm32f4xx_hal_adc_ex.h
Projeye ADC icin asagidaki iki kutuphaneyi ekle
stm32f4xx_hal_adc.c
'''
Created on 25 Oct 2019
@author: Ibrahim Ozturk
@link : http://oku.ozturkibrahim.com/
STM32F4DISCOVERY kitindeki 4 pine bagli 4 ledin sabit ve değişken aralikli yakılıp söndürülmesi.
Ödev içeriğine dair daha detaylı bilgi için aşağıdaki linki tıklayınız:
http://oku.ozturkibrahim.com/docs/Microprocessors_HW02_GPIO_LED.pdf
'''
Created on 11 Oct 2019
@author: Ibrahim Ozturk
@link : http://oku.ozturkibrahim.com/
STM32F4DISCOVERY kitindeki 4 pine bagli 4 ledin öncül tanımlamalarına ait fonksiyon içeriği
'''
void GPIO_Ayarla(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
@ozturkib
ozturkib / LeakyIntegrateAndFire1.py
Last active November 2, 2016 19:37
Leaky Integrate And Fire model with volt units, it is not behaving as it should behave.
'''
Created on 2 Nov 2016
@author: io517@york.ac.uk
@link : http://www.ozturkibrahim.com/
Give a stimulus and see the trajectory of membrane voltage
'''
from brian2 import *
import brian2tools
@ozturkib
ozturkib / spGenAttributeAccessExample.py
Created July 7, 2016 12:22
Accessin spike indices and times attributes in SpikeGeneratorGroup object
'''
Created on 7 Jul 2016
@author: io517@york.ac.uk
'''
import brian2
print("brian_version : " + str(brian2.__version__))
from brian2 import *
indices = np.array([0, 2, 1])
@ozturkib
ozturkib / spGenSimpleExample.py
Created July 5, 2016 18:12
Output of this file is : brian_version : 2.0rc3 times : 0. s How is this possible ?
'''
Created on 5 Jul 2016
@author: io517@york.ac.uk
'''
import brian2
print("brian_version : " + str(brian2.__version__))
from brian2 import *
indices = np.array([0, 2, 1])