Skip to content

Instantly share code, notes, and snippets.

View Dltd's full-sized avatar

Dltd

View GitHub Profile
@Dltd
Dltd / sp_execute_external_script_in_python.md
Created July 15, 2020 18:25 — forked from james-otten/sp_execute_external_script_in_python.md
Executing Python inside MSSQL using sp_execute_external_script

Executing Python in MSSQL

MSSQL 2017 includes Microsoft Machine Learning Services, which allows for the execution of Python and R scripts within MSSQL via sp_execute_external_script. This is an expansion of the functionality available in MSSQL 2016, which allowed for the execution of R scripts with SQL Server R Services. Examples of how to abuse this functionality with R scripts are available elsewhere.

To execute Python code:

  • Machine Learning Services (In-Database) and Python must have been selected during installation
  • External scripts must be enabled
    • EXEC sp_configure 'external scripts enabled', 1
    • RECONFIGURE WITH OVERRIDE
    • Restart the database server
  • The user must have EXECUTE ANY EXTERNAL SCRIPT
@Dltd
Dltd / gist:18cb29ca40b4a8edd62a5b3f45bccb44
Created January 20, 2024 12:33
Lilygo T-Display Cybernetic Reconnaissance & Unveiling Module
#include <TFT_eSPI.h>
#include <BLEDevice.h>
#include <BLEScan.h>
class MyAdvertisedDeviceCallbacks : public BLEAdvertisedDeviceCallbacks {
public:
void onResult(BLEAdvertisedDevice advertisedDevice);
bool isNewDevice(BLEAddress address);
void displayDeviceInfo(BLEAdvertisedDevice device);
void displayMessage(String line, int fontSize, uint16_t textColor, uint16_t bgColor, bool flash, bool center);