Skip to content

Instantly share code, notes, and snippets.

View mustafaxfe's full-sized avatar
💭
I may be slow to respond.

mustafa mustafaxfe

💭
I may be slow to respond.
View GitHub Profile
using Business.Abstract;
using Entities.Concrete;
using System;
using System.Collections.Generic;
using System.Text;
namespace Business.Concrete
{
public class PttManager : ISupplierService
{
@mustafaxfe
mustafaxfe / ffmpeg.md
Created February 17, 2021 17:36 — forked from protrolium/ffmpeg.md
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@mustafaxfe
mustafaxfe / yatak_dengeli.mlx
Created December 10, 2019 16:31
yatak_dengeli.mlx
function [A_yatagi, B_yatagi] = dengeli_yatak_kuvvetleri(W, S1, Q1, Q2, m1, m2, D, E,L,A, B, mL, mR, Qr, Ql, RbL, RbR)
% Statik denge şartından toplam kuvvetler ve toplam moment 0 olmalı
V = pi * (W/30); % Mil hız
% X ekseninde
% A yatağına göre moment
Bx = (mL*cosd(Ql)*S1*RbL*V^2+mR*cosd(Qr)*(L+S1)*RbR*V^2+m2*cosd(Q2)*(A+B+S1)*E*V^2+m1*cosd(Q1)*(A+S1)*D*V^2)/(L+S1+S1);
Ax = Bx - (mL*cosd(Ql)*RbL*V^2 + mR*cosd(Qr)*RbR*V^2 + m2*cosd(Q2)*E*V^2 + m1*cosd(Q1)*D*V^2);%- m1 * cosd(Q1) * V^2 + m2 * cosd(Q2) * V^2 - mL * cosd(Ql) * V^2 - mR * cosd(Q2) * V^2;
% Y ekseninde
% A yatağına göre moment
@mustafaxfe
mustafaxfe / yatak_dengeli.mlx
Created December 10, 2019 16:31
yatak_dengeli.mlx
function [A_yatagi, B_yatagi] = dengeli_yatak_kuvvetleri(W, S1, Q1, Q2, m1, m2, D, E,L,A, B, mL, mR, Qr, Ql, RbL, RbR)
% Statik denge şartından toplam kuvvetler ve toplam moment 0 olmalı
V = pi * (W/30); % Mil hız
% X ekseninde
% A yatağına göre moment
Bx = (mL*cosd(Ql)*S1*RbL*V^2+mR*cosd(Qr)*(L+S1)*RbR*V^2+m2*cosd(Q2)*(A+B+S1)*E*V^2+m1*cosd(Q1)*(A+S1)*D*V^2)/(L+S1+S1);
Ax = Bx - (mL*cosd(Ql)*RbL*V^2 + mR*cosd(Qr)*RbR*V^2 + m2*cosd(Q2)*E*V^2 + m1*cosd(Q1)*D*V^2);%- m1 * cosd(Q1) * V^2 + m2 * cosd(Q2) * V^2 - mL * cosd(Ql) * V^2 - mR * cosd(Q2) * V^2;
% Y ekseninde
% A yatağına göre moment
@mustafaxfe
mustafaxfe / yatak.mlx
Created December 9, 2019 20:20
dengesiz hal için yatak reaksiyonları
function [B_yatagi, A_yatagi ] = dengesiz_yatak_kuvvetleri(W, S1, Q1, Q2, m1, m2, D, E,L)
% Statik denge şartından toplam kuvvetler ve toplam moment 0 olmalı
V = pi * (W/30); % Mil hızından hız
% X ekseninde
% A yatağına göre moment
Bx = (m1 * cos(Q1)*D*V^2 + m2 * cos(Q2)*E*V^2)/(S1+S1+L);
Ax = m1*cos(Q1)*V^2 + m2*cos(Q2)*V^2 - Bx;
% Y ekseninde
% A yatağına göre moment
By = (m1 * sin(Q1)*D*V^2 + m2 *sin(Q2)*E*V^2)/(S1+S1+L);
@mustafaxfe
mustafaxfe / deepspeech_data.py
Created January 24, 2019 18:36
Creating deepspeech data format
#First Step
book = AudioSegment.from_mp3("/content/gdrive/My Drive/TASR/kitaplar/teneke/bolum1/Teneke_Yasar_Kemal_01.mp3")
with open('/content/gdrive/My Drive/TASR/kitaplar/{0}/{1}_output/tuned.json'.format(book_name, chapter)) as f:
syncmap = json.loads(f.read())
syncmap
#Second Step
sentences = []
for fragment in syncmap['fragments']:
if ((float(fragment['end'])*1000) - float(fragment['begin'])*1000) > 400:
This file has been truncated, but you can view the full file.
SAMSUN A ÇIKTIĞIM GÜN GENEL DURUM VE GÖRÜNÜŞ 1919 yılı Mayısının 19 uncu günü Samsun a çıktım.
Ülkenin genel durumu ve görünüşü şöyledir Osmanlı Devleti nin içinde bulunduğu grup, I.
Dünya Savaşı nda yenilmiş, Osmanlı ordusu her tarafta zedelenmiş, şartları ağır bir ateşkes anlaşması imzalanmış.
Büyük Savaş ın uzun yılları boyunca millet yorgun ve fakir bir durumda.
Milleti ve memleketi I.
Dünya Savaşı na sürükleyenler, kendi hayatlarını kurtarma kaygısına düşerek memleketten kaçmışlar.
Saltanat ve hilâfet makamında oturan Vahdettin soysuzlaşmış, şahsını ve bir de tahtını koruyabileceğini hayal ettiği alçakça tedbirler araştırmakta.
Damat Ferit Paşa nın başkanlığındaki hük met âciz, haysiyetsiz ve korkak.
Yalnız padişahın iradesine boyun eğmekte ve onunla birlikte kendilerini koruyabilecekleri herhangi bir duruma razı.
Ordunun elinden silâhları ve cephanesi alınmış ve alınmakta... İtilâf Devletleri, ateşkes anlaşmasının hükümlerine uymayı gerekli bulmuyorlar.
#Generate root password
import random, string
password = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(20))
#Download ngrok
! wget -q -c -nc https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
! unzip -qq -n ngrok-stable-linux-amd64.zip
#Setup sshd
! apt-get install -qq -o=Dpkg::Use-Pty=0 openssh-server pwgen > /dev/null
#Set root password
@mustafaxfe
mustafaxfe / tts_example.ipynb
Created December 20, 2018 17:27 — forked from erogol/tts_example.ipynb
TTS_example.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mustafaxfe
mustafaxfe / cuda_installation_on_ubuntu_18.04
Created November 18, 2018 14:28 — 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
###