Trigger warning: скрепы.
TL;DR: Я сделал механическую игрушку на российский конкурс, и это была очень сложная инженерная задача.
Несколько месяцев назад Российское Общество «Знание» объявило конкурс «Родная Игрушка»: нужно было отправить идею какой-нибудь куклы, модельки, конструктора, настолки итд, которая впоследствии может производиться в России и обладать соответствующим культурным или научным колоритом. Было подано что-то около 22 тысяч идей, я отправил две. В следующий тур вышло несколько сотен, в том числе внезапно одна из моих — заводная подводная лодка, которая плывет не вперед, как существующие заводные игрушки для ванны, а прям погружается и всплывает. Связал я это не с военными подлодками, а с научными глубоководными аппаратами, по которым у России несколько мировых рекордов. Вы знали, например, что Кэмерон брал наши глубоководные «Мир-1/2» для съемок Титаника? А еще они первыми достигли дна Северного Ледовитого Океана.
После отбора вы попадали в этап моделирования, где нужно было сделать 3D-модель, чертежи, спецификацию, описание и так далее. Здесь я уже не обошелся без помощи профессиональных 2D и 3D художников. Заказал эскизы и моделирование внешнего вида, а сам уже в Компасе дорабатывал нужные элементы для сборки.
Моделирование отсекло ещё значимый процент участников, где-то 70-80 человек в пяти категориях вышли на этап создания прототипа. И вот тут я скажу вам, сложно передать, сколько хитрых инженерных задач пришлось решить по пути. Проект оказался одним из самых сложных (и одним из самых интересных) в моей практике. Вообще, айтишнику полезно поработать с материальным миром, изобилующим погрешностями и допущениями.
Герметичность корпуса, например, испытывает противоположные воздействия при движении в среде вверх и вниз — швы, не пропускающие при погружении, начинают пропускать при всплытии. Разница в два грамма балласта на таких масштабах влияет на плавучесть очень значительно, поэтому балласт должен легко регулироваться (я остановился на двух отсеках с ружейной дробью). Мультипликатор заводного механизма пришлось перепроектировать пять раз, попутно печатая фотополимером зубчатые колеса с модулем пол миллиметра. Сделать фотополимер цветным с устойчивостью к воде — офигенно непростая задача с не самым очевидным решением: в жидкий раствор с нужным базовым оттенком подмешивается пигмент для эпоксидных смол, и только потом печатается на чуть увеличенной засветке. Сделать полностью прозрачное стекло не вышло, но и текущая частичная прозрачность получилась не сразу. Даже у жетонов был десяток итераций, чтобы они не оказались слишком тяжелыми, и чтобы металлическое ядро для захвата магнитом не было слишком далеко от стенок. Добавьте сюда подбор шага и размеров винта, сложности работы с моделью такой формы, летнюю жару, из-за которой постоянно забивался подающий механизм принтера...
Но результатом очень доволен, смотрите видео. Прямо сейчас еду в Москву на выставку игрушек, где выберут победителей, чьи проекты запустят в тираж уже на настоящем производстве.
#gadgets#diy#hobby
http://www.lfd.uci.edu/~gohlke/pythonlibs/
This page provides 32- and 64-bit Windows binaries of many scientific open-source extension #packages for the official #CPython distribution of the #Python programming language.
The files are unofficial (meaning: informal, unrecognized, personal, unsupported, no warranty, no liability, provided "as is") and made available for testing and evaluation purposes.
https://www.buzzfeed.com/andrewkelleher/deep-exploration-into-python-lets-review-the-dict-module?utm_term=.rhDeZBxA8#.bgB5DM0Z9
In this series, we’ll take a look at various modules and pieces of functionality of the #Python language. We’ll look at design choices, their impact, and their evolution. We’ll also look at the design of the language itself and learn about the operations of the interpreter as it parses the language all the way to the main eval loop. Finally, we’ll attempt to give practical takeaways that fall out of a deeper understanding of the language.
The #cpython implementation of Python (which is the standard on most machines) has been ported over to GitHub from its home in Mercurial. I think it also had a time under #SVN, but the engineers managed to preserve (for the most part) the commit logs.
https://wiki.python.org/moin/GlobalInterpreterLock
In #CPython, the #global#interpreter lock, or #GIL, is a mutex that prevents multiple native #threads from executing Python bytecodes at once. This lock is necessary mainly because CPython's memory management is not thread-safe. (However, since the GIL exists, other features have grown to depend on the guarantees that it enforces.)
http://lxml.de/
#lxml is the most feature-rich and easy-to-use library for processing #XML and #HTML in the Python language.
The lxml XML toolkit is a Pythonic binding for the #C libraries #libxml2 and #libxslt. It is unique in that it combines the speed and XML feature completeness of these libraries with the simplicity of a native Python #API, mostly compatible but superior to the well-known ElementTree API. The latest release works with all #CPython versions from 2.6 to 3.6. See the introduction for more information about background and goals of the lxml project. Some common questions are answered in the FAQ.
http://www.jaggedverge.com/2017/11/how-a-web-page-request-makes-it-down-to-the-metal/
How a web page request makes it down to the metal
by : Janis Posted in : Tutorials, work-in-progess Tags : #NGINX, #Python No Comments
The other day I was interested in how many steps occur between sending a #POST or #GET#request from a website to the actual processing that happens on the CPU of the #server. I figured that I knew bits and pieces of the puzzle but I wanted to see the complete path from the highest levels of abstraction all the way to the lowest without missing anything too big in-between. It turns out that in a modern web system there are a lot of steps. I have been really fascinated by this much like the explorer that wants to find a path from one known place to another. If you are interested in better understanding how your computer works you might find walking along this path with your tech stack helpful.
Frontend
prelude: GET request
Browser page #rendering
POST request
sidenote: #CSRF#token
Network stack
sidenote: The Internet
#TCP
sidenote: more comprehensive treatment of network stack
Backend
Handling web request
#WSGI
#Django
Django URL routing
Django views
Python implementations
#CPython
CPython bytecode
CPython bytecode execution details
Machine Code
CPython to machine code
Machine code execution
Hardware implementation details
Microcode
Processor #pipeline
Silicon implementation of addition
Silicon adder unit
AND gate
Transistor