Travel.

Travel dates back to antiquity where wealthy Greeks and Romans would travel for leisure to their summer homes and villas in cities such as Pompeii and Baiae.[7] While early travel tended to be slower, more dangerous, and more dominated by trade and migration, cultural and technological advances over many years have tended to mean that travel has become easier and more accessible.[8] Mankind has come a long way in transportation since Christopher Columbus sailed to the new world from Spain in 1492, an expedition which took over 10 weeks to arrive at the final destination; to the 21st century where aircraft allow travel from Spain to the United States overnight.

Travel in the Middle Ages offered hardships and challenges, however, it was important to the economy and to society. The wholesale sector depended (for example) on merchants dealing with/through caravans or sea-voyagers, end-user retailing often demanded the services of many itinerant peddlers wandering from village to hamlet, gyrovagues (Wandering Monks) and wandering friars brought theology and pastoral support to neglected areas, travelling minstrels practiced the never-ending tour, and armies ranged far and wide in various crusades and in sundry other wars.[7] Pilgrimages were common in both the European and Islamic world and involved streams of travellers both locally (Canterbury Tales-style) and internationally.[9]

In the late 16th century it became fashionable for young European aristocrats and wealthy upper class men to travel to significant European cities as part of their education in the arts and literature. This was known as the Grand Tour, it included cities such as London, Paris, Venice, Florence and Rome. However, The French revolution brought with it the end of the Grand Tour.[7]

Travel by water often provided more comfort and speed than land-travel, at least until the advent of a network of railways in the 19th century. Travel for the purpose of tourism is reported to have started around this time when people began to travel for fun as travel was no longer a hard and challenging task. This was capitalised on by people like Thomas Cook selling tourism packages where trains and hotels were booked together.[10] Airships and airplanes took over much of the role of long-distance surface travel in the 20th century, notably after the second World War where there was a surplus of both aircraft and pilots.[7]

Safety

Authorities emphasize the importance of taking precautions to ensure travel safety.[12] When traveling abroad, the odds favor a safe and incident-free trip, however, travelers can be subject to difficulties, crime and violence.[13] Some safety considerations include being aware of one’s surroundings,[12] avoiding being the target of a crime,[12] leaving copies of one’s passport and itinerary information with trusted people,[12] obtaining medical insurance valid in the country being visited[12] and registering with one’s national embassy when arriving in a foreign country.[12] Many countries do not recognize drivers’ licenses from other countries; however most countries accept international driving permits.[14] Automobile insurance policies issued in one’s own country are often invalid in foreign countries, and it is often a requirement to obtain temporary auto insurance valid in the country being visited.[14] It is also advisable to become oriented with the driving-rules and -regulations of destination countries.[14] Wearing a seat belt is highly advisable for safety reasons; many countries have penalties for violating seatbelt laws.[14]

There are three main statistics which may be used to compare the safety of various forms of travel (based on a DETR survey in October 2000):[15]

THE EVOLUTION OF TECHNOLOGY: PAST, PRESENT AND FUTURE

Technology runs our lives these days. Smartphones, tablets and computers – we really can’t seem to function without them. In a very short amount of time, technology has exploded in the market and now, many people cannot imagine a life without it.

To understand how we left the dark ages (which really wasn’t all that long ago) to where we are today, it is important to understand how technology evolves and why it matters.

PURPOSE DRIVES TECHNOLOGY FORWARD

All technologies are born out of purpose. For example, search engines were created to sort through the massive amounts of data online. With each new upgrade technology compounds existing technologies to create something better than what was previously used before. And on and on it goes.

With the lightning speed of technological evolution, it is no wonder many people have struggled to keep up. To be fair, the scope of technology’s expanse is so great, wrapping everything up into a single blog post is practically impossible.

Here is just a brief glimpse into how rapidly the Internet and technology as a whole have evolved in recent years.

THE PAST: WORLD, MEET THE INTERNET

Looking back to the 1990’s, the Internet was a new commodity many, but not all, households and businesses began to gain access. For people living during that time, the sound of the painfully slow dial up signal connecting to the Internet is a not-so-fond memory (EEEE-AAAAAHH!!!!).

Thankfully, as more people found value in the Internet, technology took off to eliminate having to use a phone line to go online and instead delivered faster connections to the World Wide Web.

blog-laptop.jpg

WEBSITES AND BLOGGING ARE BORN

Websites advanced along with the internet. Suddenly, everyone had a Geocities or Tripod website dedicated to themselves. Just in infancy, websites were basic in both function and design. This is also the time when the blogging craze started to set in on the consumer level with the introduction of “weblogs” (later condensed to “blogs”). Remember Xanga? If only we knew then what we know now.

FLOPPY DISCS AKA THE REAL-LIFE SAVE-BUTTON ICON

A few years later, sharing information gradually started to become easier. Instead of handing over a floppy disc or CD-ROM, people began emailing documents or storing large files on USB sticks or flash drives.

As new technologies started to pop-up, each technology would compound and build to form a better, faster and stronger piece of technology. With this speedy development, the Internet changed the way people live, work and operate today.

THE PRESENT: SNAPS, CHATS AND DOUBLE TAPS

Fast-forward a short decade later (side note: remember VHS tapes!? The OG fast-forward? OK, moving on…).

Since the days of dial-up, access to the Internet is available almost everywhere. It is rare these days for consumers to go into a coffee shop, library or any place of business and not be able to access a Wi-Fi signal. If there isn’t a Wi-Fi signal in close range, most people still have access to the Internet via their cellular data connection on their smartphones and personal hotspots, no problem.

THERE’S AN APP FOR THAT

With this anywhere/anytime access to the Internet, businesses created web applications to answer common needs of consumers. These applications can do everything from tracking food portions to sending massive amounts of information in a click of a button.

social-media-phone.jpg

THE EVOLUTION AND REVOLUTION OF COMMUNICATION

How we communicate continued to evolve as well. Remember face-to-face conversations? Hand-written letters? Waiting by the phone – the kind with the cord? Technology perpetually reshapes our communication. Perhaps the most noticeable difference in the Internet today is the ability to be personable in such an impersonal setting. Constant connection seems to be the name of the game. And along with connection, we see instant availability. Bluetooth connections, talk-to-text, every form of messaging apps – while you’re driving, in meetings, at home. Connection. Everywhere.

MYSPACE, YOURSPACE, BOOKFACE: THE SOCIAL MEDIA AWAKENING

We’ve watched texting evolve from sending text-only messages (literally texting) to the addition of imagery, thanks to the viral spread of gifs, memes, emojies and bitmojies. In fact, with the spike in video-sharing, actual text is shrinking (meet SnapChat, Instagram Stories, Facebook Stories, Periscope, Vine, etc. and shorthand abbreviations). SMH.

Social networks continue to change the way people engage with one another. Ironically, the constant connection and way people interact with one another seems to morph to a more superficial setting online. Although superficial at times, this form of communication helps people stay closer to each other when they would have otherwise lost contact.

FACE TO FACE (VIRTUALLY, SPEAKING)

Face-to-face conversations via technology are resurfacing, though, and even strengthening, thanks to higher-quality video and streaming capabilities (enter: Skype, Google Hangouts, Zoom, FaceTime, live streaming, etc.). With more people engaging in web/video conferencing online, geographic barriers that once hindered communication were torn down. Instead, companies can engage with consumers in a more human manner, people can talk to people face-to-face without the need for costly travel and reaching out to people all over the world is faster and easier.

CUTTING THE CORD: THE ERA OF VIDEO STREAMING

Remember when Netflix was a primarily a DVD delivery company, bringing your favorite movie via mail? Back when binge-watching wasn’t a thing?

Today, people are cutting the cord when it comes to cable, opting for digital streaming and video services like Netflix, YouTube and Hulu. Big brands are trying to keep up and compete, doing their best to one-up each other with original content, availability and delivery channels (e.g. Apple TV, Amazon Fire TV, Google TV, etc.). User-generated content is a force to acknowledge as well. Thanks to streaming options like Facebook Live, Instagram Live and Periscope, individuals and business are able to broadcast their own videos and content.

In a nutshell, videos are popping up everywhere and trending big time. And they thought talking pictures would never last…

TODAY’S TECH FORECAST: ICLOUDY DAYS AHEAD

More people and companies are using cloud-based services for their business and store everything online instead of on a single device. This change will continue to have an enormous impact on the way business is done, transforming our once-traditional office environments and how people interact with companies on a regular basis. Flash drives are almost extinct with the prevalence of cloud storage, like iCloud, Google Drive, Dropbox and FTP sites.

With so many new technologies permeating the way people access information and access each other, the forward momentum looks promising for future technological developments.

THE FUTURE: EMERGING TRENDS ON THE HORIZON

As more existing technologies are stacked onto each other and developed into something greater, consumers and businesses alike can expect to see more opportunity with future technology. Technology will be faster, have the ability to accomplish more and everything will become more streamlined to make getting work done, easier.

While we don’t have the ability to predict the future, we can offer speculations on technology’s evolution. We are constantly seeing emerging media and new trends in technology to follow. Here are a few trends to watch for in the coming years.

SMART IS THE NEW SEXY

And by “smart” we mean the continued evolution of smart devices and rise of artificial intelligence (AI) technology.

Smart devices will continue to evolve to work better together. These machines will share data automatically limiting the need for human involvement. Of course, it’s not just smartphones, watches, TVs or tablets anymore.

THE INTERNET OF THINGS

You’ll hear more and more about the “Internet of Things” (IoT) now and in the future. The deeper we dive into technology, the more it seems we try to blend the physical and virtual worlds together. Smart speakers, smart homes and even smart cars are the tech wave to ride in the future, but it’s just the beginning.

Think of the Internet of Things as a network of physical devices – like handheld gadgets, vehicles, home appliances or any kind of electronic item with embedded software or technology – connected together and able to exchange data.

Gartner, an analyst firm, speculates there will be more than 26 billion connected devices by 2020. Imagine a future where your car warns you of heavy traffic or your alarm clock notifies you about your coffee brewing itself in the kitchen. Imagine living in a smart home in a smart city.

In other words, the future happening is now. Or at least, it’ll be here sooner than you may think.

WHY BOTHER KEEPING UP WITH TECHNOLOGY?

It’s a fair question. Technology is constantly changing and it sometimes feels like way too much effort to keep up with a moving target. Just remember – keeping up with technology adds value to your business.

Staying up-to-date helps ensure you don’t miss opportunities, become irrelevant or fall behind your competitors. Remember Kodak? They taught us all an invaluable lesson: don’t be afraid to embrace change.

Here are a few ways to keep up and stay informed:

  • Follow industry blogs (like ours!)
  • Listen to industry leaders
  • Follow topics on social media
  • Join groups (online and in-person)
  • Listen to podcasts
  • Engage in tech forums
  • Subscribe to relevant eNewsletters
  • Set up Google alerts

THE FINAL (FANTASY) FRONTIER

Space may not be the final frontier as we thought. Technology is a frontier on its own, continuing to evolve, grow and reshape our world. As we continue to explore and expand technology, the more life will change, creating new habits and forming new ways of working together.

While the future is unknown, we believe in leveraging technology to create personalized approaches and solutions.

Hope you liked it.

Thank you.

Evolution of our earth.

The history of Earth concerns the development of planet Earth from its formation to the present day. Nearly all branches of natural science have contributed to understanding of the main events of Earth’s past, characterized by constant geological change and biological evolution.

The geological time scale (GTS), as defined by international convention,[3] depicts the large spans of time from the beginning of the Earth to the present, and its divisions chronicle some definitive events of Earth history. (In the graphic: Ga means “billion years ago”; Ma, “million years ago”.) Earth formed around 4.54 billion years ago, approximately one-third the age of the universe, by accretion from the solar nebula.[4][5][6] Volcanic outgassing probably created the primordial atmosphere and then the ocean, but the early atmosphere contained almost no oxygen. Much of the Earth was molten because of frequent collisions with other bodies which led to extreme volcanism. While the Earth was in its earliest stage (Early Earth), a giant impact collision with a planet-sized body named Theia is thought to have formed the Moon. Over time, the Earth cooled, causing the formation of a solid crust, and allowing liquid water on the surface.

The Hadean eon represents the time before a reliable (fossil) record of life; it began with the formation of the planet and ended 4.0 billion years ago. The following Archean and Proterozoic eons produced the beginnings of life on Earth and its earliest evolution. The succeeding eon is the Phanerozoic, divided into three eras: the Palaeozoic, an era of arthropods, fishes, and the first life on land; the Mesozoic, which spanned the rise, reign, and climactic extinction of the non-avian dinosaurs; and the Cenozoic, which saw the rise of mammals. Recognizable humans emerged at most 2 million years ago, a vanishingly small period on the geological scale.

The earliest undisputed evidence of life on Earth dates at least from 3.5 billion years ago,[7][8][9] during the Eoarchean Era, after a geological crust started to solidify following the earlier molten Hadean Eon. There are microbial mat fossils such as stromatolites found in 3.48 billion-year-old sandstone discovered in Western Australia.[10][11][12] Other early physical evidence of a biogenic substance is graphite in 3.7 billion-year-old metasedimentary rocks discovered in southwestern Greenland[13] as well as “remains of biotic life” found in 4.1 billion-year-old rocks in Western Australia.[14][15] According to one of the researchers, “If life arose relatively quickly on Earth … then it could be common in the universe.”[14]

Photosynthetic organisms appeared between 3.2 and 2.4 billion years ago and began enriching the atmosphere with oxygen. Life remained mostly small and microscopic until about 580 million years ago, when complex multicellular life arose, developed over time, and culminated in the Cambrian Explosion about 541 million years ago. This sudden diversification of life forms produced most of the major phyla known today, and divided the Proterozoic Eon from the Cambrian Period of the Paleozoic Era. It is estimated that 99 percent of all species that ever lived on Earth, over five billion,[16] have gone extinct.[17][18] Estimates on the number of Earth’s current species range from 10 million to 14 million,[19] of which about 1.2 million are documented, but over 86 percent have not been described.[20] However, it was recently claimed that 1 trillion species currently live on Earth, with only one-thousandth of one percent described.[21]

The Earth’s crust has constantly changed since its formation, as has life since its first appearance. Species continue to evolve, taking on new forms, splitting into daughter species, or going extinct in the face of ever-changing physical environments. The process of plate tectonics continues to shape the Earth’s continents and oceans and the life they harbor. Human activity is now a dominant force affecting global change, harming the biosphere, the Earth’s surface, hydrosphere, and atmosphere with the loss of wild lands, over-exploitation of the oceans, production of greenhouse gases, degradation of the ozone layer, and general degradation of soil, air, and water quality.

Eons

In geochronology, time is generally measured in mya (million years ago), each unit representing the period of approximately 1,000,000 years in the past. The history of Earth is divided into four great eons, starting 4,540 mya with the formation of the planet. Each eon saw the most significant changes in Earth’s composition, climate and life. Each eon is subsequently divided into eras, which in turn are divided into periods.

Creating your own website in only 4 easy steps

Creating a website

Most customers will expect to be able to find your business on the internet. Whether you are selling your products online, or simply want to provide some information about your business and your contact details, having a website is almost essential.

It’s a good idea to think about what you hope to achieve with your website before you start creating one. Researching your competitors’ websites can help you get a clear idea of what may work best for you.

To create a website, you need to follow 4 basic steps.

1. Register your domain name

Your domain name should reflect your products or services so that your customers can easily find your business through a search engine. Your customers may also expect your domain name to be similar to your business name.

Your domain name will also be used for your email address. While you can use a free email address such as hotmail, sending emails from a business address looks more professional.

To register your domain name, you will need to find an accredited registrar and pay a fee. Accredited registrars are organisations who are authorised by auDA, the Australian domain name administrator, to provide services to people who want to register a new domain name, renew their existing domain name, or make changes to their domain name record.

2. Find a web hosting company

You will need to find a web hosting company to get your domain name on the internet. Most of the major internet service providers offer web hosting services. They can also provide you with multiple email addresses.

Monthly fees for web hosting vary depending on how large your website is and how many visits you get.

3. Prepare your content

Think about what you want your customers to be able to do via your website. This will help you work out what sections or pages you want to include. Consider what information or transactions your customers will want and make sure the site is structured to make it easy for them to find and do the things they need.

Just as you might hire a professional to design your site, you might also want to consider hiring a professional to write and structure your content.

A website that is well designed and easy for customers to use will help your business stand out. Having relevant and appropriate content and images will help customers understand your products and services and will make them feel comfortable with buying from your business.

4. Build your website

You can build your own website or have a professional web developer build it for you. Websites need to be kept up to date, so make sure you plan for ongoing maintenance.

You can use a website publishing package to build your own website. These are similar to word processors, but also have inbuilt features to convert your text and images to web content and send it to your website.

Having someone else build a website for you is a good idea if you’re new to online business. A professional web developer can build your site quickly and provide guidance on successful web design. Hiring a professional can be particularly useful if you are looking at having an online shop or offering other services through your website.

You will need to design your website so it can be easily used on smartphones and other mobile devices. Optimising your website for mobile use means that the growing number of people using phones and tablets to access the internet can use your site while they are out and about.

Useful tips for creating a website

  • Think about what your customers want to know, not just what you want to tell them.
  • Use professionals to help you. An unprofessional website can potentially put customers off.
  • Update your website regularly, especially if you include information about your prices.
  • Make sure your contact details are correct and easy for your customers to find.
  • Promote your website in your marketing material and include it on your business cards.
  • Find out how you can make your website easy for search engines, such as Google, to find. This is called search engine optimisation (SEO). A web developer can help you with SEO for your website.

PYTHON tips and tricks every programmer need to know about.

15 Essential Python Tips And Tricks For Programmers

Tips#1. In-Place Swapping Of Two Numbers.

Python provides an intuitive way to do assignments and swapping in one line. Please refer to the below example.

x, y = 10, 20
print(x, y)
 
x, y = y, x
print(x, y)
 
#1 (10, 20)
#2 (20, 10)

The assignment on the right seeds a new tuple. While the left one instantly unpacks that (unreferenced) tuple to the names <a> and <b>.

Once the assignment is through, the new tuple gets unreferenced and flagged for garbage collection. The swapping of variables also occurs at eventually.

TOC

Tips#2. Chaining Of Comparison Operators.

Aggregation of comparison operators is another trick that can come handy at times.

n = 10
result = 1 < n < 20
print(result)

# True

result = 1 > n <= 9
print(result)

# False

TOC

Tips#3. Use Of Ternary Operator For Conditional Assignment.

Ternary operators are a shortcut for an if-else statement and also known as conditional operators.

[on_true] if [expression] else [on_false]

Here are a few examples which you can use to make your code compact and concise.

The below statement is doing the same what it is meant to i.e. “assign 10 to x if y is 9, otherwise assign 20 to x“. We can though extend the chaining of operators if required.

x = 10 if (y == 9) else 20

Likewise, we can do the same for class objects.

x = (classA if y == 1 else classB)(param1, param2)

In the above example, classA and classB are two classes and one of the class constructors would get called.

Below is one more example with a no. of conditions joining to evaluate the smallest number.

def small(a, b, c):
	return a if a <= b and a <= c else (b if b <= a and b <= c else c)
	
print(small(1, 0, 1))
print(small(1, 2, 2))
print(small(2, 2, 3))
print(small(5, 4, 3))

#Output
#0 #1 #2 #3

We can even use a ternary operator with the list comprehension.

[m**2 if m > 10 else m**4 for m in range(50)]

#=> [0, 1, 16, 81, 256, 625, 1296, 2401, 4096, 6561, 10000, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936, 2025, 2116, 2209, 2304, 2401]

TOC

Tips#4. Work With Multi-Line Strings.

The basic approach is to use backslashes which derive itself from C language.

multiStr = "select * from multi_row \
where row_id < 5"
print(multiStr)

# select * from multi_row where row_id < 5

One more trick is to use the triple-quotes.

multiStr = """select * from multi_row 
where row_id < 5"""
print(multiStr)

#select * from multi_row 
#where row_id < 5

The common issue with the above methods is the lack of proper indentation. If we try to indent, it’ll insert whitespaces in the string.

So the final solution is to split the string into multi lines and enclose the entire string in parenthesis.

multiStr= ("select * from multi_row "
"where row_id < 5 "
"order by age") 
print(multiStr)

#select * from multi_row where row_id < 5 order by age

TOC

Tips#5. Storing Elements Of A List Into New Variables.

We can use a list to initialize a no. of variables. While unpacking the list, the count of variables shouldn’t exceed the no. of elements in the list.

testList = [1,2,3]
x, y, z = testList

print(x, y, z)

#-> 1 2 3

TOC

Tips#6. Print The File Path Of Imported Modules.

If you want to know the absolute location of modules imported in your code, then use the below trick.

import threading 
import socket

print(threading)
print(socket)

#1- <module 'threading' from '/usr/lib/python2.7/threading.py'>
#2- <module 'socket' from '/usr/lib/python2.7/socket.py'>

TOC

Tips#7. Use The Interactive “_” Operator.

It’s a useful feature which not many of us know.

In the Python console, whenever we test an expression or call a function, the result dispatches to a temporary name, _ (an underscore).

>>> 2 + 1
3
>>> _
3
>>> print _
3

The “_” references to the output of the last executed expression.

TOC

Tips#8. Dictionary/Set Comprehensions.

Like we use list comprehensions, we can also use dictionary/set comprehensions. They are simple to use and just as effective. Here is an example.

testDict = {i: i * i for i in xrange(10)} 
testSet = {i * 2 for i in xrange(10)}

print(testSet)
print(testDict)

#set([0, 2, 4, 6, 8, 10, 12, 14, 16, 18])
#{0: 0, 1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64, 9: 81}

Note- There is only a difference of <:> in the two statements. Also, to run the above code in Python3, replace <xrange> with <range>.

TOC

Tips#9. Debugging Scripts.

We can set breakpoints in our Python script with the help of the <pdb> module. Please follow the below example.

import pdb
pdb.set_trace()

We can specify <pdb.set_trace()> anywhere in the script and set a breakpoint there. It’s extremely convenient.

TOC

Tips#10. Setup File Sharing.

Python allows running an HTTP server which you can use to share files from the server root directory. Below are the commands to start the server.

# Python 2

python -m SimpleHTTPServer

# Python 3

python3 -m http.server

Above commands would start a server on the default port i.e. 8000. You can also use a custom port by passing it as the last argument to the above commands.

TOC

Tips#11. Inspect An Object In Python.

We can inspect objects in Python by calling the dir() method. Here is a simple example.

test = [1, 3, 5, 7]
print( dir(test) )
['__add__', '__class__', '__contains__', '__delattr__', '__delitem__', '__delslice__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getslice__', '__gt__', '__hash__', '__iadd__', '__imul__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__rmul__', '__setattr__', '__setitem__', '__setslice__', '__sizeof__', '__str__', '__subclasshook__', 'append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort']

TOC

Tips#12. Simplify If Statement.

To verify multiple values, we can do in the following manner.

if m in [1,3,5,7]:

instead of:

if m==1 or m==3 or m==5 or m==7:

Alternatively, we can use ‘{1,3,5,7}’ instead of ‘[1,3,5,7]’ for ‘in’ operator because ‘set’ can access each element by O(1).

TOC

Tips#13. Detect Python Version At Runtime.

Sometimes we may not want to execute our program if the Python engine currently running is less than the supported version. To achieve this, you can use the below coding snippet. It also prints the currently used Python version in a readable format.

import sys

#Detect the Python version currently in use.
if not hasattr(sys, "hexversion") or sys.hexversion != 50660080:
    print("Sorry, you aren't running on Python 3.5\n")
    print("Please upgrade to 3.5.\n")
    sys.exit(1)
    
#Print Python version in a readable format.
print("Current Python version: ", sys.version)

Alternatively, you can usesys.version_info >= (3, 5) to replacesys.hexversion!= 50660080 in the above code. It was a suggestion from one of the informed reader.

Output when running on Python 2.7.

Python 2.7.10 (default, Jul 14 2015, 19:46:27)
[GCC 4.8.2] on linux
   
Sorry, you aren't running on Python 3.5

Please upgrade to 3.5.

Output when running on Python 3.5.

Python 3.5.1 (default, Dec 2015, 13:05:11)
[GCC 4.8.2] on linux
   
Current Python version:  3.5.2 (default, Aug 22 2016, 21:11:05) 
[GCC 5.3.0]

TOC

Tips#14. Combining Multiple Strings.

If you want to concatenate all the tokens available in a list, then see the below example.

>>> test = ['I', 'Like', 'Python', 'automation']

Now, let’s create a single string from the elements in the list given above.

>>> print ''.join(test)

TOC

Tips#15. Four Ways To Reverse String/List.

# Reverse The List Itself.

testList = [1, 3, 5]
testList.reverse()
print(testList)

#-> [5, 3, 1]

# Reverse While Iterating In A Loop.

for element in reversed([1,3,5]): print(element)

#1-> 5
#2-> 3
#3-> 1

# Reverse A String In Line.

"Test Python"[::-1]

This gives the output as ”nohtyP tseT”

# Reverse A List Using Slicing.

[1, 3, 5][::-1]

The above command will give the output as [5, 3, 1].

TOC

Hope you liked it.

If you want to learn how to code, taking your first steps into this huge universe might seem like a daunting, if not intimidating task. Here’s the big secret: There are plenty of free (and inexpensive) resources you can use to give yourself all the help you need, teach yourself new techniques, and make this learning process fun and exciting—as exciting as coding can get, at least.

Whether you’re an adult looking to transition into the tech industry, a student looking to learn the latest language, or a hobbyist who just wants to understand how software and services work, all you need is a computer and internet access to start your programming journey. But before you take a flying leap into The Matrix, here are our best tips and resources to set you off on the right foot.

Ask yourself: Why do you want to learn how to code?

Take a few minutes (or a day) to think about the reasons—the real reasons—why you want to learn a programming language. Be honest with yourself. Are you trying to learn the barest minimum to score a promotion? Are you looking to make a big career change? Do you want to create the next greatest app? Thrill your roommates by programming your various smart devices to do something awesome?

Your answer can help determine which programming language(s) you should master, as well as what sort of commitment (in time and money) your goal may require. For example, if your dream is to create the next great operating system or a killer alternative to PhotoShop , you would benefit from a formal computer science education that teaches you C++, as well as more complex topics like data structure, algorithms and memory allocation.

On the other hand, if you’re a mid-career professional looking to transition into a tech career, a short-term coding bootcamp might make more sense than going into debt for a second degree. If all you want to do is build websites or push your Raspberry Pi to its limits, a combination of interactive tutorials and free online courses might be enough to get you going.

Choose the right programming language

Once you figure out why you want to code, you can more easily pinpoint which programming language you should tackle. While there is no single “best” programming language to learn, some languages are more user-friendly than others. HTML and CSS are considered the easiest entry points into the coding world, but they are only really useful for developing basic websites.

For more interactive websites involving payment systems or databases, you’ll need to know Javascript, PHP, SQL, and Python to make all the components sing. Mobile app makers use Swift or C to make iOS apps, and Java or Kotlin for Android apps. Video game developers will turn to Unity, or even C#, to bring their game ideas to life.

Still can’t decide on your starter programming language? Most professionals recommend learning Python, C#, or JavaScript, as they offer the widest utility and career flexibility. To help you make up your mind, check out this great infographic that compares a few popular programming languages.

Above all else, just get started learning something. Once you become comfortable with one programming language, you’ll be able to pick up the next one that much faster—like learning a new musical instrument or foreign language.

Try out some online courses

If you want more control over your learning schedule (or don’t want to go at it alone), an online coding course might be a better option than an in-person coding bootcamp. However, there are many different online classes that teach the same programming languages, and it can be hard to figure out which one is truly worth your time and money.

If you don’t mind practicing solo, check out The Odin Project, a free option that pulls together some of the best open-source content for turning a coding newbie into a programmer.

Thanks to the internet, you don’t have to enroll in a four-year college program to learn the fundamentals of computer science; a number of college-level classes are available online for free (or a nominal fee).

I can’t recommend Harvard’s CS50x Introduction to Computer Science enough. You can audit the course for free via edX and earn a certificate by completing all the assignments, or you can go at your own pace and watch all the lectures posted on Youtube. You can build your own DIY college-level computer science program with this selection of fifteen online courses (many of which are also listed in our Lifehacker U series)

Get a book

The best way to learn to code may involve you getting up-close-and-personal with some dead trees—a real book that you can follow along from beginning to end. In a perfect world, this will give you a more comprehensive introduction to coding than jumping around from topic to topic on a website

You can probably find an e-book for any language or framework you’re trying to learn on GitHub, but many web developers swear by Jon Duckett’s colorful series on everything from front- to back-end web development.

As a self-taught programmer, you might also benefit from books that offer broader advice on the profession. You’ll improve your thinking and habits, traits you can apply to any language you decide to learn. Steve McConnell’s 900-page Code Complete: A Practical Handbook of Software Construction (2nd Edition) is considered the definitive guide for best practices, with data-backed advice on everything from project design to debugging code.

A corollary to that behemoth is Clean Code: A Handbook of Agile Software Craftsmanship by “Uncle Bob” Robert Martin. Martin believes code should be efficiently written for easy testing and scalability, making this a must-read for many modern dev teams.

Since programming is really about problem solving, you’ll appreciate the thought process and “back of the envelope” solutions that Jon Bentley shares in Programming Pearls (2nd Edition). Every chapter ends with a number challenges that are often used in technical job interviews, so make this book part of your job prep.

Check out some interactive tutorials or coding games

Let’s face it: reading lines of code on a screen or in a book can look like gibberish. When you see an example in action, that abstract concept suddenly makes perfect sense. That’s the beauty of interactive coding tutorials you can find around the web.

For example, FreeCodeCamp not only breaks down coding concepts into small chunks within your web browser, it also pairs each concept with a relevant exercise that you have to solve before moving onto the next topic. This way, you can’t just skip ahead to the fun stuff; the site really forces you to debug your code as you learn.

Thank you

HOPE YOU liked IT.

HPC and AI Are Changing the World

enterprises can gain a competitive advantage with hpc and ai applications

During the recent SC19 supercomputing conference, the top semiconductor and systems vendors discussed and demoed the highest-performance computing solutions in the world. While it’s easy to imagine these platforms solving some of the most challenging problems, and simulating everything from the human genome to climate change, there are thousands of other applications that can benefit from HPC as well.

Enterprises are rushing to push data, applications and IP services to the cloud, but perhaps more companies should consider how they can use HPC and AI to improve their organization’s operational and competitive advantage.

Rapid Pace of Advancement

With the ever-increasing amount of data from the environment — sensors, connected machines, and a variety of other sources — a new challenge has arisen: how to process and understand all this information in a meaningful way.

There are early examples across a wide range of applications:

  • Banks and financial institutions are using HPC and AI for threat detection;
  • Internet and advertising companies are using it for targeted ads;
  • Insurance companies are using it for risk assessment;
  • Healthcare organizations are using it for detection and treatment of cancer and other ailments;
  • Chip companies are using it for new chip designs; and
  • farmers are using it to improve crop yields.

Because of the rapid pace of technology, the chip and systems companies that do not offer HPC or AI solutions may not be relevant in the next five years. Because of the technology race, HPC and AI solutions and intellectual property are more accessible now than ever before.

Similarly, those research organizations and enterprises that do not use HPC and AI also will become irrelevant in the future. Even universities must consider using HPC and AI to remain competitive.

One of the major sources of federal funding for university research is the National Science Foundation, which specifies that when it evaluates project proposals it looks for radically different approaches, applies new expertise, or engages novel disciplinary or interdisciplinary perspectives.

Many of the recent grants have targeted projects leveraging HPC and AI.

IBM, Nvidia Use Cases

IBM, one of the world’s largest IT technology and services providers and a leader in HPC and AI, published several use cases on how customers are leveraging HPC and AI. In each case, the organizations leverage IBM’s AC922 server platform with Nvidia GPU acceleration.

Vision Blanco, a Paraguay financial intuition, is using AI to extend the ability of its existing infrastructure to support more small- and medium-sized businesses by better evaluating credit risk.

Bridger Pipeline is using it to improve response time to oil pipeline leaks. The benefit is an improvement of the detection of leaks by one-fifth, while reducing the number of false detections. This not only improves the performance of the pipeline, but also reduces the risk to the environment and the general public.

Oxford Cancer Biomarkers are using AI to detect colorectal cancer sooner to save lives and to reduce medical costs.

One of the most interesting applications is The Harry Butler Institute’s use of image detection and recognition with AI to detect threat species on Barrow Island, a nature reserve off the west coast of Australia.

Innovative Applications

AI also improves AI — as we are starting to see. Many semiconductor companies have indicated that they are using AI in the layout/design of new chips. AI may be used in the specification of new chips in the future.

In another example, the Oak Ridge National Laboratory is using data from the 4,608 node Summit supercomputer, one of the most powerful supercomputers in the world, to improve the cooling and overall efficiency of the platform.

By combining real-time data from the IBM AC922 servers with local weather and data from the cooling plant, both the performance of Summit and the cooling plant are optimized for maximum efficiency and peak performance.

SC19 offered the latest information about new chips, new systems, and the Top-500 supercomputer rankings. However, at the end of the day, what matters most is not the performance crown, but what we can do with HPC and AI. Ultimately, it’s those innovations that will change businesses and society.

HOPE YOU LIKE IT.

HPE says its ssd’s will fail at 32,768 hours unless patched.

Hewlett Packard Enterprise said that certain SAS solid state drives would fail once they hit their 32,768th hour of operation—that’s 3 years, 270 days, and 8 hours—unless their firmware is upgraded to version HPD8.

The company says a manufacturer notified it of a firmware defect in certain solid state drives used in server and storage products on November 15.

While those who backed up their data on different drives will be able to recover it, anything on the affected HPE SSDs will be gone forever. “After the SSD failure occurs, neither the SSD nor the data can be recovered,” the company ominously warned.

HPE never said why the drives fail at exactly 32,768 hours, but PCMag speculates that it’s related to an integer overflow bug, as the number 32,768 is the maximum negative integer a 16-bit computer can process, and 32,767 is the maximum positive integer.

Some of the SSD models already received a patch on November 22, while a patch for a second set of drives will arrive on the week starting December 9.

Links to the firmware download and instructions on how to apply the update are available from HPE’s advisory. There’s also a link to determine an SSD’s total power-on hours.

“By disregarding this notification and not performing the recommended resolution, the customer accepts the risk of incurring future related errors,” wrote HPE.

Tesla recieves over 200,000 pre orders for this truck.

What just happened? Tesla’s Cybertruck unveiling wasn’t without its faults, but it did manage to garner a lot of interest from early adopters, over 200,000 of whom placed pre-orders for the electric pickup over the weekend.

It’s fairly easy to imagine the hype when Elon Musk gets onstage with an electric pickup nearly as divisive as the man himself. Although Tesla’s stock price dipped by 6 percent after the Cybertruck’s recent unveiling, pre-orders continued to pile up over the weekend and reached an impressive 200,000 as of Sunday night.

The pickup is still a few years away, but the company’s marketing and the lower price of admission have resulted in a healthy number of prospective buyers. Keeping them as such would be a challenge for Tesla, as the company’s track record of actually delivering its cars on schedule has run into various issues in the past, leading many to cancel their reservations last year after running out of patience for the Model 3 to make it to their driveways.

Nevertheless, the pickup truck remains a favorite class of vehicle among US buyers, most of whom are likely behind these pre-order figures. It also helps that the $100 refundable fee needed to reserve the Cybertruck is Tesla’s lowest price yet, as compared to the $1,000 deposit required for the Model 3 and the $2,500 fee for the Model Y SUV.

Reaching such a high number of pre-orders for the Cybertruck was made possible “with no advertising & no paid endorsement” boasted Musk on Twitter, but then that duty was taken over by the internet itself, which unleashed a sea of Cybertruck memes over the weekend and made sure the electric pickup remained a hot topic of most discussions, online and offline.

Highlighting the Cybertruck’s utility and speed, Musk compared it to America’s current favorite pickup and one of the world’s best sports cars, calling it a “better truck than an F-150 [and] faster than a Porsche 911.” For what it’s worth, he also shared a brief clip of the Ford pickup being pulled uphill by the supposedly more powerful and heavier Cybertruck.

Although Tesla’s latest product might not be to everyone’s taste, the company can certainly do with the $20 million or so which it has generated through the Cybertruck’s pre-orders in such a short period. The company has only managed to record five profitable quarters to date, including its latest Q3’19, and the Cybertruck could potentially provide a much needed, if temporary, financial relief.

Also, unlike the Model 3 that was touted as the cheapest Tesla but launched with its most expensive trim, the Cybertruck will be made the other way round. Its cheaper single and dual-motor versions will be produced initially in the latter part of 2021, followed by the flagship tri-motor spec that’s expected to arrive no sooner than late 2022.

HOPE YOU ALL LIKED IT.

Design a site like this with WordPress.com
Get started