Skip to content

Instantly share code, notes, and snippets.

@ybagheri
ybagheri / @french_learn_link.php
Created August 12, 2020 04:27
@french_learn french_learn link list of topic url telegram channel
@ybagheri
ybagheri / @french_learn_link.php
Created August 12, 2020 04:27
@french_learn french_learn link list of topic url telegram channel
@ybagheri
ybagheri / creating-a-neural-network-from-scratch-in-python.py
Created June 25, 2020 09:40
Creating a Neural Network from Scratch in Python
# reference: https://stackabuse.com/creating-a-neural-network-from-scratch-in-python/
import numpy as np
# The Problem
# Suppose we have some information about
# obesity, smoking habits, and exercise habits of five people.
# We also know whether these people are diabetic or not.
# Our dataset looks like this:
#
@ybagheri
ybagheri / emoji.php
Created May 21, 2020 04:25
all emoji as array with native value.
<?php
$emoji =[
'😀',
'😃',
'😄',
'😁',
'😆',
'😅',
'🤣',
'😂',
@ybagheri
ybagheri / gist:7849ce44126fc48f0ab16e6b67d1a660
Created February 11, 2020 05:02
Installing FFmpeg on CentOS from Nux Dextop repository CentOS 7 CentOS7
sudo su -
sudo yum install epel-release
sudo rpm -v --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
sudo yum install ffmpeg ffmpeg-devel
ffmpeg -version
@ybagheri
ybagheri / gist:b6eb394085c4f16075e63631a493dc9c
Created February 11, 2020 05:01
Installing FFmpeg on CentOS from
sudo su -
sudo yum install epel-release
sudo rpm -v --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
sudo yum install ffmpeg ffmpeg-devel
ffmpeg -version
@ybagheri
ybagheri / forward.php
Created January 2, 2020 11:12
Telegram api bot forward forwardMessage from a channel to another.
<?php
$token = YOUR_BOT_TOKEN;
//your bot must be admin of both channel.
$original_from_chat_id = ORIGINAL_CHAT_ID; // like this -1001122688109
$target_chat_id = TARGET_CHAT_ID; // like this -1001131688104
@ybagheri
ybagheri / calendar.txt
Created December 24, 2019 08:04
Gregorian date to Persian Shamsi Jalali insert to database sql
This file has been truncated, but you can view the full file.
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[calender](
[Id] [numeric](18, 0) NOT NULL,
[GDate] [date] NULL,
[PMonth] [smallint] NULL,
@ybagheri
ybagheri / ffmpeg_imageMagic_convert_rar_unrar_centos_7.txt
Created December 15, 2019 06:16
ffmpeg imageMagic convert rar unrar centos 7
# install ffmpeg https://gist.github.com/ybagheri/566971246c9446a5d493b0f8bc922af8
sudo su -
yum install xz
cd /usr/local/bin
mkdir ffmpeg
cd ffmpeg
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-i686-static.tar.xz
@ybagheri
ybagheri / install_ffmpeg_imageMagic_centos7.txt
Last active November 28, 2019 06:14
install ffmpeg imageMagic centos7 centos 7 git remote add origin push pull
# install ffmpeg
sudo su -
yum install xz
cd /usr/local/bin
mkdir ffmpeg
cd ffmpeg
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-i686-static.tar.xz