on-internet

Can my continental waterway system feasibly work?

My worldbuilding goal is to create a logistical system for my ancient human civilization. Generally, this civilization needs to urgently deliver certain goods in bulk to the continental center, frequently return to retrieve more, and then head back to the center, creating a continuous cycle. Since land transportation and a lack of modern technology massively hamper efficiency, I decided on maritime shipping and designed this hydrological system to justify their ancient logistics. Consider the following: Massive, circular continent Large inland sea at the center Emanating from the inland sea ar

Join the discussion →

デザインハーネスという虚像 - takanorip blog

デザインハーネスは虚像だ。 デザインハーネスについてまじめにやっている人のことを非難したいわけではない。これが必要だと思う人はやれば良いと思う。だけど僕を巻き込まないでほしい。過度な宣伝をして「デザインハーネスをやらなければ」という流れをつくることはやめていただきたい。たのむ。静かにやってくれ。 ...

Join the discussion →

How can I return a value from a function decorator and from the function itself?

I want to time how long a function takes to execute by using a decorator. My issue is that I want the decorator to return the time value it measured along with the return value of the function. How can I achieve this? Another thing is that I expect the time taken to execute the function to be less than 1 second for small input values. However it shows more time than that. What could cause this? def measure_time(func): def wrapper(): import timeit time = timeit.timeit('func()', globals={'func':func}, number=1) return time return wrapper @measure_time def get_num(): listt = [] for i in range(n+1

Join the discussion →

How can I return a value from a function decorator and the function itself?

I want to time how long a function takes to execute by using a decorator. My issue is that I want to decorator to return the time value it measured along with the return value of the function. How can I achieve this? Another thing is that I expect the time taken to execute the function to be less than 1 second for small input values. However it shows more time than that. What could cause this? def measure_time(func): def wrapper(): import timeit time = timeit.timeit('func()',globals={'func':func},number=1) return time return wrapper n=int(input('Please enter your number: ')) @measure_time def

Join the discussion →

problem with returning a function/decorator

sorry I am a little bit new to python and I have a problem here. at the same time I want to return my list(listt) not print and print it outside the functions before the execution time being returned. I can not kind of figure out how the decorator works and also how to print listt outside the function as I don't want the time of printing be calculated and listt is now local. another thing is I feel like the time for small numbers should be below 1 second but now it returns more than that. Could you please help me fix this problem? I am sorry for this noobish question def measure_time(func): de

Join the discussion →

미국 10월 생산자물가 전년 대비 6.5% 상승, 약 4년 만에 최고

미국 10월 생산자물가지수(PPI) 가 전년 동월 대비 6.5% 상승함 전년 동월 대비 상승률은 2022년 11월 이후 최고치를 기록함 예상치 6.6%를 밑돌았지만, 이전 수치인 6.3%보다 높아짐 전월 대비 PPI 상승률은 0.3% 로, 예상치 0.4%를 밑돎 9월 전월 대비 상승률은 기존 1.3%에서 1.4%로 상향 수정됨 10월 생산자물가와 9월 수정치 전년 동월 대비 상승률은 6.3%에서 6.5%로 높아져 2022년 11월 이후 최고치를 기록했으나, 예상치 6.6%에는 못 미침 전월 대비 상승률은 0.3%로 예상치 0.4%보다 낮았으며, 9월 수치는 1.3%에서 1.4%로 상향 …

Join the discussion →

git archive で作成した zip ファイルを AWS CodePipeline のビルドのソースとして使う場合はDOSタイムスタン

git archive で作成した zip ファイルを AWS CodePipeline のビルドのソースとして使う場合はDOSタイムスタンプをUTCで作成すべき 要約 zip ファイルには DOS タイムスタンプと拡張タイムスタンプがある DOS タイムスタンプはタイムゾーン無しのタイムスタンプ 拡張タイムスタンプはUTCで格納されたタイムスタンプ AWS C...

Join the discussion →

[分享创造] 做了 Genjutsu AI:上传一段视频和一张照片,把人换进去,动作和原声不动

分享一个网站:Genjutsu AI。 它做的事很窄。你上传一段已经拍好的视频,再给要换的每个人各贴一张照片。成片还是原来那条:镜头顺序、动作、机位、剪辑和声音都留着,变的是你贴了照片的人。没贴照片的人、背景、道具,都按原片留在画面里。 不用写提示词。视频传上去之后会按场景切开,把里面的人列出来。一张照片只属于一个人,这个人后面每个镜头都用同一张。照片可以是你自己、朋友、宠物、产品,或者一个角色。 自己手里的 mp4、mov、webm 可以直接传,最大 80MB。站上也有一批模板,点一下就能拿来换人,比如 Hotel Lobby、Tiny Desk AI、Night Dance、Bulin 47。 限制先写在这里: 单个场景超过 15 秒生成不了,得换一条更短的,或者让每个场景都落在 15 秒以内。 成片是 720p,原声保留。 每 15 秒 10 个积分。生成失败,积分退回。 要先用 Google 账号登录。做好的视频留在这个账号里。 积分不过期。一条 15 秒是 10 积分: 套餐 积分 价格 大概能做 Starter 10 首单 $6.90,之后 $9.99 一条 15 秒 Plus 30 $24.99 三条 15 秒,或一条拆成多个短场景的更长视频 Creator 100 $69.99 十条 15 秒 它和 Higgsfield 的 Genjutsu 不是同一个产品。这边就

Join the discussion →

Как Scrum карьере моей помог

Сегодня – обещанная история о том, как я получил повышение благодаря книге. Ситуация, скорее, забавная – о пользе совпадения интересов с начальником. Слышали, наверное, шуточные рекомендации – увлекайся тем же, чем занимаются вышестоящие, и общность увлечений может открыть новые пути развития карьеры. У меня получилось почти так же, но совпадение вышло случайным. Работал я ИТ-директором (это главный над программистами и системными администраторами). Всё было хорошо, но вдруг сменился директор предприятия – мой непосредственный руководитель. С предыдущим начальником у меня всё было хорошо – я н

Join the discussion →

США против Paramount: как Голливуд лишился своих кинотеатров

Представьте: под новый год ваши родители принесли с работы подарочный набор. В нём вас ждёт один-единственный киндер-сюрприз, штук десять нормальных конфет и целая россыпь “Буревестников”, “Ромашек”, “Цитронов” и “Ласточек”. Этот опыт внезапно роднит вас с владельцами независимых кинотеатров в США тридцатых годов. В этом материале я расскажу о судебном процессе, который продлился 10 лет и определил современный облик киноиндустрии. Читать далее

Join the discussion →

Nigeryjski gang rozbity na Mazowszu

Policjanci z CBZC zatrzymali troje obywateli Nigerii w wieku od 29 do 32 lat, podejrzanych o oszustwa metodą BEC (przejmowanie firmowej poczty i podmiana numerów rachunków bankowych w korespondencji z kontrahentami) oszukiwali firmy w Australii, Słowacji, Portugalii, USA i Niemczech.

Join the discussion →

[分享创造] 做了一个中英双语 GLSL 学习站:改代码就能看到 Shader 效果

我做了 Shader Learn,想把 GLSL 的解释、练习和实际画面放在一起,方便前端开发者和创意编程学习者边试边理解。 中文学习入口:https://shader-learn.com/zh/learn 在线编辑器:https://shader-learn.com/playground 目前有学习路径、函数参考、可编辑效果示例,以及实时 Shader Playground。比如在 smoothstep 页面直接修改参数和代码,就能看到边缘过渡的变化:https://shader-learn.com/glsl/smoothstep 编辑器也提供时间控制、纹理和 uniform 配置。可以先在浏览器里试效果,再结合解释看代码。 先说明一下:部分教程需要 Pro,公开函数参考、示例和 Playground 可用于体验。 我是作者,想听听大家在学习 Shader 时最容易卡在哪里,以及这套边改边看的方式是否有帮助。

Join the discussion →

Разоблачаем магию deb-пакетов

Дорогой читатель! Сегодня мы разберёмся, как устроены .deb-пакеты в Linux, и убедимся, что никакой магии в них нет. Превратим небольшой C++ - сервер в устанавливаемый пакет, добавим конфиг и systemd-юнит, разберёмся с зависимостями и обновлениями. Затем автоматизируем сборку и опубликуем пакет в своём APT-репозитории - чтобы устанавливать его одной командой. Интерактивный учебник - Открыть учебник Материалы статьи - Код и примеры на GitHub А ловко ты это придумал....

Join the discussion →

Tokenize/untokenize leaves unwanted lines

When using tokenize to remove a line from source code, untokenize adds back in blank lines for all those lines which I have removed: import tokenize as t from io import StringIO source_code = """a = 'one' b = 'two' c = 'three' d = 'four' e = 'five' """ modi_toks = [] toks = t.generate_tokens(StringIO(source_code).readline) for tok in toks: if not ( 1 < tok.start[0] < 4): modi_toks.append(tok) modi_source = t.untokenize(modi_toks) print(f"{source_code=}") print(modi_source) I have tried writing only (tok.type, tok.string) to the new tokens list but that then causes the white space between the '

Join the discussion →

Tokenize / unotkenize leaves unwanted lines

When using tokenize to remove a line from source code untokenize adds back in blank lines for all those lines which I have removed, see example: import tokenize as t from io import StringIO source_code = """a = 'one' b = 'two' c = 'three' d = 'four' e = 'five' """ modi_toks = [] toks = t.generate_tokens(StringIO(source_code).readline) for tok in toks: if not ( 1 < tok.start[0] < 4): modi_toks.append(tok) modi_source = t.untokenize(modi_toks) print(f"{source_code=}") print(modi_source) I have tried writing only (tok.type, tok.string) to the new tokens list but that then causes the white space b

Join the discussion →

How can I set a static lock screen wallpaper without resetting the OEM lock screen style (clock style, widgets, depth effect)?

I'm building an Android app that sets the currently playing track's album art as the **lock screen** wallpaper (minSdk 26, targetSdk 36). Each time the track changes, it sets a new static bitmap on the lock screen only. On HyperOS and ColorOS devices, the lock screen customisation (clock style, lock screen widgets, depth effect) resets to the phone maker's default whenever my app changes the wallpaper. Setting the same image by hand through the system wallpaper picker keeps the customisation. Device(s) where this happens: - REDMI Note 15 Pro 5G (25080RABDG), Android 15 (API 35), HyperOS 2.0 (O

Join the discussion →

AI 코딩 에이전트의 "테스트 모두 통과"를 믿기 전에 확인하는 9가지 (실측 사례 모음)

Android 앱 몇 개를 혼자 만들면서 클로드 코드에 구현과 테스트를 맡겨 왔습니다. 그동안 "통과"라는 보고가 실제로는 아무것도 지키지 않던 경우를 모아서 정리했습니다. 테스트 3,066개가 다 통과한 채팅 앱에, 기기에서 DB 열기가 실패하는 코드가 남아 있었음 "E2E 100% 통과"의 출처는 expect()가 하나도 없는 러너 7개였음 버그 수정을 되돌려도 테스트 13개가 그대로 통과 대비 검사기는 텍스트 9,318개 중 59.6%만 재고 실패 0건을 냄 "크래시 없음"의 근거는 실행 시간 857ms뿐. 몽키 테스트를 돌리니 15번째 이벤트에서 죽음 …

Join the discussion →

Уран и сковородки: история тефлона

В моём детстве у родителей на кухне была тяжеленная чёрная сковородка (скорее всего, чугунная). У неё была съёмная ручка, и на ней отлично получалось жарить семечки. А вот яичница к ней прилипала похлеще пальцев к суперклею. Но долгое время все жили в парадигме «по-другому не бывает». Оказалось, ещё как бывает! Примерно в 1995 году у нас появилась первая тефлоновая сковорода, и процесс готовки просто преобразился. И не только у нас. Тефлон был настоящим культурным феноменом: о нём сочиняли анекдоты, о нём ходили легенды, а людей, с которых всё как с гуся вода, на какое-то время стали называть

Join the discussion →

私って基本的にハンムラビ法典なんだよな 目には目を、歯には歯を、スト..

私って基本的にハンムラビ法典なんだよな 目には目を、歯には歯を、ストレスを与えてきた人には同等のストレスを これで心の靄がちゃんと晴れちゃうのが良くない 存在だけで私をイライラさせてくる兄のプライドを片っ端からへし折ってたし、パワハラ上司の話は白目剥きながら声量デカめに相槌打ってた

Join the discussion →

Месть за голосовые: генерирую видео с печатающими руками прямо в браузере

У меня есть друзья, которые присылают голосовые на три минуты. Содержание обычно умещается в одно предложение, но чтобы его достать, нужно прослушать «короче, слушай, тут такое дело…». Голосовое не пробежишь глазами, на созвоне его не включишь, а ночью рядом со спящим человеком тем более. В какой-то момент я решил ответить им так же неудобно. Получился pleasejusttext.me: пишешь ответ текстом, а на выходе MP4, где мультяшные руки не спеша набирают его на телефоне. Меня заставили слушать, пусть теперь смотрят. Как это устроено

Join the discussion →
Older stories