Archive

Archive for the ‘Uncategorized’ Category

Flowers in my lens … 8

April 15, 2021 Leave a comment

Here is another photo taken with a #galaxy #Note9 phone for some flowers from my garden..

For mor follow me on Twitter @h_ta3kees

Ali radwani flowers in garden camera photo photography

Activities in Pandemic

March 21, 2021 Leave a comment

During COVID19 school vacation I had several activities with my kids specially Drawing and Coloring, here are some papers that we colored along with Turkish Coffee (coffee for me). I take the photo using Galaxy Note 9.

 

 

 

Flowers in my lens ..1

February 21, 2021 3 comments

This is a photo taken by Galaxy Note9 handheld..

Ali radwani yellow flowers photo Photography

You may follow me on Twitter Here.

Ali,

Another sketch challenge week: Parrot

February 18, 2021 Leave a comment

This week sketch challenge @1hour1sketch is to Draw a Parrot, so here is my sketch using pencil, black Pen. More Sketches on my Sketch page .. also follow me on Twitter @h_ta3kees

Ali radwani drawing sketch challenge 1hour1sketch pen pencil parrot

Another SketcheBook

October 13, 2020 Leave a comment

After my 6th Sketchebooks I start creating sketchebooks for my self, cutting the A4 papers, punch or glue them together then creating the cover and Sketch over it, other sketchbooks are purchased online then again I draw/sketch on it’s cover. Sample of what I made here ..

Sketch Books 12, 13 Here

Sketch Books 22, 23 Here

This one here is my 42nd Sketchebook Cover, I purchased this from AliExpress site, verey nice and small but the papers are very thin and the colors appear on the other side of the page, over all, they are doing the job.

More sketches are available in My Sketchbooks Page..

Sketch from One Year Back

August 5, 2020 Leave a comment

This is an Elephant sketch from One #year ago i use a pencile then black ink pen.

Follow me on Twitter..

Tow Weeks with Kaggle



Several months ago I was looking for some data to test one of my projects, the search take me to KAGGLE page, I spend some time there grab some free data I want; test my project.. DONE!.

Tow weeks ago I was reading an article and the name Kaggle come across, I decide to give the page some more time. I join it, and immediately start to joined one of free courses. I am happy to be there, learning from the community I finish five free courses in Tow Weeks, they have tons of data, highly recommended it.


…… KAGGLE Team ….. Thank you ..



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




Follow me on Twitter..




By: Ali Radwani




Categories: Uncategorized

Sketch to Relax


This is a last night Sketch, just to break or stop thinking in codes and functions that are not working well. I think I need to stop codeing for 2-3 Days.

Python Project: Filter Numbers with a List

April 15, 2019 Leave a comment



Python: Bite 107


Filter numbers with a list comprehension

I was happy to join Pybites and start to solve the code-challenges, my problem from the first bite was that i am solving the challenges in other online python interpreter, and it looks working fine and the output seams as it should be, but once I copy the code in Pybite portal and doing the code test it fail and gives errors.

In this challenge Bite 107, after a list of numbers the task is to return the positive even number. Now in the task description it mentioned to use (elegant list comprehension; one line of code). I start to work on it, immediately it jump to my head a for loop and if each item is even and more than 0 add it to my_list, then return my_list. After coding, the output was a list with positive and even numbers in a Number-list, but it failed in the Bite test portal. WAY!.

This type of failure was against me in other challenges also, and i was just setting all the day thinking what happen!. With Bite 107 I decide to click on “Show Solution” button just to see what is wrong.

One line code:The Solution was in one line of list brackets after a return statement congaing for and if without my_list. just like that. I start smiling, and ask my self “How could i know that i can write it like this??”. Yes it is beautiful, Yes elegant and yes one line of code, and yes my-way of coding gives the answer that we want, my code pass my testing exam.

Concloguen: I think i come up with a good resource of learning python, I don’t want to read book’s but reading codes that doing things and having the alternatives of writing same code; this will help me a lot. I am not coding for NASA or in other sensitive area that processing time is essential and micro-milli seconds make difference, so one line of four-line to-me is OK. 🙂

Acknowledge: I’d like to thank Pybite community for there contribution in spreading knowledge and codes, and for this challenges. I will read the challenges, and try my best to solve them as elegant as i can, also i will not stop in one point because my code is 2 lines more than what should be.

Last thing, Bite 107 here is my code and the elegant code. Be calm and positive.



The Code:



#First: My Code
def filter_positive_even_numbers(numbers):

my_list=[]

for i in range(len(numbers)):

if (i>0 and i%2==0) :my_list.append(i)

return my_list

print (filter_positive_even_numbers(numbers))



#The optimal solution
def filter_positive_even_numbers(numbers):

return[n for n in numbers if n > 0 and n % 2 == 0]





Follow me on Twitter..

Categories: Uncategorized

Python Project: Draw Face

November 25, 2018 Leave a comment

Drawing Face

In this fast python code we will draw a Face using 3 circles and one line.

We need to import a library for this called turtle, and we will use functions to help us in our mission, so let’s start.

#Python #code to #draw #face

import turtle
t=turtle.Turtle()
t.speed(9) #this will set the drawing speed to 9.

t.pencolor(“black”) #you can change the color to red, blue, or any other.

# Now we will create a functions taking circle size(s), the position (x,y) and our turtle name (t)

def d_c(t,s,x,y)
t.penup() #take pen up of the canvas.
t.goto(x,y) #goto position x,y
t.pendown()

t.circle(s) # draw the circle.

d_c(t,50,25,0) # call to draw the face
d_c(t,7,5,50) #call to draw the eye.
d_c(t,7,50,50) #call to draw second eye
t.penup()

#now we will draw the mouth
t.goto(15,20)
t.pendown()
t.goto(50,20)

Categories: Uncategorized