Skip to content

Instantly share code, notes, and snippets.

View SqlWaldorf's full-sized avatar

Nico Jacobs SqlWaldorf

View GitHub Profile
@SqlWaldorf
SqlWaldorf / summarizeYouTube.py
Last active May 31, 2024 08:26
Summarize youtube video with ollama
from youtube_transcript_api import YouTubeTranscriptApi
from youtube_transcript_api.formatters import TextFormatter
import sys
formatter = TextFormatter()
video_id = sys.argv[1]
transcript = YouTubeTranscriptApi.get_transcript()
text_transcript = formatter.format_transcript(transcript)
@SqlWaldorf
SqlWaldorf / CreateDiagram.py
Last active June 19, 2024 10:21
This script uses graphviz to create diagrams from a Power BI project
# Code provided "as-is". Use at your own risk
#
# Requires graphviz python package:
# pip install graphviz
#
# Unless you run with the -s option, you must also install the graphviz software from
# https://www.graphviz.org/download/
#
# Basic use: python CreateDiagram.py <path to folder with .SemanticModel>
#
@SqlWaldorf
SqlWaldorf / Wiskundedemo.md
Last active August 4, 2022 12:34
Wiskundedemo

Eenvoudig teksten typen

Soms heb je niet alle toeters en bellen van een programma zoals Word nodig. Dan kan Markdown van pas komen. Dit is een lichtgewicht manier van tekstopmaak, maar dit toch mooie resultaten kan opleveren. En het is bovendien in heel wat websites en applicaties beschikbaar (bijvoorbeeld Jupyter notebooks, Google colab, stackedit,...).

Markdown ondersteunt ook $\LaTeX$, een manier om met eenvoudige tekst ingewikkelde wiskundige notaties mooi weer te geven. Ook daarvan vind je hieronder enkele voorbeelden. Veel plezier ermee!

Beginnen met MarkDown

Je kan Markdown typen in bvb StackEdit.

@SqlWaldorf
SqlWaldorf / u2u_student_laptop_boxstarter.txt
Last active September 1, 2022 20:59
BoxStarter list of packages to install on a new windows machine
choco feature enable -n allowGlobalConfirmation
cinst Chocolatey
cinst azcopy
cinst azure-cli
cinst azurepowershell
cinst sql-server-express
cinst sql-server-management-studio
cinst powerbi
cinst sqlsentryplanexplorer
cinst curl
@SqlWaldorf
SqlWaldorf / CreateInternetSalesTargetsAdventureworksDW.m
Created January 11, 2019 10:33
M script for the U2U course on Power BI
let
Source = Sql.Database("u2u-sql.database.windows.net", "UBIPB_AdventureWorksDW2014"),
dbo_FactInternetSales = Source{[Schema="dbo",Item="FactInternetSales"]}[Data],
#"Removed Columns" = Table.RemoveColumns(dbo_FactInternetSales,{"PromotionKey", "CurrencyKey", "SalesTerritoryKey", "RevisionNumber", "ExtendedAmount", "UnitPriceDiscountPct", "DiscountAmount", "ProductStandardCost", "CarrierTrackingNumber", "CustomerPONumber", "DueDate", "ShipDate", "DimCurrency", "DimCustomer", "DimDate(DueDateKey)", "DimDate(OrderDateKey)", "DimDate(ShipDateKey)", "DimProduct", "DimPromotion", "DimSalesTerritory", "FactInternetSalesReason"}),
#"Added Custom" = Table.AddColumn(#"Removed Columns", "Profit", each [SalesAmount]-[TotalProductCost]),
#"Changed Type" = Table.TransformColumnTypes(#"Added Custom",{{"Profit", type number}}),
#"Calculated Start of Quarter" = Table.TransformColumns(#"Changed Type",{{"OrderDate", Date.StartOfQuarter, type datetime}}),
#"Removed Columns1" = Table.RemoveColumns(
@SqlWaldorf
SqlWaldorf / BoxStarter_TrainerLaptop.ps1
Last active July 5, 2019 14:11
Boxstarter / chocolatey script for getting my machine installed. Work in progress, use at your own risk
# Don't hide my filename extensions
Set-ExplorerOptions -showProtectedOSFiles -showFileExtensions
# yes on all license questions
choco feature enable -n allowGlobalConfirmation
# install the important frameworks
cinst javaruntime
cinst nodejs.install
cinst typescript