PYGAME – HOW GET USERNAME AND CONTINUE THE GAME

PYGAME – PYTHON 3 : HOW GET USERNAME AND CONTINUE THE GAME

====================================

 

Coming Soon!

Two games/script examples [Snake, Tetris] in Pygame where initially enter Username and also have Top Ten Score/Username Rank…

YouTube Video below! SlideShare.net embed below!

If you like to buy for 7.00$ email me – Included: The 2 Games + the 2 Games the same but with functionality added: Username enter & Top 10 Players keep in a text file, support for 3-months on the scripts

 

 

index2@BestOfficeDeskSetup.com – Drop me an email

https://paypal.me/lsepolis123    // All payments PayPal guarantee

 

 

PC to VM converter

PC to VM converter

=======================

I recently converted a Windows 7 Home OS [old Dell Laptop] to vmdk Virtual Machine (VM)…

I will describe here the important points of the procedure.

 

 

http://kb.vmware.com/kb/2005129 – This video discusses and demonstrates how to convert a physical machine into a virtual machine that will run on VMware Fusion, Workstation or Player.

 

Points to keep in mind

Set in resulting VM Network all 3 types of NAT, Host-Only, Bridge so as the VM has Connection to the internet.

RAM will be Ram of the converter PC… for me was 3.8GB so after finished Prior run VM round it to 4GB and after because the total RAM in my host PC is 32GB I increase it to 8GB exactly.

Follow the instructions in the tutorial & article above… VMWare converter server service must get started prior to starting the converting procedure. In my case, the software prompted me to START THIS SERVICE in Windows 7 Home.

SCREENSHOTS & SHOTS

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Your OLD PC CPU can Not run vmware… then try this…

If Your OLD PC CPU can Not run Vmware Player … ( cpu older than 2010 ) do Not give up try…

Then you can try install Virtual Box from Oracle…

Success worked

PC supports Visualization but CPU very old to install Vmware Player so installed Virtual Box …

For Questions email me

Get weather in CLI in Linux

First install w3m terminal browser with:

sudo apt install w3m

AFTER

to get weather type

w3m wttr.in/London

Or

w3m wttr.in/Limassol-Cyprus

Or

w3m wttr.in/Paphos-Cyprus

According to the desired location

Make sure Terminal window is expanded – large size mode, to see weather easily

================================

EXIT BY PRESSING

Q

Y/n   Y

================================

SEE SCREENSHOT HERE >>>>

https://lse-blogs.s3-eu-west-1.amazonaws.com/personal/2019-08-19_07-46-46-London-wttr-in.png

 

 

Send SMS with Python 3 & Twilio.com

Send SMS with Python 3 & Twilio.com

==========================================

 

If you wanted in your PHP web site or Python Program, send SMS you can follow below :

https://www.twilio.com/docs/sms/quickstart/php

https://www.twilio.com/docs/sms/tutorials/how-to-send-sms-messages-python

https://lse-blogs.s3-eu-west-1.amazonaws.com/personal/SMS-Python3-Twilio-provider.zip

The latter zip file is a complete Python program – when you press switch [press space bar emulated here] eg Enter a PC Lab room the switch turn True… then recorded in TXT file the date/time entered, appear on the Pygame window this time, and an SMS sent to your Mobile.

Requirements

1

Trial Free Twilio account – a limit on free SMS

2

Twilio credentials lines 15-16

# Your Account Sid and Auth Token from twilio.com/console
# DANGER! This is insecure. See http://twil.io/secure
account_sid = ”
auth_token = ”

3

Twilio Telephone number provided by Twilio account and your own mobile number [SMS delivered]  lines 70-71

from_=’+11234567890′, # personal Twilio account telephone number
to=’+11234567890′ # your number – notified / delivered the SMS

 

if you need help contact me

LSE

 

Linux Distributions with most pre installed Software

Linux Distributions with most pre installed Software/Apps/Games

===============================

Coming Soon !

For Now Check Out / Googling

  1. Ubuntu Studio OS – Creators Distro
  2. Zorin OS Educational – Educational/Student Distro
  3. Debian – Raspbian OS for PCs and Macs – Educational/Programming/Projects w/ Pi Distro

========================================

Useful Composer PHP Package Manager Commands

Useful Composer PHP 7 Package Manager Commands

==========================

 

Composer is fairly easy to update, just run this command:
composer self-update

Composer works by using the configuration in a file called composer.json, where you can
outline external dependencies and your autoloading style. Once Composer has installed
dependencies listed in this file, it writes a composer.lock file that details the exact
versions it has installed. When using version control it is important that you commit this file
(alongside the composer.json file), don’t add it to your .gitignore file if you’re on Git.
This is very important because the lock file details the exact version of a package that was
installed at a particular time in your version control system. You can, however, exclude a
directory called vendor,

So now we can add the following markup to the composer.json file:

{
  "autoload": {
    "psr-4": {
      "IcyApril\\ChapterOne": "src/"
    }
  }
}
So let me explain what this file does; it tells Composer to autoload everything in the

So, the next step is to create our src directory where we include the code we want to
autoload. Done that? Right, now let's open up our command line and move into the
directory where we've put our composer.json file.
In order to install everything in the composer.json file in your project just run the
composer install command. For subsequent updates, the composer update command
will update to the latest versions of all dependencies as defined in composer.json. If you
don't want to do this, though, there is an alternative; running the composer dump-autoload
command will solely regenerate the list of the PSR-0/PSR-4 classes that need to
be included in the project (for example, you add, delete, or rename some of your classes).
Now let me cover how you will actually go about creating a class. So, let's create an src
directory in our project and in that src directory create a new class called Book. You can do
this by creating a file called Book.php. In that file, add something like this:

<?php
namespace IcyApril\ChapterOne;

class Book
{
  public function __construct()
  {
    echo "Hello world!";
  }
}


?>

The line after you put in your PHP opening tag, we need to pull in our autoloader script:
require_once('vendor/autoload.php');

Then we can instantiate our Book class:
new \IcyApril\ChapterOne\Book();

Addition and Multiplication of Matrix in Python 3

Addition and Multiplication of Matrix in Python 3

=========

m1 = [[1,2,3],[4,5,6],[7,8,9],[10,11,12]]

m2 = [[1,2,3],[4,5,6],[7,8,9],[10,11,12]]
m3 = [[1,2,3],[4,5,6],[7,8,9],[10,11,12]]
m4 = [[1,2,3,4],[4,5,6,7],[7,8,9,0]]
class TwoDimMatrixOp:
def __init__(self, m1, m2):
self._m1 = m1
self._m2 = m2
self._result = [ [0]*(len(m1)-1) for _ in xrange(len(m2)) ]
def sum(self):
# iterate through rows
for i in range(len(self._m1)):
# iterate through columns
for j in range(len(self._m1[i])):
self._result[i][j] = self._m1[i][j] + self._m2[i][j]
for r in self._result:
print(r)
def multi(self):
self._result_mult = [ [0]*(len(m1)) for _ in xrange(len(m2[0])+1) ]
# iterate through rows of X
for i in range(len(self._m1)):
# iterate through columns of Y
for j in range(len(self._m2[0])):
# iterate through rows of Y
for k in range(len(self._m2)):
self._result_mult[i][j] += self._m1[i][k] * self._m2[k][j]
for r in self._result_mult:
print(r)
TwoDimMatrixOp(m1, m2).sum()
TwoDimMatrixOp(m3, m4).multi()

Topics in Linux Terminal working

Symbolic Links building & Extracting zip keeping perm origin

============

1

Scenario: You installed in Ubuntu Eclipse IDE but to run needed JDK/JRE (Java) being installed in Ec;ipse dir /home/leonidassavvides/Documents/eclipse/jre/bin/java , instead of install JAva in this directory you install in default directory and create a symbolic link at /home/leonidassavvides/Documents/eclipse/jre/bin/java .

# create directories that needed
leonidassavvides@ubuntu:~$ mkdir -p /home/leonidassavvides/Documents/eclipse/jre/bin

# link directories java to java/eclipse
leonidassavvides@ubuntu:~$ ln -s /usr/lib/jvm/jdk-11.0.3/bin/java /home/leonidassavvides/Documents/eclipse/jre/bin/java

now Eclipse IDE should work

2

Scenario: Extract Prestashop zip archive keeping origin before extract files/folders permissions the same

coming soon

 

 

My Reading list for Summer 2019 – Data Science

My Reading list for Summer 2019 – Data Science

I took a ZENVA course in Data Science in May 2019 so my reading list is as here – along some programming books in [advanced in Data Structures & Design Patterns] Python/C++/PHP/Java NOT referred here…

 

Laura Igual • Santi Seguí Introduction to Data Science , Springer A Python Approach to Concepts, Techniques and Applications For this reason all the code examples and data in this book are available to download at https://github. com/DataScienceUB/introduction-datascience-python-book

=====

José Unpingco Python for Probability, Statistics, and Machine Learning , Springer

=====

Python Web Scraping , Packt Second Edition Hands-on data scraping and crawling using PyQT, Selnium, HTML and Python Katharine Jarmul, Richard Lawson

=====

PROBABILITY AND STATISTICS FOR COMPUTER SCIENTISTS SECOND EDITION Michael Baron CRC Press, Taylor & Francis Group

=====

IPython Interactive Computing and Visualization Cookbook , Packt Copyright © 2014 Packt Publishing

=====

Software Architecture with Python , Packt Design and architect highly scalable, robust, clean, and high performance applications in Python Anand Balachandran Pillai

Why every Creator needs to take a look at Ubuntu Studio OS Linux

Why every Creator needs to take a look at Ubuntu Studio OS Linux

Why bother installing and trying creative software and Not give Ubuntu Studio OS Linux a try…

In Ubuntu Studio OS you will find Ubuntu OS Linux with preinstalled all major/best FOSS creative Apps for Linux… [carefully selected completely FREE and Open Source] many also have Windows and Mac editions… like Video Production Apps, Audio Production, Graphics Design, EBook/Book Publishing/Editing, Office Apps, and more

Basically you have to install Nothing… only give a try to the Apps, because exist Apps for any Creative Work you can imagine… and in some cases many alternative Apps to do the same thing eg Video Production, so just try and install nothing…

Soon coming screen shots of my Ubuntu Studio OS Linux VM (Guest) in VMWare Player 14… Windows 10 Pro (Host PC)

Hello World! My first test in Raspberry Pi 3 B+

Hello World! My first test in Raspberry Pi 3 B+

====================

After Run Raspbian OS & Apps like the Free (for R Pi) Mathematica in Raspberry Pi 3 B+… connected in Display HDMI/Keyboard USB/Mouse USB … I proceeded further for Hello World! My first test in Raspberry Pi 3 B+ control of external electronics components and devices… in this Hello World! is basically some LEDs/Resistances connection to some selective Pins of the R Pi 40 pins… The project is run with the help of a Python script run from CLI/Shell Linux/Raspbian OS Shell…

More Coming Soon !!! with Photos

Why learn more than 2 programming languages

Why learn more than

2 programming languages

================

Simply because you have to use
Right tool/language for the job to be done !

You cannot build web site without JavaScript and HTML5/CSS3 for front-end and if you consider backend you are recommended PHP & PHP Frameworks or Python and Frameworks or ASP.net/C#…

You cann’t build an Apple device/iOS/MacOS App without either use

Swift Or HTML5/CSS3/JS as a front-end development…

You cann’t build an Android device App without either use

Java Or HTML5/CSS3/JS as a front-end development…

You cann’t Build a Windows or Linux or MacOS system tool/driver/program without C/C++.

Also if you consider cross-platform GUI software you can use Java or Python or C#-Xamarin/C#… Electron/nw.js/Cordova/JS/TypeScript/ES6+ so you build it for first platform and then adjust/adapt it for the other platforms easily…

Python invaded Scientific research and community… and is preferred… and the list of the best tool for the job continues…and goes on…

Myself

Currently I am expert in HTML5/CSS3/JS, PHP And PHP Frameworks like CakePHP or Codeigniter … I also know Android/Java native development and also know Cross-platform development desktop and mobile Apps in HTML5/JS using frameworks like Electron/nw.js/Cordova…

I am upper beginner in Python 3 learning now Python Data Structures and Algorithms… also plan to study Python for Scientific research and Computational Physics… Python GUI programs… Python for Raspberry Pi 3B+… Python OOP & Design Patterns… etc

Also soon after these planing study C++ Data Structures and Algorithms and recap my Java Data Structures and Algorithms … skills !

Also as Linux guy I have skills in Linux Administration and some programming skills in Shell Scripting/Perl/Python/C language.

I plan studying more C/C++ and involved more in Linux Security… and also study TypeScript and ES6+/ES2016-ES2018 for web, mobile and desktop development.

After these plan study Swift for iOS & MacOS development.

Basically I recommend when you study programming languages learn something interesting and motivated for yourself…

Also after the basics, to cover Data Structures and Algorithms… OOP … And Design Patterns and Frameworks eg for JS the most popular are Vue.js or Angular or ReactJS…
Or the PHP Frameworks like Codeigniter, CakePHP, Laravel, SlimPHP, …

Basically I want to be advanced developer in JS/HTML5, TypeScript/Node.js, Java, Python, PHP, Swift and C/C++ about 10 languages !!!!
So be able do anything in programming using the right tool for the job easily… on time… and perfectly !!!

Best Python Textbook for Upper-Beginners

Best Python Textbook for Upper-Beginners – for
Programming-II course or Algorithms & Data Structures course

==================

 

 

 

 

 

 

My First PC Build – Intel i5 8400 – 2 x 8GB DDR4 – 500GB M.2 NVE x4

My First PC Build – i5 8400 – 2 x 8GB DDR4 – 500GB M.2 NVE x4

==============

Date: 2018 December 7-15 Cost 800€

Future Expansion To:

Additional Cost 400€

RAID 1 : 2 x 3TB HDD[for my Data], NVIDIA GTX 1050 Graphics Card

OSs[64-bit]: Windows 10 Pro OS
Virtual Machine[64-bit]: Ubuntu Studio 18.10 OS, Fedora 29 OS, Manjaro Arch Linux OS, Zorin OS Education… etc Distros

Computer Parts:

 

Image Shots:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Video Shots:

Notes:

  1. I have read my MB manual. Nevertheless I recommend at start read some different MB (same vendor) manuals to get the idea/some experience, and because manuals may show different guidelines eg my MB not indicate Ram chip insert priority – 4 slots one Ram chip – also not show how adapt head sink & CPU Fan in the MB. In contrast some other Asus MB manuals show this info, and also I have registered the motherboard in Asus Site and contacted Asus Support pertinent to all my Questions. My MB manual shows only how adapt processor in its slot in MB.
  2. I prefer Intel Processors as only these support Hackintosh Build Systems or Mac OS in Virtual Machines in hypervisors like Vmware Workstation Player or Oracle VirtualBox

GUI Python3 vs GUI Shell Scripting

GUI Python 3 vs GUI (Linux) Shell Scripting

================================

As a PHP/JS Web Developer I study in my free time Linux topics online or in e-books… Also started study Python 3… As I mention Python 3 and Linux Shell Scripts provide some commands for creating GUIs windows[programs with GUI instead of the traditional CLI…  text mode programs]… In this post I focus on GUIs in Python 3 vs Shell Scripting GUIs…

Shell Scripting at first exist on Unix/Linux/MacOS OSs… (mainly Linux) but Python can installed in any OS including Windows 10….

In this article I use Linux Ubuntu Studio 18.10 for the demonstrations – I like using Ubuntu Studio rather Ubuntu or Fedora… because Ubuntu Studio come from Canonical too, and has preinstalled many free programs for Graphic Design, Video/Audio Edit, Photography, Publishing Ebooks, etc Tools… that’s I feel Not needed change OS to do these other essential Tasks for my work like edit an image etc… !!!

 

 

Coming Soon !!!

 

 

 

 

 

 

 

Practice Computers and Electronics with Best Selling UK Raspberry Pi 3B+ – First Impressions

Practice Computers and Electronics with Best Selling UK Raspberry Pi 3B+ – First Impressions

Today i escaped from my PC and operated my recent purchase a Raspberry Pi 3B+ the best selling UK “PC”.

I feel i can Not await to try tomorrow a big download (over 700MB) on this Board PC… i mean for the free (for Raspbian OS) Mathematica Computer Algebra System software… more info on the way tomorrow… !!!

Second Day

I installed the Free for raspberry pi Mathematica Software… My first impression was that needed to read a little of Docs/Manual/books to make the most of this… killing app for this embedded system…

More Coming Soon !!!

Starting with Raspberry Pi 3 B+ – Read this book first

Starting with Raspberry Pi 3 B+

Suggestion

Read this book first even yet bought Raspberry Pi … this guides you what’s available and what buy… for yours needs… eg if you buy kit pack must include pi charger but plain box Pi only Raspberry Pi 3 B+ board includes and even Not include SD Micro card… so you have also buy the latter too.

Also includes many things to do with your new Raspberry Pi … This book refers for Raspberry Pi 3 B (2016)… but as of date of writing the newest model is 3 B+ (2018) … but the differences between the two is minimal – do your search and you will proof this – so is ok to use this book.

The book is…

Raspberry Pi For Dummies 3rd Edition by Sean McManus (Author), Mike Cook (Author)

Best Python Textbook for Beginners

Best Python Textbook for Beginners – for Programming-I course

Here i present the Best Python textbook in my opinion i used to start with Python…

Advise

As a beginner in a programming language you need a textbook that actually is being used in Universities… This must have academic text and by this i mean text chapters with objectives and questions like T/F and Multiple choice, Short Answer Questions and also algorithmic exercises and actual programming exercises/projects for full practising the material.

Also may have solutions to easy Questions, summary in chapter’s end an index or and glossary and may also have list of reserved words etc language construct notes…

This is the normality of a University textbook and this i used and i like it very well… the only advise in addition is … hand write nothing… but instead just solve-practise-develop by typing in Python or your target language as much as you can… also type your notes and save them… and in some times you can print this notes for learning offline…

Well the textbook is…

Starting Out with Python, Global 4/e Edition Paperback – April 25, 2018 – by Tony Gaddis (author)

 

Fix an Internet connection – Internet not working

Here is a Python Script

If then try…

….

else try ..,

From this script flow & flowchart you can learn to debug a non working connection

EASY READ EVEN FOR NON PYTHON PROGRAMMERS

SCRIPT HERE // FLOWCHART FOLLOWS

17-internet-connection_py

Flowchart