cookie

Ми використовуємо файли cookie для покращення вашого досвіду перегляду. Натиснувши «Прийняти все», ви погоджуєтеся на використання файлів cookie.

avatar

yihong0618 和朋友们的频道

yihong0618 和朋友们的频道

Більше
Рекламні дописи
6 087
Підписники
+4824 години
+897 днів
+60830 днів

Триває завантаження даних...

Приріст підписників

Триває завантаження даних...

Показати все...
在上海花12块就能给一个男人带来快乐,打工人的快乐很简单_哔哩哔哩_bilibili

在上海花12块就能给一个男人带来快乐,打工人的快乐很简单, 视频播放量 1629218、弹幕量 2443、点赞数 132131、投硬币枚数 70636、收藏人数 12901、转发人数 3106, 视频作者 小岳来了24, 作者简介 好好生活,好好活着,相关视频:上海出租房里,43块带你体验打工人下班最真实的快乐,哨塔森林,防火木墙,战壕推进!这场游牧将化为镀金城市!【帝国时代4】,在魔都上海,花35块带你感受打工人最真实的快乐,[MV]河南说唱之神-工厂,再氪7万硬刚土豪战无双!挑战霸服咸鱼之王2.0!,有关于我入职后睡了一觉惊动了集团高层(上篇),62块让这个不当舔狗的男人快乐了一整晚,月赚19800,一分不攒就是花,100块让这个男人快乐了一整晚,年轻那会哪有这个待遇!,今晚宵夜 一盘酱牛肉配上白酒,男人的快乐就是这么简单

Показати все...
我想做个废物!我摊牌了!和解了!_哔哩哔哩_bilibili

-, 视频播放量 390447、弹幕量 3031、点赞数 24975、投硬币枚数 9070、收藏人数 2607、转发人数 1906, 视频作者 导演小策, 作者简介 作品:《广场往事》《朱一旦的枯燥生活》(1-229集)《C座802》(截止到无旦道) 《马小策梦游系列》 ,相关视频:【朱一旦】181 我的编剧跑路了,不要“做”挑战?(第十八期),恋爱7年 迎来了新篇章,有能力的人有权享受世界,[MV]河南说唱之神-工厂,怎么第一巡按钮就亮了?,回村三天,二舅治好了我的精神内耗,【MSI准时哔哔】BLG vs PSG 定时发送,一刀不剪!,最佳拍档!,发现肚脐眼了嘛? 今天穿凉鞋还涂了粉粉的脚指甲哦~

👍 6
Показати все...
Donghee Na (@dongheena92) on X

https://t.co/9c8AwvVBuO

One of my colleagues, @ninoseki san, designed and implemented the VSCode extension module to manage Python dependencies. It is an OSS project!

https://t.co/JWHSsmIaNQ

Check it out :)

👍 2
Repost from 汗牛充栋
Dijkstra的手写体,我觉得写的还挺好看的。他一生写了3000多篇文章(包括论文,博客,信件等……
Показати все...
👍 14 2
面对别人讽刺营销的推文不生气不喷回去,顺着这个角度继续写篇能带来更多流量的推,确实营销大师。虽然我不太喜欢,但确实佩服。 https://x.com/huangyun_122/status/1788517681097806036?s=46
Показати все...
黄赟 (@huangyun_122) on X

推荐个书:《思想本质》,但我更喜欢副标题:《语言是洞察人类天性之窗》 平克四部曲之一。禁忌语的使用,在传播中的作用

Показати все...
My Own 3b1b Animation Engine but in C

Streamed Live on Twitch:

https://twitch.tv/tsoding

Panim Playlist:

https://www.youtube.com/playlist?list=PLpM-Dvs8t0VYH2HouIXMjFFuz7G1FrXiB

References: - 3Blue1Brown Channel:

https://www.youtube.com/3blue1brown

- Tsoding - Musializer -

https://github.com/tsoding/musializer

- Tsoding - Tula -

https://github.com/tsoding/tula

- Easings -

https://easings.net/

Support: - BTC: bc1qj820dmeazpeq5pjn89mlh9lhws7ghs9v34x9v9 - Pay for my VPS:

https://zap-hosting.com/en/shop/donation/2038e94867b5e65cab2e72abf8ad956c/

TIL: Link: https://github.com/simonw/til/blob/main/exif/orientation-and-location.md 📌 Interpreting photo orientation and locations in EXIF data I upgraded my Niche Museums site to use PhotoSwipe for its photo galleries today. Here's my issue. This lead me down a bit of a rabbit hole of photo EXIF data. The two problems I ended up solving: ⦁ Given photo EXIF data, what is the width and height of the image (taking photo orientation into account)? ⦁ Also given EXIF data, how can I determine the latitude and longitude of the photo? ✏️ Figuring out the width and height The PhotoSwipe gallery code needs to have the width and heights of the images embedded in custom data- attributes like this:
<a
  data-pswp-height="3024"
  data-pswp-width="4032"
  href="https://niche-museums.imgix.net/pioneer-history-19.jpeg?w=1200&auto=compress" 
  class="gallery-photo">
  <img
    src="https://niche-museums.imgix.net/pioneer-history-19.jpeg?w=400&blur=200&px=16&auto=format">
</a>
My database was only storing the URL to those images, not their widths and heights. In order to generate the correct HTML I needed that extra information. Niche Museums hosts photos in an S3 bucket behind Imgix, which means I can resize the photos on demand using the ?w= and ?h= query parameters. It also means I can get back JSON for the EXIF data of the images by appending ?fm=json. https://niche-museums.imgix.net/pioneer-history-18.jpeg?fm=json There's a lot of information in there, but the most important bits for solving this problem are:
{
  "Orientation": 3,
  "PixelWidth": 4032,
  "PixelHeight": 3024
}
For my first attempt, I assumed that PixelWidth and PixelHeight represented the width and height of the image, respectively. This almost worked... except for some photos which were displayed in portrait mode, for which the two values appeared to be swapped. The answer turned out to be in the Orientation parameter. GPT-4 helped me understand the following:
The values you mentioned (1, 3, 6, and 8) represent the most common orientations: ⦁ 1: Normal (0° rotation) ⦁ 3: Upside-down (180° rotation) ⦁ 6: Rotated 90° counterclockwise (270° clockwise) ⦁ 8: Rotated 90° clockwise (270° counterclockwise)
So I need to flip the width and height values if the orientation is 6 or 8. I ended up doing that using this SQL query:
select
    'https://niche-museums.imgix.net/' || filename as url,
    case
        when Orientation in (6, 8) then PixelHeight
        else PixelWidth
    end as width,
    case
        when Orientation in (6, 8) then PixelWidth
        else PixelHeight
    end as height
from raw_photos;
✏️ That raw_photos table I skipped a step here: how did I load the data into that raw_photos table in the first place? First I wrote a Python script to retrieve the JSON metadata for every photo. This dumped them into a photos-metadata/, each one with a name like IMG_0859.jpeg.json. That script now runs in GitHub to catch metadata for newly added photos - a form of Git scraping. Next, I wrote a sqlite-utils to load all of those JSON files into my SQLite database. That script also creates a photos view that implements the above case SQL logic. I initially wrote this as a shell script, but it was a LOT slower than doing it in Python:
for json_file in photos-metadata/*.json; do
  sqlite-utils insert browse.db raw_photos \
    --pk=filename \
    --replace \
    --alter \
    --
Показати все...

1
震惊了。。。儿子幼儿园的好朋友家长突然管我们借钱。。。。
Показати все...
😢 16 1🤯 1😭 1
gaotian 也太强了。。。成了cpython 的member 了。 cpython members 有两个华人了。
Показати все...
10👏 7👨‍💻 1
Repost from Frost's Notes
这篇有想法很久了,总算写了出来 https://frostming.com/2024/friendly-python-reuse/
Показати все...
友好的 Python:封装和复用

醉后不知天在水,满船清梦压星河

👍 6