<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7165432</id><updated>2026-10-16T17:27:57.746+11:00</updated><category term="Java"/><category term="Spring"/><category term="Python"/><category term="Productivity"/><category term="Scala"/><category term="AWS"/><category term="OGNL"/><category term="Web Service"/><category term="Spark"/><category term="Algorithm"/><category term="Analytics"/><category term="Semantic Web"/><category term="Docker"/><category term="JavaScript"/><category term="PySpark"/><category term="R"/><category term="Terraform"/><category term="xml"/><category term="AngularJs"/><category term="CI/CD"/><category term="Gradle"/><category term="JUnit"/><category term="Linux"/><category term="Patterns"/><category term="SQL"/><category term="Security"/><category term="Tech writing"/><category term="Vaadin"/><category term="Ajax"/><category term="Ansible"/><category term="BlazeDS"/><category term="DL"/><category term="Flex"/><category term="Go"/><category term="Haskell"/><category term="Hibernate"/><category term="JSF"/><category term="Kubernetes"/><category term="LDAP"/><category term="MacOS"/><category term="Mongdb"/><category term="OWL"/><category term="Ontology"/><category term="Packer"/><category term="Protege"/><category term="REST"/><category term="Rails"/><category term="Ruby"/><category term="SSL"/><category term="Tomcat"/><title type='text'>Ojitha Hewa Kumanayaka</title><subtitle type='html'>Software Engineer from Australia</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>141</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7165432.post-5341745098845936706</id><published>2023-06-17T14:06:00.026+10:00</published><updated>2023-07-18T17:24:49.090+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>SQL Analytic Functions</title><summary type="text">
table, td, th {
  border: 1px solid;
}

table {
  border-collapse: collapse;
  font-size: small;
}

Window functions play a very important part in analytic queries. I explore some of the window functions using Postgres 13.4. Window function defaults differ from Postgres to Redshift, although the results are the same. The OVER () default for Redshift is (ROWS BETWEEN UNBOUNDED PRECEDING AND </summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/5341745098845936706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2023/06/sql-analytic-functions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/5341745098845936706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/5341745098845936706'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2023/06/sql-analytic-functions.html' title='SQL Analytic Functions'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-9125589158255412369</id><published>2023-04-23T13:25:00.011+10:00</published><updated>2023-04-23T21:35:20.873+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Haskell"/><title type='text'>VSCode for Haskell Development</title><summary type="text">Haskell is a purely functional programming language. The VSCode extension Haskell for Visual Studio Code has been configured to develop Haskell code in the Docker container remotely. This blog explains how to use the VSCode editor to develop Haskell programs. The features, where you can find the table, summarises the features that HLS supports. Many of these are standard LSP features.


Install </summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/9125589158255412369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2023/04/vscode-for-haskell-development.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/9125589158255412369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/9125589158255412369'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2023/04/vscode-for-haskell-development.html' title='VSCode for Haskell Development'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-6459032528487077354</id><published>2022-02-21T19:29:00.015+11:00</published><updated>2023-02-16T06:55:31.071+11:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PySpark"/><category scheme="http://www.blogger.com/atom/ns#" term="Spark"/><title type='text'>PySpark relational operations</title><summary type="text">In this blog I explore the PySpark DataFrame API to create SQL JOIN and Windowing functionality. I am using MovieLens1 dataset to explain. In addition to SQL JOIN and CASE, advanced topic such as SQL Window and Pivot will be discussed here.
In my last blog post2, I&#39;ve explained how to use Hive metastore which is more intent to use SQL only.  For the full list, see the Spark SQL documentation3.


</summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/6459032528487077354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2022/02/pyspark-relational-operations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/6459032528487077354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/6459032528487077354'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2022/02/pyspark-relational-operations.html' title='PySpark relational operations'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-6531628052727309440</id><published>2022-02-20T11:48:00.005+11:00</published><updated>2023-04-09T12:58:26.450+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PySpark"/><category scheme="http://www.blogger.com/atom/ns#" term="Spark"/><title type='text'>Spark SQL using Hive metastore</title><summary type="text">This is the second part of the PySpark Dataframe DSL basics1. The main objectives are to create a Hive metastore based database and tables.


Create Databases and tables
Metadata
Data Sources
SQL User Define Functions



First, create Spark Session manually as the first step. By default, Spark uses the Apache Hive metastore to persist all the tables metadata. I have to change the default location</summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/6531628052727309440/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2022/02/spark-sql-using-hive-metastore.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/6531628052727309440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/6531628052727309440'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2022/02/spark-sql-using-hive-metastore.html' title='Spark SQL using Hive metastore'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-7725827230706939631</id><published>2022-02-19T12:27:00.015+11:00</published><updated>2022-02-20T16:28:15.180+11:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PySpark"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Spark"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>PySpark Dataframe DSL basics</title><summary type="text">In this blog post, I explore the PySpark DataFrame structured API and DSL operators.
Typical tasks you can learn:

Connection to remote PostgreSQL database
Create DataFrame from above database using PostgreSQL Sample Database
Create DataFrame using CSV (movieLens) files.

In addition to that the equivalent SQL has been provided to compare with the DSL.


Preperation
Configure Database in the </summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/7725827230706939631/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2022/02/pyspark-dataframe-dsl-basics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/7725827230706939631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/7725827230706939631'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2022/02/pyspark-dataframe-dsl-basics.html' title='PySpark Dataframe DSL basics'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-829183360152371350</id><published>2022-02-16T16:46:00.036+11:00</published><updated>2023-04-09T12:19:32.258+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Spark"/><title type='text'>PySpark environment for the Postgres database</title><summary type="text">In this blog, I am going to

Create Postgres 13.4 docker environment
Create Spark enabled Jupyter docker environment
Run remote Jupyter notebooks via Visual Studio Code
And test the PySpark Jupyter notebook1 or follow the PySpark Dataframe DSL basics which is the second part of this blog.

As shown in Fig.1, Jupyter Server and Postgres databases run in the Docker environment. Jupyter and Postgres</summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/829183360152371350/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2022/02/pyspark-environment-for-postgres.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/829183360152371350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/829183360152371350'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2022/02/pyspark-environment-for-postgres.html' title='PySpark environment for the Postgres database'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-4317367955818062619</id><published>2021-06-26T11:14:00.005+10:00</published><updated>2023-02-16T07:14:28.775+11:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AWS"/><title type='text'>AWS Cloudformation to create AWS VPC</title><summary type="text">This blog will build AWS Virtual Private Cloud (VPC) creation using AWS Cloudformation template, step by step. However, it is necessary to plan your network with Classless Inter-Domain Routing (CIDR).


Simplest VPC
Planning
Attach AWS Internet Gateway and Route Table
Testing the VPC



Simplest VPC
Here this simplest workable CFN:
Fig 1: Creates only VPC
This creates only the VPC, as shown in </summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/4317367955818062619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2021/06/aws-cloudformation-to-create-aws-vpc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/4317367955818062619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/4317367955818062619'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2021/06/aws-cloudformation-to-create-aws-vpc.html' title='AWS Cloudformation to create AWS VPC'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-1647076449041849552</id><published>2021-06-09T21:22:00.004+10:00</published><updated>2021-06-22T13:31:20.031+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AWS"/><title type='text'>AWS Glue Workflow: Getting started</title><summary type="text">Create a fundamental Glue workflow using the AWS Cloudformation template. The Glue workflow replaces the use of the Step functions, which have been used to maintain Glue flow states. However, if you plan to automate your build deployment, here is the blog post1 to help you.

In this post, I completely ignore the AWS BuildPipeline, which is the recommended CI/CD pipeline explained in the above </summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/1647076449041849552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2021/06/aws-glue-workflow-getting-started.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/1647076449041849552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/1647076449041849552'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2021/06/aws-glue-workflow-getting-started.html' title='AWS Glue Workflow: Getting started'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-4222703342198813066</id><published>2021-03-18T12:27:00.007+11:00</published><updated>2021-06-28T11:23:05.777+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Java Streaming API recipes</title><summary type="text">In Java, elements in the stream are subdivided into subsets (can be subdivided into further) which are processed in parallel using different cores of the CPU. Therefore, only stateless, non-interfering and associative subsets are eligible to run parallel. These subsets are combined for the short-circuit/terminal process for the final result. The sequential(default) or parallel mode depends on the</summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/4222703342198813066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2021/03/java-streaming-api-recipes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/4222703342198813066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/4222703342198813066'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2021/03/java-streaming-api-recipes.html' title='Java Streaming API recipes'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-6923647131187545306</id><published>2021-01-01T17:27:00.002+11:00</published><updated>2021-01-01T17:34:23.028+11:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Java 9 Parallelism</title><summary type="text">A current computer programming paradigm is not object-oriented anymore; it is about parallelism1. In the programming perspective, concurrency is the composition of independently executing processes. Parallelism is the simultaneous execution of computations.


Concurrency is about dealing with lots of things at once. Parallelism is about doing lots of things at once. 

Concurrency is about </summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/6923647131187545306/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2020/11/java-9-parallelism.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/6923647131187545306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/6923647131187545306'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2020/11/java-9-parallelism.html' title='Java 9 Parallelism'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-1029500495364876300</id><published>2020-09-29T10:40:00.002+10:00</published><updated>2021-06-28T11:23:52.719+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>Python my workflow</title><summary type="text">My Flow
I combined two softwares using pyenv-virtualenv :

pyenv manages multiple versions of Python itself
virtualenv (Python Virtual Environments: A Primer) manages virtual environments for a specific Python version.
pyenv-virtualenv manages virtual environments for across varying versions of Python.

Here the way to create virtualenv
pyenv virtualenv 3.7.2 p3

To activate the environment
pyenv</summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/1029500495364876300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2020/09/python-my-workflow.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/1029500495364876300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/1029500495364876300'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2020/09/python-my-workflow.html' title='Python my workflow'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-282890752870686921</id><published>2020-08-17T15:21:00.007+10:00</published><updated>2022-12-18T17:22:46.343+11:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Semantic Web"/><title type='text'>Structured data meaning</title><summary type="text">Google uses structured data such as RDFa, Microdata or JSON-LD to understand the contents of the page. RDFa is based on the RDF and HTML5 extension. JOSN-LD can be created from the same RDF Turtle. Learn RDF Turtle to create structured data for SEO.
RDFa1 (Resource Description Framework in Attributes) is attribute-based, for example, a, href in the HTML/XHTML. RDFa does not affect the HTML code </summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/282890752870686921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2020/08/structured-data-meaning_69.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/282890752870686921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/282890752870686921'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2020/08/structured-data-meaning_69.html' title='Structured data meaning'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-2079532579425661074</id><published>2020-08-14T14:45:00.079+10:00</published><updated>2022-12-18T17:37:45.460+11:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Semantic Web"/><title type='text'>Apache Jena to learn RDF and SPARQL </title><summary type="text">RDF is one of the semantic web technology as well as the foundation for Turtle, N-Triples including JSON-LD.  SPARQL is the query language for RDF. Use Apache Jena tools to learn RDF.
For example, if you see the web page, that is human readable, because the end-user is human. However, there are search engines who choose the page on behalf of the consumer. Therefore, a search engine is a machine </summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/2079532579425661074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2020/08/apache-jena-to-learn-rdf-and-sparql_64.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/2079532579425661074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/2079532579425661074'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2020/08/apache-jena-to-learn-rdf-and-sparql_64.html' title='Apache Jena to learn RDF and SPARQL '/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-1228833300722106028</id><published>2020-08-08T09:16:00.012+10:00</published><updated>2020-08-25T15:48:54.031+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>JSF and RichFaces</title><summary type="text">Recently, I got a project to work on JSF RichFaces1. RichFaces project reached end-of-life in June 2016. Thanks to Java backward compatibility I managed to run the RichFaces application on TomEE 7 using Intellij Idea as IDE.

Run the following maven archytype in your command prompt as explained in the JBoss Community guide2:

mvn archetype:generate -DarchetypeGroupId=org.richfaces.archetypes </summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/1228833300722106028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2020/08/jsf-and-richfaces.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/1228833300722106028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/1228833300722106028'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2020/08/jsf-and-richfaces.html' title='JSF and RichFaces'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-6515861776877804040</id><published>2020-06-17T21:47:00.040+10:00</published><updated>2020-08-25T15:49:43.691+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MacOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Productivity"/><title type='text'>Mac keyboard shortcut to copy file path as markdown</title><summary type="text">The macOS productivity1 shortcut to Copy file/folder markdown path. 
How to create macOS Automator Quick Action to copy the file/folder markdown path using shortcut keys as the same way you copy the path name of the file/folder. I give you an idea of how to use JXA in the Automator. As additional information, I introduce how to use macOS Cocoa that will help you to make better logging using macOS</summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/6515861776877804040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2020/06/macos-quick-action-to-copy-markdown.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/6515861776877804040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/6515861776877804040'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2020/06/macos-quick-action-to-copy-markdown.html' title='Mac keyboard shortcut to copy file path as markdown'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-4090489781670766164</id><published>2020-05-31T19:10:00.009+10:00</published><updated>2020-06-01T12:34:17.746+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Productivity"/><title type='text'>How to create step guides</title><summary type="text">



Flow to create step guide


Screen annotation in Mac






Flow to create step guide

Most of the bloggers need to add stories to their blog posts. For tech bloggers, that is most probably the journey of clicks over browser, application and so on. However, the blogger has to capture the screen and record with the annotations. In this blog, I explain how to create step by step guide:

graph TD</summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/4090489781670766164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2020/05/annotated-screenshot-in-mac-preview.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/4090489781670766164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/4090489781670766164'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2020/05/annotated-screenshot-in-mac-preview.html' title='How to create step guides'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-2115095989980012937</id><published>2020-05-30T21:01:00.022+10:00</published><updated>2020-05-31T19:46:34.394+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Productivity"/><title type='text'>Toolbox for bloggers</title><summary type="text">CONTENTS





Animated GIF for terminal recording


Diagrams and Charts


Write a blog post


Math notations


Create step guides






Animated GIF for terminal recording

The LICECap is nice free little tool good to create animated gif show your terminal for example.

Fig 1: Python version on terminal

It is hard to find the similar

Diagrams and Charts

Although there are few diagrams types </summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/2115095989980012937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2020/05/animated-gif-for-blogger.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/2115095989980012937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/2115095989980012937'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2020/05/animated-gif-for-blogger.html' title='Toolbox for bloggers'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-1692114729622514485</id><published>2020-05-17T21:10:00.000+10:00</published><updated>2020-06-02T09:09:49.341+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AngularJs"/><title type='text'>AngularJs Basics</title><summary type="text">You can download the AngularJs to use via CDN. I am using doing my examples in


 Visual Studio Code (VSC)
 Live Server plugin for the VSC


Angular application based on the model-view-controller pattern. The view is based on the DOM. The controllers are JavaScript classes and the model data is stored in object properties1.


The model (line# 10) represent the current state of the application.
</summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/1692114729622514485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2020/05/angularjs-basics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/1692114729622514485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/1692114729622514485'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2020/05/angularjs-basics.html' title='AngularJs Basics'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-6741528805877991750</id><published>2020-04-08T19:49:00.009+10:00</published><updated>2020-05-31T09:28:48.673+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Productivity"/><title type='text'>MAC shortcuts</title><summary type="text">Here the simple mac shortcuts found from the difference sources such as1. Here the general tips:


  Mac keyboard shortcuts from Apple Support.
  
run the caffeinate in the terminal to keep the computer wake unlimitedly2.
Expand print dialog box by default:


defaults write -g PMPrintingExpandedStateForPrint -bool TRUE



Enable or disable character accent menu:


// disable
defaults write -g </summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/6741528805877991750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2020/04/mac-shortcuts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/6741528805877991750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/6741528805877991750'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2020/04/mac-shortcuts.html' title='MAC shortcuts'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-6448172745565017646</id><published>2020-03-29T17:46:00.002+11:00</published><updated>2020-03-29T22:55:05.655+11:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AWS"/><title type='text'>Calling AWS Services</title><summary type="text">To programmatically connect to the AWS Services, need to use endpoints. The AWS SDK and the CLI use the default endpoint of the region to access the service. The regional endpoint is protocol://service-code.region-code.amazonaws.com standard. But services such as IAM not support the region. 

Some example of calling1 to AWS services via API calls. All CLI calls are signed by Signature version 42.</summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/6448172745565017646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2020/03/calling-aws-services.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/6448172745565017646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/6448172745565017646'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2020/03/calling-aws-services.html' title='Calling AWS Services'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-8209307030230415316</id><published>2019-08-31T08:08:00.000+10:00</published><updated>2019-08-31T08:12:00.448+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Java Collectors recipes</title><summary type="text">Java Collectors is a utility class with several reduction operations. Here a few of the example you can do with the Collectors class. For example, grouping functionality first.

import java.util.stream.Collectors;
import java.util.stream.Stream;

// basic functionality of the collector
Stream.of(&amp;quot;one&amp;quot;, &amp;quot;two&amp;quot;, &amp;quot;three&amp;quot;, &amp;quot;four&amp;quot;, &amp;quot;five&amp;quot;)
        .</summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/8209307030230415316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2019/08/java-collectors-recipes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/8209307030230415316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/8209307030230415316'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2019/08/java-collectors-recipes.html' title='Java Collectors recipes'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-7500068689694016280</id><published>2019-04-03T23:15:00.001+11:00</published><updated>2020-05-14T22:58:00.309+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="xml"/><title type='text'>Parse the namespace based XML using Python</title><summary type="text">In this blog, I am considering how to parser and modify the xml file using python. For example, I need to parser the following xml1 (slightly modified for this blog) and need to write the modified xml to out.xml file.

Here the country.xml

&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;
&amp;lt;actors xmlns:fictional=&amp;quot;http://characters.example.com&amp;quot;
        xmlns=&amp;quot;http://people.example.com&amp;quot;</summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/7500068689694016280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2019/04/parse-namespace-based-xml-using-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/7500068689694016280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/7500068689694016280'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2019/04/parse-namespace-based-xml-using-python.html' title='Parse the namespace based XML using Python'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-2561993508183460040</id><published>2019-03-24T11:48:00.002+11:00</published><updated>2020-05-15T17:17:00.873+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Terraform"/><title type='text'>Terraform SSH connection to AWS EC2 </title><summary type="text">The instances are created via Terraform, but Terraform can only used existing key pairs. First thing is to create the key pair as explained in the AWS documentation1.

NOTE:
However, if you are not familiar with Terraform, please go through the following blogs before this blog


Basic example of creating AWS EC2 with Terraform
Creating AWS S3 bucket with Terraform


Connect to the EC2 instance, </summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/2561993508183460040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2019/03/terraform-ssh-connection-to-aws-ec2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/2561993508183460040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/2561993508183460040'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2019/03/terraform-ssh-connection-to-aws-ec2.html' title='Terraform SSH connection to AWS EC2 '/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-3130992252305595939</id><published>2019-03-23T21:51:00.002+11:00</published><updated>2020-05-15T17:17:14.124+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Terraform"/><title type='text'>Creating AWS S3 bucket with Terraform</title><summary type="text">I recommend to read the first example1,because this is a extenstion to that. However, instead of AWS EC2, here the target resource is AWS S3 for the simplicity. Here the providers.tf file.

provider &amp;quot;aws&amp;quot; {
  region = &amp;quot;${var.s3_region}&amp;quot;
}

terraform {
    required_version =  &amp;quot;&amp;gt;= 0.11.13&amp;quot;
    backend &amp;quot;s3&amp;quot; {
        bucket = &amp;quot;ojitha&amp;quot;
        key </summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/3130992252305595939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2019/03/creating-aws-s3-bucket-with-terraform.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/3130992252305595939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/3130992252305595939'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2019/03/creating-aws-s3-bucket-with-terraform.html' title='Creating AWS S3 bucket with Terraform'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7165432.post-282006755368637847</id><published>2019-03-23T21:35:00.005+11:00</published><updated>2020-05-15T17:17:29.649+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Terraform"/><title type='text'>Basic example of creating AWS EC2 with Terraform</title><summary type="text">Here the very basic example. This is just a note of creating single EC2 instance using Terraform.

First you need to define the provider in the example.tf file

provider &amp;quot;aws&amp;quot; {
  region = &amp;quot;ap-southeast-2&amp;quot;
}

# resource &amp;quot;aws_s3_bucket&amp;quot; &amp;quot;example&amp;quot; {
#   bucket = &amp;quot;ojithatest1&amp;quot;
#   acl = &amp;quot;private&amp;quot;
# }

resource &amp;quot;aws_instance&amp;quot; &amp;quot</summary><link rel='replies' type='application/atom+xml' href='http://ojitha.blogspot.com/feeds/282006755368637847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ojitha.blogspot.com/2019/03/basic-example-of-creating-aws-ec2-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/282006755368637847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7165432/posts/default/282006755368637847'/><link rel='alternate' type='text/html' href='http://ojitha.blogspot.com/2019/03/basic-example-of-creating-aws-ec2-with.html' title='Basic example of creating AWS EC2 with Terraform'/><author><name>Ojitha Hewa  Kumanayaka</name><uri>http://www.blogger.com/profile/17299136133671661631</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hXwWQJ9BG6est799i-eSOOOvGGN3Kd6nGbVyaHffHm33aekHDk4G-wMRA9YfutwR7MmJZyb4SJd2jrRmWpga3fyICCV3P5sBcvWIHSo_qAv-ZXLFyRMAy2PyjeU6Zs8/s113/ojitha_new.jpg'/></author><thr:total>0</thr:total></entry></feed>