Web hosting

Sunday, January 14, 2018

ASX Stock Market Analysis Script, Random Stuff, and More

- wanted to test a theory of mine regarding the ASX stock market. Download results and script here:
- details are as follows:
# I wanted to know basic long term data about price movement from the ASX
# based on information that I found online at the following site:
# https://www.asxhistoricaldata.com/
# https://www.asxhistoricaldata.com/archive/
# The basic results of were calculated by extracted files from the following
# archives. Then running this script across them.
# 1997-2006.zip
# 2007-2012.zip
# 2013-2016.zip
# Basic data says that about a small proportion of ASX stocks go up over 
# given period, many go down over given period, while the most/rest go 
# off market. Data is obviously included in this archive. Clearly 
# indicates that picking shares isn't as easy as it sounds on the ASX
# (even for professionals who deal with IPOs in the first place).
# $ tail -n 4 results-*
# ==> results-19970102-20061229.dat <==
# [Total Stocks] - 731
# [Total Up] - 135
# [Total Down] - 84
# [Total Off] - 512
# ==> results-20070102-20121231.dat <==
# [Total Stocks] - 1452
# [Total Up] - 168
# [Total Down] - 401
# [Total Off] - 883
# ==> results-20130102-20161230.dat <==
# [Total Stocks] - 1284
# [Total Up] - 373
# [Total Down] - 320
# [Total Off] - 591
# There is stodgy data in 2013 to 2016 period but I haven't really
# bothered to look further as this was mainly about checking a theory
# that I was interested in and overall results/data output seem fine.
# As this is the very first version of the program it may be VERY buggy. 
# Please test prior to deployment in a production environment.
- this is obviously a continuation of my posts on financial trading:

Random Stuff:
- as usual thanks to all of the individuals and groups who purchase and use my goods and services
- I've been thinking about building a Chess AI for a little while now. Depending on how you build it things can get pretty complex fairly quickly. Complexity/goodness of system is dependent on the way you think. Play enough games you'll realise that certain moves become a given (they're the only logical moves that are left available) when certain situations arise. You actually need multi-level/step thinking in a Chess AI for this particular reason
open source python chess game
Sunfish: A simple but strong chess engine in 111 lines of Python
bash chess game
open source bash chess
open source python chess
- latest in science and technology
Tutorial - Android & Lazarus for novices like me
laztoapk and laz4android
- latest in finance and politics
- latest in defense and intelligence
- latest in animal news
- latest in music and entertainment

Random Quotes:
- Burke, he shorthanded, defined the duty of an MP accordingly: "I'm not your facsimile, I'm not going to do whatever you tell me to do, what I owe you is my judgment, my intellect".

There's never been any doubt about Turnbull's intellect – nor any danger of the member for Wentworth being mistaken as a "facsimile" of the ordinary man. His judgment, however, is more contestable.
- Konopka said patients prefer her practice compared to big hospitals because of the individual attention they receive.
Doctors at hospitals look at computers all the time, Konopka said, and rely on them, instead of their intellect, for diagnoses and guidelines to prescribing medications. She called that system expensive and harmful to patients. The doctors have no contact with the patients, she said.
"They practice electronic medicine, I practice medical art," she said. "I treat the patient. And I'm not going to compromise the patient's health or life for the system."
- During the Vietnam War, the American aircraft famously did this repeatedly over the Ho Chi Minh Trail that snaked from North Vietnam south through Laos. The United States also saturated the area with small landmines, irritating chemicals, and even a powder that was supposed to create permanent, made-made “mud” to slow down enemy personnel and vehicles. More infamously, the U.S. military sprayed copious amounts of toxic herbicides, including a mixture called Agent Orange, to deny cover to insurgent forces.
- Excess body weight is another major factor, accounting for 7% of cancer cases and 6% of all deaths, according to the study. Alcohol use, exposure to ultraviolet radiation, physical inactivity, consumption of red and processed meats, and low consumption of fruits and vegetables, fiber and calcium are also listed as "major, potentially modifiable exposures." Taken together, alcohol consumption, excess body weight, poor diet and physical inactivity account for roughly 18% of all cancer cases and 16% of deaths.
- It is double pleasure to deceive the deceiver.
- "A CIA Study Group believed that the Soviets could use UFO reports to touch off mass hysteria and panic in the United States. The group also believed that the Soviets might use UFO sightings to overload the US air warning system so that it could not distinguish real targets from phantom UFOs," admitted the CIA in a 2007 article.
- The Kosovo campaign was an embarrassment for NATO tactical air power. NATO completely failed to inflict serious casualties on Serbian forces. It was NATO attacks on Serbian economic targets that brought them to it's knees. We reverted to the origins of air force thinking, strategic bombing. We hit Serbian chemical plants, urban transportation targets, The studios of Serbian national television were hit. Our objective was to make the Serbian civilian population suffer, and force their government to end the war, and it worked.

A decade later Israel found itself in a similar situation. They were under heavy rocket attack from Hezbollah in Lebanon. Israeli air and artillery forces were tasked with suppressing the threat. They failed utterly to destroy the rocket launchers. They decided to take the advice of gen Billy Mitchell and reverted to a strategic bombing campaign. Lebanon was made to suffer with massive attacks on it's transportation network. Hezbollah lost it's popularity for bringing economic ruin on the country. Internal political pressure forced Hezbollah to end the war, and assure both Israel, and the government in Beirut that they wouldn't do it again, at least anytime soon.

Back in Desert Storm the 100 hour ground war destroyed more Iraqi tanks, and other weapons then 6 weeks of bombing did. The army drove the Iraqi's out of Kuwait, something the air force failed to do. All this recent experience should teach us that air power acting on it's own cannot defeat a determined dug in enemy army. Tactical air power is most effective when employed in conjunction with ground, and naval forces. Recent history tells us those thinking that air power alone will be able to neutralize NK missile, rocket, and artillery forces are almost certainly mistaken.
- "Everything I had ever learned about air fighting taught me that the man who is aggressive, who pushes a fight, is the pilot who is successful in combat and who has the best opportunity for surviving battle and coming home."
-- Major Robert S. Johnson, USAAF
- Roughly, you need around four squadrons in total to sustain one squadron at sea: one squadron aboard the Big Grey War Canoe™; one squadron that has just come off the Big Grey War Canoe™; one squadron at home on leave; and one squadron working up ready to take its turn aboard the aircraft carrier. The maths is not precise; in the modern armed forces, aircraft are pooled instead of being issued to particular squadrons for their exclusive use, while experienced personnel whose skills are in short supply may be unlucky and end up with back-to-back deployments.
-    Currently 54% of the world’s population lives in countries with currencies in circulation worth less than the value of bitcoin.
    If the price of bitcoin rises to $15,000 it will overtake the value of all Indian rupee banknotes and coins in circulation to become the fifth most valuable currency. Given its recent growth rate this could happen within the next month.
    However, bitcoin’s price needs to increase to a staggering US$72,300 to overtake the Euro and become the second most valued currency.
    To beat the US dollar, in terms of circulation value, it would need to increase in price to at least US$85,160.
    At a price of US$458.82 the total market cap of ethereum stands at US$44 billion, making it the 17th most valuable currency, worth more than the value of all banknotes and coins in circulation of countries such as Turkey (US$36 billion) and Singapore (US$27 billion).
    Bitcoin cash’s current price of $1,425.21 gives it a market cap of US$24 billion, making it the 20th most valuable currency, worth more than all Swedish Krona (US$9 billion) or South African rand (US$6 billion) banknotes and coins.
    Ripple just missed the top 20 with a value of US$10 billion, but was ahead of krona or rand.

Saturday, January 13, 2018

Alternative Android (from Android Studio) Development, Random Stuff, and More

- this is obviously a continuation of my Android and Mobile Application development series of posts:
- looked for complete Linux distributions with Android development capabilities built in. Haven't really found any. Mostly for development of Android platform itself. Not actual distribution for Android application development
android studio linux live distribution
- as I've said previously there are a few alternatives besides the straight Android Studio Development Toolkit that Google offers if you're into Android development. Some of them are even cross platform as well?
- one of the things that I've found to be truly remarkable is that some of them are 'really small' and completely independent of Android Studio. RFO Basic relies on the RFO Basic programming language. Development environment is really tiny but code is horrible to look at (nothing like Visual Basic if that's what you're thinking). Reminds me of going back to 'BASIC' and even 'Assembly' at times (look at some of the sample code for more complex programs and you'll understand what I mean)?
- you can sort of get away with modifying APK files instead of creating from scratch (but not completely)? Basically, extract APK, modify relevant key files, re-archive, re-sign, etc... Not as trivial as you'd like it to be... Following Lazarus link tells you how things sort of work under the hood... Half curious whether you can wrap any arbitrary language around Android toolkit to allow any language to run on it (guess it's sort of allowed if you look through my previous research?)?
change executable inside apk
- the frustrating thing about some of the options out there is that they are effectively an overlay over Android Studio. Underneath it all is still the Android Studio that developers have grown to love or hate. The interesting thing about HyperNext-Android-Creator and RFO-Basic is how they seem to be built. They take core pieces from Android Studio and then use them to their own end to allow people to achieve the same thing in a smaller footprint. That's why B4A, Lazarus, Xamarin, etc... are so frustrating. You still need to get the entire Android Studio framework running in the background. If you've ever worked with it for long enough you'll know that maintenance of it can be 'intensive' at times especially if you want portable code that will work across many platforms. The other fascinating thing about some of these operations is that they are effectively 'single man' commercial entities. A side project of some sort?
- cleanest mechanism by far thus far that I've seen is a Virtual Machine image setup
- there's a lot of sample code out there. Use the usual tools to mirror/download content and sample code. Namely mass down loaders, crawlers, etc...
android medical and health apps? 
android pedometer source code
android music player source code
android scrolling game source code
android football manager source code
android torch sourcecode coloured
android torch sourcecode
android games sourcecode
- there are options to program entirely on the Android device itself. If you've ever worked on a small form factor device you'll realise how unrealistic this is over the long term though. Screen is too small, it's not easy to program on a keyboard that has no tactile feel, etc...
9 ways to program for Android devices using Android devices
- if you don't already know downloads of APK's from Google Play store aren't really allowed. Only options are to backup APKs when you're on Android device, third party APK download sites (which often lack the range of the actual Google Play Store), and there seems to be mirrors of Google Store for free apps all over the place? The interesting thing for me is that some of them seem to be implying that they have somehow found direct links to the Google Play Store? I wanted to figure out how they worked...
- most of them rely on PHP so possible analysis options are limited.  I looked around for offline options but there aren't all that many... I decompiled the code (use procyon to extract Java code from a jar file) for APKDownloader.jar and found out that it basically logs into the Google Play store and basically emulates a device which can then download an APK. Not really that sophisticated but then again who needs complexity when it's un-required?
procyon -jar APKDownloader.jar -o output
Decompiling apkdownloader/APKDownloaderAboutBox...
Decompiling apkdownloader/APKDownloaderApp...
Decompiling apkdownloader/APKDownloaderView...
Decompiling apkdownloader/DownloadBox...
Decompiling apkdownloader/MyTableRenderer...
Decompiling apkdownloader/Option...
Decompiling apkdownloader/PutAName...
Decompiling apkdownloader/RenameOption...
Decompiling apkdownloader/ScanOption...
Decompiling apkdownloader/UpdateSoftware...
Decompiling apkdownloader/dao/ConvertURL...
Decompiling apkdownloader/dao/ListAppsDAO...
Decompiling apkdownloader/dao/MyTableFilter...
Decompiling apkdownloader/dao/ScanFolderDAO...
Decompiling apkdownloader/entities/Config...
Decompiling apkdownloader/entities/CustomLocale...
Decompiling apkdownloader/model/ListAppsModel...
Decompiling apkdownloader/model/ScanFolderModel...
- I've been looking up more to do with Kivy. Nothing seems 'easy'. Everything seems so painful because it feels like hack after hack after hack...
include arbitrary python library with kivy
- sample code options for Kivy. In spite of significantly larger then average APK's for Kivy and pain in getting the toolchain setup you have to admit that it's so much more aethetically pleasing at Python code sometimes?
kivy midi applications
python random riff generator
game simulator python kivy
automated job application software
game simulator python kivy
python content curator online
kivy file manager
I just tried Kivy. Thanks for telling me about it! Kivy is pretty awesome
python pacman implementation
python tetris implementation
python games
python office package
python office suite
- I've been looking at building an Anti-Virus/Security tool for a while now. I've actually built some basic prototypes based on rudimentary core principles (look at checksums, filenames, file size, behavioural mechanisms, etc... Maybe I'll release the code on here someday?) The problem is tracking so many threats though? It's actually easier to do what a lot of security vendors are now actually doing. You basically use someone elses engine, re-package, re-market, re-sell, etc... The obvious problem is then you're almost entirely dependent on your upstream product, commercial relationships could change, etc...
java open source virus scanner
python anti-virus implementation
online anti-virus
python anti-virus engine
java anti-virus engine
android open source anti-virus
linux cli virustotal
- if you think about it there aren't all that many money generating Android and Mobile Applications. It feels like a small group are commercially viable?
money generating android apps
- there are alternative (and free) markets for Android applications if you don't already know...
Submitting Apps to the Amazon Appstore Developer Portal

Random Stuff:
- as usual thanks to all of the individuals and groups who purchase and use my goods and services
- I've obviously built stuff like this before (language conversion). Obvious thing is whether or not it's easier or more dificult to learn the new intermediate language to deal with CSS? Not sure with some of these? Can understand on much larger then average CSS though...
- latest in science and technology
Light shed on mystery space radio pulses
- latest in finance and politics
- latest in defense and intelligence
- latest in animal news
- latest in music and entertainment

Random Quotes:
- But the Air Force had always known that stealth aircraft are not invisible or invincible. In fact, during Operation Desert Storm, contrary to popular belief, U.S. Army AH-64 Apache gunships made the first air raids on Iraq rather than the F-117. Those attack helicopters had one mission—that was to eliminate Iraqi low frequency early warning radars operating in the VHF and UHF-bands. Those radars can detect and track stealth aircraft like the F-117, which are designed to operated against radars operating in the C, X and Ku-bands. The Apaches cleared a path for the stealth fighters to proceed to their targets deep inside Iraq undetected.

Subsequent stealth aircraft like the F-22 and F-35 are also designed to operate against high-frequency fire control radars. The concept behind fifth-generation fighters—which in some ways are the direct successors to the F-117 tactical stealth attack aircraft—is that they operate with the enemy potentially knowing that something is present in their air space. The enemy just can’t do anything about their presence however—putting it basically—or so the theory goes. But, despite its public stance, the Air Force has never operated its stealth aircraft without the presence of Navy electronic warfare aircraft like Prowler or jammers.

Stealthy strategic bombers like the B-2 however, are designed to operate more like submarines—that is they operate without their presence being noticed. The massive bombers are optimized for “broad band all-aspect” stealth, which means they are able to remain unnoticed even in the presence of low frequency radars by hiding in the background noise and clutter. But even then, the Pentagon didn’t fully anticipate how quickly the Russians and Chinese would develop low frequency radars with performance to threaten even the B-2. “We've had the ability to map our threats in real time in the B-2 for a while with our Defense Management System (DMS),” said an Air Force official. “But the growth in the EW [electronic warfare] spectrum wasn't reasonably anticipated and thus precipitated an upgrade into a new DMS.” But even the B-2 is not going to be able keep pace with the evolving threat, that’s why the new Air Force LRS-B will be optimized to defeat those low frequency systems.

But the Air Force official’s statement also highlights why the F-117 is no longer relevant in the ultra high-end fight. Not only is the subsonic light bomber optimized to defeat high frequency radars, it also does not have the ability to map out threat emitters and manage its signature in real time like the F-22 and F-35. Nor does it have the performance to survive when it is detected and confronted.

But that’s the real advantage of the F-22 and F-35 over not only the F-117, but also the Russian PAK-FA and Chinese J-20 and J-31. The F-117 was entirely dependent on an autorouter to map out its course to avoid threats before each mission. Both the F-22 and the F-35 have the ability to map out threats in real time and are equipped with pilot vehicle interfaces that can make sense of that information for the pilot. In that respect, the Joint Strike Fighter is head and shoulders above the Raptor thanks to years of technological advancements.

Multiple Air Force and industry sources confirm that the Raptor has a lower radar cross section over a wider range of frequencies than the F-35 (as the Air Force maintained for nearly decade till 2014), but the newer aircraft is far better at managing its signature thanks to an incredibly advanced electronic warfare suite. That is likely why retired Air Combat Command commander Gen. Mike Hostage told Breaking Defense: “The F-35 doesn’t have the altitude, doesn’t have the speed [of the F-22], but it can beat the F-22 in stealth.” The operative word there is can. As current ACC commander Gen. Hawk Carlisle told National Defense Magazine: The F-35 has much better “passive capability to determine who’s out there [and] its ability to manage its own signature.”

Ultimately, it’s the pilot vehicle interface the United States has developed over the decades at great expense that affords it the edge over Russia and China’s upstart programs—as Carlisle himself told me a few years ago at the Pentagon. Nonetheless, the United States will have to keep developing new technology to stay ahead.
- An editorial in a Turkish conservative pro-government newspaper said Ankara could leave Israel exposed to an Iranian missile attack by disabling a US radar station, in retaliation for a possible Washington ban on the purchase of F-35 fighter jets.

The editorial was published on Sunday by the Yeni Safak newspaper in apparent response to concerns voiced by a US Air Force official. Heidi Grant, the deputy undersecretary of the USAF for international affairs, had earlier said that Turkey’s deployment of the Russian-made S-400 long-range anti-aircraft missile system may expose vulnerabilities of the US-made F-35 Lightning II fighter jets. Turkey plans to purchase over 100 of the advanced warplanes from Lockheed Martin.
- Millions of Kenyans, without toilets in their homes, are forced to endure their neighbours’ unsavoury smells and habits in a shared pit in the ground or nearby fields.

Worse still, they spread germs that cause diarrhoea – one of the leading killers of children under five in Kenya.

“This is the 21st century and we are unable to create decent sanitation solutions - why is that?” said Andrew Foote, the 29-year-old founder of Sanivation, a socially-motivated business that is turning poop into profit.

“As a global community that’s embarrassing,” he told the Thomson Reuters Foundation.

Only three in ten Kenyans have access to a decent toilet, according to the charity WaterAid, with the remainder dumping their faeces in drains or rivers or burying it.

Some 5,000 children in Kenya die every year from diarrhoea caused by dirty water and poor sanitation, it says.

Sanivation installs “blue box” plastic toilet containers in customers’ homes for free, and then charges a monthly fee of 700 Kenya shillings ($6.78) to collect the waste, which it turns into odourless charcoal.

The idea is not new, said Foote, pointing to the fact that cow dung has been used as fuel in India for years.

Sanivation removes the waste from the free-standing toilets, heats it to kill dangerous bacteria and turns it into charcoal balls, sold in supermarkets under the brand Eco Flame.

This means less trees are felled to cook food for Kenya’s 44 million people, who are rapidly depleting its forests by illegal settlements, logging and charcoal production.

Eight out of ten urban homes use charcoal, according to Kenya Forest Service.
- Leaders of a prominent West Side synagogue are threatening to cancel a book fair next month unless a nearby store ditches a pro-Palestine children’s book.

“P is for Palestine” teaches children the alphabet using Palestinian references. But Rabbi Ammiel Hirsch of the Stephen Wise Free Synagogue said it also glorifies violence.

“The book states that ‘I is for Intifada,’ Arabic for rising up for what is right, if you are a kid or grownup!” Hirsch said in an open letter posted on the temple’s website. “The intifada was not ‘a rising up for what is right.’ It was a mass descent into immorality.”

The book by Golbarg Bashi is carried by Book Culture on Columbus. Bookstore owner Chris Doeblin didn’t respond to a request for comment.
- The electorate is offended by his tendency to wallow in the job of Prime Minister, rather than doing it: that is leading, solving problems, and delivering meaningful policy outcomes. He is obviously having a "Great and Exciting Time". But, speak with those in his team sitting on shrinking primary votes in marginal seats. Are they smiling?

Protest votes are an ever-increasing feature of our democracy. The electorate has lost respect for, and confidence in, the major parties that have become excessively self-absorbed, short-term in their focus, populous, opportunistic, and mostly negative – concentrating on point scoring and blame shifting.

 Turnbull desperately needs to rise above this political mire. It will be his only salvation.
- In a rare interview in his West Wing office earlier this month - a silver bowl of Halloween candy still on the table - Kushner offered his own version of the fable of the fox, who knows many things, and the hedgehog, who knows one important thing.

In a rare interview in his West Wing office earlier this month - a silver bowl of Halloween candy still on the table - Kushner offered his own version of the fable of the fox, who knows many things, and the hedgehog, who knows one important thing.

Allies say Kushner's subtle shift into the background of the West Wing reflects his natural inclination to work hard and eschew the limelight, while his enemies gloat that it stems from a series of avoidable missteps that are the result of his political naivete. Following recent reports, which the White House denied, that the president privately blames Kushner for Mueller's widening probe, Breitbart, the conservative website, snarkily dubbed him, "Mr Perfect."

Some aides scoff at the notion that Kushner isn't still whispering to the president about official business. But one of Kelly's conditions for taking the job was that everyone, including Kushner and his wife, had to go through him to reach the president, and Kelly has made clear that Kushner reports to him, aides said.

The new hierarchy is part of Kelly's effort to sideline Kushner, said one Republican in frequent contact with the White House, though others say the order Kelly has imposed has simply liberated Kushner to focus on his own portfolio - and eased some of the animosity his colleagues felt toward him.

Kushner said he welcomes the change. "The order allows this place to function," Kushner said. "My number one priority is a high-functioning White House, because I believe in the president's agenda, and I think it should get executed."
- Konopka said patients prefer her practice compared to big hospitals because of the individual attention they receive.
Doctors at hospitals look at computers all the time, Konopka said, and rely on them, instead of their intellect, for diagnoses and guidelines to prescribing medications. She called that system expensive and harmful to patients. The doctors have no contact with the patients, she said.
"They practice electronic medicine, I practice medical art," she said. "I treat the patient. And I'm not going to compromise the patient's health or life for the system."
- Each year, Australian households throw out some A$8 billion worth of edible food, with those aged 18 to 24 reported as the biggest wasters.

However, this household figure is likely far outweighed by the value of food waste generated by commercial retailers. In truth, our youth are but one contributor to what could be deemed a massive market failure.

But some people are looking for different ways to approach food and waste. Over three months I interviewed 21 young environmentalists from Melbourne, exploring how and why they began “dumpster diving”: searching waste bins for food.

While there are many reasons why someone might choose—or be forced by economic circumstances—to investigate trash, the young people I spoke to cited a range of motivations: to reduce waste; to create a sense of community; and because they did not want to support unsustainable food markets.

ASX Stock Market Analysis Script, Random Stuff, and More

- wanted to test a theory of mine regarding the ASX stock market. Download results and script here: https://sites.google.com/site/dtbnguy...