Skip to content

Instantly share code, notes, and snippets.

View imakin's full-sized avatar

Izzulmakin imakin

View GitHub Profile
@imakin
imakin / mkn
Created February 27, 2024 02:25
{"name":"mkn","settings":"{\"settings\":\"{\\n \\\"editor.inlineSuggest.suppressSuggestions\\\": true,\\n \\\"editor.minimap.enabled\\\": false,\\n \\\"splitHTMLAttributes.tabSize\\\": 4,\\n \\\"rewrap.wrappingColumn\\\": 72,\\n \\\"editor.wrappingIndent\\\": \\\"indent\\\",\\n \\\"editor.stickyScroll.enabled\\\": false,\\n \\\"files.autoSave\\\": \\\"afterDelay\\\"\\n}\"}","keybindings":"{\"keybindings\":\"// Place your key bindings in this file to override the defaultsauto[]\\n[\\n {\\n \\\"key\\\": \\\"ctrl+d\\\",\\n \\\"command\\\": \\\"editor.action.copyLinesDownAction\\\",\\n \\\"when\\\": \\\"editorTextFocus && !editorReadonly\\\"\\n },\\n {\\n \\\"key\\\": \\\"ctrl+shift+alt+down\\\",\\n \\\"command\\\": \\\"-editor.action.copyLinesDownAction\\\",\\n \\\"when\\\": \\\"editorTextFocus && !editorReadonly\\\"\\n },\\n {\\n \\\"key\\\": \\\"ctrl+d\\\",\\n \\\"command\\\": \\\"-editor.action.addSelectionToNextFindMa
["84356699810", "366146320780", "272030129612", "240719970754", "395796298582", "40182483925", "272030129612", "375226574551", "129239025301", "178105201626", "272030129612", "100484855017", "178105201626", "214183786506", "216183985757", "235306993955", "297891121454", "230116772493", "143098719019", "272644607108", "178105201626", "16459641996", "84356699810", "216183985757", "100484855017", "178105201626", "263812242620", "263812242620", "263812242620", "263812242620", "272644607108", "216183985757", "395796298582", "178076814417", "129239025301", "178105201626", "204006238654", "274326397623", "216183985757", "240719970754", "230116772493", "265501136311", "90681369612", "16412104577", "16459641996", "84356699810", "216183985757", "318488485466", "346595961137", "178596313369", "129239025301", "178105201626", "90681369612", "186588444019", "104308260566", "186588444019", "6772211063", "16459641996", "84356699810", "216183985757", "235306993955", "297891121454", "230116772493", "143098719019", "27264460710
@imakin
imakin / configure_cuda_p70.md
Created September 12, 2022 12:55 — forked from alexlee-gk/configure_cuda_p70.md
Use integrated graphics for display and NVIDIA GPU for CUDA on Ubuntu 14.04

This was tested on a ThinkPad P70 laptop with an Intel integrated graphics and an NVIDIA GPU:

lspci | egrep 'VGA|3D'
00:02.0 VGA compatible controller: Intel Corporation Device 191b (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GM204GLM [Quadro M3000M] (rev a1)

A reason to use the integrated graphics for display is if installing the NVIDIA drivers causes the display to stop working properly. In my case, Ubuntu would get stuck in a login loop after installing the NVIDIA drivers. This happened regardless if I installed the drivers from the "Additional Drivers" tab in "System Settings" or the ppa:graphics-drivers/ppa in the command-line.

@imakin
imakin / nvidia-oc.bash
Created June 4, 2021 04:34
how to overclock NVIDIA GPU on linux from command line
nvidia-settings -a [gpu:0]/GPUMemoryTransferRateOffset[4]=1500
nvidia-settings -a [gpu:1]/GPUMemoryTransferRateOffset[4]=2000
nvidia-settings -q all | grep CUDA | grep gpu
# Attribute 'CUDACores' (mkn2020:0[gpu:0]): 1920.
# Attribute 'CUDACores' (mkn2020:0[gpu:1]): 4864.
nvidia-smi -L
#GPU 0: NVIDIA GeForce RTX 3060 Ti (UUID: GPU-1e08c8ef-81e2-8759-0754-b4c30de0da7a)
@imakin
imakin / mykeyboard
Last active November 27, 2019 12:28
https://www.youtube.com/results?search_query=abu+usamah+kartun
https://www.youtube.com/watch?v=MGPeIG7tIvI
#!/home/kareem/anaconda3/bin/python3.6
"""
requires:
socket
pynput
"""
import os
import logging
import socket
from pynput import keyboard
@imakin
imakin / devices.py
Last active February 3, 2017 10:53
JKFF simulator
#!python3
class Device(object):
def clock(self):
raise NotImplemented("unimplemented clock method")
class Terminal(Device):
"""
wired object for any devices
Members:
@imakin
imakin / temp.py
Last active December 15, 2016 07:59
def next_move(posx, posy, dimx, dimy, board):
if board[posy][posx]=="d":
print("CLEAN")
return
shortest_path = 5000
shortest_coord = (-1,-1)
for y in range(len(board)):
for x in range(len(board[y])):
if board[y][x]=="d":
node0 = Node()
node1 = Node()
node2 = Node()
node3 = Node()
node4 = Node()
node5 = Node()
node6 = Node()
node7 = Node()
node8 = Node()
node9 = Node()
@imakin
imakin / BrainBrain.b
Last active December 7, 2016 10:57
testing if possible to make brainfuck interpreter written in brainfuck itself
[
brainfuck interpreter written in brainfuck
flag of code instruction:
p if 62, ascii for POINTER_INC command ">"
p if 60, ascii for POINTER_DEC command "<"
p5 if 43, ascii for INC command "+"
p3 if 45, ascii for DEC command "-"
p2 if 46, ascii for OUTPUT command "."
p4 if 44, ascii for INPUT command ","
p if 91, ascii for loop begin command "[" ][