U.S. to auction $1.6 million of bitcoin from various cases

NEW YORK The U.S. government said on Monday it plans to auction over 2,700 bitcoins that were forfeited during several cases, several of which stemmed from investigations of the online black market known as Silk Road.The U.S. Marshals Service said that the online auction would be held on Aug. 22, and that potential bidders must register by Aug. 18. The bitcoin are worth about $1.6 million, according to the Bitstamp exchange.The auction is the latest by the Marshals Service of the digital currency. It completed four prior auctions from June 2014 to November 2015 of bitcoins seized during the prosecution of Ross Ulbricht, who authorities say ran Silk Road.His case is one of nine criminal, civil or administrative matters from which the Marshals Service said the 2,719 bitcoins had been forfeited and are subject to the latest auction. Ulbricht, 32, was sentenced in May 2015 to life in prison after being convicted for orchestrating a scheme that enabled more than $200 million of anonymous online drug sales through Silk Road using bitcoin. He is appealing.Only about 2.8 bitcoins in the latest auction came from Ulbricht's case, the Marshals Service said. The bulk of the bitcoins in the auction, 1,294, came from a civil forfeiture case related to a Silk Road drug dealer, Matthew Gillum, who was sentenced in 2015 to nine years in prison, the Marshals Service said.It said another 65 bitcoins came from the case of Carl Force, a former U.S. Drug Enforcement Administration agent who was sentenced in October to 78 months in prison for stealing bitcoins during the Silk Road investigation. The agency said another 664 bitcoins came from the case of Sean Roberson, a Florida man who prosecutors said created an online shop for selling counterfeit credit and debit cards. He was sentenced in November 2015 to 78 months in prison. (Reporting by Nate Raymond in New York; Editing by Bernadette Baum and Frances Kerry) Read more

Study finds cosmic rays increased heart risks among Apollo astronauts

CAPE CANAVERAL, Fla. Apollo astronauts who ventured to the moon are at five times greater risk of dying from heart disease than shuttle astronauts, U.S. researchers said on Thursday, citing the dangers of cosmic radiation beyond the Earth's magnetic field. The study by researchers at Florida State University and NASA found that three Apollo astronauts, including Neil Armstrong, the first person to walk on the moon, or 43 percent of those studied, died from cardiovascular disease, a finding with implications for future human travel beyond Earth.The research, published in the journal Scientific Reports, was the first to look at the mortality of Apollo astronauts, the only people so far to travel beyond a few hundred miles (km) of Earth.It found that the chief health threat to the Apollo astronauts came from cosmic rays, which are more prevalent and powerful beyond the magnetic bubble that surrounds Earth.NASA disputed the findings, saying it was too early to draw conclusions about the effect of cosmic rays on Apollo astronauts because the current data is limited. The results of the study have implications for the United States and other countries, as well as private companies, such as Elon Musk’s SpaceX, which are planning missions to Mars and other destinations beyond Earth.For the study, the researchers examined the death records of 42 astronauts who flew in space, including seven Apollo veterans, and 35 astronauts who died without ever going into space.They found the Apollo astronauts’ mortality rate from cardiovascular disease was as much as five times higher than for astronauts who never flew, or for those who flew low-altitude missions aboard the space shuttle that orbited a few hundred miles above Earth. A companion study simulated weightlessness and radiation exposure in mice and showed that radiation exposure was far more threatening to the cardiovascular system than other factors, lead scientist Michael Delp said in an interview."What the mouse data show is that deep space radiation is harmful to vascular health," he said. So far, only 24 astronauts have flown beyond Earth’s protective magnetic shield, in missions spanning a four-year period from December 1968 to December 1972.Of those, eight have died, seven of whom were included in the study. The cause of death of the eighth astronaut, Apollo 14's Edgar Mitchell, who died in February 2016, has not been released, so he was excluded from the study, Delp said. Mitchell was the sixth person to walk on the moon.Delp and colleagues are working on a follow-up study that includes more detail on family medical histories, smoking and other factors. (Reporting by Irene Klotz; Editing by Julie Steenhuysen and Peter Cooney) Read more

Fine Tune Your Polling and Batching in Mule ESB

They say it's best to learn from others. With that in mind, let's dive into a use case I recently ran into. We were dealing with a number of legacy systems when our company decided to shift to a cloud-based solution. Of course, we had to prepare for the move — and all the complications that came with it.Use CaseWe have a legacy system built with Oracle DB using Oracle forms to create applications and lots and lots of stored procedures in the database. It's also been in use for over 17 years now with no major upgrades or changes. Of course, there have been a lot of development changes over these 17 years that taken the system close to the breaking point and almost impossible to implement something new. So, the company decided to move to CRM (Salesforce) and we needed to transfer data to SF from our legacy database. However, we couldn't create or make any triggers on our database to send real-time data to SF during the transition period.SolutionSo we decided to use Mule Poll to poll our database and get the records in bulk, then send them to SF using the Salesforce Mule connector.I am assuming that we all are clear about polling in general. If not, please refer to references at the end. Also, if you are not clear with Mule polling implementation there are few references at the bottom, too. Sounds simple enough doesn't it? But wait, there are few things to consider.What is the optimum timing of the poll frequency of your polls?How many threads of each poll you want to have? How many active or inactive threads do you want to keep?.How many polls can we write before we break the object store and queue store used by Mule to maintain your polling?What is the impact on server file system if you use watermark values of the object store?How many records can we fetch in one query from the database?How many records can we actually send in bulk to Salesforce using SFDC?These are few, if not all the considerations you have to do before implementation. The major part of polling is the WATERMARK of polling and how Mule implements the watermark in the server.Polling for Updates Using WatermarksRather than polling a resource for all its data with every call, you may want to acquire only the data that has been newly created or updated since the last call. To acquire only new or updated data, you need to keep a persistent record of either the item that was last processed, or the time at which your flow last polled the resource. In the context of Mule flows, this persistent record is called a watermark.To achieve the persistency of watermark, Mule ESB will store the watermarks in the object store of the runtime directory of a project in the ESB server. Depending on the type of object store you have implemented, you may have a SimpleMemoryObjectStore or TextFileObjectStore, which can be configured like below: Below is a simple memory object store sample: Below is text file object store sample: For any kind of object store, Mule ESB creates files in-server, and if the frequency of your polls are not carefully configured, then you may run into file storage issues on your server. For example, if you are running your poll every 10 seconds with multiple threads, and your flow takes more than 10 seconds to send data to SF, then a new object store entry is made to persist the watermark value for each flow trigger, and we will end up with too many files in the server object store.To set these values, we have consider how many records we are fetching from the database, as SF has limit of 200 records that you can send in one bulk. So, if you are fetching 2,000 records, then one batch will call SF 10 times to transfer  these 2,000 records. If your flow takes five seconds to process 200 records, including the network transfer to send data to SF and come back, then your complete poll will take around 50 seconds to transfer 2,000 records.If our polling frequency is 10 seconds, it means we are piling up the object store.Another issue that will arise is the queue store. Because the frequency and execution time have big gaps, the queue store's will also keep queuing. Again, you have to deal with too many files.To resolve this, it’s always a good idea to fine-tune your execution time of the flow and frequency to keep the gap small. To manage the threads, you can use Mule's batch flow threading function to control how many threads you want to run and how many you want to keep active.I hope few of the details may help you set up your polling in a better way.There are few more things we have to consider. What happens when error occurs while sending data? What happens when SF gives you error and can't process your data? What about the types of errors SF will send you? How do you rerun your batch with the watermark value if it failed? What about logging and recovery? I will try to cover these issues in a second blog post.Refrences:https://docs.mulesoft.com/mule-user-guide/v/3.6/poll-reference#polling-for-updates-using-watermarkshttps://docs.mulesoft.com/mule-user-guide/v/3.7/poll-referencehttps://docs.mulesoft.com/mule-user-guide/v/3.7/poll-schedulers#fixed-frequency-schedulerhttps://en.wikipedia.org/wiki/Polling_(computer_science) Read more

Destroy All IFs: A Perspective From Functional Programming

The Anti-IF Campaign currently stands at 4,136 signatures, and there’s a reason: Conditional statements are frequently a troublesome source of bugs and brittle logic, and they make reasoning about code difficult because they multiply the code paths. The problem is not necessarily with conditionals: It's with the boolean values that are required to use conditionals. A boolean value reduces a huge amount of information to a single bit (0 or 1). Then on the basis of that bit, the program makes a decision to take one path or a totally different one.What could possibly go wrong?The Root ProblemI've long argued that, despite all its flaws, one of the great things about functional programming is its intrinsic inversion of control.In an impure imperative language, if you call some function void doX(State *state), the function can do anything it wants. It can modify state (both passed in and global), it can delete files, it can read from the network, and it can even launch nukes!In a pure functional language, however, if you call some function doX :: State -> IO (), then at most, it's going to return a value. It can't modify what you pass it, and if you like, you can ignore the value returned by the function, in which case calling the function has no effect (aside from sucking up a little CPU and RAM).Now granted, IO in Haskell is not a strong example of an abstraction that has superior reasoning properties, but the fundamental principle is sound: In purely functional programming languages, the control is inverted to the caller.Thus, as you're looking at the code, you have a clearer sense of what the functions you are calling can do, without having to unearth their foundations.I think this generalizes to the following principle:Code that inverts control to the caller is generally easier to understand.(I actually think this is a specialization of an even deeper principle — that code that destroys information is generally harder to reason about than code that does not.)Viewed from this angle, you can see that if we embed conditionals deep into functions, and we call those functions, we have lost a certain amount of control: We feed in inputs, but they are combined in arbitrary and unknown ways to arrive at a decision (which code path to take) that has humongous ramifications on how the program behaves.It's no wonder that conditionals (and with them, booleans) are so widely despised!A Closer LookIn an object-oriented programming language, it's generally considered a good practice to replace conditionals with polymorphism.In a similar fashion, in functional programming, it's often considered good practice to replace boolean values with algebraic data types.For example, let's say we have the following function that checks to see if some target string matches a pattern:match :: String -> Boolean -> Boolean -> String -> Bool match pattern ignoreCase globalMatch target = ...(Let's ignore the boolean return value and focus on the two boolean parameters.)Looking at the match function, you probably see how its very signature is going to cause lots of bugs. Developers (including the one who wrote the function!) will confuse the order of parameters and forget the meaning.One way to make the interface harder to misuse is to replace the boolean parameters with custom algebraic data types:data Case = CaseInsensitive | CaseSensitive data Predicate = Contains | Equals match :: String -> Case -> Predicate -> String -> Bool match pattern cse pred target = ...By giving each parameter a type, and by using names, we force the developers who call the function to deal with the type and semantic differences between the second and third parameters.This is a big improvement to be sure, but let's not kid ourselves: Both Case and Predicate are still "boolean" values that have 1 bit of information each, and inside of match, big decisions will be made based on those bits!We've cut out some potential for error, but we haven't gone as far as our object-oriented kin because our code still contains conditionals.Fortunately, there's a simple technique you can use to purge almost all conditionals from your code base. I call it, replace conditional with lambda.Replace Conditional With LambdaWhen you're tempted write a conditional based on boolean values that are passed into your function, I encourage you to rip out those values and replace them with a lambda that performs the effect of the conditional.For example, in our preceding match function, somewhere inside, there's probably a conditional that looks like this:let (pattern', target') = case cse of CaseInsensitive -> (toUpperCase pattern, toUpperCase target) CaseSensitive -> (pattern, target)That normalizes the case of the strings based on the sensitivity flag.Instead of making a decision based on a bit, we can pull out the logic into a lambda that's passed into the function:type Case = String -> String data Predicate = Contains | Equals match :: String -> Case -> Predicate -> String -> Bool match pattern cse pred target = ... let (pattern', target') = (cse pattern, cse target)In this case, because we are accepting a user-defined lambda that we are then applying to user-defined functions, we can actually perform a further refactoring to create a match combinator:type Matcher = String -> Predicate -> String -> Bool caseInsensitive :: Matcher -> Matcher match :: MatcherNow a user can choose between a case-sensitive match with the following code:match a b c -- case sensitive caseInsensitive match a b c -- case insensitiveOf course, we still have another bit and another conditional: the predicate flag. Somewhere inside the match function, there’s a conditional that looks at Predicate:case pred of Contains -> contains pattern' target' Equals -> eq pattern' target'This can be extracted into another lambda:match :: String -> (String -> Bool) -> String -> BoolNow you can test strings like so:caseInsensitive match "foo" eq "foobar" -- false caseInsensitive match "fOO" contains "foobar"Of course, now the function match has been simplified so much, it no longer needs to exist, but in general, that won't happen during your refactoring.Note that as we performed this refactoring, the function became more general-purpose. I consider that a side-benefit of the technique, which replaces highly-specialized code with more generic code.Now let's go through a real world case instead of a made-up toy example.psc-publishThe PureScript compiler has a publish tool with a function defined approximately as follows:publish :: Bool -> IO () publish isDryRun = if isDryRun then do _ <- unsafePreparePackage dryRunOptions putStrLn "Dry run completed, no errors." else do pkg <- unsafePreparePackage defaultPublishOptions putStrLn (A.encode pkg)The purpose of publish is either to do a dry-run publish of a package (so the user can make sure it works)or to publish the package for real.Currently, the function accepts a boolean parameter, which indicates whether it's a dry-run. The function branches off this bit to decide the behavior of the program.Let's unify the two code branches by extracting out the options, and introducing a lambda to handle the different messages printed after package preparation:type Announcer = String -> IO String dryRun :: Announcer dryRun = const (putStrLn "Dry run completed, no errors.") forReal :: Announcer forReal = putStrLn (A.encode pkg) publish :: PublishOptions -> Announcer -> IO () publish options announce = unsafePreparePackage options >>= announceThis is better, but it's still not great because we have to feed two parameters into the function publish, and we've introduced new options that don’t make sense (publish with dry run options, but announce with forReal).To solve this, we'll extend PublishOptions with an announcer field, which lets us collapse the code to the following:forRealOptions :: PublishOptions forRealOptions = ... dryRunOptions :: PublishOptions dryRunOptions = ... publish :: PublishOptions -> IO () publish options = unsafePreparePackage options >>= announcer optionsNow a user can call the function like so:publish forRealOptions publish dryRunOptionsThere are no conditionals and no booleans, just functions. You never need to decide what bits mean, and you can't get them wrong.Now that the control has been inverted, the caller of the publish function has the ultimate power and can decide what happens deep in the program merely by passing the right functions in.If you don't have any trouble reasoning about code that overflows with booleans and conditionals, then more power to you!For the rest of us, however, conditionals complicate reasoning. Fortunately, just like OOP has a technique for getting rid of conditionals, we functional programmers have an alternate technique that's just as powerful.By replacing conditionals with lambdas, we can invert control and make our code both easier to reason about and more generic.So what are you waiting for? Go sign the Anti-IF Campaign today. Read more

Megaupload coming back? Founder Kim Dotcom plans a relaunch in 2017

Flamboyant German tech entrepreneur Kim Dotcom is planning to relaunch file-sharing website Megaupload in January 2017, five years after the U.S. government took down the site accusing it of piracy.Megaupload, founded in 2005, had boasted of having more than 150 million registered users and 50 million daily visitors. At one point, it was estimated to be the 13th most frequently visited website on the internet.Dotcom, who announced his plans in a series of tweets on Friday, said most of the Megaupload users would get their accounts reinstated with premium privileges.He also hinted and that the new website will use bitcoins. (bit.ly/29r9UIA)Dotcom did not immediately respond to a mail seeking comment.Dotcom and three others were arrested on Jan. 20, 2012, after armed New Zealand police raided his country estate at the request of the U.S. Federal Bureau of Investigation. U.S. authorities had said Dotcom and three other Megaupload executives cost film studios and record companies more than $500 million and generated more than $175 million by encouraging paying users to store and share copyrighted material, such as movies and TV shows. (reut.rs/29Ja8Ji)Dotcom, who has New Zealand residency, has denied charges of internet piracy and money laundering and has been fighting extradition to the United States.He has contended that the website was merely a storage facility for online files and should not be held accountable if stored content was obtained illegally. A New Zealand court in 2013 granted Dotcom access to all evidence seized by police in the raid of his house. (reut.rs/2a1Ti7g)While Kim Dotcom's net worth was not known, he became well known for his lavish lifestyle as much as his computer skills.He used to post photographs of himself with cars having vanity plates such as "GOD" and "GUILTY", shooting an assault rifle and flying around the world in his private jet. The U.S. Federal Bureau of Investigation estimated in 2012 that Dotcom personally made around $115,000 a day during 2010.The assets seized earlier included nearly 20 luxury cars, one of them a pink Cadillac, works of art, and NZ$10 million invested in local finance companies. (reut.rs/29GXjjR)"I'll be the first tech billionaire who got indicted, lost everything and created another billion $ tech company while on bail," he tweeted on Sunday. (Reporting by Supantha Mukherjee in Bengaluru; Editing by Shounak Dasgupta) Read more

Older Post