This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://dev.botframework.com/bots | |
| https://docs.microsoft.com/en-us/azure/bot-service/bot-service-quickstart-create-bot?view=azure-bot-service-4.0&tabs=csharp%2Cvs | |
| https://www.youtube.com/watch?v=-FHc_lZ6jJY | |
| https://youtu.be/RjGVOFm39j0?t=651 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "terminal.integrated.profiles.windows": { | |
| "PowerShell": { "source": "PowerShell", "icon": "terminal-powershell" }, | |
| "GitBash": { | |
| "path": "${env:windir}\\System32\\cmd.exe", | |
| "args": ["/k","C:\\Tools\\cmder\\vendor\\git-for-windows\\bin\\bash.exe"] | |
| }, | |
| "Cmder": { | |
| "path": "${env:windir}\\System32\\cmd.exe", | |
| "args": ["/k", "C:\\Tools\\cmder\\vendor\\bin\\vscode_init.cmd"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| #$ python3 ip-to-hostname.py 216.58.196.4 | |
| #Address: 216.58.196.4 | |
| #Host: ('kul08s09-in-f4.1e100.net', [], ['216.58.196.4']) | |
| import socket | |
| import sys | |
| address = sys.argv[1] | |
| host = socket.gethostbyaddr(address) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # python subnet.py 200.100.33.65/26 | |
| # from: curl -O https://gist.github.com/ibrezm1/4b4274006dc2a5d5ad48e6b2c395633b/subnet.py | |
| import sys | |
| # Get address string and CIDR string from command line | |
| (addrString, cidrString) = sys.argv[1].split('/') | |
| # Split address into octets and turn CIDR into int |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| export PROJECT_ID=$(gcloud config get-value project) | |
| export PROJECT_USER=$(gcloud config get-value core/account) # set current user | |
| export PROJECT_NUMBER=$(gcloud projects describe $PROJECT_ID --format="value(projectNumber)") | |
| export IDNS=${PROJECT_ID}.svc.id.goog # workload identity domain | |
| export GCP_REGION="us-central1" | |
| export GCP_ZONE="us-central1-a" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- # Start of yaml with --- | |
| # https://yaml-online-parser.appspot.com/ | |
| # https://www.json2yaml.com/ | |
| # https://github.com/josephmachado/beginner_de_project/blob/master/docker-compose.yaml ( Sample usage of anchors ) | |
| # Sample YAml | |
| - name: Test | |
| str1: 'HEllo' | |
| str2: 'HEllo2' | |
| - numbers: | |
| num: 1 # Dec |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Decorators | |
| import sys, traceback | |
| import time | |
| # Create a function with function argument | |
| def timerit(func): | |
| #Create a wrapper to that function with args | |
| def wrapper(*arg): | |
| # function preporcessing | |
| t=time.time() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://beam.apache.org/documentation/transforms/python/aggregation/combinevalues/ | |
| # | |
| import apache_beam as beam | |
| import csv | |
| if __name__ == '__main__': | |
| with beam.Pipeline('DirectRunner') as pipeline: | |
| (pipeline | |
| | "Read File" >> beam.io.ReadFromText('test.txt') | |
| | 'Split' >> ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://beam.apache.org/documentation/transforms/python/aggregation/combinevalues/ | |
| # http://shzhangji.com/blog/2017/09/12/apache-beam-quick-start-with-python/ | |
| import apache_beam as beam | |
| import csv | |
| if __name__ == '__main__': | |
| with beam.Pipeline('DirectRunner') as pipeline: | |
| (pipeline | |
| | "Read File" >> beam.io.ReadFromText('test.txt') | |
| | 'Split' >> ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Sample Cloud execution on local | |
| # pip install google-auth | |
| # pip install --upgrade google-auth | |
| import os | |
| import json | |
| import requests | |
| import google.oauth2.id_token | |
| import google.auth.transport.requests |