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
| set number | |
| set relativenumber | |
| set cursorline | |
| set cursorcolumn | |
| set colorcolumn=80 | |
| syntax on | |
| set hlsearch | |
| set incsearch | |
| set showmatch | |
| set foldmethod=syntax |
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 requests | |
| import json | |
| import time | |
| import pandas as pd | |
| import sys | |
| if len(sys.argv) != 2: | |
| print("Invalid arguments") | |
| exit(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
| sudo date -s "$(wget --method=HEAD -qSO- --max-redirect=0 google.com 2>&1 | sed -n 's/^ *Date: *//p')" |
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 argparse | |
| import bibtexparser | |
| # Create the parser | |
| parser = argparse.ArgumentParser( | |
| description="Search for .bib files in a directory and merge them." | |
| ) | |
| # Add the arguments | |
| parser.add_argument("Dir", metavar="dir", type=str, help="the directory to search") |
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 perf_measure(y_actual, y_hat): | |
| TP = 0 | |
| FP = 0 | |
| TN = 0 | |
| FN = 0 | |
| for i in range(len(y_hat)): | |
| if y_actual[i] == y_hat[i] == 1: | |
| TP += 1 | |
| if y_hat[i] == 1 and y_actual[i] != y_hat[i]: |
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
| select t2.* from (select json_extract(replace(value, "'",'"'),'$[*]') as arr from rh23_game_session inner join rh23_property_instance on rh23_game_session.id=rh23_property_instance.game_session where property_tk='PPG_LOG') as t1, | |
| JSON_TABLE(cast(t1.arr as NCHAR), '$[*]' COLUMNS ( | |
| li INT PATH '$.li', ts BIGINT PATH '$.ts') | |
| ) t2 |
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
| git checkout --orphan latest_branch | |
| git add -A | |
| git commit -am "first commit" | |
| git branch -D main | |
| git branch -m main | |
| git push -f origin main | |
| git gc --aggressive --prune=all |
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 requests | |
| import json | |
| import time | |
| import pandas as pd | |
| import random | |
| import sys | |
| def send_notif(message): |
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 | |
| def search(p, s, ff): | |
| try: | |
| dirs = os.listdir(p) | |
| for item in dirs: | |
| if '.' in item: | |
| if item.endswith('.{}'.format(ff)): |
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 requests | |
| import multiprocessing | |
| import time | |
| import sys | |
| from collections import Counter | |
| def get_uris(uri): | |
| session = requests.Session() | |
| try: | |
| response = str(session.get(uri).status_code) |
NewerOlder