- Home
- Data Science
- Python
Category: Python
Monitor AWS IoT connections in near-real time using MQTT LWT

Feed: The Internet of Things on AWS – Official Blog. Author: Syed Rehan. In a connected device, you may need to monitor devices in near-real time to detect error and mitigate actions, Last Will and Testament (LWT) method for MQTT addresses this challenge. LWT is a standard method of MQTT protocol specification that allows to detect abrupt disconnects of devices and to notify other clients about this abrupt disconnections. IoT devices are often used in environments with unreliable network connectivity and/or devices might disconnect due to lack of power supply, low battery, loss of connection, or any other reason. This ... Read More
Quantum Computing without the Hype

Feed: Radar. Author: Mike Loukides. Several weeks ago, I had a great conversation with Sebastian Hassinger about the state of quantum computing. It’s exciting–but also, not what a lot of people are expecting. I’ve seen articles in the trade press telling people to invest in quantum computing now or they’ll be hopelessly behind. That’s silly. There are too many people in the world who think that a quantum computer is just a fast mainframe. It isn’t; quantum programming is completely different, and right now, the number of algorithms we know that will work on quantum computers is very small. You ... Read More
Modernize Mainframe Applications for Hybrid Cloud with IBM and AWS

Feed: AWS Partner Network (APN) Blog. Author: Steve Steuart. By Steve Steuart, WW Principal Mainframe Modernization GTMS – AWSBy Skyla Loomis, Vice President, IBM zSystems Application Platform – IBM IBM To meet the needs of a digitally transformed business, customers are modernizing mainframe applications to increase agility, maximize the value of their investments, and innovate faster. At re:Invent 2021, Amazon Web Services (AWS) announced AWS Mainframe Modernization to help customers modernize their mainframe workloads with a managed and highly available runtime environment on AWS. On the path to modernization, we are also seeing customers choose a hybrid cloud strategy that ... Read More
Three packages that port the tidyverse to Python
Feed: R-bloggers. Author: %>% dreams. [This article was first published on %>% dreams, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. As I’ve been saying every year for the past seven years or so, I am learning Python. (It’s been a journey.) Python packages like pandas have several ways to work with data. There are several options for indexing, slicing, etc. They have a lot of flexibility but also a lot of conventions ... Read More
Comparing performances of CSV to RDS, Parquet, and Feather file formats in R
Feed: R-bloggers. Author: tomaztsql. [This article was first published on R – TomazTsql, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. From the previous blogpost:– CSV or alternatives? Exporting data from SQL Server data to ORC, AVRO, Parquet, Feather files and store them into Azure data lake we have created Azure blob storage, connected secure connection using Python and started uploading files to blob store from SQL Server. Alongside, we compared the performance of ... Read More
This Week in Neo4j: Graph Embeddings, OSS Vulnerabilities, Supply Chain Stack, Star Wars Graph, Chatbot MD, and More!

Feed: Neo4j Graph Data Platform. Author: Yolande Poirier. With graph data science, you can choose between several graph embedding algorithms, and generating low-dimensional vector spaces is easy. But how do you evaluate the embedding results in your machine learning application? Enter Emblaze, a Jupyter notebook widget for visually comparing embeddings developed by Carnegie Mellon University’s Data Interaction Group. In his tutorial, Nathan Smith shows you the power of the widget’s Python API to perform dimensionality reduction on multiple sets of embedding data and compare the embeddings using animated scatter plots.
Don’t miss the tutorial: Understanding Graph Embeddings with ... Read More
10 Things You Can Do With Cypher That Are Hard With SQL

Feed: Neo4j Graph Data Platform. Author: Enzo. Editor’s note: This presentation was given by Michael Hunger in December 2021 at Neo4j Connections: Graphs for Cloud Developers. SQL has been around for a long time; it’s a powerful query language, but there are some things that just make more sense in Cypher. I’ll occasionally show SQL as a point of comparison, but in general, I will focus on the Cypher aspects because that is what we run here at Neo4j. Before I jump into my list of ten things that you can do better in Cypher, I will first provide a ... Read More
Key Rate Duration using R code
Feed: R-bloggers. Author: sang-heon lee. #========================================================## Quantitative ALM, Financial Econometrics & Derivatives # ML/DL using R, Python, Tensorflow by Sang-Heon Lee ## https://kiandlee.blogspot.com#——————————————————–## Key Rate Durations#========================================================#graphics.off(); rm(list = ls())#=======================================================# read data#=======================================================str.zero – “matm zero 12 0.022 24 0.030 36 0.040 48 0.046 60 0.050 72 0.052 84 0.053 96 0.053 108 0.053 120 0.054″df – read.table(text = str.zero, header = TRUE)v.key_matm – df$matm # maturities for key ratesnkey – length(v.key_matm)# linear interpolation of zero ratesf_interpol – approxfun(df$matm, df$zero, rule = 2)# fill rates between key rates by 6M tenormatm = seq(6,120,6)df.sa – data.frame(matm = matm)nobs – length(matm)df.sa$zero – f_interpol(matm)# 10Y YTMYTM10 – 0.0527780789520333CPN10 – YTM10 # 10Y coupon = par yield rate#=======================================================# read data#=======================================================# rate shift : 0.0001 is preferabledr = 0.0001# make a table of dr for each key ratesfor(n in 1:nkey) { df.sa – cbind(df.sa, NA) colnames(df.sa)[2+n] – as.character(v.key_matm[n]) key_matm – v.key_matm[n] # set dr to the same key maturity # set 0 to other key rates # set NA to rates between key rates for(i in 1:nobs) { matmi – df.sa$matm[i] if(matmi == key_matm) { df.sa[i,2+n] – dr } else if (matmi %in% v.key_matm){ df.sa[i,2+n] – 0 } } # rates between key rates is linearly interpolated f_interpol – approxfun(matm, df.sa[,2+n], rule = 2, na.rm = TRUE) df.sa[,2+n] – f_interpol(matm)}# p0zero – df.sa$zeroP0 – sum((YTM10/2)/(1+zero/2)^(matm/6)) + 1/(1+zero[nobs]/2)^(matm[nobs]/6)# all the key rate shiftszerou – zero + rowSums(df.sa[,1:nkey+2])zerod – zero – rowSums(df.sa[,1:nkey+2])# effective duration : traditionalPu – sum((YTM10/2)/(1+zerou/2)^(matm/6)) + 1/(1+zerou[nobs]/2)^(matm[nobs]/6)Pd – sum((YTM10/2)/(1+zerod/2)^(matm/6)) + 1/(1+zerod[nobs]/2)^(matm[nobs]/6)ED – (Pd – Pu)/(2*P0*dr)# Key rate duationsdf.KRD – data.frame(matm = df$matm, ED = NA)for(n in 1:nkey) { # key rate shifts zerou – zero + df.sa[,2+n] zerod – zero – df.sa[,2+n] # effective duration : KRD Pu – sum((YTM10/2)/(1+zerou/2)^(matm/6)) + 1/(1+zerou[nobs]/2)^(matm[nobs]/6) Pd – sum((YTM10/2)/(1+zerod/2)^(matm/6)) + 1/(1+zerod[nobs]/2)^(matm[nobs]/6) df.KRD[n,2] – (Pd – Pu)/(2*P0*dr)}df.KRD# check if sum of KRDs is equal to effective durationdrsum(df.KRD$ED)ED ... Read More
AWS Service Catalog Provisioning constructs for the AWS Cloud Development Kit (AWS CDK) are now available
Feed: Recent Announcements. AWS Service Catalog Provisioning constructs for the AWS Cloud Development Kit (AWS CDK) are now available for builders to create application infrastructure in code that provisions cloud resources from their approved Service Catalog products. Service Catalog builders can now create their AWS CDK applications with approved constructs in familiar programming languages like Typescript and Python directly in their Integrated Development Environment. Using cdk-import, builders can access a library of Provisioning constructs in their local development environment for the AWS Service Catalog products they have access to provision which automatically include the governance that their administrators have configured ... Read More
How to Deploy MySQL on Ubuntu and Fully Managed

Feed: Planet MySQL; Author: ScaleGrid.io; In this blog post, we will show you a step-by-step guide on how to install and set up a MySQL server both manually on the Ubuntu 20.04 operating system, as well as by using ScaleGrid’s managed database service. In the following sections of this tutorial, we will help you through every step to successfully set up your very own MySQL server and configure it properly. A bit about MySQL & Ubuntu MySQL is an open-source relational database management system (DBMS). It runs on Windows and Linux Servers, and it is commonly installed as part of ... Read More
Recent Comments