Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

Saturday, June 11, 2016

Mastering Python Design Patterns (Repost)




Mastering Python Design Patterns By Sakis Kasampalis
2015 | 212 Pages | ISBN: 1783989327 | EPUB + PDF (conv) | 3 MB



Create various design patterns to master the art of solving problems using Python
About This Book
Simplify design pattern implementation using the power of Python
Each pattern is accompanied with a real-world example demonstrating its key features
This is an easy-to-follow guide focusing on the practical aspects of Python design patterns
Who This Book Is For
This book is for Python programmers with an intermediate background and an interest in design patterns implemented in idiomatic Python. Programmers of other languages who are interested in Python can also benefit from this book, but it would be better if they first read some introductory materials that explain how things are done in Python.
What You Will Learn
Explore Factory Method and Abstract Factory for object creation
Clone objects using the Prototype pattern
Make incompatible interfaces compatible using the Adapter pattern
Secure an interface using the Proxy pattern
Choose an algorithm dynamically using the Strategy pattern
Extend an object without subclassing using the Decorator pattern
Keep the logic decoupled from the UI using the MVC pattern



Monday, June 6, 2016

The Python Book 3rd Edition




The Python Book 3rd Edition


Imagine Publishing Ltd | 2016 | ISBN: 178546339X | English | 180 pages | True PDF | 27 Mb


In this revised edition of The Python Book, you’ll find plenty of creative projects to help you get to grips with one of the fastest-growing programming languages around. Its powerful functionality works brilliantly with the Raspberry Pi, but you’ll also find plenty of tutorials that focus on Python’s effectiveness away from the Pi. You’ll learn how to code with Python from the very beginning with our comprehensive masterclass, then go on to complete tutorials to consolidate your skills and become fluent in the language. Become a true Python expert with the wealth of information contained in this bookazine. Featuring: Get started with Python – Learn Python the right way with our masterclass. 50 essential Python commands – Discover 50 commands every Python user needs. Work with Python – Improve systems and efficiency using Python. Create with Python – Complete fun projects and improve your programming skills. Get started with Python – Learn Python the right way with our masterclass 50 essential Python commands – Discover 50 commands every Python user needs Work with Python – Improve systems and efficiency using Python Create with Python – Complete fun projects and improve your programming skills



Monday, May 30, 2016

Python Programming for Arduino [Repost]




Python Programming for Arduino by Pratik Desai
English | Feb. 27, 2015 | ISBN: 1783285931 | 360 Pages | EPUB | 6 MB


This is the book for you if you are a student, hobbyist, developer, or designer with little or no programming and hardware prototyping experience, and you want to develop IoT applications. If you are a software developer or a hardware designer and want to create connected devices applications, then this book will help you get started.




Thursday, May 26, 2016

Internet of Things with Python




Gastón C. Hillar, “Internet of Things with Python”
English | ISBN: 1785881388 | 2016 | PDF/EPUB/MOBI | 373 pages | 9 MB/21 MB/30 MB


Key Features


Rapidly prototype even complex IoT applications with Python and put them to practical use


Enhance your IoT skills with the most up-to-date applicability in the field of wearable tech, smart environments, and home automation


Interact with hardware, sensors, and actuators and control your DIY IoT projects through Python


Book Description


Internet of Things (IoT) is revolutionizing the way devices/things interact with each other. And when you have IoT with Python on your side, you’ll be able to build interactive objects and design them.


This book lets you stay at the forefront of cutting-edge research on IoT. We’ll open up the possibilities using tools that enable you to interact with the world, such as Intel Galileo Gen 2, sensors, and other hardware. You will learn how to read, write, and convert digital values to generate analog output by programming Pulse Width Modulation (PWM) in Python. You will get familiar with the complex communication system included in the board, so you can interact with any shield, actuator, or sensor.


Later on, you will not only see how to work with data received from the sensors, but also perform actions by sending them to a specific shield. You’ll be able to connect your IoT device to the entire world, by integrating WiFi, Bluetooth, and Internet settings. With everything ready, you will see how to work in real time on your IoT device using the MQTT protocol in python.


By the end of the book, you will be able to develop IoT prototypes with Python, libraries, and tools.


What you will learn


Prototype and develop IoT solutions from scratch with Python as the programming language


Develop IoT projects with Intel Galileo Gen 2 board along with Python


Work with the different components included in the boards using Python and the MRAA library


Interact with sensors, actuators, and shields


Work with UART and local storage


Interact with any electronic device that supports the I2C bus


Allow mobile devices to interact with the board


Work with real-time IoT and cloud services


Understand Big Data and IoT analytics




Wednesday, May 18, 2016

Thursday, April 28, 2016

Introduction to Computer Science and Programming using Python



We will start the semester by discussing the difference between imperative knowledge and definitional knowledge, as well as between fixed program and stored program computers, and finally the definitions of syntax, static semantics, and semantics. We cover straight line, branching, and looping programs. Other topics are binary representation of numbers, orders of growth, and debugging programs.
Python concepts covered in this unit include values, types, int, float, Boolean, strings (str), tuples, dictionaries (dict), and lists. We will also learn about expressions and statements—especially how to effectively use print statements in your programs. Other topics include assignment, conditionals, loops, assert, functions, scope, object models, mutation, and mutability.
By the end of Unit 1 you should be familiar with the following algorithmic techniques: guess and check, linear search, bisection search, successive approximation, and Newton-Raphson (Newton’s method). You will also learn recursive definitions, problem solving techniques, and how to structure programs using decomposition and abstraction, including specifications and parameters.
Unit 1 ends with a quiz covering all material (lectures, recitations, and problem sets) through Efficiency and Order of Growth.
Session 1
This lecture covers course expectations, introduces computer programming and its uses, and begins to familiarize the student with concepts related to how programs work.
Lecture 1: Introduction to 6.00
Topics covered: Purposes of the course, declarative and imperative knowledge, flow of control, algorithms, fixed program and stored program computers, termination conditions, interpretation, compilation, syntax, static semantics, semantics, and types of errors.
Session 2
This lecture covers the building blocks of straight line and branching programs: Objects, types, operators, variables, execution, and conditional statements. It also discusses common errors related to the topics covered.
Lecture 2: Core Elements of a Program
Topics covered: IDLE, types of objects, operators, overloading, commands, variables, assignment, input, straight line and branching programs, looping constructs, turing completeness, conditionals, nesting.
Recitation 1: Introduction to Coding Concepts
Topics covered: Syntax, semantics, object types, comparison, loops, coding.
Session 3
This lecture covers the use of iteration to build programs whose execution time depends upon the size of inputs. It also introduces search problems and brute force and bisection for solving them.
Lecture 3: Problem Solving
Topics covered: Termination, decrementing functions, exhaustive enumeration, brute force, while loop, for loop, approximation, specifications, bisection search.
Session 4
This lecture introduces the notion of decomposition and abstraction by specification. It also covers Python modules, functions, parameters, and scoping. Finally, it uses the Python assert statement and type ‘str’.
Lecture 4: Machine Interpretation of a Program
Topics covered: Decomposition, module, function, abstraction, formal parameter, actual parameter, argument, assert, scope, mapping, stack, last in first out, LIFO, strings, slicing.
Recitation 2: Loops, Tuples, Strings and Functions
Topics covered: Loops, tuples, concatenating tuples and strings, string operations, immutability, range function, slicing, types of data structures, decrementing function, global and local variables, global keepers.
Session 5
This lecture introduces Python tuples, lists, and dictionaries, as well as the concept of mutability and how to avoid problems relating to it.
Lecture 5: Objects in Python
Topics covered: Tuples, lists, dictionaries, methods, identifiers, modifying objects, aliasing, mutability.
Session 6
This lecture finishes the discussion of dictionaries, then introduces inductive reasoning and recursion. Examples include generating the Fibonacci sequence and solving the Towers of Hanoi problem.
Lecture 6: Recursion
Topics covered: Dictionaries, modular abstraction, divide and conquer, recursion, tower of Hanoi, base case, Fibonacci sequence.
Recitation 3: Lists and their Elements, Sorting, and Recursion
Topics covered: Tuples, lists, iteration, list elements, sorting lists, mutability, keys, dictionaries, chain method, recursion, base case, Tower of Hanoi.
Session 7
This lecture starts with a brief explanation of why floating point numbers are only an approximation of the real numbers. Most of the lecture is about a systematic approach to debugging.
Lecture 7: Debugging
Topics covered: Binary, float, floating point, approximations, debugging, runtime error.
Recitation 4: Recursion, Pseudo code and Debugging
Topics covered: Recursion, divide and conquer, base cases, iterative vs. recursive algorithms, Fibonacci numbers example, recursive bisection search, optional and default parameters, pseudo code, introduction to debugging, test cases and edge cases, and floating points.
Session 8
This lecture revolves around the topic of algorithmic efficiency. It introduces the random access model (RAM) of computation and “big O notation” as a way to talk about order of growth. It concludes with binary search.
Lecture 8: Efficiency and Order of Growth
Topics covered: Efficiency, problem reduction, RAM, best case, worst case, expected case, growth, exponential growth, polynomial growth, logarithmic growth, global variables.
Session 9
This lecture discusses how indirection is used to provide an efficient implementation of Python lists and other data structures. It also presents and analyzes the efficiency of selection and merge sort.
Lecture 9: Memory and Search Methods
Topics covered: Memory, storage, indirection, sorting.
Quiz I