This file contains 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
import sys, os, time | |
import aztk.spark | |
from aztk.error import AztkError | |
import datetime | |
#UPDATE this section to set your secrets | |
secrets_confg = aztk.spark.models.SecretsConfiguration( | |
service_principal=aztk.spark.models.ServicePrincipalConfiguration( | |
tenant_id="Update with AAD Directory ID", | |
client_id="Update with App Registration ID", |
This file contains 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
!apt-get update | |
!apt-get install openjdk-8-jdk-headless -qq > /dev/null | |
!wget -q http://archive.apache.org/dist/spark/spark-2.3.1/spark-2.3.1-bin-hadoop2.7.tgz | |
!tar xf spark-2.3.1-bin-hadoop2.7.tgz | |
!pip install -q findspark |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
export SugarURL="*******" | |
export SugarUser="******" | |
# If your password have special character use escape | |
export SugarPassword="*****" | |
export DockerImage=dajor85570/barcodedocker:v1.8 | |
docker build --tag $DockerImage . |
This file contains 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
# Last Tested Version 1.8.1 | |
import logging | |
import azure.functions as func | |
from azure.storage.blob import BlockBlobService | |
import os, io | |
import json | |
import base64 | |
from pyzbar.pyzbar import decode |
This file contains 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
import logging | |
import azure.functions as func | |
import os, io, crm, json | |
import pandas as pd | |
from sugarcrm.client import Client | |
def main(myblob: func.InputStream): | |
logging.info(f"Python blob trigger function processed blob \n" | |
f"Name: {myblob.name}\n" |
This file contains 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
#r "Microsoft.Azure.Documents.Client" | |
using Microsoft.Azure.Documents; | |
using Microsoft.Azure.Documents.Client; | |
using System.Net; | |
using System.Configuration; | |
using Microsoft.Azure.KeyVault; | |
using Microsoft.Azure.Services.AppAuthentication; | |
private static HttpClient httpClient = new HttpClient(); | |
private static DocumentClient client = null; |
This file contains 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
{ | |
"frameworks": { | |
"net46":{ | |
"dependencies": { | |
"Microsoft.Azure.KeyVault": "2.3.2", | |
"Microsoft.Azure.Services.AppAuthentication": "1.1.0-preview" | |
} | |
} | |
} | |
} |
This file contains 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
{ | |
"bindings": [ | |
{ | |
"name": "req", | |
"type": "httpTrigger", | |
"direction": "in" | |
}, | |
{ | |
"name": "$return", | |
"type": "http", |
This file contains 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
import pandas as pd | |
df = pd.read_csv("./hotels.csv") | |
df.head() |
NewerOlder