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
| TOKEN = 'XXX' | |
| REPORT_ID = 'YYY' | |
| GROUP_ID = 'ZZZ' | |
| delete_url = f'https://api.powerbi.com/v1.0/myorg/groups/{GROUP_ID}/reports/{REPORT_ID}' | |
| headers = { | |
| 'Content-Type': 'application/json', | |
| 'Authorization': 'Bearer ' + TOKEN | |
| } | |
| res = requests.post(delete_url, headers=headers) |
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
| import requests | |
| import adal | |
| import json | |
| # Parameters: | |
| GROUP_ID = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" | |
| # AAD Client ID -- To get this, go here: https://dev.powerbi.com/apps | |
| CLIENT_ID = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" | |
| AUTHENTICATION_URL = 'https://login.microsoftonline.com/egmont.onmicrosoft.com' |
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
| #! -*- coding:utf8 -*- | |
| def generate_inverse_transformations(left,right): | |
| return ( | |
| lambda left: { | |
| 'uuid': left.get('key'), | |
| 'first_name': left.get('name').get('first'), | |
| 'last_name': left.get('name').get('last'), | |
| 'triple_tuples': [x for x in left.get('triples').items()], | |
| 'opposites': [{'first': x, 'second': y} for x,y in left.get('opposites')] |
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
| from kivy.app import App | |
| from kivy.lang import Builder | |
| from kivy.properties import NumericProperty | |
| from kivy.uix.boxlayout import BoxLayout | |
| from kivy.clock import Clock | |
| Builder.load_string(''' | |
| <MainWidget>: | |
| BoxLayout: | |
| orientation: 'vertical' |
NewerOlder