Skip to content

Instantly share code, notes, and snippets.

View bkbncn's full-sized avatar

Xiangyu Xu bkbncn

View GitHub Profile
@johnvilsack
johnvilsack / get-vmwarefusion.sh
Created August 8, 2025 21:27
Direct Download VMWare Fusion - Download, Install, and Update VMWare Fusion Automatically.
#!/usr/bin/env bash
# VMware Fusion Latest Version Downloader, Installer, and Updater
# This script automatically finds, downloads, and optionally installs the highest version available
#
# Inspired by this gist: https://gist.github.com/jetfir3/6b28fd279bbcadbae70980bd711a844f
#
# Usage: $0 [-y] [-i] [-d] [-f] [-t <dmg_path>]
# -y: Skip download confirmation prompt
# -i: Automatically install after download (implies -y)
@rain-1
rain-1 / LLM.md
Last active December 29, 2025 09:47
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@GadgetSteve
GadgetSteve / where_am_i.py
Last active June 27, 2022 06:42
Importable execution position in python
"""
Importable get called from file & location.
Based on a tweet by Ned Batchelder @nedbat
"""
import inspect
def where_am_i():
""" Return the current filename and line number. """
bf = inspect.currentframe().f_back
return (bf.f_globals.get("__file__", "interactive"), bf.f_lineno)
@kss7
kss7 / Pytest.md
Last active December 29, 2025 02:57

Python Automation Testing With Pytest

Pytest Framework Course

Pytest Usage

https://docs.pytest.org/

pytest [options] [file_or_dir] [file_or_dir] ...
import operator
people.sort(key=operator.itemgetter('age'))
people.sort(key=operator.itemgetter('name'))
# !/usr/bin/env python
# -*- coding: utf-8 -*-
__coverage__ = 0.00
__author__ = "Bruce_H_Cottman"
__license__ = "MIT License"
""" A sandbox DevOps implemented in Python.
Environment can vary by language, os, cpu, packages,
package versions....
"""
#
# Working through some examples from python 3 asyncio docs
#
# https://docs.python.org/3/library/asyncio.html#module-asyncio
#
import asyncio
import random
import time
@miguelgrinberg
miguelgrinberg / .tmux.conf
Last active March 15, 2022 11:39
My .tmux.conf file for working with tmux
# Set the prefix to ^A.
unbind C-b
set -g prefix ^A
bind a send-prefix
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
@miguelgrinberg
miguelgrinberg / .vimrc
Last active November 19, 2025 18:07
My .vimrc configuration for working in Python with vim
" plugins
let need_to_install_plugins = 0
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
let need_to_install_plugins = 1
endif
call plug#begin()
Plug 'tpope/vim-sensible'
@ben-doyle
ben-doyle / perforce.MD
Last active July 5, 2024 03:47
Perforce for git users.

Understanding Perforce (as a git user).

Commands

Git Perforce Command Line P4V Notes
git pull p4 sync get latest revision
n/a p4 update ? Get latest revision without overwriting files that have been changed.
git checkout p4 edit checkout You plan to change a file from the version control system
git commit p4 submit submit
git push n/a n/a No perforce equivalent. There is no concept of a pure local submit in Perforce.