Skip to content

Instantly share code, notes, and snippets.

View mxbi's full-sized avatar
💚

Mikel Bober-Irizar mxbi

💚
  • Iconic Games // University of Cambridge
  • United Kingdom
View GitHub Profile
@inoryy
inoryy / _results.md
Last active December 28, 2022 07:54
Fixing MKL on AMD Zen CPU.

Fixing MKL on AMD Zen CPU

As per discussion on Reddit, it seems a workaround for the Intel MKL's notorious SIMD throttling of AMD Zen CPUs is as simple a setting MKL_DEBUG_CPU_TYPE=5 environment variable.

Benchmarks

All three scripts are executed in the same Python 3.7 environment on a first-gen AMD Zen CPU (1950x).
The difference will be even bigger on newer models as first-gen Zen resolves 256-bit AVX2 in two 128-bit instructions.

@pika1928
pika1928 / Junkensteins revenge timings.py
Last active October 28, 2018 22:53
Overwatch Junkensteins Revenge: A python script that outputs key timings to the console, along with a beep, instructing the players what to do
import time
import math
import winsound
Torb = 'Torb player'
Mccree = 'Mccree pLayer'
Hanzo = 'Hanzo player'
Zen = 'Zen player'
xy={'6:55': 'Shock Tyre (right)',

WannaCry|WannaDecrypt0r NSA-Cyberweapon-Powered Ransomware Worm

  • Virus Name: WannaCrypt, WannaCry, WanaCrypt0r, WCrypt, WCRY
  • Vector: All Windows versions before Windows 10 are vulnerable if not patched for MS-17-010. It uses EternalBlue MS17-010 to propagate.
  • Ransom: between $300 to $600. There is code to 'rm' (delete) files in the virus. Seems to reset if the virus crashes.
  • Backdooring: The worm loops through every RDP session on a system to run the ransomware as that user. It also installs the DOUBLEPULSAR backdoor. It corrupts shadow volumes to make recovery harder. (source: malwarebytes)
  • Kill switch: If the website www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com is up the virus exits instead of infecting the host. (source: malwarebytes). This domain has been sinkholed, stopping the spread of the worm. Will not work if proxied (source).

update: A minor variant of the viru

@telegraphic
telegraphic / parse_nvidia_smi.py
Created September 23, 2016 00:37
Parse nvidia-smi from python
"""
Parse output of nvidia-smi into a python dictionary.
This is very basic!
"""
import subprocess
import pprint
sp = subprocess.Popen(['nvidia-smi', '-q'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
@baraldilorenzo
baraldilorenzo / readme.md
Last active November 21, 2023 22:41
VGG-16 pre-trained model for Keras

##VGG16 model for Keras

This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman

@jweyrich
jweyrich / arithmetic-expression-evaluator.cpp
Last active March 23, 2021 09:26
Simple arithmetic expression evaluator written in C++
//
// ORIGINAL CODE: http://stackoverflow.com/questions/17806760/binary-expression-tree-c
//
#include <cassert>
#include <iostream>
template <typename ExpressionT>
struct expression
{
@isa
isa / gist:1776881
Created February 9, 2012 02:58
Windows 2000 Source Code
/* Source Code Windows 2000 */
#include "win31.h"
#include "win95.h"
#include "win98.h"
#include "workst~1.h"
#include "evenmore.h"
#include "oldstuff.h"
#include "billrulz.h"
#include "monopoly.h"