Sunday 10 February 2019

تدريب اللاعب الدولي "محمدالحسيني"

صور و لقطات من التدريب الحي 
للاعب 
محمدالحسيني 
لاعب البراكانوي المصري 
*******
images & videos for 
ParaCanoe Tanning  of  M.Hosseny Egyptian player 








Wednesday 2 August 2017

شرح بايثون pYTHON IN 2 WEEKS

شرح بايثون pYTHON IN 2 WEEKS




Saturday 8 April 2017

اخيرا

الحمدلله اولا واخيرا للخروج من سجون الظالمين

اخيرا استطيع المتابعة بعد اكثر من عاميين 

Monday 6 March 2017

How To Set Up Raspberry 3.5 inch RPi LCD v3

  1. I have been frustrated on how to make this LCD work. I spent almost one week (on and off) to figure this out. So, I will make a guide on how this LCD is installed, because there are no direct guide on how to install it.

This is what the LCD looks like







It is a bit odd because there are no brands on the back, although from  a couple of research they said that this LCD shares the same driver as the Waveshare 3.5inch.

Tutorial on how to install (from a fresh image installation of Jessie 2016-03-18):

Standard update & upgrade
sudo apt-get update && sudo apt-get upgrade

Expand file system
sudo raspi-config
Choose option number 1 -> Yes -> Reboot

Install the fbtft driver (now included on rpi-updatesudo rpi-update)
sudo rpi-update

Change fb0 to fb1
sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf

NB: Steps after are the tutorial from the swkim01’s GitHub. 
Clone his repo to your Pi
git clone https://github.com/swkim01/waveshare-dtoverlays.git

Copy the overlay file to /boot/overlay as root
sudo cp waveshare-dtoverlays/waveshare35a-overlay.dtb /boot/overlays


Add this on /boot/config.txt
dtparam=spi=on
dtoverlay=waveshare35a
gpu_mem=128

Permanently add driver to /etc/modules
flexfb width=320 height=480 regwidth=16 init=-1,0xb0,0x0,-1,0×11,-2,250,-1,0x3A,0x55,-1,0xC2,0x44,-1,0xC5,0x00,0x00,0x00,0x00,-1,0xE0,0x0F,0x1F,0x1C,0x0C,0x0F,0x08,0x48,0x98,0x37,0x0A,0x13,0x04,0x11,0x0D,0x00,-1,0xE1,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0xE2,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0×36,0x28,-1,0×11,-1,0×29,-3
fbtft_device debug=3 rotate=90 name=flexfb speed=16000000 gpios=reset:25,dc:24

Additional settings, add to /boot/cmdline.txt
fbcon=map:1 fbcon=font:ProFont6x11

Reboot and you should be seeing the LCD works



Additional Notes:

Plug your LCD to the Raspi while working the tutorial
Reboot if told
If the screen go white, then black, you probably missed the last step


All credit goes to:

swkim01 https://github.com/swkim01

DirkS https://www.raspberrypi.org/forums/viewtopic.php?f=45&t=136558

Thread that helped me figure things out https://github.com/notro/fbtft/issues/215

 

Sunday 25 September 2016

Python Network Programming – Part 1 Build 7 Python Apps

Python Network Programming – Part 1 Build 7 Python Apps (UP 2016) 
MP4 | Video: AVC 1280×720 | Audio: AAC 44KHz 2ch | Duration: 13.5Hours | 1.65 GB
Genre: eLearning | Language: English
Learn Python From Scratch! Go from zero programming to building great network apps with Python! Full Python Apps Inside!
Course Went Live: May 2015. Last Update: May 2016 *
* Full Python Apps, Quizzes, Coding Exercises and Final Project are included *
Before you read what I have to say, see what my students are saying about my courses:
"What an incredible value and learning experience!" by Sean A.

Do you want to become a Python Developer without having to spend a lot of money on books and boring theoretical courses?
Are you a network professional who wants to start automating network tasks using Python?
Or maybe you're seeking a raise or even a career change?
Screenshots



Screenshots




Password if need: http://pasted.co/97d4ec1f
Download link:

Tuesday 10 May 2016

Python: how to telnet MSAN Cabinet and change port configuration




python is amazing usable programming langue i saw ever,



 well, this topic about the challenge that i faced in my work @TEData ( biggest ISP in egypt) we have a repeated problem that happened when the TE(Telecom Egypt) specialist assign the new ADSL user to the TEData Vlan ( vlan number look like 405 - 420 ....etc) but he assign customer to another vlan by mistake so our customer can't reach has ADSL service plus customer showing the another ISP (like Nour - Orange - Vodafone) portal 
this case usually escalated to us to re-assign the customer  to the correct Vlan, we have a full queue by the same cases , i written a python script that offer the sample solution it works as :

1- Telnet the huawei MSAN Cabinet 5600T
2- looking for the correct stacking Vlan
3- check if the desired port is configured OR not.
4- if not configured send message "port not configured"close telnet session 
5- if configured check configuration of the port desired 
6- if the configuration is OK send message "Everything is OK& no problem found "
7- else: replace the correct vlan by the port configuration 
8- send message    "the vlan changed from "wong number " to the "correct vlan number"
9-close telnet session 


I'll upload the code soon  you can check the below part of code :




import telnetlib

import sys
import time
import re

#####################################################################################################
############ scritp written By Mohamed El Hosseny to correct the Bit streem Issue exclusive fot TEDATA company
############ Mohamed.hosseny@outlook.com
############ Python V2.7
#####################################################################################################
#------Telne&login-------#
HOST = int (raw_input("Enter Host IP:"))
user = chr (raw_input("Enter userName:"))
password = chr (raw_input("Enter password:"))
port = int (raw_input("Enter port look like 1/1/1 :"))

tn = telnetlib.Telnet(HOST)
tn.read_until("name:",5)
tn.write(user)
tn.read_until("sword:",5)
tn.write(password)
tn.read_until(">",10)#incase the cbenit Hostname end by E NOT EG

    #----------Run_Script --------#
tn.write(command)
tn.read_until(")#",5)
## check MAC-address ##
tn.write("display mac-address port  %s \n" %port)
tn.write("\n \n")
out1=tn.read_until(")#",5)
nomac = "Failure:"
if nomac in out1:
    print ("There is no MAC address Found")
else:
    tn.write("display mac-address port  %s \n" %port)
    tn.write("\n \n")
    out1=tn.read_until("dl ",5)
    out2=tn.read_until("dynamic",10)
    print ("MAC-address is found : \n %s " %out2[2:16])
    ##check Stacking vlan##
    tn.write("display current-configuration section vlan-config | include vlan attrib 4\n")
    tn.read_until("\n vlan attrib ",5)
    out1=tn.read_until("stacking",5)
    out1 = out1[0:3]
    service = "inner-vlan"##
    ##check the configuration under port
    out = tn.write("display current-configuration section bbs-config | include %s v\n" %port)
    tn.read_until("service-port ",5)
    out=tn.read_until("outbound",5)
    #check if there is a configuration or not#
    if service not in out :
        print ("port not configured ")
        tn.close()
    else :
        print ("the configured Vlan is : %s " %out[9:13])
        print ("the  stacking Vlan is : %s " %out1)





Thursday 17 September 2015

لمحات فرعونية

حاولت مرار تجميع الكلمات ونظمها لكتابة قصة تستحق القراءة وكلما اجتمعت لي مجموعة من اكلمات وجدتها تتلاشي من راسي وكأنه سحابة صيف مرت علي بمنتصف نهار حار
جالس الي مكتبي ..بيدي القلم اخط علي ورقة بيضاء مجموعة من الخطوط بلا معني او هدف
حاولت اجتر بعضا من ذكرياتي لعل اجد طرف خيط ابدأ به القصة او الرواية (اذا كنت محظوظ)
لا اجد شئ ...تركت القلم جانبا
وامسكت بريموت كنترول الحاص بجهاز التكيفف وزدت من درجة برودة الغرفة ..
تركت المكتب واتجهت للكتب المصفوفة بمواجهة المكتب
اخرجت كتاب تاريخ يتحدث عن التاريخ الفرعوني في حقبة الاسرات الاولي
وتسالت كيف كانت حياه الفلاحين في اراضيهم ..منازلهم .اسواقهم
فلم يصل لنا من حياتهم الا اقل القليل ...مجموعه من اللوحات الزاهية غالبا لا يعرف عنها المصريين اي شئ الا اذا صادفت رؤيتها باحدي القنوات المحلية ....مددت ساقي علي الكنبة الكبيرة بمكتبي ..شعرت ببعض البرودة امسكت بالكتاب اتصفحهوارحت راسي علي المخدة و............

بسوق القرية الواسع والذي يقام اسبوعيا ..اصوات الباعة ... اصوات المشترين ...اتجهت الي بائع خضار وسألت عن سعر احدي الخضر
-  بكم سعر هذا الجرجير الطازج؟
. ربع نب نفر لكل ربطة.. انه ورور
حين راي البائع علامات التعجب علي وجهي اشار الي مبتسما
. انت غريب ياسيدي عنا
- نعم فانا لست من هذه الديار
. اذا خذ ما تريد من الخضر الطازج وادفع ما معك ..وليبارك لنا رع فيما رزق؟
-ولكني لا احمل اي مال .
وضع في يدي رغيف خبز كبير وقطعة جبن قريش وبعض الخضر واشار الي احدي الجهات قائلا
. اذهب الي معبد حتحور بهذا الاتجاه وستجد المساعدة لدي الكهنة فهم بركة السماء ونجوم الارض ...

...........................
يستكمل