This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"name":"dev","settings":"{\"settings\":\"{\\r\\n \\\"editor.guides.bracketPairs\\\": true,\\r\\n \\\"workbench.iconTheme\\\": \\\"material-icon-theme\\\",\\r\\n \\\"remote.SSH.remotePlatform\\\": {\\r\\n \\\"kiet\\\": \\\"linux\\\",\\r\\n \\\"hermes\\\": \\\"linux\\\"\\r\\n },\\r\\n \\\"workbench.colorTheme\\\": \\\"Theme Darker\\\",\\r\\n \\\"editor.fontFamily\\\": \\\"Cascadia Code\\\",\\r\\n \\\"terminal.integrated.fontFamily\\\": \\\"Cascadia Code\\\",\\r\\n \\\"editor.fontLigatures\\\": true,\\r\\n \\\"window.zoomLevel\\\": 1,\\r\\n \\\"material-icon-theme.saturation\\\": 1,\\r\\n \\\"material-icon-theme.folders.theme\\\": \\\"specific\\\",\\r\\n \\\"material-icon-theme.folders.color\\\": \\\"#26a69a\\\",\\r\\n \\\"material-icon-theme.files.color\\\": \\\"#7cb342\\\"\\r\\n}\"}","extensions":"[{\"identifier\":{\"id\":\"eamodio.gitlens\",\"uuid\":\"4de763bd-505d-4978-9575-2b7696ecf94e\"},\"displayName\":\"GitLens — Git supercharged\"},{\"identifier\":{\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| import inspect | |
| from functools import wraps | |
| from typing import Any | |
| def typechecked(func): | |
| @wraps(func) | |
| def inner_function(*args, **kwargs): | |
| # dict of variable name and values | |
| targs = inspect.signature(func).bind(*args, **kwargs).arguments |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import sys | |
| import argparse | |
| class Node(): | |
| def __init__(self, path): | |
| self.abspath = os.path.abspath(path) | |
| self.name = os.path.basename(self.abspath) | |
| self.isdir = os.path.isdir(self.abspath) | |
| self.children = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| man_wall_change() | |
| { | |
| if [[ $1 == 1 ]] | |
| then | |
| gsettings set org.gnome.desktop.background picture-options zoom | |
| gsettings set org.gnome.desktop.background picture-uri "/usr/share/backgrounds/mine/Single/assassin_game_4k.jpg" | |
| else | |
| gsettings set org.gnome.desktop.background picture-options spanned |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # If you come from bash you might have to change your $PATH. | |
| # export PATH=$HOME/bin:/usr/local/bin:$PATH | |
| # Path to your oh-my-zsh installation. | |
| export ZSH="$HOME/.oh-my-zsh" | |
| # Set name of the theme to load --- if set to "random", it will | |
| # load a random theme each time oh-my-zsh is loaded, in which case, | |
| # to know which specific one was loaded, run: echo $RANDOM_THEME | |
| # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " customizing vim using .vimrc | |
| " https://www.makeuseof.com/tag/5-things-need-put-vim-config-file/ | |
| " https://www.cyberciti.biz/faq/vi-show-line-numbers/ | |
| " https://www.freecodecamp.org/news/vimrc-configuration-guide-customize-your-vim-editor/ | |
| " Disable compatibility with vi which can cause unexpected issues. | |
| set nocompatible | |
| " Enable type file detection. Vim will be able to try to detect the type of file in use. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://discuss.pytorch.org/t/difference-between-cuda-0-vs-cuda-with-1-gpu/93080/8 | |
| # cude device initialization | |
| device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu') | |
| # or do | |
| if(torch.cuda.is_available()): | |
| device = torch.device("cuda") | |
| print('Using GPU') | |
| print('GPU count:', torch.cuda.device_count()) | |
| print('GPU device:', torch.cuda.get_device_name(0)) | |
| else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function KeepClicking() | |
| { | |
| console.log("Clicking"); | |
| document.querySelector("colab-connect-button").click(); | |
| } | |
| setInterval(KeepClicking, 60 * 1000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def add_letter(src, tar): | |
| return chr((((ord(src) - 97) + (ord(tar) - 96)) % 26) + 97) | |
| def remove_letter(src, tar): | |
| return chr((((ord(src) - 97) - (ord(tar) - 96)) % 26) + 97) | |
| def clean_word(src): | |
| src = src.lower() | |
| ans = "" | |
| for i in range(len(src)): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| import turtle | |
| import time | |
| import numpy as np | |
| def get_POI(l1, l2, a, b): | |
| dist = math.sqrt(a**2 + b**2) | |
| if(dist > l1 + l2 or dist < abs(l1 - l2)): | |
| return | |
| if(b == 0): |
NewerOlder