Skip to content

Instantly share code, notes, and snippets.

View haijohn's full-sized avatar
🎲
Wandering

haijohn

🎲
Wandering
View GitHub Profile
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.example.mapper.OlympicWinnerMapper">
<sql id="selectColumns">
*
</sql>
@haijohn
haijohn / test.py
Created May 8, 2025 15:22
demo the master/slave code
# combined_pipeline.py
import multiprocessing
import time
import os
import pickle
import pandas as pd
import sys
import functools # Import functools for decorators
def __mul__(self, other):
if isinstance(other, (N.ndarray, list, tuple)) :
# This promotes 1-D vectors to row vectors
return N.dot(self, asmatrix(other))
if isscalar(other) or not hasattr(other, '__rmul__') :
return N.dot(self, other)
return NotImplemented