Custom Python App on EMR Serverless

Environment Reference I had to jump through a few hoops to get a PySpark application running on EMR Serverless. Below are the steps I followed, along with final functioning configuration, and at the bottom of this post is a few errors I encountered along the way. Steps 1. Setup Build Environment For a packaged application … Continue reading “Custom Python App on EMR Serverless”

ICellRendererAngularComp + ICellRendererParams: DOMException: Failed to execute ‘removeChild’ on ‘Node’: The node to be removed is no longer a child of this node. Perhaps it was moved in a ‘blur’ event handler?

I recently encountered a collision between Angular and ag-grid, where multiple – i.e., two – attempts were being made to remove the same child node each time a cell renderer underwent a change, one attempt made by ag-grid and the second, failing attempt made by Angular change detection event that attempted a re-render via DefaultDomRenderer2. … Continue reading “ICellRendererAngularComp + ICellRendererParams: DOMException: Failed to execute ‘removeChild’ on ‘Node’: The node to be removed is no longer a child of this node. Perhaps it was moved in a ‘blur’ event handler?”

Snowflake SDK Configuration: CertificateError

I had to wrestle with getting the Snowflake SDK working, kept encountering the error: 250001: Could not connect to Snowflake backend after 0 attempt(s).Aborting. The underlying error to which was: SSLError(CertificateError(“hostname ‘sk78217.us-east-2.snowflakecomputing.com’ doesn’t match either of ‘*.us-west-2.snowflakecomputing.com’, ‘*.us-west-2.aws.snowflakecomputing.com’, ‘*.global.snowflakecomputing.com’, ‘*.snowflakecomputing.com’, ‘*.prod1.us-west-2.aws.snowflakecomputing.com’, ‘*.prod2.us-west-2.aws.snowflakecomputing.com'”)) I read much on the tubes about how region needs to be set, … Continue reading “Snowflake SDK Configuration: CertificateError”

Pass HTTP Headers with Non Proxy Lambda Integration in AWS API Gateway

I set out to pass an HTTP header through API Gateway by mapping it in the method and integration request configurations (specifically using Serverless framework/template), based on various documentation I found online indicating I should do so. While troubleshooting, I at one point removed the mappings entirely and noticed that it *just worked*. I.e., with … Continue reading “Pass HTTP Headers with Non Proxy Lambda Integration in AWS API Gateway”

Satisfying Email SPF Spam Checks (Emphasis: Gmail)

I ran into an issue where mail from my server/domain ended up in Gmail users’ spam folders and so endeavored to resolve it. I didn’t find anything in my online searching where someone was seeing exactly what I was seeing. This link was helpful for general information around SPF: http://www.openspf.org/FAQ/Common_mistakes For purposes of this documentation, configuration/values … Continue reading “Satisfying Email SPF Spam Checks (Emphasis: Gmail)”

Limiting User to SFTP for Uploading Web Content

I required the following: System user that could upload content to a directory in root web directory (default root: /var/www/html) Limit user from interactive SSH Limit user from other areas of OS Specifically, I am working within the AWS distribution on a hosted EC2 instance. I found posts online that accomplished part of what I … Continue reading “Limiting User to SFTP for Uploading Web Content”

Ubuntu Yielding Noisy Black/White Scans

I did a fresh install of Ubuntu 14.10 today with Cinnamon as a desktop and am pleased with the interface. I noticed something when scanning some documents in lineart mode, though: the resulting images had a ton of noise, noise that I did not see in scans prior to my upgrade. After snooping around the … Continue reading “Ubuntu Yielding Noisy Black/White Scans”

Default Argument Value Does Not Refresh Between Function Calls

Something struck me as unexpected today while working in Python. I had a function to take a datetime object and convert it into epoch milliseconds: import datetime import time this_tz = ‘US/Eastern’ def get_epch_ms(dttm=datetime.datetime.now(pytz.timezone(this_tz))): # Returns milliseconds since epoch for datetime object passed. # If no argument is passed, uses *now* as time basis. # … Continue reading “Default Argument Value Does Not Refresh Between Function Calls”

Right and Wrong, Politically Speaking

A friend recently advanced the notion that one of our political parties is more “right” than the other when it comes to economic policy. As an admitted layman in economics, I disagree: —– Interesting that you’d specifically mention macroeconomic policy, as it may be considered particularly confounding as the subject of an exercise seeking to … Continue reading “Right and Wrong, Politically Speaking”