To ignore multiple rules to a single line use the comma to seperate the rules like this: This will ignore the use of the type any and the unused variable
You’ll like to have a cool badge from Azure Pipelines like this But it doesn’t show and a no-image is displayed This could be because you have renamed you’re pipeline. Microsoft DevOps Pipeline has an error where the updated badge link doesn’t work from “Status Badge” You get the sample markdown looking similar to this: […]
To run a function every second use the DispatcherTimer Class https://docs.microsoft.com/en-us/dotnet/api/system.windows.threading.dispatchertimer?redirectedfrom=MSDN&view=netframework-4.8 DispatcherTimer will tick evey second calling dispatcherTimer_Tick. You can set the interval with a timespan
To migrate https://github.com/marketplace/actions/aws-lambda-deploy to using yml. Your workflow looks something similar to this: Migrating this to YML Note that you need to add the Access Key ID and Secret Access Key to Github Security
Microsoft SQL Server Management Studio (SSMS) will default connect to port 1421 and there’s not obvious way to changing the port number. However it is possible by using a comma in the server name. So in the example:database-1.eu-west-1.rds.amazonaws.com,1521First the server name, then a comma, and then the port number.
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 wanted. By using set() on a dict you’ll get all the keys and then do […]
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:
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 not how it works in python3, this returns an iterator instead of a list, hence […]
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:
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 tutorial. You’ll have to add the following import.