Skip to content

Instantly share code, notes, and snippets.

/*
* Verilog Simulator checker by predefined macro.
*
* Copyright (C) 2017 MURAMATSU Atsushi <[email protected]>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
@Nihhaar
Nihhaar / linux_performance.md
Created September 18, 2017 18:42 — forked from marianposaceanu/linux_performance.md
Linux simple performance tweaks

Linux simple performance tweaks

Change the I/O Scheduler

Open $ vim /etc/default/grub then add elevator=noop next to GRUB_CMDLINE_LINUX_DEFAULT. Run $ update-grub and $ cat /sys/block/sda/queue/scheduler to be sure that noop is being used:

$ vim /etc/default/grub
$ update-grub
$ cat /sys/block/sda/queue/scheduler

[noop] deadline cfq

@alimanfoo
alimanfoo / find_runs.py
Created November 5, 2017 23:53
Find runs of consecutive items in a numpy array.
import numpy as np
def find_runs(x):
"""Find runs of consecutive items in an array."""
# ensure array
x = np.asanyarray(x)
if x.ndim != 1:
raise ValueError('only 1D array supported')
@jprivet-dev
jprivet-dev / README.adoc
Last active April 4, 2024 06:39
[Cheatsheet] Markdown & Asciidoctor rendering in GitHub
@mamaj
mamaj / ssh-utils.py
Last active October 9, 2024 13:21
Python: simple class to perform commands and copy files (scp) on ssh using subprocess and native ssh client (OpenSSH).
import subprocess
import os
from pathlib import Path
from typing import Union
class SshClient():
""" Perform commands and copy files on ssh using subprocess
and native ssh client (OpenSSH).
"""