<details>
<summary>## Click me</summary>
### Heading
1. Foo
2. Bar
* Baz
* Qux
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 base64 | |
import requests | |
def encode_image_to_base64(image_path): | |
with open(image_path, "rb") as image_file: | |
return base64.b64encode(image_file.read()).decode('utf-8') | |
def perform_ocr(image_path): | |
base64_image = encode_image_to_base64(image_path) | |
response = requests.post( |
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
FROM nvidia/cuda:12.4.1-devel-ubuntu22.04 AS builder | |
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | |
curl \ | |
libssl-dev \ | |
pkg-config \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y | |
ENV PATH="/root/.cargo/bin:${PATH}" |
This file has been truncated, but you can view the full file.
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
A | |
a | |
aa | |
aal | |
aalii | |
aam | |
Aani | |
aardvark | |
aardwolf | |
Aaron |
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
""" | |
Generates per-file-ignores section for the .flake8 configuration file based on | |
flake8 run output (can be either piped using STDIN or read from the file as the | |
first argument to this script). | |
Use this to disable some linting in legacy code, but keep full linting for | |
newly written code. | |
""" | |
import fileinput |
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 timer = setInterval(() => { | |
document.getElementById('account-0-showMoreLink').click(); | |
}, 1000); | |
clearInterval(timer); | |
function parse() { | |
const results = []; | |
document.querySelectorAll('#account-0-transaction-table > tbody > tr').forEach((node) => { |
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
// This is a naive HTML scraper, using the API might be a better idea (https://medium.com/@bartclaeys/how-to-export-your-robinhood-stocks-fc8245b3d118) | |
var timer = setInterval(() => { | |
window.scrollTo(0,document.body.scrollHeight); | |
}, 1000); | |
clearInterval(timer); | |
function parse() { | |
const results = []; |
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
// without TypeScript (not tested) | |
module.exports = { | |
root: true, | |
extends: [ | |
'airbnb', | |
'airbnb/hooks', | |
'plugin:import/errors', | |
'plugin:import/warnings', | |
'prettier', | |
'prettier/react', |
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
function googleCalendarHoliday() { | |
var fromDate = new Date('2017-12-19T00:00:00-08:00'); | |
var toDate = new Date('2018-01-01T23:30:00-08:00'); | |
var calendarId = "your@gmail"; | |
//Logger.log(CalendarApp.getAllCalendars().map(function(c) { return c.getId() })); | |
var calendar = CalendarApp.getCalendarById(calendarId); | |
var events = calendar.getEvents(fromDate, toDate); | |
Logger.log('Events: ' + events.length); | |
for (var i = 0; i < events.length; i++) { |
I decided to follow up on my email about requires vs. autoload in Ruby. I thought I'd do more research to figure out how to best manage requiring code in a Ruby gem. I decided to take a look at a few popular Ruby projects to get inspired.
The results are... not inspiring.
NewerOlder