This file contains 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 ssl | |
import certifi | |
import logging | |
# Disable SSL verification warning | |
requests.packages.urllib3.disable_warnings(requests.packages.urllib3.exceptions.InsecureRequestWarning) | |
# Configure logging | |
logging.basicConfig(level=logging.INFO) |
This file contains 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 pandas as pd | |
# Read the Excel spreadsheet into a pandas DataFrame | |
df = pd.read_excel('your_spreadsheet.xlsx') | |
# Specify the columns to keep intact | |
keep_columns = ['A', 'B', 'C'] | |
# Specify the columns to be transposed | |
transpose_columns = ['1', '2', '3', '4', '5'] |
This file contains 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
syntax on | |
if empty(glob('~/.vim/autoload/plug.vim')) | |
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs | |
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC | |
endif | |
" change the leader key from \ to , | |
let mapleader = "," |
This file contains 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
--- TLP 1.3.0-beta.2 -------------------------------------------- | |
+++ Configured Settings: | |
TLP_ENABLE="1" | |
TLP_PERSISTENT_DEFAULT="0" | |
DISK_IDLE_SECS_ON_AC="0" | |
DISK_IDLE_SECS_ON_BAT="2" | |
MAX_LOST_WORK_SECS_ON_AC="15" | |
MAX_LOST_WORK_SECS_ON_BAT="60" | |
CPU_ENERGY_PERF_POLICY_ON_AC="balance_performance" |
This file contains 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
--- TLP 1.3.0-beta.2 -------------------------------------------- | |
+++ Configured Settings: | |
TLP_ENABLE="1" | |
TLP_PERSISTENT_DEFAULT="0" | |
DISK_IDLE_SECS_ON_AC="0" | |
DISK_IDLE_SECS_ON_BAT="2" | |
MAX_LOST_WORK_SECS_ON_AC="15" | |
MAX_LOST_WORK_SECS_ON_BAT="60" | |
CPU_ENERGY_PERF_POLICY_ON_AC="balance_performance" |
This file contains 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/bash | |
# Check for root/sudo | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script should not be run using sudo or as the root user" | |
exit 1 | |
fi | |
# Turn off indexing |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import socket # socket module | |
import sys # exit method(s) | |
def check_server(address, port): | |
# Create TCP Socket | |
s = socket.socket() |
This file contains 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
var checkout_data = { | |
product : "", | |
variation:0, | |
flavour_set :true, | |
selected_flavour:"", | |
specific_flavours:[] | |
}; | |
function navigate_step(step){ | |
$(".one_button .step").removeClass("active"); | |
$("#step"+step).addClass("active"); |
This file contains 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
hash = 910897038977002 | |
letters = "acdegilmnoprstuw" | |
answer = "" | |
9.times do |x| #9 letter string loop | |
remainder = hash % 37 #get the remainder for lookup | |
answer = answer + letters[remainder] #add letter to the answer | |
hash = (hash - remainder) / 37 #now we're evenly divisible |