This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## the git-repo contains the example code and solutions to the exercises in O'Reilly book: | |
## | |
## "Scaling Machine Learning with Spark: Distributed ML with MLlib, TensorFlow, and PyTorch" 2023 by Adi Polak | |
# You will need a Python install using "anaconda" by means of Mamba: | |
# https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html | |
git clone https://github.com/adipolak/ml-with-apache-spark.git | |
mamba create -n spark-jupyter-openjdk8-py3 -c conda-forge python=3.11 jupyter notebook openjdk=8 findspark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from PIL import Image | |
import sys | |
import time | |
import os | |
from os import path | |
import shutil | |
from optparse import OptionParser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# MacOS *specific*, 'sshfs' remote-mounts | |
# - tested on MacOS catalina; latest MacOS Fuse & sshfs | |
# - 10-02-2021 Sat | |
# NOTE: | |
# sudo mkdir -p /private/ssh # and do a 'chmod, chgrp'... | |
# drwxrwsr-x 5 root admin 160 Oct 2 08:32 /private/ssh/ | |
# - install, MacOS FUSE, sshfs from https://osxfuse.github.io/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# "git fetch all branches" -- to your local-repo | |
## to RUN-ME: | |
## git branch -r | sed -r -e 's:origin/::g' -e '/^\s+HEAD/d' | egrep -v gerrit/ > /tmp/foo | |
# ... gives you a chance, to change the "temp list of Branches to fetch" | |
## cat /tmp/foo ## hand-edit, if needed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*-conf-*- | |
[user] | |
# email = [email protected] | |
email = [email protected] | |
name = Mark Biggers | |
[core] | |
autocrlf = input | |
safecrlf = false | |
pager = less -+S |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymysql.cursors | |
import os | |
from attrdict import AttrDict | |
import sys | |
from datetime import datetime as dt | |
# Insert all /var/tmp/*/"CSV summary-reports" into MySQL - using Py DB-API | |
# NOTE: schema for the table must have been already created! | |
# | |
# INSTALL: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /home/mabigger/.bashrc.win -*-sh-*- | |
# ---- References | |
# https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly | |
# https://sourceforge.net/projects/vcxsrv/ | |
CEC=mabigger | |
sudo mount --bind /mnt/c /c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Refs: | |
# (primary) http://peewee.readthedocs.io/en/latest/peewee/quickstart.html | |
# https://peewee.readthedocs.io/en/2.0.2/peewee/cookbook.html | |
from datetime import date | |
import peewee | |
from peewee import ( # noqa: F401 | |
MySQLDatabase, | |
Model, | |
BooleanField, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; gosmacs.el --- rebindings to imitate Gosmacs. | |
;; Copyright (C) 1986 Free Software Foundation, Inc. | |
;; Maintainer: FSF | |
;; Keywords: emulations | |
;; This file is part of GNU Emacs. | |
;; GNU Emacs is free software; you can redistribute it and/or modify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# REWORKED by [email protected], from: | |
# 16/7/7 | |
# create by: snower | |
import datetime | |
from tornado import gen | |
from tornado.ioloop import IOLoop | |
from torpeewee import ( | |
Model, |
NewerOlder