Skip to content

Instantly share code, notes, and snippets.

@Saarth-Jain
Saarth-Jain / readability.py
Created October 16, 2020 05:43
CS50 Solution pset6 readability in python
from cs50 import get_string
text = get_string("Text: ")
numOfLetters = 0
numOfWords = 1
numOfSentences = 0
for i in range(len(text)):
if text[i].isalpha():
numOfLetters += 1
elif text[i].isspace():
@Klerith
Klerith / instalaciones-angular-openai.md
Created January 8, 2024 13:15
Instalaciones recomendadas para el curso de OpenAI con Angular y Nest

OpenAI Logo

Instalaciones recomendadas

Curso de OpenAI con Angular y NestJS

Necesarias

@handcoding
handcoding / Ashley’s Light Fader.yaml
Last active December 29, 2024 20:01
This script for Home Assistant will fade a lamp over time with your choice of easing, including varieties of ease-in, ease-out, and ease-in-out.
alias: Ashley’s Light Fader
description: >
Fades a lamp over time. If you have any questions or comments about this
script, feel free to tweet Ashley Bischoff at @FriendlyAshley. Released under
the Apache 2.0 license. (v2.0)
fields:
light:
name: 💡 Light
description: entity_id of the lamp.
selector:
@nibirrayy
nibirrayy / iemi.md
Last active December 29, 2024 19:59
[GUIDE] How to change IMEI on Snapdragon devices

[GUIDE] How to change IMEI on Snapdragon devices

FOR EDUCATIONAL PURPOSE ONLY, CHANGING IMEI IS ILLEGAL IN MOST COUNTRIES, MAKE SURE YOU CONVINCE YOUR ACTIONS BEFORE DOING THIS.

I DON'T RESPONSIBLE IF YOUR DEVICE IS BROKEN OR THE IMEI IS NOT CHANGED CAUSED BY YOU DIDN'T FOLLOW THE STEPS CAREFULLY OR HAVING A DIFFERENT EFS PARTITION SCHEME.

This guide was tested on Google Pixel 3, different device may also have a different EFS partition scheme, please make sure you adjust it with this guide. Other Google Pixel devices may use this guide without adjusting.

Prerequisites:

"""Skrypt pozwala na pobieranie z napiprojekt.pl gdy nie posiadamy aplikacji.
ID z URL z wynikow wyszukiwania podajemy jako argument do skryptu. Np.
$ python napiprojekt.py e79975aa41dfecf52b81ac8231f4abde > napisy.txt
Wymagania:
* Python 2.7
* Paczki z requirements.txt
"""
@yifanzz
yifanzz / code-editor-rules.md
Created December 17, 2024 00:01
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@m5lil
m5lil / reset.sh
Last active December 29, 2024 19:55
[reset jetbrains application trial] reset jetbrains ide evals v1.0.4 #others
#!/bin/bash
# reset jetbrains ide evals v1.0.4
OS_NAME=$(uname -s)
JB_PRODUCTS="IntelliJIdea CLion PhpStorm GoLand PyCharm WebStorm Rider DataGrip RubyMine AppCode"
if [ "$OS_NAME" == "Darwin" ]; then
echo 'macOS:'
for PRD in $JB_PRODUCTS; do
@Artefact2
Artefact2 / README.md
Last active December 29, 2024 19:53
GGUF quantizations overview

Which GGUF is right for me? (Opinionated)

Good question! I am collecting human data on how quantization affects outputs. See here for more information: ggerganov/llama.cpp#5962

In the meantime, use the largest that fully fits in your GPU. If you can comfortably fit Q4_K_S, try using a model with more parameters.

llama.cpp feature matrix

See the wiki upstream: https://github.com/ggerganov/llama.cpp/wiki/Feature-matrix

@raisabelatrix
raisabelatrix / obsidian-show-ribbon-on-hover.css
Last active December 29, 2024 19:51
Keeps the sidebar ribbon out of sight and only shows it upon hover. [Not tested on Obsidian 1.0+]
/*HIDE RIBBON WHEN SIDEBAR IS COLLAPSED*/
.side-dock-ribbon.mod-left.is-collapsed .side-dock-ribbon-action {
opacity: 0;
transition: opacity .3s;
}
.side-dock-ribbon.mod-left.is-collapsed:hover .side-dock-actions:hover .side-dock-ribbon-action,
.side-dock-ribbon.mod-left.is-collapsed:hover .side-dock-settings:hover .side-dock-ribbon-action {
opacity: 1;
}
@raisabelatrix
raisabelatrix / replace-hashtag-with-emoji.css
Last active December 29, 2024 19:51
Replace Obsidian hashtag in tags to a custom emoji. [Not tested on Obsidian 1.0+]
a.tag,
.kanban-plugin .kanban-plugin__item-tags .kanban-plugin__item-tag {
position: relative;
display: inline-block;
margin: .125em;
}
a.tag::before,
.cm-formatting-hashtag::before {
font-size: .85em;
content: "🌺";