Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
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
---Utility for keymap creation. | |
---@param lhs string | |
---@param rhs string|function | |
---@param opts string|table | |
---@param mode? string|string[] | |
local function keymap(lhs, rhs, opts, mode) | |
opts = type(opts) == 'string' and { desc = opts } | |
or vim.tbl_extend('error', opts --[[@as table]], { buffer = bufnr }) | |
mode = mode or 'n' | |
vim.keymap.set(mode, lhs, rhs, opts) |
this is a rough draft and may be updated with more examples
GitHub was kind enough to grant me swift access to the Copilot test phase despite me @'ing them several hundred times about ICE. I would like to examine it not in terms of productivity, but security. How risky is it to allow an AI to write some or all of your code?
Ultimately, a human being must take responsibility for every line of code that is committed. AI should not be used for "responsibility washing." However, Copilot is a tool, and workers need their tools to be reliable. A carpenter doesn't have to
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 flask import Flask, request | |
from sqlalchemy import Column, Integer, String | |
from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine | |
from sqlalchemy.future import select | |
from sqlalchemy.orm import declarative_base, sessionmaker | |
engine = create_async_engine('sqlite+aiosqlite:///./db.db') | |
async_session = sessionmaker( | |
engine, expire_on_commit=False, class_=AsyncSession | |
) |
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 url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;700&family=Fira+Sans:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap"); | |
:root { | |
--background: #282828; | |
--light-background: #3c3836; | |
--lighter-background: #504945; | |
--dark-background: #3c3836; | |
--darker-background: #1d2021; | |
--foreground: #ebdbb2; | |
--current-line: #504954; |
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 21 columns, instead of 13 in line 8.
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
data,d_0_9,d_10_19,d_20_29,d_30_39,d_40_49,d_50_59,d_60_69,d_70_79,d_80_89,d_90,c_0_9,c_10_19,c_20_29,c_30_39,c_40_49,c_50_59,c_60_69,c_70_79,c_80_89,c_90 | |
30 Settembre 2020,4,0,15,70,318,1255,3602,9378,14695,6590,5898,11471,29286,30086,41486,52207,34327,28419,29232,13328 | |
01 Ottobre 2020,4,0,15,70,318,1257,3604,9384,14705,6602,6062,11723,29653,30463,41847,52610,34546,28556,29291,13343 | |
02 ottobre 2020,4,0,15,70,318,1258,3606,9391,14711,6605,6212,11936,30002,30820,42209,52970,34754,28696,29380,13388 | |
03 ottobre 2020,4,0,15,70,318,1261,3606,9394,14717,6606,6316,12106,30282,31075,42461,53241,34942,28799,29420,13410 | |
04 ottobre 2020,4,0,15,70,318,1261,3606,9397,14724,6612,6460,12419,30649,31417,42832,53614,35144,28931,29513,13451 | |
05 ottobre 2020,4,0,15,70,318,1262,3608,9401,14729,6618,6610,12724,30974,31703,43155,53952,35355,29061,29620,13471 | |
06 ottobre 2020,4,0,15,70,319,1263,3613,9409,14736,6621,6920,13209,31719,32314,43842,54715,35816,29377,29857,13535 | |
07 Ottobre 2020,4,0,15,70,319,1263,3616,9416,14744,6625,7067,1 |
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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Install and load required packages | |
install.packages("needs") | |
library(needs) | |
needs(tidyverse, magrittr, animation, pdftools, png, scales) | |
# Function that extracts data from Google Mobility PDFs | |
process_google_mobility <- function(country_code, start_date, end_date){ | |
# Convert first page of PDF into high-res PNG | |
pdf_convert(paste0("https://www.gstatic.com/covid19/mobility/",end_date,"_",country_code,"_Mobility_Report_en.pdf"), format = "png", pages = 1, dpi = 300, filenames = "IMG1.png") |
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 pandas as pd | |
import unicodedata | |
import re | |
from typing import Hashable, List, Collection, Union | |
_underscorer1 = re.compile(r"(.)([A-Z][a-z]+)") | |
_underscorer2 = re.compile("([a-z0-9])([A-Z])") | |
def _camel2snake(col_name: str) -> str: |
NewerOlder