Skip to content

Instantly share code, notes, and snippets.

@5310
5310 / test-rocm.py
Last active March 15, 2024 13:04 — forked from damico/test-rocm.py
Script for testing PyTorch support with AMD GPUs using ROCM
import torch, grp, pwd, os, subprocess
devices = []
try:
print("\n\nChecking ROCM support...")
result = subprocess.run(['rocminfo'], stdout=subprocess.PIPE)
cmd_str = result.stdout.decode('utf-8')
cmd_split = cmd_str.split('Agent ')
for part in cmd_split:
item_single = part[0:1]
item_double = part[0:2]
@5310
5310 / xfce4-panel-auto-opaque.sh
Last active September 18, 2020 07:02 — forked from bharadwaj-raju/panel-alpha.sh
Changes XFCE panel transparency depending on whether any window on the current workspace is maximized or not #script
#!/usr/bin/env bash
#-- CONFIGURATION
transparent_alpha=0
maximized_alpha=100
interval=0.5
#--
alpha_prop_list=()
for prop in $(xfconf-query -c xfce4-panel -p /panels -l); do
@5310
5310 / git-cheat-list.md
Created February 18, 2017 04:57
Git cheat list #cheatsheet

Git cheat list

  • name of the current banch and nothing else (for automation)

    git rev-parse --abbrev-ref HEAD
    
  • all commits that your branch have that are not yet in master

    git log master..<HERE_COMES_YOUR_BRANCH_NAME>
    
@5310
5310 / kinds.md
Created August 3, 2016 05:01 — forked from anonymous/kinds.txt
Kind Polymorphism in Haskell #article

So we have all these types like Int, Float, String, Map String Int, [Maybe String], etc. What do all these types have in common? Well, essentially, they're "normal" types where we can make a value for them. Just as values have types, types have "kinds". In this case, just as 4 : Int, Int : *, and just as "Hello" : String, String : *. That is to say, all these normal types (the types of plain old values) have kind *.

Now, in OCaml, you have type parametricity, but only over types of kind *. Let's give an example of a type that's not of kind *.

Map : * -> * -> *

We apply this "type constructor" (which is a kind of "type function", just like constructors are a kind of function) to the type Int : *.

Map Int : * -> *

@5310
5310 / iitc-plugin-ingressKML-exporter.user.js
Last active April 14, 2023 05:26 — forked from Dron007/iitc-plugin-ingressKML-exporter.user.js
IITC plugin: Ingress KML Exporter #script #userscript
// ==UserScript==
// @id iitc-plugin-CSV@pad
// @name IITC plugin: Ingress KML Exporter
// @category Keys
// @version 1.0.20160105.02
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL https://gist.github.com/Dron007/33205981b11ab4cadb31/raw/f425c125f236256998f143f385249006c0442223/iitc-plugin-ingressKML-exporter.user.js
// @downloadURL https://gist.github.com/Dron007/33205981b11ab4cadb31/raw/f425c125f236256998f143f385249006c0442223/iitc-plugin-ingressKML-exporter.user.js
// @description Exports portals currently in view for use with Google Map ( KML Format ).
// @include https://www.ingress.com/intel*