This document discusses basic Python programming concepts including strings, functions, conditionals, loops, imports and recursion. It begins with examples of printing strings, taking user input, and calculating areas of shapes. It then covers variables and data types, operators, conditional statements, loops, functions, imports, strings, and recursion. Examples are provided throughout to demonstrate each concept.
Python programming | Fundamentals of Python programming KrishnaMildain
Basic Fundamentals of Python Programming.
What is Python, History of python, Advantages, Disadvantages, feature of python, scope, and many more.
Data Structure using Python, Object Oriented Programming using
This presentation provides the information on python including the topics Python features, applications, variables and operators in python, control statements, numbers, strings, print formatting, list and list comprehension, dictionaries, tuples, files, sets, boolean, mehtods and functions, lambda expressions and a sample project using Python.
Python An Introduction, A presentation Developed by Swarit Wadhe. This Slide Will Give you basic information about python (Origin, Codes and difference from other languages).
I hope you'll find this helpfull and if you do please share it with your fellows.
Installing and Using Python
Basic I/O
Variables and Expressions
Conditional Code
Functions
Loops and Iteration
Python Data Structures
Errors and Exceptions
Object Oriented with Python
Multithreaded Programming with Python
Install/Create and Using Python Library
Compile Python Script
Resources
===========================
and 7 Quizzes
This Edureka Python tutorial is a part of Python Course (Python Tutorial Blog: https://goo.gl/wd28Zr) and will help you in understanding what exactly is Python and its various applications. It also explains few Python code basics like data types, operators etc. Below are the topics covered in this tutorial:
1. Introduction to Python
2. Various Python Features
3. Python Applications
4. Python for Web Scraping
5. Python for Testing
6. Python for Web Development
7. Python for Data Analysis
This is the third presentation in pySIG 2015 @ BMS College of Engineering, Bangalore. The code and assignments can be found at https://github.com/pranavsb
Python programming | Fundamentals of Python programming KrishnaMildain
Basic Fundamentals of Python Programming.
What is Python, History of python, Advantages, Disadvantages, feature of python, scope, and many more.
Data Structure using Python, Object Oriented Programming using
This presentation provides the information on python including the topics Python features, applications, variables and operators in python, control statements, numbers, strings, print formatting, list and list comprehension, dictionaries, tuples, files, sets, boolean, mehtods and functions, lambda expressions and a sample project using Python.
Python An Introduction, A presentation Developed by Swarit Wadhe. This Slide Will Give you basic information about python (Origin, Codes and difference from other languages).
I hope you'll find this helpfull and if you do please share it with your fellows.
Installing and Using Python
Basic I/O
Variables and Expressions
Conditional Code
Functions
Loops and Iteration
Python Data Structures
Errors and Exceptions
Object Oriented with Python
Multithreaded Programming with Python
Install/Create and Using Python Library
Compile Python Script
Resources
===========================
and 7 Quizzes
This Edureka Python tutorial is a part of Python Course (Python Tutorial Blog: https://goo.gl/wd28Zr) and will help you in understanding what exactly is Python and its various applications. It also explains few Python code basics like data types, operators etc. Below are the topics covered in this tutorial:
1. Introduction to Python
2. Various Python Features
3. Python Applications
4. Python for Web Scraping
5. Python for Testing
6. Python for Web Development
7. Python for Data Analysis
This is the third presentation in pySIG 2015 @ BMS College of Engineering, Bangalore. The code and assignments can be found at https://github.com/pranavsb
This presentation about Python Interview Questions will help you crack your next Python interview with ease. The video includes interview questions on Numbers, lists, tuples, arrays, functions, regular expressions, strings, and files. We also look into concepts such as multithreading, deep copy, and shallow copy, pickling and unpickling. This video also covers Python libraries such as matplotlib, pandas, numpy,scikit and the programming paradigms followed by Python. It also covers Python library interview questions, libraries such as matplotlib, pandas, numpy and scikit. This video is ideal for both beginners as well as experienced professionals who are appearing for Python programming job interviews. Learn what are the most important Python interview questions and answers and know what will set you apart in the interview process.
Simplilearn’s Python Training Course is an all-inclusive program that will introduce you to the Python development language and expose you to the essentials of object-oriented programming, web development with Django and game development. Python has surpassed Java as the top language used to introduce U.S. students to programming and computer science. This course will give you hands-on development experience and prepare you for a career as a professional Python programmer.
What is this course about?
The All-in-One Python course enables you to become a professional Python programmer. Any aspiring programmer can learn Python from the basics and go on to master web development & game development in Python. Gain hands on experience creating a flappy bird game clone & website functionalities in Python.
What are the course objectives?
By the end of this online Python training course, you will be able to:
1. Internalize the concepts & constructs of Python
2. Learn to create your own Python programs
3. Master Python Django & advanced web development in Python
4. Master PyGame & game development in Python
5. Create a flappy bird game clone
The Python training course is recommended for:
1. Any aspiring programmer can take up this bundle to master Python
2. Any aspiring web developer or game developer can take up this bundle to meet their training needs
Learn more at https://www.simplilearn.com/mobile-and-software-development/python-development-training
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...DRVaibhavmeshram1
Python
Language
is uesd in engineeringStory adapted from Stephen Covey (2004) “The Seven Habits of Highly Effective People” Simon & Schuster).
“Management is doing things right, leadership is doing the right things”
(Warren Bennis and Peter Drucker)
Story adapted from Stephen Covey (2004) “The Seven Habits of Highly Effective People” Simon & Schuster).
“Management is doing things right, leadership is doing the right things”
(Warren Bennis and Peter Drucker)
Story adapted from Stephen Covey (2004) “The Seven Habits of Highly Effective People” Simon & Schuster).
“Management is doing things right, leadership is doing the right things”
(Warren Bennis and Peter Drucker)
The Sponsor:
Champion and advocates for the change at their level in the organization.
A Sponsor is the person who won’t let the change initiative die from lack of attention, and is willing to use their political capital to make the change happen
The Role model:
Behaviors and attitudes demonstrated by them are looked upon by everyone else. . Hence, they must be willing to go first.
Employees watch leaders for consistency between words and actions to see if they should believe the change is really going to happen.
The decision maker:
Leaders usually control resources such as people, budgets, and equipment, and thus have the authority to make decisions (as per their span of control) that affect the initiative.
During change, leaders must leverage their decision-making authority and choose the options that will support the initiative.
The Decision-Maker is decisive and sets priorities that support change.
The Sponsor:
Champion and advocates for the change at their level in the organization.
A Sponsor is the person who won’t let the change initiative die from lack of attention, and is willing to use their political capital to make the change happen
The Role model:
Behaviors and attitudes demonstrated by them are looked upon by everyone else. . Hence, they must be willing to go first.
Employees watch leaders for consistency between words and actions to see if they should believe the change is really going to happen.
The decision maker:
Leaders usually control resources such as people, budgets, and equipment, and thus have the authority to make decisions (as per their span of control) that affect the initiative.
During change, leaders must leverage their decision-making authority and choose the options that will support the initiative.
The Decision-Maker is decisive and sets priorities that support change.
The Sponsor:
Champion and advocates for the change at their level in the organization.
A Sponsor is the person who won’t let the change initiative die from lack of attention, and is willing to use their political capital to make the change happen
The Role model:
Behaviors and attitudes demonstrated by them are looked upon by everyone else. . Hence, they must be willing to go first.
Employees watch leaders for consistency between words and actions to see if they s
ISTA 130 Lab 21 Turtle ReviewHere are all of the turt.docxpriestmanmable
ISTA 130: Lab 2
1 Turtle Review
Here are all of the turtle functions we have utilized so far in this course:
turtle.forward(distance) – Moves the turtle forward in the direction it is currently facing the distance
entered
turtle.backward(distance) – Same as forward but it moves in the opposite direction the turtle is facing
turtle.right(degrees) – Roates the turtle to the right by the degrees enteres
turtle.left(degrees) – Same as right, but it rotates the turtle to the left
turtle.pensize(size) – Adjusts the size of the line left by the turtle to whatever value is entered for size
turtle.home() – Moves the turtle to the default location and faces it to the right
turtle.clear() – Clears all the lines that were left by the turtle in the window.
turtle.penup() – Causes the turtle to stop leaving lines (until pen is placed back down)
turtle.pendown() – Places the pen back down to the turtle can continue leaving lines when forward and
backward are called.
turtle.pencolor(color string) – Changes the color of the lines left by the turtle to whatever color string
entered (so long as Python recognizes it).
turtle.bgcolor(color string) – Changes the background color for the window that the turtle draws in.
turtle.speed(new speed) – Changes the speed at which the turtle moves to whatever newSpeed is.
turtle.clearscreen() – Deletes all drawings and turtles from the screen, leaving it in its initial state
Note that abbreviations also exist for many of these functions; for example:
� turtle.fd(distance)
� turtle.rt(degrees)
� turtle.pu()
1
2 Functions and Parameters
Here is the square function we looked at yesterday:
def square(side_length):
’’’
Draws a square given a numerical side_length
’’’
turtle.forward(side_length)
turtle.right(90)
turtle.forward(side_length)
turtle.right(90)
turtle.forward(side_length)
turtle.right(90)
turtle.forward(side_length)
turtle.right(90)
return
square(50) # This would give side_length the value of 50
square(100) # This would give side_length the value of 100
print side_length # This will give an error because side_length
# only exists inside the function!
Try it out:
(1 pt.) Create a new file called lab02.py. In this file, create a simple function called rhombus. It
will take one parameter, side length. Using this parameter, have your function create a rhombus
using turtle graphics. Call your rhombus function in the script. What happens if you provide no
arguments to the function? Two or three arguments?
Then, modify your rhombus function so it takes another argument for the angle inside the
rhombus.
3 Data types
Python recognizes many different types of values when working with data. These can be numbers,
strings of characters, or even user defined objects. For the time being, however, were only going to
focus on three of the data types:
integer – These are whole numbers, both positive and negative. Examples are 5000, 0, and -25
float – These are numbers that are followed by a decimal poi ...
Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming language.
Make use of the PPT to have a better understanding of Python.
When we created this quiz of Java programming course, we did that with Fasilkom UI students in mind.
Fast forward, we now thought that the quiz could be of greater use if it's shared to anyone, not just Fasilkom UI students.
Yes, our students of our course are everyone, including you!
So please find attached, fresh from the oven, Java programming quiz part 01 (with key answers). More parts are coming whenever they are ready.
#java #programming #universitasindonesia #opencourse #openaccess #openeducation #opentridharma
Featuring pointers for: Single-layer neural networks and multi-layer neural networks, gradient descent, backpropagation. Slides are for introduction, for deep explanation on deep learning, please consult other slides.
Current situation: focus is limited to only implement Tridharma, that is, education, research, and community service, with little concern on openness aspect.
The openness of Tridharma can potentially be a breakthrough in mitigating the quality gap issue: opening Tridharma outputs for public would help to increase the citizen inclusion in accessing the quality content of Tridharma, hence narrowing the quality gap in higher education.
[ISWC 2013] Completeness statements about RDF data sources and their use for ...Fariz Darari
This was presented at ISWC 2013 in Sydney, Australia.
Abstract:
With thousands of RDF data sources available on the Web covering disparate and possibly overlapping knowledge domains, the problem of providing high-level descriptions (in the form of metadata) of their content becomes crucial. In this paper we introduce a theoretical framework for describing data sources in terms of their completeness. We show how existing data sources can be described with completeness statements expressed in RDF. We then focus on the problem of the completeness of query answering over plain and RDFS data sources augmented with completeness statements. Finally, we present an extension of the completeness framework for federated data sources.
Dissertation Defense - Managing and Consuming Completeness Information for RD...Fariz Darari
The ever increasing amount of Semantic Web data gives rise to the question: How complete is the data? Though generally data on the Semantic Web is incomplete, many parts of data are indeed complete, such as the children of Barack Obama and the crew of Apollo 11. This thesis aims to study how to manage and consume completeness information about Semantic Web data. In particular, we first discuss how completeness information can guarantee the completeness of query answering. Next, we propose optimization techniques of completeness reasoning and conduct experimental evaluations to show the feasibility of our approaches. We also provide a technique to check the soundness of queries with negation via reduction to query completeness checking. We further enrich completeness information with timestamps, enabling query answers to be checked up to when they are complete. We then introduce two demonstrators, i.e., CORNER and COOL-WD, to show how our completeness framework can be realized. Finally, we investigate an automated method to generate completeness statements from text on the Web via relation cardinality extraction.
KOI - Knowledge Of Incidents - SemEval 2018Fariz Darari
We present KOI (Knowledge Of Incidents), a system that given news articles as input, builds a knowledge graph (KOI-KG) of incidental events.
KOI-KG can then be used to efficiently answer questions such as "How many killing incidents happened in 2017 that involve Sean?" The required steps in building the KG include:
(i) document preprocessing involving word sense disambiguation, named-entity recognition, temporal expression recognition and normalization, and semantic role labeling;
(ii) incidental event extraction and coreference resolution via document clustering; and (iii) KG construction and population.
Slides made and presented by Paramita.
Comparing Index Structures for Completeness ReasoningFariz Darari
Data quality is a major issue in the development of knowledge graphs. Data completeness is a key factor in data quality that concerns the breadth, depth, and scope of information contained in knowledge graphs. As for large-scale knowledge graphs (e.g., DBpedia, Wikidata), it is conceivable that given the amount of information contained in there, they may be complete for a wide range of topics, such as children of Donald Trump, cantons of Switzerland, and presidents of Indonesia. Previous research has shown how one can augment knowledge graphs with statements about their completeness, stating which parts of data are complete. Such meta-information can be leveraged to check query completeness, that is, whether the answer returned by a query is complete. Yet, it is still unclear how such a check can be done in practice, especially when a large number of completeness statements are involved. We devise implementation techniques to make completeness reasoning in the presence of large sets of completeness statements feasible, and experimentally evaluate their effectiveness in realistic settings based on the characteristics of real-world knowledge graphs.
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
How Recreation Management Software Can Streamline Your Operations.pptxwottaspaceseo
Recreation management software streamlines operations by automating key tasks such as scheduling, registration, and payment processing, reducing manual workload and errors. It provides centralized management of facilities, classes, and events, ensuring efficient resource allocation and facility usage. The software offers user-friendly online portals for easy access to bookings and program information, enhancing customer experience. Real-time reporting and data analytics deliver insights into attendance and preferences, aiding in strategic decision-making. Additionally, effective communication tools keep participants and staff informed with timely updates. Overall, recreation management software enhances efficiency, improves service delivery, and boosts customer satisfaction.
A Comprehensive Look at Generative AI in Retail App Testing.pdfkalichargn70th171
Traditional software testing methods are being challenged in retail, where customer expectations and technological advancements continually shape the landscape. Enter generative AI—a transformative subset of artificial intelligence technologies poised to revolutionize software testing.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
In software engineering, the right architecture is essential for robust, scalable platforms. Wix has undergone a pivotal shift from event sourcing to a CRUD-based model for its microservices. This talk will chart the course of this pivotal journey.
Event sourcing, which records state changes as immutable events, provided robust auditing and "time travel" debugging for Wix Stores' microservices. Despite its benefits, the complexity it introduced in state management slowed development. Wix responded by adopting a simpler, unified CRUD model. This talk will explore the challenges of event sourcing and the advantages of Wix's new "CRUD on steroids" approach, which streamlines API integration and domain event management while preserving data integrity and system resilience.
Participants will gain valuable insights into Wix's strategies for ensuring atomicity in database updates and event production, as well as caching, materialization, and performance optimization techniques within a distributed system.
Join us to discover how Wix has mastered the art of balancing simplicity and extensibility, and learn how the re-adoption of the modest CRUD has turbocharged their development velocity, resilience, and scalability in a high-growth environment.
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...informapgpstrackings
Keep tabs on your field staff effortlessly with Informap Technology Centre LLC. Real-time tracking, task assignment, and smart features for efficient management. Request a live demo today!
For more details, visit us : https://informapuae.com/field-staff-tracking/
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Anthony Dahanne
Les Buildpacks existent depuis plus de 10 ans ! D’abord, ils étaient utilisés pour détecter et construire une application avant de la déployer sur certains PaaS. Ensuite, nous avons pu créer des images Docker (OCI) avec leur dernière génération, les Cloud Native Buildpacks (CNCF en incubation). Sont-ils une bonne alternative au Dockerfile ? Que sont les buildpacks Paketo ? Quelles communautés les soutiennent et comment ?
Venez le découvrir lors de cette session ignite
Software Engineering, Software Consulting, Tech Lead.
Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Security,
Spring Transaction, Spring MVC,
Log4j, REST/SOAP WEB-SERVICES.
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
Experience our free, in-depth three-part Tendenci Platform Corporate Membership Management workshop series! In Session 1 on May 14th, 2024, we began with an Introduction and Setup, mastering the configuration of your Corporate Membership Module settings to establish membership types, applications, and more. Then, on May 16th, 2024, in Session 2, we focused on binding individual members to a Corporate Membership and Corporate Reps, teaching you how to add individual members and assign Corporate Representatives to manage dues, renewals, and associated members. Finally, on May 28th, 2024, in Session 3, we covered questions and concerns, addressing any queries or issues you may have.
For more Tendenci AMS events, check out www.tendenci.com/events
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
Accelerate Enterprise Software Engineering with PlatformlessWSO2
Key takeaways:
Challenges of building platforms and the benefits of platformless.
Key principles of platformless, including API-first, cloud-native middleware, platform engineering, and developer experience.
How Choreo enables the platformless experience.
How key concepts like application architecture, domain-driven design, zero trust, and cell-based architecture are inherently a part of Choreo.
Demo of an end-to-end app built and deployed on Choreo.
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns
Unlocking Business Potential: Tailored Technology Solutions by Prosigns
Discover how Prosigns, a leading technology solutions provider, partners with businesses to drive innovation and success. Our presentation showcases our comprehensive range of services, including custom software development, web and mobile app development, AI & ML solutions, blockchain integration, DevOps services, and Microsoft Dynamics 365 support.
Custom Software Development: Prosigns specializes in creating bespoke software solutions that cater to your unique business needs. Our team of experts works closely with you to understand your requirements and deliver tailor-made software that enhances efficiency and drives growth.
Web and Mobile App Development: From responsive websites to intuitive mobile applications, Prosigns develops cutting-edge solutions that engage users and deliver seamless experiences across devices.
AI & ML Solutions: Harnessing the power of Artificial Intelligence and Machine Learning, Prosigns provides smart solutions that automate processes, provide valuable insights, and drive informed decision-making.
Blockchain Integration: Prosigns offers comprehensive blockchain solutions, including development, integration, and consulting services, enabling businesses to leverage blockchain technology for enhanced security, transparency, and efficiency.
DevOps Services: Prosigns' DevOps services streamline development and operations processes, ensuring faster and more reliable software delivery through automation and continuous integration.
Microsoft Dynamics 365 Support: Prosigns provides comprehensive support and maintenance services for Microsoft Dynamics 365, ensuring your system is always up-to-date, secure, and running smoothly.
Learn how our collaborative approach and dedication to excellence help businesses achieve their goals and stay ahead in today's digital landscape. From concept to deployment, Prosigns is your trusted partner for transforming ideas into reality and unlocking the full potential of your business.
Join us on a journey of innovation and growth. Let's partner for success with Prosigns.
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar
The European Union Agency for Law Enforcement Cooperation (Europol) has suffered an alleged data breach after a notorious threat actor claimed to have exfiltrated data from its systems. Infamous data leaker IntelBroker posted on the even more infamous BreachForums hacking forum, saying that Europol suffered a data breach this month.
The alleged breach affected Europol agencies CCSE, EC3, Europol Platform for Experts, Law Enforcement Forum, and SIRIUS. Infiltration of these entities can disrupt ongoing investigations and compromise sensitive intelligence shared among international law enforcement agencies.
However, this is neither the first nor the last activity of IntekBroker. We have compiled for you what happened in the last few days. To track such hacker activities on dark web sources like hacker forums, private Telegram channels, and other hidden platforms where cyber threats often originate, you can check SOCRadar’s Dark Web News.
Stay Informed on Threat Actors’ Activity on the Dark Web with SOCRadar!
SOCRadar Research Team: Latest Activities of IntelBroker
Basic Python Programming: Part 01 and Part 02
1. Topic 00
Basic Python Programming – Part 01
Fariz Darari, Ph.D.
Machine Learning Specialization for Geoscientists
In collaboration with FMIPA UI
v04
2. print("Python" + " is " + "cool!")
"Python is easy to use, powerful, and versatile, making it a great choice
for beginners and experts alike." – Pluralsight Platform
2
public class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}
print("Hello world!")
Hello world in Java vs. Python
3. print("Python" + " is " + "cool!")
3
Big names using Python
"Python is easy to use, powerful, and versatile, making it a great choice
for beginners and experts alike." – Pluralsight Platform
4. print("Python" + " is " + "cool!")
"Python is easy to use, powerful, and versatile, making it a great choice
for beginners and experts alike." – Pluralsight Platform
4opencv.org
5. print("Python" + " is " + "cool!")
"Python is easy to use, powerful, and versatile, making it a great choice
for beginners and experts alike." – Pluralsight Platform
5pygame.org
6. print("Python" + " is " + "cool!")
"Python is easy to use, powerful, and versatile, making it a great choice
for beginners and experts alike." – Pluralsight Platform
6http://flask.palletsprojects.com/
7. print("Python" + " is " + "cool!")
"Python is easy to use, powerful, and versatile, making it a great choice
for beginners and experts alike." – Pluralsight Platform
7
matplotlib.org
8. print("Python" + " is " + "cool!")
"Python is easy to use, powerful, and versatile, making it a great choice
for beginners and experts alike." – Pluralsight Platform
8
https://github.com/amueller/word_cloud
9. print("Python" + " is " + "cool!")
9
Top programming languages 2019 by IEEE Spectrum
11. How to install Python the Anaconda way
1. Download Anaconda (which includes Python and
relevant libraries): https://www.anaconda.com/distribution/
2. Run the installer and follow the instructions
3. Run the Spyder editor or Jupyter Notebook and create your first Python program "helloworld.py"
11
Python Setup
12. A more enhanced hello program
12
name = "Dunia" # can be replaced with another value
print("Halo, " + name + "!")
13. A more and more enhanced hello program
13
print("Halo, " + input() + "!")
15. Create a program to calculate the area of a circle!
15
Step 1: Minta nilai jari-jari.
Step 2: Hitung sesuai rumus luas lingkaran.
Step 3: Cetak hasil luasnya.
16. Create a program to calculate the area of a circle!
16
# Step 1: Minta nilai jari-jari.
jari2 = input("Jari-jari: ")
jari2_int = int(jari2)
# Step 2: Hitung sesuai rumus luas lingkaran.
luas = 3.14 * (jari2_int ** 2)
# Step 3: Cetak hasil luasnya.
print(luas)
17. Similar program, now with import math
17
import math
# Step 1: Minta nilai jari-jari.
jari2 = input("Jari-jari: ")
jari2_int = int(jari2)
# Step 2: Hitung sesuai rumus luas lingkaran.
luas = math.pi * (math.pow(jari2_int,2))
# Step 3: Cetak hasil luasnya.
print(luas)
19. Quiz: Create a program to calculate square areas!
19
# Step 1: Minta nilai panjang sisi.
# Step 2: Hitung sesuai rumus luas persegi.
# Step 3: Cetak hasil luasnya.
print(luas)
20. Quiz: Create a program to calculate square areas!
20
# Step 1: Minta nilai panjang sisi.
sisi = input("Sisi: ")
sisi_int = int(sisi)
# Step 2: Hitung sesuai rumus luas persegi.
luas = sisi_int * sisi_int
# Step 3: Cetak hasil luasnya.
print(luas)
21. input("some string")
21
It's a function to print "some string" and
simultaneously ask user for some input.
The function returns a string (sequence of characters).
PS: If not wanting to print anything, just type: input()
22. Assignment
22
The = symbol is not for equality,
it is for assignment:
"Nilai di sebelah kanan diasosiasikan dengan
variabel di sebelah kiri"
Contohnya, x = 1.
PS: x = 1 berbeda dengan x == 1. More on this later.
23. Assignment
23
Example:
my_var = 2 + 3 * 5
• evaluate expression (2+3*5): 17
• change the value of my_var to 17
Example (suppose my_int has value 2):
my_int = my_int + 3
• evaluate expression my_int on RHS to: 2
• evaluate expression 2 + 3: 5
• change the value of my_int to 5
24. Type conversion
24
The int() function as we saw before is for converting string to int.
Why? Because we want to do some math operations!
But what if the string value is not converted to int?
Well, try this out: "1" + "1"
Other type conversions: float() , str()
25. print(var, "some string")
25
Well, it prints.
It may take several elements separated by commas:
- If the element is a string, print as is.
- If variable, print the value of the variable.
Note that after printing, we move to a new line.
26. Save program as module
26
Program yang disimpan disebut dengan Python module,
dan menggunakan file extension .py
Jadi, module adalah sekumpulan instruksi Python.
Module dapat dieksekusi, atau diimpor dalam module
lain (ingat module math).
27. Memberi komentar pada program
27
Komentar atau comment adalah cara untuk semakin
memperjelas alur program kita.
Komentar tidak dapat dijadikan excuse untuk kode
program yang berupa spaghetti code (berantakan).
Komentar pada Python dimulai dengan # (hash),
atau diapit dengan petik tiga """ untuk komentar multibaris.
28. • Variables store and give names to data values
• Data values can be of various types:
• int : -5, 0, 1000000
• float : -2.0, 3.14159
• bool : True, False
• str : "Hello world!", "K3WL"
• list : [1, 2, 3, 4], ["Hello", "world!"], [1, 2, "Hello"], [ ]
• And many more!
• In Python, variables do not have types! This is called: Dynamic typing.
• A type defines two things:
• The internal structure of the type
• Operations you can perform on type
(for example, capitalize() is an operation over type string)
28
Variables and Data Types
29. Name convention
• Dimulai dengan huruf atau underscore _
• Ac_123 is OK, but 123_AB is not.
• Dapat mengandung letters, digits, and underscores
• this_is_an_identifier_123
• Panjang bebas
• Upper and lower case letters are different (case sensitive)
• Length_Of_Rope is not the same as length_of_rope
29
40. 40
Conditionals: Generic Form
if boolean-expression-1:
code-block-1
elif boolean-expression-2:
code-block-2
(as many elif's as you want)
else:
code-block-last
41. 41
Conditionals: Usia SIM
age = 20
if age < 17:
print("Belum bisa punya SIM!")
else:
print("OK, sudah bisa punya SIM.")
42. 42
Conditionals: Usia SIM dengan Input
age = int(input("Usia: "))
if age < 17:
print("Belum bisa punya SIM!")
else:
print("OK, sudah bisa punya SIM.")
48. So far, we have seen (briefly) two kinds of collections:
string and list
For loops can be used to visit each collection's element:
48
For Loops
for element in collection:
code-block
for chr in "string":
print(chr)
for elem in [1,3,5]:
print(elem)
49. Range function
49
• range merepresentasikan urutan angka (integer)
• range memiliki 3 arguments:
– the beginning of the range. Assumed to be 0 if not provided.
– the end of the range, but not inclusive (up to but not including
the number). Required.
– the step of the range. Assumed to be 1 if not provided.
• if only one argument is provided, assumed to be the end value
50. Eksplorasi range
50
for i in range(10):
print(i, end=" ")
print()
for i in range(1,7):
print(i, end=" ")
print()
for i in range(0,30,5):
print(i, end=" ")
print()
for i in range(5,-5,-1):
print(i, end=" ")
51. Lirik lagu menggunakan range
51
syg = "sayang"
for i in range(2):
print("satu")
print("aku", syg, "ibu")
print()
for i in range(2):
print("dua")
print("juga", syg, "ayah")
print()
for i in range(2):
print("tiga")
print(syg, "adik", "kakak")
print()
for i in range(1,4):
print(i)
print(syg, "semuanya")
52. • Functions encapsulate (= membungkus) code blocks
• Why functions? Modularization and reuse!
• You actually have seen examples of functions:
• print()
• input()
• Generic form:
52
Functions
def function-name(parameters):
code-block
return value
53. • Functions encapsulate (= membungkus) code blocks
• Why functions? Modularization and reuse!
• You actually have seen examples of functions:
• print()
• input()
• Generic form:
53
Functions
def function-name(parameters):
code-block
return value
58. • Code made by other people shall be reused!
• Two ways of importing modules (= Python files):
• Generic form: import module_name
import math
print(math.sqrt(4))
• Generic form: from module_name import function_name
from math import sqrt
print(sqrt(4))
58
Imports
59. Make your own module
59
def lame_flirt_generator(name):
print("A: Knock-knock!")
print("B: Who's there?")
print("A: Love.")
print("B: Love who?")
print("A: Love you, " + name + " <3")
import mymodule
mymodule.lame_flirt_generator("Fayriza")
mymodule.py
example.py
60. • String is a sequence of characters, like "Python is cool"
• Each character has an index
• Accessing a character: string[index]
x = "Python is cool"
print(x[10])
• Accessing a substring via slicing: string[start:finish]
print(x[2:6])
60
String
P y t h o n i s c o o l
0 1 2 3 4 5 6 7 8 9 10 11 12 13
61. >>> x = "Python is cool"
>>> "cool" in x # membership
>>> len(x) # length of string x
>>> x + "?" # concatenation
>>> x.upper() # to upper case
>>> x.replace("c", "k") # replace characters in a string
61
String Operations
P y t h o n i s c o o l
0 1 2 3 4 5 6 7 8 9 10 11 12 13
62. >>> x = "Python is cool"
>>> x.split(" ") 62
String Operations: Split
P y t h o n i s c o o l
0 1 2 3 4 5 6 7 8 9 10 11 12 13
P y t h o n
0 1 2 3 4 5
i s
0 1
c o o l
0 1 2 3
x.split(" ")
63. >>> x = "Python is cool"
>>> y = x.split(" ")
>>> ",".join(y) 63
String Operations: Join
P y t h o n , i s , c o o l
0 1 2 3 4 5 6 7 8 9 10 11 12 13
P y t h o n
0 1 2 3 4 5
i s
0 1
c o o l
0 1 2 3
",".join(y)
64. Quiz: Transform the following todo-list
"wake up,turn off alarm,sleep,repeat"
into
"wake up$turn off alarm$sleep$repeat"
64
65. Quiz: Transform the following todo-list
"wake up,turn off alarm,sleep,repeat"
into
"wake up$turn off alarm$sleep$repeat"
65
todo_list = "wake up,turn off alarm,sleep,repeat"
todo_list_split = todo_list.split(",")
todo_list_new = "$".join(todo_list_split)
print(todo_list_new)
66. Topic 00
Basic Python Programming – Part 02
Fariz Darari, Ph.D.
Machine Learning Specialization for Geoscientists
In collaboration with FMIPA UI
v04
67. Recursion
WIKIPEDIA
A function where the solution to a problem depends on
solutions to smaller instances of the same problem
THINK PYTHON BOOK
A function that calls itself
72. Factorial in Python
def faktorial(num): # function header
# 0! or 1! return 1
if (num == 0) or (num == 1):
return 1
73. Factorial in Python
def faktorial(num): # function header
# 0! or 1! return 1
if (num == 0) or (num == 1):
return 1
# do recursion for num > 1
return num * faktorial(num-1)
74. Main components of recursion
def faktorial(num):
# BASE CASE
if (num == 0) or (num == 1):
return 1
# RECURSION CASE
return num * faktorial(num-1)
• Base case
Stopping points for recursion
• Recursion case
Recursion points for smaller problems
76. • You've learned that a string is a sequence of characters.
A list is more generic: a sequence of items!
• List is usually enclosed by square brackets [ ]
• As opposed to strings where the object is fixed (= immutable),
we are free to modify lists (= mutable).
76
Lists
x = [1, 2, 3, 4]
x[0] = 4
x.append(5)
print(x) # [4, 2, 3, 4, 5]
77. 77
List Operations
>>> x = [ "Python", "is", "cool" ]
>>> x.sort() # sort elements in x
>>> x = x[0:2] # slicing
>>> len(x) # length of string x
>>> x = x + ["!"] # concatenation
>>> x[1] = "hot" # replace element at index 1 with "hot"
>>> x.remove("Python") # remove the first occurrence of "Python"
>>> x.pop() # remove the last element
78. It is basically a cool way of generating a list
78
List Comprehension
[expression for-clause condition]
Example:
["Aku tidak akan bolos lagi" for i in range(100)]
79. It is basically a cool way of generating a list
79
List Comprehension
[expression for-clause condition]
Example:
["Aku tidak akan bolos lagi" for i in range(100)]
[i*2 for i in [0,1,2,3,4] if i%2 == 0]
80. It is basically a cool way of generating a list
80
List Comprehension
[expression for-clause condition]
Example:
["Aku tidak akan bolos lagi" for i in range(100)]
[i*2 for i in [0,1,2,3,4] if i%2 == 0]
[i.replace("ai", "uy") for i in ["Santai", "kyk", "di", "pantai"] if len(i) > 3]
81. • Like a list, but you cannot modify/mutate it
• Tuple is usually (but not necessarily) enclosed by parentheses ()
• Everything that works with lists, works with tuples,
except functions modifying the content
• Example:
81
Tuples
x = (0,1,2)
y = 0,1,2 # same as x
x[0] = 2 # this gives an error
83. • As opposed to lists, in sets duplicates are removed and
there is no order of elements!
• Set is of the form { e1, e2, e3, ... }
• Operations include: intersection, union, difference.
• Example:
83
Sets
x = [0,1,2,0,0,1,2,2] # list
y = {0,1,2,0,0,1,2,2} # set
print(x)
print(y) # observe difference list vs set
print(y & {1,2,3}) # intersection
print(y | {1,2,3}) # union
print(y - {1,2,3}) # difference
84. 84
Dictionaries
• Dictionaries map from keys to values!
• Content in dictionaries is not ordered.
• Dictionary is of the form { k1:v1, k2:v2, k3:v3, ... }
• Example:
x = {"indonesia":"jakarta", "germany":"berlin","italy":"rome"}
print(x["indonesia"]) # get value from key
x["japan"] = "tokyo" # add a new key-value pair to dictionary
print(x) # {'italy': 'rome', 'indonesia': 'jakarta', 'germany': 'berlin', 'japan': 'tokyo'}
86. Quiz: What is the output?
Hint: https://www.python-course.eu/python3_dictionaries.php
x = {"a":3, "b":4}
y = {"b":5, "c":1}
print(x)
x.update(y)
print(x)
print(x.keys())
print(x.values())
86
88. Lambda expression
Lambda expressions - also known as anonymous functions - allow you
to create and use a function in a single line. They are useful when
you need a short function that you will only use once.
>>> (lambda x: 3*x + 1)(3)
10
88
89. Quiz: What does this code do?
items = [1, 2, 3, 4, 5]
squared = []
for i in items:
squared.append(i**2)
89
91. Using lambda+map, the squared code can be shortened
items = [1, 2, 3, 4, 5]
squared = list(map(lambda x: x**2, items))
91
92. Lambda expression
Sort a list of names based on the last name.
lst = ["Bob Wick", "John Doe", "Louise Bonn"]
lst.sort(key=lambda name:name.split(" ")[-1])
print(lst) # ['Louise Bonn', 'John Doe', 'Bob Wick']
92
94. • Working with data heavily involves reading and writing!
• Data comes in two types:
• Text: Human readable, encoded in ASCII/UTF-8,
example: .txt, .csv
• Binary: Machine readable, application-specific encoding,
example: .mp3, .mp4, .jpg
94
Input/Output
97. 97
Output
# write mode
x = open("carpe-diem.txt", "w")
x.write("carpendiemn")
x.close()
# append mode
x = open("carpe-diem.txt", "a")
x.write("carpendiemn")
x.close()
Write mode overwrites files,
while append mode does not overwrite files but instead appends at the end of the files' content
99. 99
Errors
• Errors dapat muncul pada program:
syntax errors, runtime errors, logic/semantic errors
• Syntax errors: errors where the program does not follow the rules of Python.
For example: we forgot a colon, we did not provide an end parenthesis
• Runtime errors: errors during program execution.
For example: dividing by 0, accessing a character past the end of a string,
a while loop that never ends.
• Semantic/logic errors: errors due to incorrect algorithms.
For example: Program that translates English to Indonesian,
even though the requirement was from English to Javanese.
100. Quiz: What type error is in this is_even function?
100
def is_even(n):
if n % 2 == 0:
return False
else:
return True
101. 101
Error handling in Python
Basic idea:
• keep watch on a particular section of code
• if we get an exception, raise/throw that exception
(let the exception be known)
• look for a catcher that can handle that kind of exception
• if found, handle it, otherwise let Python handle it (which
usually halts the program)
104. Type conversion feat. exception handling
104
var_a = ["satu", 2, "3"]
for x in var_a:
try:
b = int(x)
print("Berhasil memproses", x)
except ValueError:
print("ValueError saat memproses", x)
105. File accessing feat exception handling
105
# opening a file with exception handling
try:
x = open("this-does-not-exist.py")
x.close()
except FileNotFoundError:
print("Berkas tidak ditemukan!")
# vs.
# opening a file without exception handling
x = open("this-does-not-exist.py")
x.close()
107. • While in functions we encapsulate a set of instructions,
in classes we encapsulate objects!
• A class is a blueprint for objects, specifying:
• Attributes for objects
• Methods for objects
• A class can use other classes as a base, thus inheriting the attributes
and methods of the base class
107
Classes
class class-name(base):
attribute-code-block
method-code-block
108. But why?
• Bundle data attributes and methods into packages (= classes),
hence more organized abstraction
• Divide-and-conquer
• Implement and test behavior of each class separately
• Increased modularity reduces complexity
• Classes make it easy to reuse code
• Class inheritance, for example, allows extending the behavior of (base) class
108
Classes
Color Quantization is the process of reducing number of colors in an image. One reason to do so is to reduce the memory. Sometimes, some devices may have limitation such that it can produce only limited number of colors. In those cases also, color quantization is performed. Here we use k-means clustering for color quantization.
https://docs.opencv.org/4.2.0/d1/d5c/tutorial_py_kmeans_opencv.html
http://irfancen.pythonanywhere.com/
Monumental Java by J. F. Scheltema (1912)
http://www.gutenberg.org/ebooks/42405
Dengan definisi fungsi ini, maka sudah dapat handle kasus faktorial(0) dan faktorial(1)
Bagaimana dengan faktorial(num) dimana num > 1?
Coba base casenya dihilangkan!
- Base case, sesuai dengan namanya, tidak ada pemanggilan fungsi ke dirinya sendiri (= tanpa rekursi).
- Recursion case memanggil dirinya sendiri tapi harus melakukan reduksi masalah ke yang lebih simpel dan mengarah ke base case!
unicode hex value
https://unicode.org/cldr/utility/character.jsp?a=0041
is
cool
Carpe Diem = Take the opportunity and do not think too much about tomorrow!
used to urge someone to make the most of the present time and give little thought to the future
ValueError saat memproses satu
Berhasil memproses 2
Berhasil memproses 3
Berkas tidak ditemukan!
Traceback (most recent call last):
File "C:/Users/Fariz/Downloads/temp.py", line 9, in <module>
x = open("this-does-not-exist.py")
FileNotFoundError: [Errno 2] No such file or directory: 'this-does-not-exist.py'
https://commons.wikimedia.org/wiki/File:Blauwdruk-Ronhaar.jpg
1923 blueprint for shophouse with bakery Ronhaar at the Hammerweg in Ommen, demolished in 2007; the almost flat upper part of the mansard roof is found in the central and eastern Netherlands, but is virtually unknown in the river area and in the southern part of the Netherlands.
and other books
https://stackoverflow.com/questions/tagged/python
Code practice
https://www.hackerearth.com/practice/