Skip to content

Instantly share code, notes, and snippets.

@howardrotterdam
howardrotterdam / conda_add_shared_lib.md
Created March 18, 2025 12:39
How to include specified shared libraries in environment created by conda?

How to include specified shared libraries in environment created by conda?

Grok3:

To include specific shared libraries in a Conda environment, you can leverage Conda's package management capabilities or manually configure the environment to recognize external libraries. Here's a step-by-step guide:

1. Using Conda to Install Libraries

Conda can manage many shared libraries if they are available in its repositories (e.g., conda-forge). To install a specific library:

  • Search for the library: Use conda search to check if it's available. For example, if you need libpng:
@howardrotterdam
howardrotterdam / xbgoost.md
Last active March 22, 2025 10:13
Machine Learning, XGBoost

What is regularization in regression model of machine learning?

deepseek-r1:14b: Alright, so I'm trying to understand the differences between XGBoost, GBDT, GBRT, and GBM in machine learning. These terms are often thrown around, but I'm not entirely sure how they all fit together or what sets them apart.

First, I know that Gradient Boosting is a popular method for predictive modeling, especially in competitions like Kaggle. It's known for its flexibility and high performance. But when people talk about XGBoost, GBDT, GBRT, and GBM, it can get confusing because some of these terms seem interchangeable.

Let me start by breaking down each acronym:

@howardrotterdam
howardrotterdam / python_time_usage.md
Created March 13, 2025 11:47
How to get user and system time usage of a shell command in Python code?

How to get user and system time usage of a shell command in Python code?

Grok3 (DeepSearch On)

Key Points

  • It seems likely that to measure user and system time for a shell command in Python, you can use the psutil library, which tracks CPU usage across processes.
  • Research suggests that for shell commands with features like pipes, run the command with shell=True and sum the CPU times of the parent shell process and its children using psutil.
  • The evidence leans toward needing to install psutil via pip install psutil if not already available, as it's not part of Python's standard library.

What Are User and System Time?

User time is the CPU time spent executing user-level code, while system time is the CPU time spent on kernel operations. Together, they show how much CPU a command used, excluding idle or wait times.

@howardrotterdam
howardrotterdam / push-appdynamics.md
Last active March 13, 2025 11:59
How to push metrics data to Cisco AppDynamics?

How to push metrics data to Cisco AppDynamics?

Grok3 (DeepSearch On):

Answer

Key Points

  • It seems likely that pushing metrics to Cisco AppDynamics involves using the Machine Agent's HTTP listener, as this is the standard method for sending custom metrics.
  • Research suggests you need to install and configure the Machine Agent, enable its HTTP listener, and send HTTP GET requests with metric details.
@howardrotterdam
howardrotterdam / fpe.txt
Created July 6, 2017 22:44
Opensource Format Preserving Encryption Algorithm Library
open source FPE implementation https://stackoverflow.com/questions/26782096/which-crypto-libararies-support-format-preserving-encryption-fpe
Java implementation: https://sourceforge.net/projects/format-preserving-encryption/
For privacy enhanced filtering: https://github.com/NCSC-NL/PEF/
a Java implementation of a format preserving encryption algorithm that is used to pseudonymize IP addresses of internet packets containing DNS data.
Golang implementation: https://github.com/capitalone/fpe
.Net implementation: https://www.openhub.net/p/dotfpe