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
[tool.poetry] | |
name = "poetry-demo" | |
version = "0.1.0" | |
description = "" | |
authors = ["dre-hh <[email protected]>"] | |
readme = "README.md" | |
packages = [{include = "poetry_demo"}] | |
[tool.poetry.dependencies] | |
python = ">=3.11,<3.12" |
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 re | |
from IPython import embed | |
import os | |
def fuzzyfinder(input, collection): | |
suggestions = [] | |
input = str(input) if not isinstance(input, str) else input | |
pat = '.*?'.join(map(re.escape, input)) | |
pat = '(?=({0}))'.format(pat) # lookahead regex to manage overlapping matches | |
regex = re.compile(pat, re.IGNORECASE) |
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
#!/usr/bin/env ruby | |
require 'optparse' | |
require 'pry' | |
class Latest | |
def initialize(lang, distros) | |
@lang, @distros = lang, distros | |
@distros = [@lang] unless distros |
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
#!/usr/bin/env ruby | |
heartbit = Thread.new do | |
prev_time = Time.now | |
while true | |
sleep 1 | |
current_time = Time.now | |
puts "#{current_time - prev_time} seconds passed" | |
end | |
end |
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
fun! TerminalRepeat() | |
let buffers = map(filter(copy(getbufinfo()), 'v:val.listed'), 'v:val.name') | |
for buffer in buffers | |
if buffer =~ "term://.*/" | |
let windowNr = bufwinnr(buffer) | |
if windowNr > 0 | |
execute windowNr 'wincmd w' | |
else | |
execute "b " . buffer | |
endif |
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
//ruby | |
this = x.&doThis | |
that = this && y&.doThat(this) | |
//scala | |
that = for { | |
this <- x.doThis | |
that <- y.doThat(this) | |
} yield that |
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
Never gonna give you up | |
Never gonna let you down | |
Never gonna run around and desert you | |
Never gonna make you cry | |
Never gonna say goodbye | |
Never gonna tell a lie and hurt you |