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
// Convert from degrees to radians. | |
Math.radians = function(degrees) { | |
return degrees * Math.PI / 180; | |
} | |
Math.radians(90); // 1.5707963267948966 | |
// Convert from radians to degrees. | |
Math.degrees = function(radians) { | |
return radians * 180 / Math.PI; | |
} |
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 winsound | |
import tkinter as tk | |
from PIL import Image, ImageDraw, ImageTk | |
class PomodoroClock: | |
def __init__(self, master): | |
self.master = master | |
self.total_time_in_seconds = 0 | |
self.elapsed_time_in_seconds = 0 | |
self.timer_running = False |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Chess Puzzles from The Password Game with Solutions</title> | |
</head> | |
<body> | |
<style> | |
#container { | |
display: flex; |
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
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\amro.omp.json" | Invoke-Expression | |
Import-Module Terminal-Icons | |
Import-Module PSReadLine | |
New-Alias code code-insiders | |
New-Alias curl C:\curl-7.81.0-win64-mingw\bin\curl.exe | |
Remove-Alias md | |
function md { | |
param ( |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style> | |
body { | |
margin: 0; | |
padding: 0; | |
} |
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
def value_to_rank(RP): | |
titles_list = ['Copper', 'Bronze', 'Silver', 'Gold', 'Platinum', 'Emerald', 'Diamond', 'Champion'] | |
min_value = 1000 | |
rank_interval = 500 | |
increment = 100 | |
if RP <= 1000: | |
return 'Copper 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
import matplotlib.pyplot as plt | |
import numpy as np | |
import mplcursors | |
x = np.linspace(0, 500, 1000) | |
plt.figure(figsize=(10, 6)) | |
plt.axhline(y=0, color='k', linestyle='-') |
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
// ==UserScript== | |
// @name 4ChReplies (Improve Replies) | |
// @namespace 4ChReplies | |
// @version 1.0 | |
// @description Make navigate on 4chan replies more comfortable with this script for tampermonkey. Now replies closes only by click on it. | |
// @author https://github.com/evdokimovm | |
// @match https://boards.4chan.org/* | |
// @match https://boards.4channel.org/* | |
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== | |
// @grant none |
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 all_contents = document.querySelectorAll('div#contents > ytd-item-section-renderer:nth-of-type(3) > div#contents > ytd-shelf-renderer > div#dismissible > div#contents > ytd-grid-renderer > div#items > ytd-grid-playlist-renderer > div#details > yt-formatted-string > a') | |
async function getFullTitle(item) { | |
var double_parent_node = item.parentNode.parentNode | |
var channel_name_container = double_parent_node.querySelector('ytd-video-meta-block > div#metadata > div#byline-container > ytd-channel-name > div#container > div#text-container > yt-formatted-string') | |
var playlist_title = double_parent_node.querySelector('h3 > a') | |
var _a = channel_name_container.querySelector('a') | |
if (_a) { | |
return playlist_title.title + ' | -> ' + _a.text + ' | -> ' + _a.href + '\n' | |
} else { |
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
async function promiseWrapper(options, callback) { | |
return new Promise((resolve, reject) => { | |
try { | |
callback(options, resolve) | |
} catch (err) { | |
reject(err) | |
} | |
}) | |
} |
NewerOlder