Author: Bjk

Check if two dictionaries have same keys in python

I was lazy loading a large json file and wanted to collect only two keys. Running through with ujson I had to check that I had the correct data. I needed to check if my tmp dict was what I

Tagged with:

Change a value with configparser for python

configparser is a great module to store configuration information into a filehttps://docs.python.org/2/library/configparser.html a config file could look like this: To load the value from the file To change the value in the file:

Tagged with:

Dictionary changed size during iteration while using pop() in python

Running through a json file remove all keys but one This is fine running python2 but in python3 you will run into this error Calling keys() in python2 makes a copy of the keys that we iterate through. This is

Tagged with:

Remove non letter characters before and after characters in Python

To remove none letters characters from the beginning and end in python use regex from the re.py library. I needed it to remove spaces as well but not in between the words. Here’s what I did: Output:

Tagged with:

AWS Lambda – name ‘Key’ is not defined

When going through the example from https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GettingStarted.Python.04.html I ran into the following error message: The error come from this line The issue was that I was only importing boto3, this is not enough. Guess I have to read the whole

Code sign wants to sign using key Allow button not working

A rather stupid error without any indication on what’s wrong. The button Allow always and Allow doesnt work for “Code sign wants to sign using key”. You can press it but does not do anything and the system doesn’t say

Tagged with: ,

Plex on Synology “failed to run the package service”

Got following message from Plex “failed to run the package service” when installing and trying to run it. I had missed adding certificate key. There’s a good tutorial here at plex The public key that needs to be added in

Tagged with: ,

unexpected error exception from hresult 0x81030137

While running Windows Phone 8.1 on simulator got this error when changing configuration: unexpected error exception from hresult 0x81030137 Fixed it by removing the app on the simulator and ran it again from visual studio. To remove hold down the

Tagged with:

How to unsubscribe Apple Music

To unsubscribe from Apple Music do the following: Open Apple Music app on your iphone/ipad Hit the account icon in the top left corner Choose “View Apple ID” Choose “Manage” under subscriptions Click the switch to “Off” under auto renewal  

Tagged with: ,

Mac No Display On Targus DisplayLink

Updated to Yosemite, now on 10.10.1 and the external display disappeared. It’s running through a targus dockingstation displaylink. There is multiple post about the issue on dipslayLink forum, some users got it to work: http://www.displaylink.org/forum/forumdisplay.php?f=30/ Tried both running the lastest DisplayLink

Tagged with: , ,
Top