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
/** | |
* Responsive Spacing Plugin | |
* | |
* This plugin generates responsive spacing utility classes for Tailwind CSS based on spacing tokens in the config. | |
* It creates utility classes for padding, margin, and gap with values that adjust based on screen sizes. | |
* | |
* How it works: | |
* - Accepts spacing tokens, which can be a single value or an object representing values for different breakpoints (e.g., 'sm', 'md', 'lg'). | |
* - Generates utility classes for different directions (e.g., padding-left, margin-top) that adapt to the screen size using Tailwind's responsive breakpoints. | |
* |
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
@use "sass:map"; | |
$color-dark: #1d1d1d; | |
$color-primary-medium: #f65050; | |
$color-purple: #4e47c9; | |
$color-white: #fff; | |
$colors: ( | |
'primary-medium': ('bg': $color-primary-medium, 'text': $color-dark), | |
'purple': ('bg': $color-purple, 'text': $color-white), |
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
/* ============================================ | |
Inset helper for quick top, right, bottom, left properties. | |
Use until the inset: css property has better browser support | |
https://caniuse.com/mdn-css_properties_inset | |
*/ | |
@mixin inset($top: 0, $right: 0, $bottom: 0, $left: 0) { | |
top: $top; | |
right: $right; | |
bottom: $bottom; |
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
library(dplyr) | |
library(tidytext) | |
library(ggplot2) | |
data <- read.csv('/Users/steven/Desktop/JEOPARDY_CSV.csv') | |
text_set <- iconv(data$Question, to = "utf-8-mac") | |
clean_text <- text_set %>% | |
as_tibble() %>% | |
unnest_tokens(word, value, to_lower = TRUE, strip_punct = TRUE, strip_numeric = TRUE) %>% |
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 isVisible (ele) { | |
const { top, bottom } = ele.getBoundingClientRect(); | |
const vHeight = (window.innerHeight || document.documentElement.clientHeight); | |
return ( | |
(top > 0 || bottom > 0) && | |
top < vHeight | |
); | |
} |
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
document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
anchor.addEventListener('click', function (e) { | |
e.preventDefault(); | |
document.querySelector(this.getAttribute('href')).scrollIntoView({ | |
behavior: 'smooth' | |
}); | |
}); | |
}); |
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 selectSort(nums): | |
for i in range(5): | |
minpos = i | |
for j in range(i, 6): | |
if nums[j] < nums[minpos]: | |
minpos = j | |
temp = nums[i] #hold old value | |
nums[i] = nums[minpos] #put new min value where old one was | |
nums[minpos] = temp #put old value where min used to be |
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 sort(nums): | |
for i in range(len(nums) - 1, 0, -1): | |
for j in range(i): | |
if nums[j] > nums[j + 1]: | |
temp = nums[j] | |
nums[j] = nums[j + 1] | |
nums[j + 1] = temp | |
nums = [5, 3, 8, 6, 7, 2] |
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
$(document).ready(function () { | |
var creditCardField = $('#card-element'); | |
creditCardField.on('keyup', function () { | |
//Turn card number into string for substring method | |
var creditCardString = creditCardField.val().toString(); | |
if (creditCardString.length < 2) { | |
//Hide all cards |
NewerOlder