Skip to content

Instantly share code, notes, and snippets.

View jabbany's full-sized avatar
🤦‍♂️
Status: 200 OK

Jim Chen jabbany

🤦‍♂️
Status: 200 OK
View GitHub Profile
@jabbany
jabbany / main.md
Last active April 28, 2024 09:13
Setting up podman + nvidia on F37 - F40 (Self notes)

Follow the following instructions:

  1. Install the C compiler through sudo dnf group install "C Development Tools and Libraries"
  2. Install the kernel headers sudo dnf install kernel-devel
  3. Download the latest drivers (replace with URL from nvidia website)
    wget https://us.download.nvidia.com/XFree86/Linux-x86_64/550.54.14/NVIDIA-Linux-x86_64-550.54.14.run
    chmod a+x NVIDIA-Linux-x86_64-550.54.14.run
    sudo ./NVIDIA-Linux-x86_64-550.54.14.run
    
### Keybase proof
I hereby claim:
* I am jabbany on github.
* I am jabbany (https://keybase.io/jabbany) on keybase.
* I have a public key ASCLN19Y-vajNTb43XCXfQ-nEnIqoVDGGJyRCi4SBjMvSAo
To claim this, I am signing this object:
@jabbany
jabbany / faster.py
Last active January 31, 2017 08:01
Quick Guide to Python Multiprocessing
from multiprocessing import Pool
# --- Filler code that you can ignore
# Read in your sentences and labels somehow
X_train, y_train = read_train()
X_eval, y_eval = read_eval()
# Train your model (high level filler code that looks like sklearn :) )
# myModel must be global here since we want each forked process to have a *copy* of it
@jabbany
jabbany / MintUpgradeIssuesAndSolutions.md
Last active November 2, 2016 10:33
Linux Mint 17.3 to 18 Upgrade Issues and Solutions

Issues Encountered in Linux Mint 17.3 to 18 Upgrade

This is documented for the benefit of others. Hopefully Google indexes this.

Broken Upgrade

If during upgrade, apt fails and complains leaving you in inconsistent state (this happened for me with texlive cyclical dependencies), try looking at the dpkg message. I got an error in dpkg where it would refuse to install a package upgrade since it would overwrite a file included in an older version of another package. This was fixed by using dpkg manually and forcing it. Then apt-get -f install was run to continue fixing.

Bad things like version not being bumped

After multiple rounds of apt-get upgrade, apt-get dist-upgrade until no packages were left, there were still many parts of the system that said 17.3 Rosa. Additionally, many gnome apps were installed giving a very bad experience. Furthermore, things like the system .bashrc (e.g. colored prompt) did not work.

@jabbany
jabbany / snake.c
Last active December 18, 2015 04:49
THU大作业,贪食,C...
#include<conio.h>
#include<stdio.h>
#include<stdlib.h>
#include<windows.h>
#include<time.h>
#define roof(a, b) (a+b)%b
/*
记得改掉!!
@jabbany
jabbany / ApiParser.java
Created May 26, 2013 04:59
ACFun API partially forked from jovisayhehe/acfunm
package tv.avfun.api;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;