Python – Kirk Byers Course Week 1 Part 1

This post is the first one going through the Kirk Byers Python for Network Engineers class.

In the first class Kirk shows how to pipe data into Python by using the module fileinput with the following code(modified for Python3):

import fileinput

for line in fileinput.input():
	print(line.split("."))

I’ll show what this script outputs and then we’ll look at the code.

daniel@daniel-iperf3:~/python/Week1$ echo "192.168.1.1" | python3 stdin.py
['192', '168', '1', '1\n']

How did we get data into Python? We used “echo” to send data to stdin (standard input). The function “fileinput.input()” can take either files as arguments or if no files are listed it will read from stdin.

It’s possible to use “fileinput” to read from several files and print out the content. We used the following code:

import fileinput

for line in fileinput.input():

Then we print out the text:

daniel@daniel-iperf3:~/python/Week1$ python3 stdin.py 1.txt 2.txt 
1

2

3

4

5

6

7

8

9

10

daniel@daniel-iperf3:~/python/Week1$ cat 1.txt
1
2
3
4
5
daniel@daniel-iperf3:~/python/Week1$ cat 2.txt
6
7
8
9
10

Here we printed the contents of two files by sending them to “fileinput” We can see what Continue reading

Response: Four Ways to Tackle H-1B Visa Reform – IEEE Spectrum

A balanced discussion on the merits of the US H1B visa program. These programs exist in most developed nations, and the same issues apply.

As you would expect, the program is used to benefit some companies and abused by others:

Giants like Amazon, Apple, Google, Intel, and Microsoft were all among the top 20 H-1B employers in 2014, according to Ron Hira, professor of political science at Howard University who has testified before Congress on high-skill immigration. The other fifteen—which include IBM but also consulting firms such as Tata Consultancy, Wipro, and Infosys—used the visa program mainly for outsourcing jobs.

On the whole, modern IT is changing much faster and automation is replacing most of the tasks the outsourcing does today. The era of oursourcing ended about 3 years ago, it will take several years for the market at large to catch up to this fact though.

Four Ways to Tackle H-1B Visa Reform – IEEE Spectrum : http://spectrum.ieee.org/tech-talk/at-work/tech-careers/four-ways-to-tackle-h1b-visa-reform

The post Response: Four Ways to Tackle H-1B Visa Reform – IEEE Spectrum appeared first on EtherealMind.

US chipmaker plans new factory in China

GlobalFoundries will open a new factory to make cheap wireless chips in Chengdu, China, next year.The chipmaker, once part of microprocessor designer AMD, also plans to expand production at existing fabrication plants in the U.S., Germany, and Singapore, it said Friday. It makes chips for AMD, IBM, Qualcomm, and Mediatek, among others.Beginning next year, the new fab in China, a joint venture with the municipality of Chengdu, will produce chips on 300-millimeter wafers using standard manufacturing techniques, the company said.Sometime in 2019, it will switch to a different manufacturing process, FD-SOI (fully depleted silicon on insulator), which GlobalFoundries calls 22FDX. That process is particularly suitable for the low-cost manufacture of the radio-frequency chips used in smartphones, cars, and the internet of things, the company said.To read this article in full or to leave a comment, please click here

IDG Contributor Network: Artificial intuition will supersede artificial intelligence, experts say

Artificial intelligence (AI) is so last year, according to some experts.Scientists at MIT this week claimed a breakthrough in how human intuition can be added to algorithms. And in a separate, unrelated report, Deloitte Consulting is chastising the business community for not comprehending fully that new, cognitive computing technology should be exploited.“Artificial intelligence is only the beginning,” researchers write in a Deloitte University Press article about Deloitte's February study.+ Also on Network World: Using artificial intelligence to teach computers to see + “Advanced cognitive analytics” is just one of the “fast-evolving” technologies businesses need to get a handle on, they say. A kind of artificial intuition and cognition through algorithms is one part of that machine intelligence (MI). Notably, it’s not AI. MI is more cognitive and mimics humans, the firm explains, while AI is simply a subset of MI.To read this article in full or to leave a comment, please click here

IDG Contributor Network: Artificial intuition will supersede artificial intelligence, experts say

Artificial intelligence (AI) is so last year, according to some experts.Scientists at MIT this week claimed a breakthrough in how human intuition can be added to algorithms. And in a separate, unrelated report, Deloitte Consulting is chastising the business community for not comprehending fully that new, cognitive computing technology should be exploited.“Artificial intelligence is only the beginning,” researchers write in a Deloitte University Press article about Deloitte's February study.+ Also on Network World: Using artificial intelligence to teach computers to see + “Advanced cognitive analytics” is just one of the “fast-evolving” technologies businesses need to get a handle on, they say. A kind of artificial intuition and cognition through algorithms is one part of that machine intelligence (MI). Notably, it’s not AI. MI is more cognitive and mimics humans, the firm explains, while AI is simply a subset of MI.To read this article in full or to leave a comment, please click here

Intel demotes PCs, giving datacenter chips first crack at new technologies

With Intel’s forecasts projecting the PC could be the smallest moneymaker five years from now, the company has gone “data center first”—giving Intel’s server business first crack at new manufacturing technologies.It’s another sign of massive change within Intel, as the traditional PC business is shoved to the side. In a slide presented during Intel’s investor day on Thursday, the company showed off how the total available market (TAM) for its PC CPU business was just $30 billion or so, less than half that of the data center.The TAM, as its known, projects the maximum available revenue Intel could pull in if it owned the entire market—which won’t happen. It’s an excellent guide to which segments Intel is prioritizing, however: the data center, non-volatile memory like flash and its new Optane, plus mobile communications and various embedded segments. To read this article in full or to leave a comment, please click here

Trump eyes end to an H-1B system that favors largest outsourcers

The outcome of the annual H-1B visa lottery is immigration's Groundhog Day. It's the same result year after year, as the large outsourcing firms continue to lead all others in getting H-1B visas.But this year may be different, because of President Donald Trump.[ Join the discussion at Computerworld's H-1B & IT Outsourcing group on Facebook. ] The H-1B lottery favors large firms. In the 2015 fiscal year, for instance, the top 10 firms received 38% of all the H-1B visas in computer occupations alone. All these firms, except for Amazon and to a partial extent IBM, are outsourcers. These large companies have the resources to submit enough visa applications to help ensure they receive a bare minimum of approvals.To read this article in full or to leave a comment, please click here

Are companies doing enough on the IoT security front?

We continue to hear dire warnings about the inherent security risks of the Internet of Things (IoT), and indeed IoT-related incidents are happening. With many companies beginning to capture IoT data from connected devices, a key question is are they doing enough to ensure that data and networks are secure?If security executives thought they had a lot to handle with the growth of mobile devices and the expanding digital enterprise, the emergence of connected products, corporate assets, vehicles and other “things” is taking security coverage to a whole new level.A December 2016 study by the Institute for Critical Infrastructure Technology (ICIT) — a cyber security think tank that acts as a conduit between private sector companies and U.S. federal agencies, points out how vulnerable enterprises are to attacks such as distributed denial of service (DDoS) via IoT.To read this article in full or to leave a comment, please click here

Are companies doing enough on the IoT security front?

We continue to hear dire warnings about the inherent security risks of the Internet of Things (IoT), and indeed IoT-related incidents are happening. With many companies beginning to capture IoT data from connected devices, a key question is are they doing enough to ensure that data and networks are secure?If security executives thought they had a lot to handle with the growth of mobile devices and the expanding digital enterprise, the emergence of connected products, corporate assets, vehicles and other “things” is taking security coverage to a whole new level.A December 2016 study by the Institute for Critical Infrastructure Technology (ICIT) — a cyber security think tank that acts as a conduit between private sector companies and U.S. federal agencies, points out how vulnerable enterprises are to attacks such as distributed denial of service (DDoS) via IoT.To read this article in full or to leave a comment, please click here

Video: Simplify BGP Configurations

Running BGP instead of an IGP in your leaf-and-spine fabric sounds like an interesting idea (particularly if your fabric is large). Configuring a zillion BGP knobs on every box doesn’t.

However, BGP doesn’t have to be complex. In the Simplify BGP Configurations video (part of leaf-and-spine fabric designs webinar) Dinesh Dutt explains how you can make BGP configurations simple and easy-to-understand.

Intel’s priciest chip has 24 cores and sells for $8,898

No Intel chip is as expensive as the new Xeon E7-8894 v4 server processor.The US$8,898 Xeon chip has massive horsepower with 24 cores, 60MB of cache and a maximum clock frequency of 3.4GHz. Intel said this is the company's fastest server chip, breaking enterprise application speed records.The company's next expensive chip after the E7-8894 v4 is its other 24-core processor, the Xeon E7-8890 v4, which is priced at $7,174. The chips have similar features except for the base clock speed. The new chip starts at 2.4GHz compared to 2.2GHz for the less expensive chip.The $8,898 chip even outprices Intel's fastest supercomputing chip, the Xeon Phi 7290F, which is priced at $6,401. It is also over four times more expensive than the costliest PC chip, the $1,723 Core i7-6950X for gaming desktops.To read this article in full or to leave a comment, please click here

Apple’s iCloud saved deleted browser records, security company finds

Apple’s iCloud appears to have been holding on to users’ deleted internet browsing histories, including records over a year old.Moscow-based forensics firm Elcomsoft noticed it was able to pull supposedly deleted Safari browser histories from iCloud accounts, such as the date and time the site was visited and when the record was deleted.“In fact, we were able to access records dated more than one year back,” wrote Elcomsoft’s CEO Vladimir Katalov in a Thursday blog post.Users can set iCloud to store their browsing history so that it's available from all connected devices. The researchers found that when a user deletes that history, iCloud doesn't actually erase it but keeps it in a format invisible to the user.To read this article in full or to leave a comment, please click here

Apple’s iCloud saved deleted browser records, security company finds

Apple’s iCloud appears to have been holding on to users’ deleted internet browsing histories, including records over a year old.Moscow-based forensics firm Elcomsoft noticed it was able to pull supposedly deleted Safari browser histories from iCloud accounts, such as the date and time the site was visited and when the record was deleted.“In fact, we were able to access records dated more than one year back,” wrote Elcomsoft’s CEO Vladimir Katalov in a Thursday blog post.Users can set iCloud to store their browsing history so that it's available from all connected devices. The researchers found that when a user deletes that history, iCloud doesn't actually erase it but keeps it in a format invisible to the user.To read this article in full or to leave a comment, please click here

iPhone 8 Rumor Rollup: The $1K iPhone, early birds & a brand new concept design video

The iPhone could really go back to becoming a status symbol if the latest iPhone 8 rumors prove true. Grabbing attention this week is a Fast Company article, headlined "Here's why Apple's 10th anniversary iPhone will likely cost more than $1,000," in which a source says the 5.8-inch iPhone 8 is going to be packed with new features. Those include a wraparound OLED display, more memory and possibly 3D sensing technology for security. (This concern about pricing has been a hot topic of late: See iPhone 8 Rumor Rollup -- Paying the Price for Cool.)To read this article in full or to leave a comment, please click here

Getting Down To Bare Metal On The Cloud

When you think of the public cloud, the tendency is to focus on the big ones, like Amazon Web Services, Microsoft Azure, or Google Cloud Platform. They’re massive, dominating the public cloud skyline with huge datacenters filled with thousands of highly virtualized servers, not to mention virtualized storage and networking. Capacity is divvied up among corporate customers that are increasingly looking to run and store their workloads on someone else’s infrastructure, hardware that they don’t have to set up, deploy, manage or maintain themselves.

But as we’ve talked about before here at The Next Platform, not all workloads run

Getting Down To Bare Metal On The Cloud was written by Jeffrey Burt at The Next Platform.

Hospital devices left vulnerable, leave patients at risk

A patient lies in a hospital bed waiting for a medical professional to conduct a blood gas analysis. Little does the patient know that his personal information is also undergoing a procedure.The database that stores patient data was found unencrypted, default passwords were used, and the nature of the exploit was basic, according to TrapX Security, which was called in later to recreate and diagnose the issues at the unnamed hospital. The technology research company recently released its findings in a report called "Anatomy of an Attack – Medical Device Hijack (MEDJACK)". The security company declined to name the three hospitals it examined, except to say they were located in the Western and Northeastern U.S.To read this article in full or to leave a comment, please click here

Hospital devices left vulnerable, leave patients at risk

A patient lies in a hospital bed waiting for a medical professional to conduct a blood gas analysis. Little does the patient know that his personal information is also undergoing a procedure.The database that stores patient data was found unencrypted, default passwords were used, and the nature of the exploit was basic, according to TrapX Security, which was called in later to recreate and diagnose the issues at the unnamed hospital. The technology research company recently released its findings in a report called "Anatomy of an Attack – Medical Device Hijack (MEDJACK)". The security company declined to name the three hospitals it examined, except to say they were located in the Western and Northeastern U.S.To read this article in full or to leave a comment, please click here

‘Fileless malware’ attacks, used on banks, have been around for years

Fileless malware attacks, which were recently discovered in the networks of at least 140 banks, telecoms and governments, account for about 15% of known attacks today and have been around for years in different forms."Fileless malware attacks are becoming much more common and circumvent most of the endpoint protection and detection tools deployed today," Gartner security analyst Avivah Litan said.A recent discovery of fileless malware was reported on Wednesday by researchers at Moscow-based Kaspersky Labs. The attackers have not been identified and "attribution [is] almost impossible," according to Kaspersky.To read this article in full or to leave a comment, please click here