Archive

Posts Tagged ‘الدوحه – قطر’

Camera: Nikon S9900



Subject: About My Nikon S9900 Camera

In 2016 I bought Nikon Coolpix S9900, I have Nikon D90, and Nikon 7100 both are DX (crop sensor), but S9900 is my first Coolpix (point & shoot) camera from Nikon, I use to have Sony T100. [:. Read more about my cameras and lenses Here .:]

Effective pixels: 16.0 million
Image sensor: 1/2.3-in. type CMOS

Lens: NIKKOR lens with 30x optical zoom
Focal length: 4.5-135 mm
(angle of view equivalent to that of 25-750 mm lens in 35mm [135] format)

Maximum aperture: f/3.7-6.4

Digital zoom: Up to 4x
(angle of view equivalent to that of approx. 3000 mm lens in 35mm [135] format)

Vibration reduction
Autofocus (AF)
Macro mode: Approx. 1 cm (0.4 in.)

Monitor 7.5 cm (3-in.) wide viewing angle TFT LCD with anti-reflection.

Storage: SD , SDHC , SDXC
Internal memory (approx. 473 MB)

ISO 125-1600
ISO 3200, 6400 (available when using P, S, A, or M mode)

More Specifications [Click Here]

ali nikon s9900 nikor ali nikon s9900 nikor
ali nikon s9900 nikor ali nikon s9900 nikor



I use the camera for a while, not sure why I stop, so i decided to start playing with it more, and post some output. So in coming weeks i will post some landscape and macro shots.



ali radwani ahradwani.com python projects codeFollow me on Twitter..

By: Ali Radwani

Python Sorting Algorithm – Heap Sorting -P3


Learning : Python, Math, Algorithm
Subject: Sorting Algorithm, Heap Sort P2

[NOTE: To keep the code as simple as we can, We WILL NOT ADD any user input Varevecations. Assuming that our user will Enter the right inputs.]


First let’s just remember that in Part-1 we wort the Following Functions:

  • Main Menu Function.
  • Entering/Creating the Array.
  • Print-Out or to Display the Array.
  • Sections Header.

In this Part-3 we will cover another Two important Functions that we need to talk about in our mission to understand the Heap Sorting Algorithm.

First Function
Check If The Array is in Max Heap: After the user Giveing/Entering the Array [Selecting Option 1 in the Menu] we need to Examen/Check if it is in a Max-Heap, to do so we will call the Function def check_if_max_heap(arr, inside): the Function will take Two arguments:
arr : The Array.
inside: Boolean Flag showing are we calling the Function from within another Function or Not.

Scope of Work: We will check and compare each Node [starting from last node in the leaves] with it’s Parent using this formula parent_index = ((child_index-1)//2) to get the parent index, then comparing the Values of the Child and Parent, If the Child is GRATER Than his Parent we SWAP them. Then going to the Next Child and so-on until the Root-Node. .. Here is the Code ..

Ali radwani ahradwani.com python code heap sorting algorithm

for each print statement I am using this code if not inside : then print ..
Example: if not inside : print(‘\n The Array is a Max-Heap Array.’)
So if the inside = True then the print code will not work, that’s mean we are calling the Function from inside another function and we just want the return value, the return here will be a boolean True/False as is_max [if the array is in Max-Heap].

Second Function
Convert to Max-Heap: In this Function we will convert a given Array to a Max-Heap Array. The way this Function is working is by checking/Examining all the Childs starting from the Leaves, and if any Child is Grater than his Parent we do a SWAP. After we Finish, we will call the Function def check_if_max_heap(arr, inside): to check if the Array is in Max-Heap, If NOT we will call the convert Function and so-on until we get the is_max = True from the def check_if_max_heap(arr, inside):. Both Functions def check_if_max_heap(arr, inside): and def convert_to_max_heap (arr,inside): will be run in a while loop until def check_if_max_heap(arr, inside): will return True. .. Here is the code for def convert_to_max_heap (arr,inside):

Ali Radwani python code heap sorting algorithm


And here is the while loop to keep Examining the Array until fully converted to a Max-Heap Array.

 # While loop in Option 3 from the Main-Menu, In the main body code..

    while not is_max:
             arr = convert_to_max_heap (arr,True)
             is_max = check_if_max_heap (arr,True)
                



We will stop here in this part. In Part-4 we will Add new Node to the Array, and Delete a Node from the Array.

..:: Have Fun with Coding ::.. 🙂

To Download my Python code (.py) files Click-Here



ali radwani ahradwani.com python projects codeFollow me on Twitter..

By: Ali Radwani

Python: Shares Speculation System – Part 6

August 12, 2020 1 comment


Learning : Python, DataBase, SQL, SQlite3
Subject: Plan, Design and Build a Shares Speculation System

Project Card:
Project Name: Shares Speculation System
By: Ali
Date: 2.7.2020
Version: V01-2.7.2020

In Part-5 we wrote the function to submit the Buying Transactions ..[Click to Read] also we wrote the section of showing/displaying the Buying records on the screen. In this part we will continu on same function to write the code to Save Selling Transaction and display them on the screen in Show all Transactions Function.

So First we will writing the code to Save/Submit Selling Transactions. Now let’s start coding ..
Before we start I want to focus on a one-line If statement that we will use to give the user the ability or the chance to Quit or Exit from the function in any time before saving the Transaction by just entering ‘Q’, here is the code: if s_s_id in [‘Q’,’q’] : return (s_s_id is the user input).

In def sell_share(): function we will display all the Shares Name (by calling show_share() function) on the screen and ask the user to select the ID for the share, then we will Run tow SQL statements to get some data about that share such as it Full Name and the amount of shares we have (from s_basket table), if the return value of the s_basket is None or we Don’t have any shares we can’t do any Sell process so we will Exit. Here is the code ..

ali radwani python project learning sql codeing

If we have shares, then we will print on the screen to show total amount of shares we have and will ask the user to Enter the new selling share information like the Date, The Amount of Selling and the Price, here is the code ..

ali radwani python project learning sql codeing

After that, we will ask the user to CONFIRM Saving by pressing ‘Y’, and will use the SQL Insert statement to submit the data to the Database, also to update the s_basket table…. Here is the code.

Now we finish the def sell_share(): function and will start to writing the corresponding part to show the Selling Transactions in def show_all_trans ():, in this section of the code as we did to show the Buying Transactions we will RUN an SQL statement to get all selling transaction in the table, we will use the formatting to output the data as a table format. Here is the code

Coming Up: In Next part we will Write the Function to Delete Transactions from the System, also will write a code to Show All Transactions Buying and Selling in one Table.

[NOTES]
1. Part-1 has no code file.
2. We are applying some basic Validations on some part of the code, and assuming that the user will not enter a messy data.
3. This Application Purpose for Saving Transactions and NOT for Desetion Making and Dose’t Have any type of AI or ML Model to Predict the Prices and/or Giving Sugestions on Buying or Selling Shares.
:: Shares Speculation System ::

Part 1 Part 2 Part 3 Part 4 Part 5
Part 6

To Download my Python code (.py) files Click-Here


Follow me on Twitter..


By: Ali Radwani

From my Sketch Book




Bird From my Sketch Book

I am sketching to enhance my skill, here is one of sketches from my sketchbook using pencil as a guide-line and ink-pen to finish the drawing.


Click to Enlarge

::My SketchBook::
Sketch of: Bird
Using: Ink-Pen
Date: 5/12/2017
SketchBook: SketchBook # 22
More Sketches: Click Here



Follow me on Twitter..


Inst_icon




Ali,

From my Sketch book




Giraffe From my Sketch Book

I am sketching to enhance my skill, here is one of sketches from my sketchbook using pencil as a guide-line and ink-pen to finish the drawing.


Click to Enlarge

::My SketchBook::
Sketch of: Giraffe
Using: Ink-Pen
Date: 15/10/2017
SketchBook: SketchBook # 22
More Sketches: Click Here



Follow me on Twitter..


Inst_icon




Ali,

From my Sketch Book

March 29, 2018 Leave a comment



Little Sparrow From my Sketch Book

I am sketching to enhance my skill, here is one of sketches from my sketchbook using pencil as a guide-line and ink-pen to finish the drawing.


Click to Enlarge

::My SketchBook::
Sketch of: Little Sparrow
Using: Ink-Pen
Date: 29/12/2017
SketchBook: SketchBook # 23
More Sketches: Click Here



Follow me on Twitter..


Inst_icon




Ali,

From my Sketchbook

March 26, 2018 Leave a comment



Touche Turtle From my Sketch Book

I am sketching to enhance my skill, here is one of sketches from my sketchbook using pencil as a guide-line and ink-pen to finish the drawing.


Click to Enlarge

::My SketchBook::
Sketch of: Touche Turtle
Using: Ink-Pen
Date: 21/1/2017
SketchBook: SketchBook # 13
More Sketches: Click Here



Follow me on Twitter..


Inst_icon




Ali,

From my sketch book

March 24, 2018 Leave a comment



Old Mosque From my Sketch Book

I am sketching to enhance my skill, here is one of sketches from my sketchbook using pencil as a guide-line and ink-pen to finish the drawing.


Click to Enlarge

::My SketchBook::
Sketch of: Water Color
Using: Ink-Pen
Date: 11/1/2017
SketchBook: SketchBook # 13
More Sketches: Click Here



Follow me on Twitter..


Inst_icon




Ali,

From my Sketch book

March 22, 2018 Leave a comment


A Snowy Egret From my Sketch Book

I am sketching to enhance my skill, here is one of sketches from my sketchbook using pencil as a guide-line and ink-pen to finish the drawing.


Click to Enlarge

::My SketchBook::
Sketch of: Snowy Egret
Using: Ink-Pen
Date: 11/1/2017
SketchBook: SketchBook # 13
More Sketches: Click Here



Follow me on Twitter..


Inst_icon




Ali,

From my sketch book

March 20, 2018 Leave a comment


Octopus From my Sketch Book

I am sketching to enhance my skill, here is one of sketches from my sketchbook using pencil as a guide-line and ink-pen to finish the drawing.


Click to Enlarge

::My SketchBook::
Sketch of: Octopus
Using: Ink-Pen
Date: 3/1/2017
SketchBook: SketchBook # 13
More Sketches: Click Here



Follow me on Twitter..


Inst_icon




Ali,