RSSAmplifier

Blog

Stefan's Blog

blog.krastanov.orgRSS feed ↗46 posts

Latest posts

A Few Lines of Python for Beautiful Rendering of Literate Programs

For one of my educational project, a small electronic jewelry-like device meant to teach kids how to program through an artistic platform, we needed a way to present programs as stories that are pleasant to read. The Literate Programming style fulfills these requirements perfectly. Moreover, literate programming is a very …

Making a Timelapse of the Creation of a Printed Circuit Board in KiCad

I have been working on a small electronic jewelry-like device meant to teach kids how to program. The device can be seen on the left. As it is an educational project, it certainly needs pleasant teaching materials and visuals. One such visual, meant for the Engineer s Diary where we …

My Highschool’s anthem (химна на ПМГ акад. Н. Обрешков, Бургас)

Most of my American friends are greatly entertained by the math anthem that my high school had (the math and science high school in my hometown, Burgas, Bulgaria). Given that it is becoming more and more difficult to find the anthem online, I am putting it here for reference, both …

Motion Sensing Jewelry

My favorite way to teach a subject is to present the math or physics under study as the tool empowering you to do magic (the Arthur Clarke type of magic). Moreover, when teaching, the best type of magic is the flashy beautiful whimsical magic. This has led to the creation …

Yale Quantum Institute Art Installation on Non-contextual Hidden Variable Theories

My current institution, the Yale Quantum Institute, a leading research center on quantum computing, has had an Artist in Residence program for the last year, initiated by our manager Dr. Florian Carle. During the year Martha Lewis has been part of the institute, setting up multiple exhibits and working with …

Conference Poster in HTML and CSS

At research conference like the APS Meetings, Gordon Research Conferences, or many others, one of the common way of sharing and presenting your research work is with a printer poster during a poster presentation session. You get to discuss research in a one-on-one setting with whomever passes by your booth …

Building an Automated Bioreactor

In the neighboring lab a group of friends (Siam and Bridget) are working on genetically engineering microorganisms to produce fuel or other useful organics. A lot of their research revolves around rapidly growing various strains of bacteria under a multitude of conditions to study various gene expressions. For a lot …

Heated Bracelet

This is my simple and rather amateurish heated bracelet built around an attiny. First of all, I used a simple resistive heater e-textile as a heat source. It is driven by a PWM signal that switches a transistor. The heater is close to the skin, then on top of it …

Arduino Alarm Clock and Music Player

With an Arduino, an MP3 shield, and a real-time clock one can make a cute alarm clock. I wanted to go one step further and add a pretty almost-graphical interface with an old Nokia LCD screen (that part was especially fun as it led to writing a simplistic interface event …

Simple Laser Projector Based on Persistence of Vision

A fast moving source of light on a sufficiently long exposure photograph will look like a bright continuous streak ( think of photos of fire dancers ). Similarly, a sufficiently fast moving light source would look like a long streak to our eyes too, which permits a number of interesting persistence of …

Booting a Raspberry Pi reliably from USB in the presence of multiple USB drives

I am using my Raspberry Pi for a backup and torrent server, however even high quality SD cards do not survive for more than a month. Maybe I should have moved the swap file first before attempting what is described here, but in any case, a hard drive is a …

A DIY EEG (ECG) Machine

For the moment it is only ECG . A few months ago I started working on a DIY EEG machine with a bio-major undergrad friend of mine. Here is my attempt at writing a lab notebook for the project after the fact. The First Prototype The very first prototype was based …

Конкурса по Физика на фондация Миню Балкански 2013

Тази година под контрола на Свилен Искров отново бях автор на задачите за ежегодното състезание по физика на Фондация Миньо Балкански. Както писах след конкурса от 2011 : Ако не сте млад физик или физичка вероятно не сте чували за него (Всъщност има и конкурс по математика). Но ако сте от …

SymPy plots with D3.js in IPython

About a year ago I contributed a plotting module to SymPy, which was extended with some nice features thanks to a GSoC project just after that. The module supports multiple backends, but for the moment only matplotlib is implemented. It would have been simpler if we had decided to support …

Moving from Wordpress to Pelican

I finally got the time to move my blog from Wordpress to another platform. Wordpress is great for casual blogs, but if one needs to write mathematical expressions or publish any code the support is abysmal - bizarre ad-hoc markup that constantly gets broken by the visual editor. Hence, after reading …

Sage vs SymPy - integration

During the recent GSoC summit I had the chance to participate in many fascinating discussions. One such occasion was while meeting the Sage representative. A detail he mentioned, was that during his tests SymPy frequently failed to solve integrals that Sage (using Maxima) was able to solve. An explanation, in …

Graph of the Relations between Objects in the diffgeom Module

[ ][] This graph, besides showing naively in a rather simplistic way the structure of the theory of differential geometry (and most of what I have implemented in the diffgeom module), brings attention to the one non-trivial part of the module on which I have spent most of my time lately. Namely …

The diffgeom Module - Status Report

I have written already a few posts about the theory behind the module, the structure of the module, etc. However, besides some rare examples, I have not described in much details how the work progresses. So here is a short summary (check the git log for more details): The basics …

Адреси на Народните Представители - юли 2012

[Добавка: 30 октомври] Обновен списък и много друга информация можете да намерите на http://www.parlamentaren-kontrol.com/mails.html За всяка демокрация е важно гражданите лесно да могат да се свържат с избранниците си. Ние трябва да влияем на народните представители не само когато ги избираме. През целият им мандат …

Form Fields and Vector Fields do not form a Vector Space

Form fields or vector fields over a manifold (as opposed to forms and vectors) do not form a vector space . They form a module . The difference is that the scalars of a vector space form an algebraic field while the scalars of a module form a ring . For us humans …

Objects Implemented in the diffgeom Module

This post provides a summary of all mathematical types of expression implemented in the diffgeom module. I have chosen not to mention any python classes or other implementation details at all. This table shows how an object expected by the user to be of certain mathematical type operates on another …

The Schwarzschild Solution

An easy solution to the Einstein equation (in free space) is the spherically symmetric Schwarzschild solution. The pdf bellow shows how one can use the diffgeom module in order to get the equations describing this solution. One starts with the most general spherically symmetrical metric and by using Einstein equation …

Tensor vs Tensor Field, Basis vs Coordinate System

In most of my posts that discuss the SymPy diffgeom module I do not try to make a distinction between a tensor and a tensor field, as it is usually obvious from the context. However, it would be nice to spell it out at least once. I have two favorite …

Visiting CERN for the Big Announcement

This morning I woke up rather early in order to go to the CERN campus to see the announcement of the new particle for myself. First of all: Hell, yeah! [caption id= align= aligncenter width= 512 ][ ][] Higgs-like particle[/caption] When Joe Incandela, the spokeperson for CMS , showed this plot everybody …

Part 1: What is a Tensor and How is it Implemented in the diffgeom SymPy module?

The Math The notion of a tensor is commonly defined in two different ways. The first definition goes roughly like this ( roughly means do not tell this to your math teacher ): A tensor is a geometrical object that can be represented in some coordinate system as an n-dimensional array (it …

Printing in SymPy (for the Differential Geometry Module)

This week I was doing some interesting refactoring, that brings quite a bit of new possibilities, however I will write about this in the coming days. For now printing. Most importantly, any suggestions for improvements are very welcomed. Printing in SymPy is done really easily. You just add a _print_Whatever …

Integral Curves of Vector Fields in SymPy

A week or two ago I implemented some basic functionality for work with integral curves of vector fields. However, I needed to make additional changes in other parts of SymPy in order for the ODE solver to work with systems of equations and with initial conditions. I also wanted to …

Consistent output from the SymPy solvers (and some ideas about the ODE solver)

The work on the differential geometry module has not progressed much this week. I have fixed some minor issues, docstrings and naming conventions, however I have not done much with respect to the implementation of form fields as there are still some questions about the design to be ironed out …

Scalar and Vector Fields in SymPy - First Steps

The Differential Geometry module for SymPy already supports some interesting basic operations. However, it would be appropriate to describe its structure before giving any examples. First of all, there are the Manifold and Patch classes which are just placeholders. They contain all the coordinate charts that are defined on the …

Differential Geometry in SymPy - my GSoC project

The next few moths will be interesting. I got accepted in the Google Summer of Code program and I am already starting to worry (irrationally) about the project and the schedule. I will be working on a differential geometry module for SymPy (and time permitting, some more advanced tensor algebra …

Some Fractal Renderings

Quite some time ago I decided to learn how to program idiomatically in C++. A great resource were the C++ Annotations by Frank B. Brokken, which by the way are also in Debian s repositories. My first and only project in C++ was to write a fractal renderer. I wanted …

Kernel parameters make a difference in power consumption

Yeah, obviously. Some time ago I bought a WeTab portable computer and the machine is wonderful. I can (and I actually do) use it in any way imaginable: it s a tablet form factor (so it s my heavy ebook reader) and with Ubuntu installed it is also my primary …

Какво смята обменен студент от Yale University за Препа

Yale е сред най-добрите университети в света (не са чак толкова добри по физика) и учениците там са наясно с това и се гордеят. В тази статия от училищния им вестник студент отишъл на обмен във Франция споделя впечатленията си.

Френските Висши Училища vs Известните в България Университети

Този пост доста време стоеше тук под формата на rant . Чуствах се раздразнен от някои неща във френското образование и реших да помърморя. Днес поразчистих текста и се опитах да го направя по-обективен (или поне по-малко мрънкащ). Над всичко останало едно нещо намирам за странно във френските гранд еколи. Много …

Скъпоценния камък на Гаус

Есе за скъпоценния камък на Гаус

Конкурса по Физика на фондация Миню Балкански 2011

Аз бях гордият автор на задачите за конкурса тази година. Ако не сте млад физик или физичка вероятно не сте чували за него (Всъщност има и конкурс по математика). Но ако сте от моята каста то знаете за претенциите, че конкурсът е на същото високо ниво като националната олимпиада (обикновено …

Gaussian optics in Sympy: studying a lens

In the last post I presented the small module for gaussian optics that I ve created for sympy. Here I ll try to show a real problem solved with it and with sympy. [update]: The api is still changing. Also here I m using ABCD matrices for something that is …

Gaussian optics in Sympy

[update] The API shown here will most definitely change. During my internship at LKB , Paris I m expected to prepare a number of optical setups. I thought that it would be interesting to do the work in SymPy. That s why I started working on the gaussopt module in sympy …

История на Френската Образователна Система

Тук е разяснено как се е появила системата на Grandes écoles и Classe préparatoire. Статията е публикувана на сайта на фондация Миньо Балкански. Това е същата фондация благодарение на която аз започнах обучението си във Франция.

Какво се учи в Prepa - Математика

Отбелязвам, че това е за филиала, в който аз учех. Има още няколко, но ако мислите да учите в Препа (а не на друго място) най-вероятно ще е за да сте в същия филиал. Филиалът първа година се нарича PCSI (физика, химия и индустриална наука). Филиалът втора година се нарича …

Хроничната ми непоносимост към философията

Това е продължение от тук: http://diana-oxford.blogspot.com/2011/04/blog-post_4735.html http://diana-oxford.blogspot.com/2011/04/blog-post_17.html Накратко: Да прочетох какво беше написала, но не смятам, че си разбрала какво аз имах предвид. Явно наричаме философи две различни неща. За теб това са хората, които задават …

Реформите във френското образование

Както многократно съм казвал, във Франция висшето образование е разделено в две категории - университети и Висши училища . Също така съм споменавал, че Висшите училища са много по-престижни и конкуренцията там е много по-голяма. Там са най-обещаващите студенти. Това, което се смята за проблем от повечето хора (основателно според мен), е …

Prépas

Препа може да е по-ужасен от ада. След като това е уточнено, нека дам подробности. Както вече казах , подготвителните класове (наричани още Prépas) са стъпката преди приема във Висше училище. Две години от много интензивно изучаване на Математика, Физика, Химия, Английски и Философия. След време ще опиша подробно програмата, но …

Първи впечатления от ENS Lyon

След месец занятия(беше месец когато започнах черновата) мисля, че добих достатъчно впечатления от училището, за да ги опиша. Откъм присъствие на чуждестранни студенти - приятно изненадам съм от наличието на голяма бройка. Това не е американски или английски университет, където половината студенти са чужденци, но въпреки това има непренебрежимо количество …

Висше образование във Франция (най-общо)

Ако ще разказвам как минава учението ми във Франция, ще трябва първо да обясня големите разлики между френската образователна система и другите по-известни системи. Преди всичко - във Франция има два типа висше образование - университети и нещо, което французите наричат Grandes écoles (което в превод е точно Висше училище ). От тук …

Първи дни в ENS Lyon - администрация

След две години в Препа и продължителни изпити (за всичко това някой друг път), бях приет в ENS Lyon. Преди няколко дни пристигнах (общежитията отварят на 27 август, а администрацията ни иска тук на 1 септември). Та след около 18 часа път (до София, през Прага и накрая в Лион …