Skip to content

Instantly share code, notes, and snippets.

@nad2000
nad2000 / test.c
Created December 17, 2014 04:41
Basic examples to show how to embed and extend Python in C including: creation of module in C with functions handling and building Python objects; importing and calling python functions from C.
/* Example of embedding Python in another program */
// to compile run:
// gcc -o test $(python-config --cflags) test.c $(python-config --ldflags) && ./test
#include<stdio.h>
#include "Python.h"
void initxyzzy(void); /* Forward */
main(int argc, char **argv)
@varmas
varmas / dp-study-plan.md
Last active July 28, 2022 19:26
Effective LC

From https://leetcode.com/discuss/general-discussion/475924/my-experience-and-notes-for-learning-dp/427348

A littile bit of my history of learning DP

DP has always been an obstacle when preparing for interviews. For me it is one of the hardest topic. There were several times in the past that I tried to master it, but all attempts failed. Either because I could not find good resources, or because I did not have enough time to really dive into it, have a lot of practice, and identify different patterns. To tell the truth, I even feared that I would never be able to understand it well.

This winter I had another attempt, and made up my mind to grasp the techique. I solved/read 45 DP problems of different patterns in 4 days (yes, you might think that is quite slow). At the begining, I struggled as much as all my previous attempts, but slowly I found I am getting better and I start to be able to think in the DP-way. Today I solved several problems independently, with memoization and tabulation and even spac

@alexcpn
alexcpn / kubeflow in kind cluster.md
Last active February 12, 2024 19:51
Making kubeflow work in Kind

We will use the maifest way of installing Kubeflow -https://github.com/kubeflow/manifests

Create a Kind cluster with Service Account Signing key for API Server for Kubeflow to work (Istio Needs it) like below

cat <<EOF | kind create cluster --name=kubeflow  --kubeconfig /home/alexpunnen/kindclusters/mycluster.yaml --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane