background preloader

The Julia Language

The Julia Language

Дерево ван Эмде Боаса / Алгоритмы Всем доброго времени суток! Сегодня я расскажу вам об одной интересной структуре данных, про которую слышали лишь немногие и про которую очень незаслуженно мало написано в рунете, да и в англоязычном информации, в общем-то, тоже негусто. Решено было исправить ситуацию и поделиться с общественностью в доступной форме этой достаточно экзотической структурой данных. Дерево ван Эмде Боаса (van Emde Boas tree) — ассоциативный массив, который позволяет хранить целые числа в диапазоне [0; U), где U = 2k, проще говоря, числа, состоящие не более чем из k бит. Главная особенность этой структуры — выполнение всех операций за время O(log(log(U))) независимо от количества хранящихся в ней элементов. Собственно, вот небольшой список поддерживающихся операций: Итак, приступим к построению нашей структуры, причем строить ее будем рекурсивно. Пусть k-дерево будет хранить числа в интервале [0; 2k), то есть, состоящие из k бит. Теперь построим k-дерево. Оценим асимптотически время работы этих функций.

Six Degrees of Kevin Bacon Using Neo4j and Ruby | Ruby Zone Previously I showed you how to get Neo4j up and running with Ruby and how to find recommended friends on a social network. What about finding out how you are connected to someone outside of your friends of friends network? Do you remember the concept of six degrees of separation? A credit card commercial explains how this works: The actor, Kevin Bacon wants to write a check to buy a book, but the clerk asks for his ID, which he does not have. You may not be a Hollywood actor, but if you’ve used the social network site Linked In, you’ve seen this feature in their “How you’re connected to” window. 01.require 'rubygems' 02.require 'neography' 04. 06.def create_person(name) 07. 08.end 10.def make_mutual_friends(node1, node2) 11. 12. 13.end 15.def degrees_of_separation(start_node, destination_node) 16. paths = @neo.get_paths(start_node, 17. destination_node, 18. 19. depth=4, 20. algorithm="allSimplePaths") 21. paths.each do |p| 22. p["names"] = p["nodes"].collect { |node| 23. 24. end 25.end 39.end 04. 09.

Расстановка дефисов, минусов, тире и кавычек / Типографика 18 ноября 2009 в 20:03 Вопросы правильной расстановки дефисов, длинного и короткого тире, знака минуса, кавычек-елочек и кавычек-лапок уже неоднократно поднимались в интернете и на Хабре в частности (см. ссылки ниже). Однако по-прежнему, студенты и аспиранты в своих курсовых и дипломных, диссертациях и авторефератах не уделяют достаточного внимания типографике. В данной заметке я привожу две таблицы с основными правилами расстановки указанных знаков и отбивок между ними при верстке текстов в системе LaTeX, в которой готовится значительная часть квалификационных работ по физико-математическим специальностям. Со временем возможно появятся похожие таблички с правилами расстановки пробелов, знаков препинания и по оформлению текста в целом. Дефисы, минусы и тире Источники и дополнительные ссылки С. Кавычки Upd. Только зарегистрированные пользователи могут оставлять комментарии.

Using Julia in the classroom Julia is ready for the classroom. We encourage instructors to participate in the Julia community resources for questions about Julia or specific packages. Classes using Julia for teaching Julia is now being used in several university courses in North America. Stanford University, Spring 2014 AA222, Introduction to Multidisciplinary Design Optimization (Prof. For a quick introduction to Julia, see these introductory slides. Steve Johnson maintains an excellent resource for using Julia in the classroom at MIT. Installing Julia The Julia and IPython teams have collaborated to develop IJulia, which provides a powerful graphical notebook interface to Julia. Julia binaries are available for Mac and Windows. Julia tutorials Topical material Julia packages The Julia community has put together a number of packages spanning multiple disciplines. The Julia manual The Julia manual contains a complete introduction to the Julia language. Videos

Universidad Autónoma de Nuevo León PHP: a fractal of bad design - fuzzy notepad (This article has been translated into Spanish (PDF, with some additions) by Jorge Amado Soria Ramirez — thanks!) Preface I’m cranky. I complain about a lot of things. This is not the same. PHP is the lone exception. PHP is an embarrassment, a blight upon my craft. But I’ve got to get this out of my system. An analogy I just blurted this out to Mel to explain my frustration and she insisted that I reproduce it here. I can’t even say what’s wrong with PHP, because— okay. Stance I assert that the following qualities are important for making a language productive and useful, and PHP violates them with wild abandon. A language must be predictable. My position is thus: PHP is full of surprises: mysql_real_escape_string, E_ALLPHP is inconsistent: strpos, str_rot13PHP requires boilerplate: error-checking around C API calls, ===PHP is flaky: ==, foreach ($foo as &$bar)PHP is opaque: no stack traces by default or for fatals, complex error reporting I’ve been in PHP arguments a lot. Core language Text

Fancy FAQ page using CSS3 only Usually, a FAQ page is that long page with lots of questions and answers, the one we are searching for when we need some extra info regarding a subject. So, for example, if you own a website that sells stuff, then you will need a page like that. In this article I'll show you how to create a fancy FAQ page using CSS3 only, no JavaScript. View demo The idea When I visited Facebook's Help Center section (theirs FAQ's), I noticed a cool effect for the answers previews. After seeing it, of course I immediately thought about how can I create a similar effect using CSS3 only. The HTML We will start as usual with the markup structure: <section class="faq-section"><input type="checkbox" id="q1"><label for="q1">Question? In the above image, the label is the proper heading of the section. How it works? There's no rocket science here. I played before with this cool technique, but never had the opportunity to create a practical example actually. The CSS Browser support What about the older browsers? Done!

List of logic symbols In logic, a set of symbols is commonly used to express logical representation. As logicians are familiar with these symbols, they are not explained each time they are used. So, for students of logic, the following table lists many common symbols together with their name, pronunciation, and the related field of mathematics. Additionally, the third column contains an informal definition, and the fourth column gives a short example. Be aware that, outside of logic, different symbols have the same meaning, and the same symbol has, depending on the context, different meanings. Basic logic symbols[edit] Advanced and rarely used logical symbols[edit] These symbols are sorted by their Unicode value: U+00B7 · middle dot, an outdated way for denoting AND,[2] still in use in electronics; for example "A·B" is the same as "A&B"·: Center dot with a line above it. Note that the following operators are rarely supported by natively installed fonts. Poland and Germany[edit] and the existential quantifier as .

Fast Numeric Computation in Julia Working on numerical problems daily, I have always dreamt of a language that provides an elegant interface while allowing me to write codes that run blazingly fast on large data sets. Julia is a language that turns this dream into a reality. With Julia, you can focus on your problem, keep your codes clean, and more importantly, write fast codes without diving into lower level languages such as C or Fortran even when performance is critical. However, you should not take this potential speed for granted. First, make it correct As in any language, the foremost goal when you implement your algorithm is to make it correct. Devectorize expressions Users of other high level languages such as MATLAB® or Python are often advised to vectorize their codes as much as possible to get performance, because loops are slow in those languages. Consider the following: r = exp(-abs(x-y)) Very simple expression, right? Such overhead is significant in practice, often leading to 2x to 3x slow down. while !

Interpreted Languages: PHP, Perl, Python, Ruby (Sheet One) - Hyperpolyglot a side-by-side reference sheet sheet one: version | grammar and execution | variables and expressions | arithmetic and logic | strings | regexes | dates and time | arrays | dictionaries | functions | execution control | exceptions | threads sheet two: streams | asynchronous events | files | file formats | directories | processes and environment | option parsing | libraries and namespaces | objects | inheritance and polymorphism | reflection | net and web | gui | databases | unit tests | logging | debugging sheet two: streams | asynchronous events | files | directories | processes and environment | option parsing | libraries and namespaces | objects | inheritance and polymorphism | reflection | net and web | gui | databases | unit tests | logging | debugging version used The versions used for testing code in the reference sheet. show version How to get the version. php: The function phpversion() will return the version number as a string. python: import platform platform.python_version() ruby: <? pad

Using HTML5 to Create Charts and Graphs Today I found an interesting library – flotr2: an opensource library for drawing HTML5 charts and graphs. It allows you to draw charts in different formats such as: linesbarscandlespiesbubbles Also, it doesn’t require any additional libraries such as jQuery or Prototype. Here is our demo and a downloadable package: Live Demo Downloadable Package Ok, download the source files and lets start coding! Step 1. Here is the markup of our final page: index.html <! Step 2. Here are all the stylesheets: css/main.css Step 3. js/flotr2.min.js and js/flashcanvas.js Both libraries are required and available in our package. Next – our custom file where I have implemented two different functions and three visual modes for charts. js/script.js Full documentation for the flotr2 library is available here. Conclusion As usual, I hope that today’s lesson was interesting for everyone. Source:

Требования к магистерской диссертации | Магистерское и послевузовское образование Магистерская диссертация является квалификационной работой, в которой студент должен показать профессиональное владение теорией и практикой предметной области, умение решать конкретные задачи в сфере своей профессиональной деятельности. Магистерская диссертация представляет собой отчет об изучении студентом конкретной задачи с целью построения ее решения. Магистерская диссертация должна состоять из следующих частей: • Титульный лист • Оглавление • Аннотация • Введение • Постановка задачи • Обзор существующих решений рассматриваемой задачи или ее модификаций • Исследование и построение решения задачи • Описание практической части • Заключение • Список цитируемой литературы Требования к содержанию вышеперечисленных частей магистерской диссертации 1. * Введение * Постановка задачи * Обзор предметной области, к которой относится рассматриваемая задача * Исследование и построение решения задачи * Описание практической части * Заключение * Список цитируемой литературы 1. 4. 1. 1. 1. Поле 6. 2.

Dynamic State Machines I was talking with my coworkers Jeff and Randy yesterday about some work Randy was doing implementing a finite state machine in django, and I was reminded of a pattern I've previously used to implement state machines using Python's dynamic typing to do it. In more static languages, an object is forever bound to its type, and implementing state-dependent behavior often requires using supporting classes which can be switched out to implement the variable behavior of different states. Python's dynamic nature makes this much simpler. Implementing state with dynamic typing In python, an object's type is determined simply by looking at the value of it's __class__ attribute. Conveniently, but also rather frighteningly, this attribute is mutable. This pattern is very powerful, and could easily be abused, but it expresses what is happening clearly and effectively, and matches the problem domain straightforwardly. A Blue morpho butterfly (Morpho menelaus) The life-cycle of a Butterfly Happy coding!