Skip to content

Instantly share code, notes, and snippets.

[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[string]$sourceISO,
[Parameter(Mandatory = $true)]
[string]$outputVHDX,
[Parameter(Mandatory = $true)]
[string]$os
)
@datavudeja
datavudeja / GoF refresher by example.md
Created March 18, 2025 20:42 — forked from MuhammadYossry/GoF refresher by example.md
GoF patterns primer with refactor examples
@datavudeja
datavudeja / kn.py
Created March 18, 2025 20:39 — forked from johnpcutler/kn.py
import numpy as np
import pandas as pd
from sklearn.decomposition import PCA
from sklearn.manifold import TSNE
from sklearn.cluster import KMeans
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from transformers import BertTokenizer, BertModel
import torch
from adjustText import adjust_text
@datavudeja
datavudeja / classic-flexlm-lmgrd.txt
Created March 10, 2025 17:54 — forked from pellucida/classic-flexlm-lmgrd.txt
No BS Classic Flex License manager
# Classic Flex License Manager (lmgrd)
Gory details can be read in
Book Name: License Administration Guide
Part Number: FNP-111411-LAG00
Product Release Date: March 2017
## Daemons
Clearing away the obfuscation around the license manager is fairly simple.
This license management has a vendor independent and vendor provided
#!powershell
#
# powershell -ExecutionPolicy Bypass -File .\scripts\build_windows.ps1
#
# gcloud auth application-default login
$ErrorActionPreference = "Stop"
function checkEnv() {
if ($null -ne $env:ARCH ) {
@datavudeja
datavudeja / Makefile
Created March 7, 2025 21:30 — forked from ticchen/Makefile
Makefile to help install flex server
INSTALL_DIR=/usr/local/flexlm/licenses
#get hostname from license file
licensed_hostname=$(shell cat license.dat | grep ^SERVER | awk '{print $$2}')
licensed_macaddr=$(shell cat license.dat | grep ^SERVER | awk '{print $$3}' | sed -e 's/../\0:/g' -e 's/:$$//' )
help:
# Usage:
# make install # install license server
# make uninstall # uninstall license server
@datavudeja
datavudeja / parse_lmgrd.py
Created March 7, 2025 21:29 — forked from grigory-rechistov/parse_lmgrd.py
lmgrd log file parser
#!/usr/bin/env python2
# The script to parse a lmgrd log and give some license usage metrics
#
# Copyright (c) 2014 Grigory Rechistov <[email protected]>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
@datavudeja
datavudeja / DumpSchemaFromSqliteDB.py
Created February 12, 2025 14:49 — forked from rdapaz/DumpSchemaFromSqliteDB.py
Dump Schema from SQLITE database
# Dump schema from table
"""
Credit to Wilfredo Sánchez Vega who posted this answer
on stackoverflow
https://stackoverflow.com/questions/11996394/is-there-a-way-to-get-a-schema-of-a-database-from-within-python
"""
import sqlite3
import re
import os
from pathlib import Path
@datavudeja
datavudeja / model.py
Created February 12, 2025 14:24 — forked from bao-qian/model.py
sqlite model
import sqlite3
from utils import log
db_path = 'model.sqlite'
conn = sqlite3.connect(db_path)
class Model(object):
fields = [
@datavudeja
datavudeja / log_to_sqlite.py
Created February 12, 2025 14:23 — forked from simonw/log_to_sqlite.py
Class for logging structlog entries to a SQLite database
# Use it like this:
#
# structlog.configure(
# processors=[
# structlog.processors.JSONRenderer(),
# LogToSqlite("/tmp/logs.db")
# ]
# )
# log = structlog.get_logger()
# log.msg("say-hello", whom="world", num=[random.randint(1,55)])