├── .gitattributes ├── .gitignore ├── README.rst ├── raw_files ├── Djangocon 1st June 15 FINAL.docx ├── Djangocon 2nd June 15 FINAL.docx ├── Djangocon 31st May 15 Open Day FINAL.docx ├── Djangocon 3rd June 15 FINAL.docx ├── open_day_raw_transcript.txt ├── talks_day_1_raw_transcript.txt ├── talks_day_1_working_copy.txt ├── talks_day_2_raw_transcript.txt ├── talks_day_2_working_copy.txt ├── talks_day_3_raw_transcript.txt └── talks_day_3_working_copy.txt └── transcripts ├── Makefile ├── conf.py ├── contributing └── index.rst ├── index.rst ├── make.bat ├── open_day ├── adrienne_lowe.rst ├── alasdair_nicol.rst ├── amit_nabarro.rst ├── arni_st_sigurosson.rst ├── christopher_hunt.rst ├── cory_benfield.rst ├── daniele_procida.rst ├── index.rst ├── jamie_hannaford.rst ├── katharine_jarmul.rst ├── mark_steadman.rst ├── raphael_barrois.rst ├── rhiannon_titcomb.rst ├── rivo_laks.rst ├── roger_whitaker.rst ├── russell_keith_magee.rst ├── tom_bakx.rst ├── yamila_moreno.rst └── zan_anderle.rst ├── talks_day_one └── index.rst └── talks_day_two ├── aaron_bassett.rst ├── benjamin_wohlwend.rst ├── daniele_procida.rst ├── david_gouldin.rst ├── index.rst ├── kat_stevens.rst ├── loek_van_gent.rst ├── markus_holtermann.rst ├── matthew_somerville.rst ├── ola_sendecka.rst ├── shai_berger.rst ├── stefan_foulis.rst ├── theofanis_despoudis.rst ├── thomas_turner.rst ├── under_the_hood.rst ├── xavier_dutreilh.rst └── yulia_zozulya.rst /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Numerous always-ignore extensions 2 | *.pyc 3 | *.diff 4 | *.err 5 | *.orig 6 | *.log 7 | *.rej 8 | *.swo 9 | *.swp 10 | *.vi 11 | *.cache 12 | *.egg-info 13 | *~ 14 | *# 15 | 16 | # OS or Editor folders 17 | .DS_Store 18 | Thumbs.db 19 | .cache 20 | .project 21 | .settings 22 | .tmproj 23 | *.esproj 24 | nbproject 25 | *.sublime-project 26 | *.sublime-workspace 27 | .tm_properties 28 | ._* 29 | 30 | # Folders to ignore 31 | .hg 32 | .svn 33 | .CVS 34 | .idea 35 | _assets 36 | _design 37 | _content 38 | _tmp 39 | dist 40 | build 41 | _build 42 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ========================== 2 | DjangoConEuropeTranscripts 3 | ========================== 4 | 5 | Proceedings from DjangoCon Europe 2015. 6 | 7 | `Published on Read the Docs `_. 8 | 9 | See 10 | https://github.com/evildmp/DjangoConEuropeTranscripts/blob/master/transcripts/contributing/index.rst 11 | for guidance on how the files are structured and how you can contribute to creating the 12 | transcripts. 13 | 14 | Once the conference videos have been edited and published by `AOTV `_ the work 15 | to create final versions of the transcripts can begin in earnest. 16 | 17 | See also `Joachim Jablon's `_ start on a project 18 | to turn the transcripts into synchronised video subtitles. 19 | -------------------------------------------------------------------------------- /raw_files/Djangocon 1st June 15 FINAL.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evildmp/DjangoConEuropeTranscripts/d21e57780e1b4c497d8a700e5b99999bded9f303/raw_files/Djangocon 1st June 15 FINAL.docx -------------------------------------------------------------------------------- /raw_files/Djangocon 2nd June 15 FINAL.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evildmp/DjangoConEuropeTranscripts/d21e57780e1b4c497d8a700e5b99999bded9f303/raw_files/Djangocon 2nd June 15 FINAL.docx -------------------------------------------------------------------------------- /raw_files/Djangocon 31st May 15 Open Day FINAL.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evildmp/DjangoConEuropeTranscripts/d21e57780e1b4c497d8a700e5b99999bded9f303/raw_files/Djangocon 31st May 15 Open Day FINAL.docx -------------------------------------------------------------------------------- /raw_files/Djangocon 3rd June 15 FINAL.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evildmp/DjangoConEuropeTranscripts/d21e57780e1b4c497d8a700e5b99999bded9f303/raw_files/Djangocon 3rd June 15 FINAL.docx -------------------------------------------------------------------------------- /raw_files/open_day_raw_transcript.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evildmp/DjangoConEuropeTranscripts/d21e57780e1b4c497d8a700e5b99999bded9f303/raw_files/open_day_raw_transcript.txt -------------------------------------------------------------------------------- /raw_files/talks_day_2_working_copy.txt: -------------------------------------------------------------------------------- 1 | Okay. We are in the very last session of the day. Our lightening talks so if you signed up yesterday and weren't on the list, make your way to the front. If you signed up today, form a queue behind them. 2 | Briefly, Djangocon Europe 2016 will be held in Europe, but we don't know (LAUGHTER) (APPLAUSE). 3 | Other than that, we don't yet know where! so we are inviting proposals and suggestions. If you think that you might be able to put together a team in a suitable venue, in a suitable town to host this conference next year, come and talk to us. We will announce this very soon. We have already got some expressions of interest but, we would like to know more. What's more, if it is, if you feel it is something you would like to do but perhaps aren't ready to do it in a year's time, now is also the time to come forward. Because we would like those people who are putting forward serious proposals for a Djangocon Europe in 2017 to be involved with the organising committee of Djangocon committee 2016, so there can be an exchange of knowledge and information and so on. If you would like to be involved in organising it. The time to speak is now, even if you are not going the do it next year. 4 | Peter Finch is in the house, ready to go on a Cardiff walk if you haven't been. Put your hand up if you went yesterday? Do you recommend it? Yes. Even though it was absolutely horrible with rain, everyone who went on it thoroughly recommended it. If you are booked on, you will need to meet Peter on the steps of the museum at 6:30 sharply. We have got some of Peter’s books for sale on the registration desk, if you have bought one, I am sure you can get him to sign it if you ask him nicely. 5 | Vegetarian studio, be there by, if you have got a ticket for the clink, please be there by 7:30. Let's go on to lightening talks. (APPLAUSE). 6 | We have Daniel. Did you do a lightening talk yesterday? Yes, you did. So who is next? 7 | Django and robotic telescopes, Edward thank you. 8 | Plug yourself in and off you go. Got the timer? 9 | So, in case you weren't aware, there is only rule one of lightening talk club, your talks last no longer than five minutes when we get towards the end I might give you a signal and you can start clapping like so, just to let people know and when I give you another signal. Go into a round of applause when their time is up. 10 | NEW SPEAKER: Well normally when I stand in front of a group of strangers, either astronomers or school kids, I am daunted by standing in front of an impressive group of brains, oh what has happened there? I keynote quit. I am not impressed with that, slightly more daunted. My computer is doing weird stuff. Hang on a sec. What I was going the talk to you about, something fascinating about astronomy. Everybody loves doing this sort of thing on the fly, I will try and get what was my presentation back. 11 | I would sing to you, I think that would be more terrifying than what I am about to say. 12 | These Macs are rubbish! 13 | (APPLAUSE) (LAUGHTER). 14 | Okay now got a minute less than when I started so, this is a beautiful picture of a galaxy, who likes space? Oh wow, I thought IE seven going to have to walk off the stage, that is a galaxy, a hundred billion stars, the greedy star on the right is eating the one on the left. This is something in our own galaxy, this is stars being born. This is an asteroid that I observed. This is zooming through space, this is a galaxy with an exploding star in it that was brighter than the whole galaxy, so these hopefully have wet your appetite. If you were one of the few people that didn't like astronomy and space before, hopefully that has made you like it now. 15 | I work for an observatory, we have a robotic telescope that spans the globe, unlike the British Empire we are not evil (LAUGHTER) and, the sun never rises on our network, see what I did there? We have 12 currently operating telescopes, we have a big one like this, the size of a double decker bus or if you are not from Britain, the size of two buses on top of each other. 16 | Telescope, 1 meter, the size of a family car. We have telescopes that are 40 centimetre class ones, about the size of R two D two maybe you are too clever for that one. 17 | We cluster them together at the sitings, we have more than a thousand active users about 250 of those professional astronomers and about 750 school kids. Now, how do we accept all the requests and package them together, we don't let people look at individual telescopes or let alone to fly to them. They go to a website and they make requests. There is a cyber-robot, it is a bit like a giant Tetris programme in multi-dimensions, there is the most optimised observing strategy, we use Django from almost everything, from the submission interface, to the request handling, the observation request handling and storage, a jerobi solver to package them tonight. The schedule that produces is stored in a database and we can inspect it with Django and the telescope is in java, boo. 18 | Once your observation has been done, the image data pipeline is done in weird stuff. The archiving is done with Python and then we can inspect that with an open access archive through Django and an observation request interface which is also Django, so the reason for my talk is, we need you guys. I am a little bit daunted because I sort of had a crazy idea the other day, you could do more than just support us through amazing and awesome things with Django's and Django's core at the third party apps. Maybe try it out for yourself, normally we only let professionals and school kids use our network, but you could also try it out or, if you want to try it out and take it a bit further also work for us. 19 | After Russell's talk said he is a doctor, there is me in the Tardis saying I am the "doctor." 20 | DANIELE PROCIDA: ... following from, Craig following by Carlos please. 21 | NEW SPEAKER: Craig: How do I get this to? 22 | DANIELE PROCIDA: After Carlos we have, Thomas. Then Matthew. 23 | CRAIG: Does this work? Hello? 24 | [changing resolution]. 25 | I can't get the slides working, I spent an hour, if you want to see them, find me later on. 26 | My name is Craig stone, you can find me on twitter. Since December I have been trying to mash Django with angular JS together to try and create a real-time web thing. So, you can get, so I am guessing how many people here know about angular Jess, everyone knows Django? An excellent back end from what I found and most of this mashing together the two frameworks is because my team leader said we should be doing this, I have been doing that. 27 | I have been using Django fresh ... an app called Django jangular, I had to rename them annoyingly. 28 | So if you can use Django rest framework to serialise your objects, set that at the front end as a Json, then been using Django angular to allow remote, you can decorate a method on your view with allow, remote underscore, invocation, what that will let you do, that will let you call your Python from the angular JS so if you have some Python code which you don't want to rewrite in angular or java script, or have a long going process which you can fire off, you can access it that way. Simple if you can, if I can show you the docks later on, talks you through it. 29 | So that is what I use Django angular for. 30 | The other package I have been using jangular, that lets me access the settings from java script, so I can point at the static urls, when I ... I don't have to rewrite stuff. 31 | There is some other cool things that I have not developed yet with the packages but there is something called I think swamp dragon does slightly better but not looked at that, three way binding with Reddis. Input something on the page and type out for you as well. But also, there is way of using Django angular, to pipe it to Reddis and to pipe it to your database directly. 32 | Also some edits to manage.py which one of the packages does, rather than have star app, star angular app, that gives you a ..., based on angular seed. I also found using Django angular and jangular as a good way of learning. 33 | There are some issues, angular Jess uses curly braces, use the verbatim type you saw earlier, I let Django have its time with my index view, and passing it to jangular JS to fill everything else in. Both do urls routing, seems a waste to have two doing differently and you can't use both. 34 | As nice as it is, I had to learn a whole new language, so, so I suppose that is a plus and a minus. Am I in time? Do I have time for questions? 35 | Oh. I can see a time limit. One minute of questions then. 36 | No? Okay. (APPLAUSE). 37 | Okay, Carlos, API by example? 38 | CARLOS: ... 39 | All right. So, this is API by example. It was, it used to be! 40 | It is no longer. Here it is again. So API by example this is an approach we took to testing across different services. So, this is what we had at when we started we had classic Django application it was a monolithic thing, what we wanted to get to, to more split up into smaller services in the back end we wanted to use Django and a API server, the ... this is the kind of simplified view of part of the system and so the, we had two teams a front end team and a back end team and we basically wanted both teams to be able to work independently, we wanted the UI team not to be blocked by the back end team. We wanted to reduce the dependencies between both teams and wanted both teams to be able to test their part separately and we wanted to avoid the fact that the, in the past, the back end team was dictating and the front end had to adapt to it after. 41 | So we developed a way to specify the API we wanted to make it a bit formalised. We defined API by example. Specified with a sample question and responses, structured into the files, ABE files. This is what the files look like, you have the description bit at the beginning, more, more humans, so it is meant for a machine human consumption, there is a part that describes exchanges of requests and responses, you can have as many examples of this as you want. Structured repository, we had .. and mocks and back end application. 42 | So the, the important thing to establish, began around the discussion around API so this discussion was formalised as a pull request for the repository, this pull request had to be signed up at least one person in back end and front end, we wanted to know it was usable by the people. 43 | In the end, the PR discussion became a documented discussion over the API process and ABE file became documented not just a documented API but with some tooling around we could use it for testing. Whenever a this was, PR was merged it could be labelled as a API ... (INAUDIBLE) easy to install it as a Python dependency... after the new API release, took two PR's to produce the, -- this on the front end and back end team could work on implementing the stuff. 44 | We built tooling, the whole idea around this was not just (INAUDIBLE) of the API but to make it easy to ensure that when we are testing separately, then we were testing the same thing, so we built something around this. The tooling for angular testing was at the AV protector tool, generates a back end with these responses and requesting responses and also built a small ... worked in Python units or integration tests. 45 | If you think this idea to apply to you and it is something you could do with, it is still much a work in progress, we would be happy to hear of others problems, to come up with something that we would love to be like widespread around the, the community and we would love for the tooling system to grow and to be much more useful for the documentation to be better, so you can come, find me, I will try and make a shirt that is more identifiable, so you can easily remember me. Contact me over channels as well. We have an organisation and we have example and we have several there with other tools we have. Thank you. (APPLAUSE) 46 | -------------------------------------------------------------------------------- /transcripts/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = _build 9 | 10 | # User-friendly check for sphinx-build 11 | ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) 12 | $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) 13 | endif 14 | 15 | # Internal variables. 16 | PAPEROPT_a4 = -D latex_paper_size=a4 17 | PAPEROPT_letter = -D latex_paper_size=letter 18 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 19 | # the i18n builder cannot share the environment and doctrees with the others 20 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 21 | 22 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext 23 | 24 | help: 25 | @echo "Please use \`make ' where is one of" 26 | @echo " html to make standalone HTML files" 27 | @echo " dirhtml to make HTML files named index.html in directories" 28 | @echo " singlehtml to make a single large HTML file" 29 | @echo " pickle to make pickle files" 30 | @echo " json to make JSON files" 31 | @echo " htmlhelp to make HTML files and a HTML help project" 32 | @echo " qthelp to make HTML files and a qthelp project" 33 | @echo " applehelp to make an Apple Help Book" 34 | @echo " devhelp to make HTML files and a Devhelp project" 35 | @echo " epub to make an epub" 36 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 37 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 38 | @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" 39 | @echo " text to make text files" 40 | @echo " man to make manual pages" 41 | @echo " texinfo to make Texinfo files" 42 | @echo " info to make Texinfo files and run them through makeinfo" 43 | @echo " gettext to make PO message catalogs" 44 | @echo " changes to make an overview of all changed/added/deprecated items" 45 | @echo " xml to make Docutils-native XML files" 46 | @echo " pseudoxml to make pseudoxml-XML files for display purposes" 47 | @echo " linkcheck to check all external links for integrity" 48 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 49 | @echo " coverage to run coverage check of the documentation (if enabled)" 50 | 51 | clean: 52 | rm -rf $(BUILDDIR)/* 53 | 54 | html: 55 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 56 | @echo 57 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 58 | 59 | dirhtml: 60 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 61 | @echo 62 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 63 | 64 | singlehtml: 65 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 66 | @echo 67 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 68 | 69 | pickle: 70 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 71 | @echo 72 | @echo "Build finished; now you can process the pickle files." 73 | 74 | json: 75 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 76 | @echo 77 | @echo "Build finished; now you can process the JSON files." 78 | 79 | htmlhelp: 80 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 81 | @echo 82 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 83 | ".hhp project file in $(BUILDDIR)/htmlhelp." 84 | 85 | qthelp: 86 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 87 | @echo 88 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 89 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 90 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Speech-to-textreportsfromDjangoConEurope2015.qhcp" 91 | @echo "To view the help file:" 92 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Speech-to-textreportsfromDjangoConEurope2015.qhc" 93 | 94 | applehelp: 95 | $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp 96 | @echo 97 | @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." 98 | @echo "N.B. You won't be able to view it unless you put it in" \ 99 | "~/Library/Documentation/Help or install it in your application" \ 100 | "bundle." 101 | 102 | devhelp: 103 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 104 | @echo 105 | @echo "Build finished." 106 | @echo "To view the help file:" 107 | @echo "# mkdir -p $$HOME/.local/share/devhelp/Speech-to-textreportsfromDjangoConEurope2015" 108 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Speech-to-textreportsfromDjangoConEurope2015" 109 | @echo "# devhelp" 110 | 111 | epub: 112 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 113 | @echo 114 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 115 | 116 | latex: 117 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 118 | @echo 119 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 120 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 121 | "(use \`make latexpdf' here to do that automatically)." 122 | 123 | latexpdf: 124 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 125 | @echo "Running LaTeX files through pdflatex..." 126 | $(MAKE) -C $(BUILDDIR)/latex all-pdf 127 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 128 | 129 | latexpdfja: 130 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 131 | @echo "Running LaTeX files through platex and dvipdfmx..." 132 | $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja 133 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 134 | 135 | text: 136 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 137 | @echo 138 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 139 | 140 | man: 141 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 142 | @echo 143 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 144 | 145 | texinfo: 146 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 147 | @echo 148 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 149 | @echo "Run \`make' in that directory to run these through makeinfo" \ 150 | "(use \`make info' here to do that automatically)." 151 | 152 | info: 153 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 154 | @echo "Running Texinfo files through makeinfo..." 155 | make -C $(BUILDDIR)/texinfo info 156 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 157 | 158 | gettext: 159 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 160 | @echo 161 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 162 | 163 | changes: 164 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 165 | @echo 166 | @echo "The overview file is in $(BUILDDIR)/changes." 167 | 168 | linkcheck: 169 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 170 | @echo 171 | @echo "Link check complete; look for any errors in the above output " \ 172 | "or in $(BUILDDIR)/linkcheck/output.txt." 173 | 174 | doctest: 175 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 176 | @echo "Testing of doctests in the sources finished, look at the " \ 177 | "results in $(BUILDDIR)/doctest/output.txt." 178 | 179 | coverage: 180 | $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage 181 | @echo "Testing of coverage in the sources finished, look at the " \ 182 | "results in $(BUILDDIR)/coverage/python.txt." 183 | 184 | xml: 185 | $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml 186 | @echo 187 | @echo "Build finished. The XML files are in $(BUILDDIR)/xml." 188 | 189 | pseudoxml: 190 | $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml 191 | @echo 192 | @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." 193 | -------------------------------------------------------------------------------- /transcripts/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Speech-to-text reports from DjangoCon Europe 2015 build configuration file, created by 4 | # sphinx-quickstart on Sat Jun 6 09:11:53 2015. 5 | # 6 | # This file is execfile()d with the current directory set to its 7 | # containing dir. 8 | # 9 | # Note that not all possible configuration values are present in this 10 | # autogenerated file. 11 | # 12 | # All configuration values have a default; values that are commented out 13 | # serve to show the default. 14 | 15 | import sys 16 | import os 17 | import shlex 18 | 19 | # If extensions (or modules to document with autodoc) are in another directory, 20 | # add these directories to sys.path here. If the directory is relative to the 21 | # documentation root, use os.path.abspath to make it absolute, like shown here. 22 | #sys.path.insert(0, os.path.abspath('.')) 23 | 24 | # -- General configuration ------------------------------------------------ 25 | 26 | # If your documentation needs a minimal Sphinx version, state it here. 27 | #needs_sphinx = '1.0' 28 | 29 | # Add any Sphinx extension module names here, as strings. They can be 30 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 31 | # ones. 32 | extensions = [] 33 | 34 | # Add any paths that contain templates here, relative to this directory. 35 | templates_path = ['_templates'] 36 | 37 | # The suffix(es) of source filenames. 38 | # You can specify multiple suffix as a list of string: 39 | # source_suffix = ['.rst', '.md'] 40 | source_suffix = '.rst' 41 | 42 | # The encoding of source files. 43 | #source_encoding = 'utf-8-sig' 44 | 45 | # The master toctree document. 46 | master_doc = 'index' 47 | 48 | # General information about the project. 49 | project = u'Speech-to-text reports from DjangoCon Europe 2015' 50 | copyright = u'2015, Hilary Maclean and Sheryll Holley' 51 | author = u'Hilary Maclean and Sheryll Holley' 52 | 53 | # The version info for the project you're documenting, acts as replacement for 54 | # |version| and |release|, also used in various other places throughout the 55 | # built documents. 56 | # 57 | # The short X.Y version. 58 | version = '0.1' 59 | # The full version, including alpha/beta/rc tags. 60 | release = '0.1' 61 | 62 | # The language for content autogenerated by Sphinx. Refer to documentation 63 | # for a list of supported languages. 64 | # 65 | # This is also used if you do content translation via gettext catalogs. 66 | # Usually you set "language" from the command line for these cases. 67 | language = None 68 | 69 | # There are two options for replacing |today|: either, you set today to some 70 | # non-false value, then it is used: 71 | #today = '' 72 | # Else, today_fmt is used as the format for a strftime call. 73 | #today_fmt = '%B %d, %Y' 74 | 75 | # List of patterns, relative to source directory, that match files and 76 | # directories to ignore when looking for source files. 77 | exclude_patterns = ['_build'] 78 | 79 | # The reST default role (used for this markup: `text`) to use for all 80 | # documents. 81 | #default_role = None 82 | 83 | # If true, '()' will be appended to :func: etc. cross-reference text. 84 | #add_function_parentheses = True 85 | 86 | # If true, the current module name will be prepended to all description 87 | # unit titles (such as .. function::). 88 | #add_module_names = True 89 | 90 | # If true, sectionauthor and moduleauthor directives will be shown in the 91 | # output. They are ignored by default. 92 | #show_authors = False 93 | 94 | # The name of the Pygments (syntax highlighting) style to use. 95 | pygments_style = 'sphinx' 96 | 97 | # A list of ignored prefixes for module index sorting. 98 | #modindex_common_prefix = [] 99 | 100 | # If true, keep warnings as "system message" paragraphs in the built documents. 101 | #keep_warnings = False 102 | 103 | # If true, `todo` and `todoList` produce output, else they produce nothing. 104 | todo_include_todos = False 105 | 106 | 107 | # -- Options for HTML output ---------------------------------------------- 108 | 109 | # The theme to use for HTML and HTML Help pages. See the documentation for 110 | # a list of builtin themes. 111 | # html_theme = 'alabaster' 112 | 113 | # on_rtd is whether we are on readthedocs.org 114 | on_rtd = os.environ.get('READTHEDOCS', None) == 'True' 115 | 116 | if not on_rtd: # only import and set the theme if we're building docs locally 117 | try: 118 | import sphinx_rtd_theme 119 | html_theme = 'sphinx_rtd_theme' 120 | html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] 121 | except: 122 | html_theme = 'default' 123 | 124 | 125 | # Theme options are theme-specific and customize the look and feel of a theme 126 | # further. For a list of options available for each theme, see the 127 | # documentation. 128 | #html_theme_options = {} 129 | 130 | # Add any paths that contain custom themes here, relative to this directory. 131 | #html_theme_path = [] 132 | 133 | # The name for this set of Sphinx documents. If None, it defaults to 134 | # " v documentation". 135 | #html_title = None 136 | 137 | # A shorter title for the navigation bar. Default is the same as html_title. 138 | #html_short_title = None 139 | 140 | # The name of an image file (relative to this directory) to place at the top 141 | # of the sidebar. 142 | #html_logo = None 143 | 144 | # The name of an image file (within the static path) to use as favicon of the 145 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 146 | # pixels large. 147 | #html_favicon = None 148 | 149 | # Add any paths that contain custom static files (such as style sheets) here, 150 | # relative to this directory. They are copied after the builtin static files, 151 | # so a file named "default.css" will overwrite the builtin "default.css". 152 | html_static_path = ['_static'] 153 | 154 | # Add any extra paths that contain custom files (such as robots.txt or 155 | # .htaccess) here, relative to this directory. These files are copied 156 | # directly to the root of the documentation. 157 | #html_extra_path = [] 158 | 159 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 160 | # using the given strftime format. 161 | #html_last_updated_fmt = '%b %d, %Y' 162 | 163 | # If true, SmartyPants will be used to convert quotes and dashes to 164 | # typographically correct entities. 165 | #html_use_smartypants = True 166 | 167 | # Custom sidebar templates, maps document names to template names. 168 | #html_sidebars = {} 169 | 170 | # Additional templates that should be rendered to pages, maps page names to 171 | # template names. 172 | #html_additional_pages = {} 173 | 174 | # If false, no module index is generated. 175 | #html_domain_indices = True 176 | 177 | # If false, no index is generated. 178 | #html_use_index = True 179 | 180 | # If true, the index is split into individual pages for each letter. 181 | #html_split_index = False 182 | 183 | # If true, links to the reST sources are added to the pages. 184 | #html_show_sourcelink = True 185 | 186 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 187 | #html_show_sphinx = True 188 | 189 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 190 | #html_show_copyright = True 191 | 192 | # If true, an OpenSearch description file will be output, and all pages will 193 | # contain a tag referring to it. The value of this option must be the 194 | # base URL from which the finished HTML is served. 195 | #html_use_opensearch = '' 196 | 197 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 198 | #html_file_suffix = None 199 | 200 | # Language to be used for generating the HTML full-text search index. 201 | # Sphinx supports the following languages: 202 | # 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' 203 | # 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' 204 | #html_search_language = 'en' 205 | 206 | # A dictionary with options for the search language support, empty by default. 207 | # Now only 'ja' uses this config value 208 | #html_search_options = {'type': 'default'} 209 | 210 | # The name of a javascript file (relative to the configuration directory) that 211 | # implements a search results scorer. If empty, the default will be used. 212 | #html_search_scorer = 'scorer.js' 213 | 214 | # Output file base name for HTML help builder. 215 | htmlhelp_basename = 'Speech-to-textreportsfromDjangoConEurope20155' 216 | 217 | # -- Options for LaTeX output --------------------------------------------- 218 | 219 | latex_elements = { 220 | # The paper size ('letterpaper' or 'a4paper'). 221 | #'papersize': 'letterpaper', 222 | 223 | # The font size ('10pt', '11pt' or '12pt'). 224 | #'pointsize': '10pt', 225 | 226 | # Additional stuff for the LaTeX preamble. 227 | #'preamble': '', 228 | 229 | # Latex figure (float) alignment 230 | #'figure_align': 'htbp', 231 | } 232 | 233 | # Grouping the document tree into LaTeX files. List of tuples 234 | # (source start file, target name, title, 235 | # author, documentclass [howto, manual, or own class]). 236 | latex_documents = [ 237 | (master_doc, 'Speech-to-textreportsfromDjangoConEurope2015.tex', u'Speech-to-text reports from DjangoCon Europe 2015', 238 | u'Hilary Maclean and Sheryll Holley', 'manual'), 239 | ] 240 | 241 | # The name of an image file (relative to this directory) to place at the top of 242 | # the title page. 243 | #latex_logo = None 244 | 245 | # For "manual" documents, if this is true, then toplevel headings are parts, 246 | # not chapters. 247 | #latex_use_parts = False 248 | 249 | # If true, show page references after internal links. 250 | #latex_show_pagerefs = False 251 | 252 | # If true, show URL addresses after external links. 253 | #latex_show_urls = False 254 | 255 | # Documents to append as an appendix to all manuals. 256 | #latex_appendices = [] 257 | 258 | # If false, no module index is generated. 259 | #latex_domain_indices = True 260 | 261 | 262 | # -- Options for manual page output --------------------------------------- 263 | 264 | # One entry per manual page. List of tuples 265 | # (source start file, name, description, authors, manual section). 266 | man_pages = [ 267 | (master_doc, 'Speech-to-textreportsfromDjangoConEurope2015', u'Speech-to-text reports from DjangoCon Europe 2015', 268 | [author], 1) 269 | ] 270 | 271 | # If true, show URL addresses after external links. 272 | #man_show_urls = False 273 | 274 | 275 | # -- Options for Texinfo output ------------------------------------------- 276 | 277 | # Grouping the document tree into Texinfo files. List of tuples 278 | # (source start file, target name, title, author, 279 | # dir menu entry, description, category) 280 | texinfo_documents = [ 281 | (master_doc, 'Speech-to-textreportsfromDjangoConEurope2015', u'Speech-to-text reports from DjangoCon Europe 2015', 282 | author, 'Speech-to-textreportsfromDjangoConEurope2015', 'One line description of project.', 283 | 'Miscellaneous'), 284 | ] 285 | 286 | # Documents to append as an appendix to all manuals. 287 | #texinfo_appendices = [] 288 | 289 | # If false, no module index is generated. 290 | #texinfo_domain_indices = True 291 | 292 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 293 | #texinfo_show_urls = 'footnote' 294 | 295 | # If true, do not generate a @detailmenu in the "Top" node's menu. 296 | #texinfo_no_detailmenu = False 297 | -------------------------------------------------------------------------------- /transcripts/contributing/index.rst: -------------------------------------------------------------------------------- 1 | ===================================== 2 | How to help improve these transcripts 3 | ===================================== 4 | 5 | DjangoCon Europe 2015 was supported by two speech-to-text reporters, Hilary Maclean and Sheryll 6 | Holley. 7 | 8 | We have been provided with a transcript of their output (so far, covering day one, the open day). 9 | 10 | We need to tidy this up, make corrections, fill in gaps, and publish it so that it is a useful 11 | resource and a near-complete record of proceedings. 12 | 13 | AOTV will soon be publishing the video recordings they made of talks, and together those videos, 14 | presenters' slides and these transcripts will be an invaluable resource. 15 | 16 | There's a lot of work to do, but if each speaker takes a little time to submit a pull request with 17 | amendments for their own talk, the bulk of the work will be concluded very swiftly. 18 | 19 | Once the conference videos have been edited and published by `AOTV `_ the work 20 | to create final versions of the transcripts can begin in earnest. 21 | 22 | See also `Joachim Jablon's `_ start on a project 23 | to turn the transcripts into synchronised video subtitles. 24 | 25 | 26 | How we should work 27 | ================== 28 | 29 | In the ``raw_files`` directory of the GitHub repository: 30 | 31 | * ``.docx`` files (such as ``Djangocon 31st May 15 Open Day FINAL.docx``) are the originals 32 | provided by the STTRs - they should not be edited in any way 33 | * ``raw_transcript.txt`` files (such as ``open_day_raw_transcript.txt``) are plain text versions of 34 | the above - they should not be edited in any way 35 | * ``working_copy.txt`` files (such as ``open_day_working_copy.txt``) are copies of the above - they 36 | **can** be edited 37 | 38 | When a section of a ``working_copy.txt`` file has been moved to a new location in the transcripts, 39 | it should be removed from the ``working_copy.txt``, so we can see what remains to be transferred. 40 | 41 | Structure 42 | ========= 43 | 44 | Please use this directory/file structure so we can easily link from the published videos on Vimeo 45 | to each transcript: 46 | 47 | * /transcripts 48 | 49 | * ``index.rst`` 50 | * /open_day 51 | 52 | * ``index.rst`` 53 | * ``daniele_procida_welcome_to_djangocon.rst`` Daniele Procida: Welcome to DjangoCon Europe 54 | 2015 55 | * ``roger_whitaker_welcome_to_djangocon.rst`` Roger Whitaker: Welcome to Cardiff University 56 | * ``russell_keith_magee_what_on_earth.rst`` Russell Keith-Magee: What on earth are Python and 57 | Django? 58 | * and so on 59 | 60 | * /talks_day_one 61 | 62 | * ``index.rst`` 63 | * talk one 64 | * talk two 65 | * ... etc 66 | 67 | Introductions, questions and thank-yous should be included with each talk file. 68 | 69 | Announcements in-between talks probably don't deserve to be kept for the published transcripts, 70 | unless they are important or particularly interesting. 71 | -------------------------------------------------------------------------------- /transcripts/index.rst: -------------------------------------------------------------------------------- 1 | .. Speech-to-text reports from DjangoCon Europe 2015 master file, created by 2 | sphinx-quickstart on Sat Jun 6 09:11:53 2015. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | =================================== 7 | DjangoCon Europe 2015 - transcripts 8 | =================================== 9 | 10 | See the `Git repository `_. 11 | 12 | 13 | Contents 14 | ======== 15 | 16 | .. toctree:: 17 | :maxdepth: 2 18 | 19 | contributing/index 20 | open_day/index 21 | talks_day_one/index 22 | talks_day_two/index 23 | 24 | 25 | 26 | Indices and tables 27 | ================== 28 | 29 | * :ref:`genindex` 30 | * :ref:`modindex` 31 | * :ref:`search` 32 | 33 | -------------------------------------------------------------------------------- /transcripts/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM Command file for Sphinx documentation 4 | 5 | if "%SPHINXBUILD%" == "" ( 6 | set SPHINXBUILD=sphinx-build 7 | ) 8 | set BUILDDIR=_build 9 | set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . 10 | set I18NSPHINXOPTS=%SPHINXOPTS% . 11 | if NOT "%PAPER%" == "" ( 12 | set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% 13 | set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% 14 | ) 15 | 16 | if "%1" == "" goto help 17 | 18 | if "%1" == "help" ( 19 | :help 20 | echo.Please use `make ^` where ^ is one of 21 | echo. html to make standalone HTML files 22 | echo. dirhtml to make HTML files named index.html in directories 23 | echo. singlehtml to make a single large HTML file 24 | echo. pickle to make pickle files 25 | echo. json to make JSON files 26 | echo. htmlhelp to make HTML files and a HTML help project 27 | echo. qthelp to make HTML files and a qthelp project 28 | echo. devhelp to make HTML files and a Devhelp project 29 | echo. epub to make an epub 30 | echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter 31 | echo. text to make text files 32 | echo. man to make manual pages 33 | echo. texinfo to make Texinfo files 34 | echo. gettext to make PO message catalogs 35 | echo. changes to make an overview over all changed/added/deprecated items 36 | echo. xml to make Docutils-native XML files 37 | echo. pseudoxml to make pseudoxml-XML files for display purposes 38 | echo. linkcheck to check all external links for integrity 39 | echo. doctest to run all doctests embedded in the documentation if enabled 40 | echo. coverage to run coverage check of the documentation if enabled 41 | goto end 42 | ) 43 | 44 | if "%1" == "clean" ( 45 | for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i 46 | del /q /s %BUILDDIR%\* 47 | goto end 48 | ) 49 | 50 | 51 | REM Check if sphinx-build is available and fallback to Python version if any 52 | %SPHINXBUILD% 2> nul 53 | if errorlevel 9009 goto sphinx_python 54 | goto sphinx_ok 55 | 56 | :sphinx_python 57 | 58 | set SPHINXBUILD=python -m sphinx.__init__ 59 | %SPHINXBUILD% 2> nul 60 | if errorlevel 9009 ( 61 | echo. 62 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 63 | echo.installed, then set the SPHINXBUILD environment variable to point 64 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 65 | echo.may add the Sphinx directory to PATH. 66 | echo. 67 | echo.If you don't have Sphinx installed, grab it from 68 | echo.http://sphinx-doc.org/ 69 | exit /b 1 70 | ) 71 | 72 | :sphinx_ok 73 | 74 | 75 | if "%1" == "html" ( 76 | %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html 77 | if errorlevel 1 exit /b 1 78 | echo. 79 | echo.Build finished. The HTML pages are in %BUILDDIR%/html. 80 | goto end 81 | ) 82 | 83 | if "%1" == "dirhtml" ( 84 | %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml 85 | if errorlevel 1 exit /b 1 86 | echo. 87 | echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. 88 | goto end 89 | ) 90 | 91 | if "%1" == "singlehtml" ( 92 | %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml 93 | if errorlevel 1 exit /b 1 94 | echo. 95 | echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. 96 | goto end 97 | ) 98 | 99 | if "%1" == "pickle" ( 100 | %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle 101 | if errorlevel 1 exit /b 1 102 | echo. 103 | echo.Build finished; now you can process the pickle files. 104 | goto end 105 | ) 106 | 107 | if "%1" == "json" ( 108 | %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json 109 | if errorlevel 1 exit /b 1 110 | echo. 111 | echo.Build finished; now you can process the JSON files. 112 | goto end 113 | ) 114 | 115 | if "%1" == "htmlhelp" ( 116 | %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp 117 | if errorlevel 1 exit /b 1 118 | echo. 119 | echo.Build finished; now you can run HTML Help Workshop with the ^ 120 | .hhp project file in %BUILDDIR%/htmlhelp. 121 | goto end 122 | ) 123 | 124 | if "%1" == "qthelp" ( 125 | %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp 126 | if errorlevel 1 exit /b 1 127 | echo. 128 | echo.Build finished; now you can run "qcollectiongenerator" with the ^ 129 | .qhcp project file in %BUILDDIR%/qthelp, like this: 130 | echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Speech-to-textreportsfromDjangoConEurope2015.qhcp 131 | echo.To view the help file: 132 | echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Speech-to-textreportsfromDjangoConEurope2015.ghc 133 | goto end 134 | ) 135 | 136 | if "%1" == "devhelp" ( 137 | %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp 138 | if errorlevel 1 exit /b 1 139 | echo. 140 | echo.Build finished. 141 | goto end 142 | ) 143 | 144 | if "%1" == "epub" ( 145 | %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub 146 | if errorlevel 1 exit /b 1 147 | echo. 148 | echo.Build finished. The epub file is in %BUILDDIR%/epub. 149 | goto end 150 | ) 151 | 152 | if "%1" == "latex" ( 153 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 154 | if errorlevel 1 exit /b 1 155 | echo. 156 | echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. 157 | goto end 158 | ) 159 | 160 | if "%1" == "latexpdf" ( 161 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 162 | cd %BUILDDIR%/latex 163 | make all-pdf 164 | cd %~dp0 165 | echo. 166 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 167 | goto end 168 | ) 169 | 170 | if "%1" == "latexpdfja" ( 171 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 172 | cd %BUILDDIR%/latex 173 | make all-pdf-ja 174 | cd %~dp0 175 | echo. 176 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 177 | goto end 178 | ) 179 | 180 | if "%1" == "text" ( 181 | %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text 182 | if errorlevel 1 exit /b 1 183 | echo. 184 | echo.Build finished. The text files are in %BUILDDIR%/text. 185 | goto end 186 | ) 187 | 188 | if "%1" == "man" ( 189 | %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man 190 | if errorlevel 1 exit /b 1 191 | echo. 192 | echo.Build finished. The manual pages are in %BUILDDIR%/man. 193 | goto end 194 | ) 195 | 196 | if "%1" == "texinfo" ( 197 | %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo 198 | if errorlevel 1 exit /b 1 199 | echo. 200 | echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. 201 | goto end 202 | ) 203 | 204 | if "%1" == "gettext" ( 205 | %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale 206 | if errorlevel 1 exit /b 1 207 | echo. 208 | echo.Build finished. The message catalogs are in %BUILDDIR%/locale. 209 | goto end 210 | ) 211 | 212 | if "%1" == "changes" ( 213 | %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes 214 | if errorlevel 1 exit /b 1 215 | echo. 216 | echo.The overview file is in %BUILDDIR%/changes. 217 | goto end 218 | ) 219 | 220 | if "%1" == "linkcheck" ( 221 | %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck 222 | if errorlevel 1 exit /b 1 223 | echo. 224 | echo.Link check complete; look for any errors in the above output ^ 225 | or in %BUILDDIR%/linkcheck/output.txt. 226 | goto end 227 | ) 228 | 229 | if "%1" == "doctest" ( 230 | %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest 231 | if errorlevel 1 exit /b 1 232 | echo. 233 | echo.Testing of doctests in the sources finished, look at the ^ 234 | results in %BUILDDIR%/doctest/output.txt. 235 | goto end 236 | ) 237 | 238 | if "%1" == "coverage" ( 239 | %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage 240 | if errorlevel 1 exit /b 1 241 | echo. 242 | echo.Testing of coverage in the sources finished, look at the ^ 243 | results in %BUILDDIR%/coverage/python.txt. 244 | goto end 245 | ) 246 | 247 | if "%1" == "xml" ( 248 | %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml 249 | if errorlevel 1 exit /b 1 250 | echo. 251 | echo.Build finished. The XML files are in %BUILDDIR%/xml. 252 | goto end 253 | ) 254 | 255 | if "%1" == "pseudoxml" ( 256 | %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml 257 | if errorlevel 1 exit /b 1 258 | echo. 259 | echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. 260 | goto end 261 | ) 262 | 263 | :end 264 | -------------------------------------------------------------------------------- /transcripts/open_day/alasdair_nicol.rst: -------------------------------------------------------------------------------- 1 | ============================================================= 2 | Alasdair Nicol: Ponies and moustaches, or Templates in Django 3 | ============================================================= 4 | 5 | DANIELE PROCIDA: Thank you very much. {Applause} next stop Alasdair Nicol on ponies and moustaches which are in fact technical terms in Django. {Applause}. 6 | 7 | ALASDAIR NICOL: Good afternoon and I am going to talk about ponies and moustaches the more silver templates. I'm Alasdair Nicol a developer at Memset hosting concern south-east England. Started using Django in 2009. Like Adrienne who had the slot this afternoon the first time I used Django tutorial it didn't work at all and I came back a bit later and it worked the second time so it's good advice to try again if it doesn't work first. 8 | 9 | In 2009 Django 1.0 came out, we've seen a few releases since then and in April 1, Django 1.8 came out. It's a long-term support release so if you upgrade to it you get security releases for quite sometime and some of the highlights API for the model meta class, there are lots of goodies if you use the postgres database and the thing I'm interested in talking about support for multiple template engines. 10 | 11 | So, for any visitors who come on to the open day and don't know what a template engine is I'll start simply. A template is just a text file with a special - and the template engine can take advantage of special syntax in the template so in this case we've got "hello my name is" then 2 variables name and subject. Then if we have a context so the variables, name and subject, then a template engine can render a template and merge the context into the template. So even if you haven't used Django before you might have used mail merge in office or you might have seen an email where you got some these current in braces which means someone has messed up somewhere. 12 | 13 | Before Django 1.8 if you wanted to - your choice of template engines there was a single choice of template angles Django template language. This is perhaps a bit surprising there was only one choice - not surprising there was only one choice when you get other parts of the Django stack there has been lots of choices for some time. Mark this morning was saying that with Django you have a choice of operating systems, choice of servers you employ Django with then what I'm looking at is within Django there is different layers and you have been able to have different choices before so when you come to Django and are choosing database you had lots of choices in database. Postgres SQL very popular with distributors in Django, my SQL which is very ubiquitous what we use, SQ light which is built into python which means you can get up and running very quickly, oracle and there is third party databases you can use as well. 14 | 15 | Similarly sessions the cookies or the other way you store data about the user accessing your web-site, with Django you can store sessions in the database, use signed cookies or store on files though probably not a great idea to do that. 16 | 17 | Finally one more example part of the Django stack swappable components caching where you take a page or part of your page and save it in memory so to speed up your web-site. There is mem cached support built into Django and third party support for Reddis or you can do caching in other ways as well. 18 | 19 | Templates in Django - before Django 1.8 there was only one template language you could use. There were occasionally proposals Django should replace the Django template language with something like jinja. I wouldn't have liked that because we have hundreds of templates that work and if I had to change them to something else it wouldn't be fun. 20 | 21 | It was a crowd funded campaign launched by Americ Augustin, it's one of a few Django features which has used Crowd funding and indigo {inaudible} seems to be working well. Any way the 3 planks of the campaign or the 3 goals were to keep support for the existing Django template language add support for jinja 2 and API so other people could swap in any template language they wanted. 22 | 23 | So for the rest of this talk I'm going to have an example web page which I'll show you in a second and go through the 3 bullet points to see how we implement with Django template language with jinja 2 and another engine. 24 | 25 | Sorry this is so basic, my skills are round the back end rather than front end development but since Djangocon here is a table how we moved from 2009 in Prague to 2015 here today in Cardiff. 26 | 27 | Django is model template view or also other frameworks use module view controller so before we get to the template we have a model which describes the database layout in Python code. Got a very simple conference model. Going to store the location and country as Charfields {inaudible} country would be better. Years into the field. The view is where you describe what data you want to display on the page resident Python. A very simple view which grabs conferences from the database then renders the template. And finally here is the template to - or section of that template in the Django template language. So, we've got conference year, conference location, conference country, the double angle braces or moustaches, including variables and then the other couple of things this template has is we've got a forward, that's using a template tag where you've got the angle of brace and percentage and we've also - we're using the cycle tag so that we can display {inaudible} even as odd not shown very well on the slide but you can imagine there is {inaudible} extracts going through that column. 28 | 29 | So, moving on to jinja 2 which in Django 1.8 there is support for out of the box, jinja 2 syntax is very similar to Django's, very fast. Used by flask, a micro framework in Python and I have been exploring Ansible recently and it uses jinja 2 for its template as well. Enabling jinja 2 in 1.8 is easy. There is a new templates list and by default it will come up with one entry, the Django template engine and you just need to add the second dictionary to enable jinja 2. Then when you write your jinja templates you put them in a directory with jinja 2 and when you use the short cuts Django will take place of everything else. So here is our template in jinja 2 which works very, very similar to our original template in Django template language. I think the only difference in this template is that instead of using a cycle template tag we've moved our cycle instead and jinja allows you to cull functions within the language which Django doesn't. I think that's a philosophical language, {inaudible} thinks you should keep language out of templates and jinja allows more logic into templates. 30 | 31 | Now on to the third part - I had a go at seeing what the API was - see what the API was like to add support for another templating language and I chose moustache so I could use the title I talked about. The other reason I thought moustache was interesting was that there are so many languages that have support for moustache and we've had couple of talks today where people talked about rest APIs and perhaps the need for doing templating on the server side isn't as much as there used to be but maybe there is a future where you're doing templating on the server side and on the browser in which case something like moustache where support for Java script and...(inaudible)...is potentially interesting. 32 | 33 | Yes in Python there is a module pystache which {inaudible} I used. 34 | 35 | Here is my template engine. You need a template object which knows how to render itself and most of that was taken care of using pystache then you subclass {inaudible} base engine. You set what you want to keep {inaudible} moustache directory and then we implement 2 methods, one which will render string and the other render template style from directory and render it moustache template engine. 36 | 37 | Here is a template written in moustache. Again using double angular braces for variables. Looking through conferences looks a bit different. There is not a 4 conference and conferences syntax like we had before. And the one thing you might notice is that I couldn't work out how to - I couldn't find an equivalent for the cycle tag in Django template language although you couldn't see it on the slide any way so never matter and you could do it with CSS selecting even {inaudible} any way. 38 | 39 | So, we've got the 3 layers, the model, the template and the view, and in order to get the view to work with moustache had to change it slightly and add dictionaries instead of conference who ran objects to whatever was rendering the template so I cheated slightly but I think that I have shown them that you can for the most part keep your models and views as they are and swap in whatever template language you want. 40 | 41 | So, I am going to declare success. My pony has grown a moustache. If you want any further reading, I am not a {inaudible} don't worry. The weekly updates from Amaric about decisions he made and process are interesting it's Django open source and it's great you can see the collaboration decisions and?? Getting contributed. There is a new process called Django DEPs similar to Python DEPs and I think this multiple template engine is the only DEP so far that's been accepted but it's interesting again to see a new way of how decisions about the future of Django are made in public and by the community. The Django design philosophy page on the web-site says a little bit about why Django thinks there should be less - about some of the decisions made about Django template language, I touched on that briefly when I said there is not as much logic in the Django templates as the jinja templates and there is 2 scoops of Django which is a really great book and the new edition has a chapter on jinja and some good hits if you were going to be seriously considering using it in production rather than just a fine exercise. 42 | 43 | So, yes that's my slot. Thank you very much. {Applause}. 44 | 45 | DANIELE PROCIDA: Thank you very much. Not least because your helpless claw back lost time. A coffee break waiting for us. Thank you very much. I already saw a couple of hands moving in the audience so who would like to go first with a question? OK I'll start. So, why might one not want to go down this route of exploring additional templates? Why not just stick with the completely built in out the box Django template language that everyone else uses that you know has been widely tested and will do pretty much every tutorial documentation at work? {Laughter}. 46 | 47 | ALASDAIR NICOL: I think that's a very good point and I personally work anyway - I don't think we're going to be switching any time soon. If you had a performance reason you might want to switch to jinja although many people say there is other areas like caching or database where you get more performance rather than templates any way so I like the Django template language, I'm not advocating we switch to something else but I think it's really good we formalise the API and given people the ability to swap it out if they want to and I think there is some of the even by making the API more generic it's improved the way the Django template language itself interfaces to me to some extent - 48 | 49 | DANIELE PROCIDA: It makes me nervous when I feel there is an implication I might be expected to learn something new. 50 | 51 | ALASDAIR NICOL: I agree like a couple of talks today suggested that the future is REST APIs but actually it is very nice that with the Django template language at the moment you can get your tutorial or your log in the Django girls tutorial up and running and you don't need to learn yet another front end single page app. 52 | 53 | NEW SPEAKER: By reaching engine {inaudible} template packs? 54 | 55 | ALASDAIR NICOL: Yes I think that is probably the biggest - so the templates act yes I think you'll need to re-write right the templates act. The filters - I think say if you use jinja, I think you can register filters - a filter is just a python {inaudible} takes a value and one other and returns another value. I think in jinja 2 you can put filters but tabs if you switch to jinja that involves quite a bit of re-write. 56 | 57 | NEW SPEAKER: Is there currently the ability to choose a template to run in {inaudible} time so if you wanted to render may be an Ajax view slightly differently with a different engine {inaudible}. 58 | 59 | ALASDAIR NICOL: Yes so the example that I used was you do - templates by configuration so you stick your jinja templates in jinja directorate and Django will look for them but when you use rendering in Django 1.8 it's got engine key word so you can have - I have got example template that can do most of this stuff and the way I've shown the view 3 different times is with a get parameter which the engine equals Django or engine equals moustache gets passed through but yes at one time you can choose engine. 60 | 61 | DANIELE PROCIDA: Very quick one. 62 | 63 | NEW SPEAKER: If I understand correctly the reason the logic is taken away out of Django template languages is so you get better design principles. If you follow jinja is that taken down a darker path? {Laughter}. 64 | 65 | ALASDAIR NICOL: Ah ... so I think perhaps you'd be in danger of going down that dark path because one thing jinja has that I would like Django template language which is to be able to look up and attribute by variable which you can't do, you can use it basically it looks like dictionary look up syntax in jinja which you can't do in Django I think that would be nice in Django, I don't think the world would implode if we did that. I think the Django philosophy of trying to keep logic out of templates I side with it to an extent. 66 | 67 | DANIELE PROCIDA: Smashing. Thank you very much. {Applause} we have a coffee break now, so go and have some refreshments. We'll come back, try and be here for in 25 minutes time so at 10 past. 68 | 69 | (Break) 70 | -------------------------------------------------------------------------------- /transcripts/open_day/amit_nabarro.rst: -------------------------------------------------------------------------------- 1 | ==================================== 2 | Amit Nabarro: RESTful APIs in Django 3 | ==================================== 4 | 5 | Very pleased now to introduce Amit Nabarro who is going to talk about RESTful APIs with Django. {Applause}. 6 | 7 | AMIT NABARRO: Working? No? Is this working? 8 | 9 | NEW SPEAKER: For the video... 10 | 11 | AMIT NABARRO: Hi everyone my name is Amit. I am going to talk about RESTful API with Django today. A few words about me. I have been doing software development for a living for far longer than I care to admit. 7 years ago I read a book about ruby on rails and a saw a comparison with Django and I pretty much never looked back. I only work with Django these days. 12 | 13 | So, anyone who has done anything with Django in the past knows that traditional Django what I like to call classical Django is based on a concept which is called model view control or a variation of it. Most of the frameworks out there today use this model and Django is no different. And if you have written even the simplest example in Django you know that views return with email, you send a request and they return HTML - - but that's not always enough because this was maybe could 10 years ago when only browsers taught your application but today other kind of devices talk your application, mobile devices talk your application, machines talk to your application applications, other servers talk your applications and they don't always want your fancy beautiful HTML you created, they just want raw data because they have their own presentation data their own thing they do with your data. So the traditional or classic model which Django was built on isn't that useful in those cases. 14 | 15 | Well, before I go further I'd like to remind you something which you all should know probably very well that the internet works in a very simple concept which is called request response. You fire up your browser, type in a URL, that request goes to the server then the server generates a response, a response goes back to you. The protocol this whole thing works on is http. Http is a text protocol, it happens to use HTML in classical Django - - - but it doesn't have to use HTML, it could use other text based formats as well. It could be used Json, XLL, the cool formats you came up with. 16 | 17 | So since you can do that with http and since you can return other forms of data rather than just HTML, you could be using the same mechanism in Django to return your data. 18 | 19 | Now, why would you want to do it? 20 | 21 | The first thing it allows multiple platforms to access your application. For example mobile devices have their own user interface, their own platforms, they're not interested in your HTML, they just want to get raw data then display it for their users, so they would like to request data in the format of Json most likely. 22 | 23 | Other machines, servers that may access your own application and down load information from your database. That's another good reason to do it. 24 | 25 | Modularity, separation, we're going to talk about this in a little bit. 26 | 27 | Then the last part which is also very important, it makes it very easy to develop single page applications. Anyone who doesn't know what those are, those are Java script applications, called skateful application, the entire application down loads to the browser in one request then all subsequent requests are on HS. You've all seen those, they're very common these days and they're very useful. 28 | 29 | So, in order to have your general project expose these capabilities you need to develop something called a web API. What is a web API? I ask that question on the web and I found this definition: an application programmatic interface to a defined request response message system. 30 | 31 | That's great, that fits really well with the basis on which Django works on the http request response message system. So all we have to do now is to modify our views instead of returning HTML get them to return something else, return Json for example. 32 | 33 | A lot of you might say OK fine, I can do that no problem, I don't need the risk framework or a third party tool, I can return Json no problem I can modify my review and return Json and here is a good example the most simple example which are a function of a view, returns the first name and last name of the user. This will work, this is actually valid code, and if you make a request with any tool to your web server you will get a Json which replies to the first name and the last name of the user currently in session. 34 | 35 | Now while this is a very valid example it's really not very useful because most projects are much more sophisticated, they require a lot more capabilities than just something simple like this and for that reason most projects that involve a web API end up using some kind of a web API framework. 36 | 37 | Now I've mentioned the term REST and RESTful API, ever since I started talking. What is REST? REST stands for representational state transfer. It's a software architecture style consisting of guidelines and best practices. REST is not a technology. Rest is an agreement. It's a contract between a client and a server. I will serve you a restful API. OK I know what that is, I'll write the client to consume your restful API. 38 | 39 | And there are multiple ways to develop web APIs today but REST is considered one of the good ones. And in general alone there are multiple web frameworks that support the model. 40 | 41 | Here is a couple of examples and principles of REST. The most important principle of REST is every resource is unique and in REST terminology every request you make is made to a resource, a resource can return data, and here are some examples of URL that is a unique URL for server, requesting first user or requesting user based on first name or requesting - here is an example, the last one is an example of a nes {inaudible} resource it's a resource that belongs to another resource - this is outside the focus of this talk. 42 | 43 | Another important principle of REST is that the inter actions are state less. There is no state carried from one to another. Nothing is saved on a server. Everything has to come either as a body request or in the URL. 44 | 45 | So, I said earlier that yes you could write your own views that return Json or return another form of text based response but if you are going to develop something that is a little more sophisticated and simple user name than the simple name of a user then you will want to use a web framework which a - a REST framework which will give you a lot - now what can you expect from a REST framework? 46 | 47 | The first thing you can expect is see realisation, take your data, see realising it, Json. HTML very important. Pagination, you have a lot of data and you need to paginate through your data you can't obviously make a single request from all the data in your database because that will take for ever. Validation another important thing especially when you submit data if you are posting or putting data and want to validate it that's another thing you can expect from a REST framework authentication anything to do with users logging into your system. Authorisation anything that has to do with what the user is allowed to do on the system. Throttling, throttling deals with managing too many request's when your server is bombed with requests you want to slow down, you want to allow users to have only certain amount of requests per se second or certain amount per millisecond that is where throttling comes in. Caching very important. If you have a single request data being called multiple times you want to cache your response so you don't have to get it from the database then serialise it again because it's a very good concept and it's a very rooted in Django itself. API discovery that's also very important. If you are developing an API which goes to another third party user which will use your API you want that API to be documented and discoverable and you can expect your REST framework to expose its own API or its own scheme and say OK these are APIs I'm exposing, unit testing if you don't write unit test you should be ashamed of yourself. And a lot more ... 48 | 49 | Existing REST frameworks are for Django. The first is the Django REST framework DRF, written by Tom Christie, excellent piece of software, fantastic, huge user community, very well documented, highly recommended. 50 | 51 | Django tasty pie just as good just as well documented, huge user community, actually it's even been around longer than DRF, and it's a very good option. Django piston is a third one. I wouldn't use it. Django piston is dead; it hasn't been maintained for a while, documentation code, just don't use it, if you happen to run into it move on. 52 | 53 | Here's an example of something which takes a model, a Django model and turns it into a resource. So I mention before that in the REST terminology we consider our data as resources. Here is an example of taking a book model or a database model which represents a book and turning it into a - this is all you need to do in order to get, take a model and turn it into 4 lines of code. Obviously a very simple example, probably more simple than the tutorial you're going to see in tasty pie, this is done in tasty pie not DRF, but DRF is very, very similar. And what will happen is these 4 lines of code is going to turn your model into a resource which you can perform crude operations on, create up-date - all that in 4 lines of code. It's pretty cool. 54 | 55 | Working with SQL that's not a problem at all. REST is not limited to relational databases. You can wrap your data sources with a REST framework to any data source you are using whether it's a relation database like {inaudible} or using mongo DB or any other thing. In fact on the fourth day of this conference, there is a workshop that I'm doing on mongo DB and Django and I'll be touching that subject in very detailed way. 56 | 57 | That's it. Pretty much. {Applause} I would like to say one more thing. REST is a very big concept and I can probably talk about it all day but given that it was only 20 minutes I tried to condense it as much as possible and give you an introduction to it but if you are interested in talking more about REST I am going to be here for the REST of the conference. 58 | 59 | NEW SPEAKER: Thank you very much. Questions if anyone is interested. 60 | 61 | NEW SPEAKER: Which of the 2 recommended frameworks do you think is most likely to end up in the core of Django? 62 | 63 | AMIT NABARRO: I don't know if I can answer this question unopinionated. You want an opinion I have no idea. I use Django testify {inaudible} for familiarity and no other reason. Django framework is fantastic but it's my personal preference. 64 | 65 | NEW SPEAKER: What's the main reason you decided to use Django and not rails for your APIs except to {inaudible}. 66 | 67 | AMIT NABARRO: Before I was doing computation I was using Python so it was just easier for me to do it but if you look at - I like to look at trends and Django is really trending up and ruby on rails is ... that's not my opinion ... {applause}. 68 | 69 | NEW SPEAKER: My question is - ruby on rails doesn't have much support on-line {inaudible} engineering things like that, whereas Python has a lot of support on things like data management and engineering things like that. What's your take on that like? 70 | 71 | AMIT NABARRO: It's a known fact Python has way more third party modules than ruby so you are more likely to find something in Python than - I can give an example, just not too long ago I was writing a driver for an engine and it was talking something called mud bus which is just a protocol for motors to talk and it's based on http and {inaudible} wait a minute...motor bus ... that was it. Anything else? OK thank you very much. {Applause}. 72 | 73 | DANIELE: So while Yamila sets up, to let you know that there is a jobs fayre with the sponsors in the foyer, so if you are interested in talking to them, now might be a good time. Otherwise they are going the be here all day, you can talk to them at any time. 74 | 75 | If you didn't get the message earlier, whatever it says on any piece of paper you may see, lunch will start at 12:30 that is the earliest we are doing lunch. If you are only here for the Open Day, sorry, we are not able to provide you lunch because we have only provided lunch for the people who signed up for it because, those are the numbers we have, but there are plenty of places to grab a bite to eat nearby. 76 | -------------------------------------------------------------------------------- /transcripts/open_day/christopher_hunt.rst: -------------------------------------------------------------------------------- 1 | ================================================================== 2 | Christopher Hunt: Arduino sensors, mobile apps and virtual reality 3 | ================================================================== 4 | 5 | Hello and welcome to the final session of talks today, we are going the kick off with Christopher Hunt, the lead developer, research assistant and ... at Plymouth university, he will be talking about Arduino sensors. 6 | 7 | CHRISTOPHER HUNT: Are we all caffeinated ready for the last session, tried to Welsh cakes? Hopefully you have. 8 | 9 | So welcome, today I am talking about we are going to talk quickly and speed through, try and scare these people doing a lovely job in the corner here. 10 | 11 | So, come in people, you have missed the start. 12 | 13 | So the Django and the data system. Objectives for today, understand the concept and come points of the data system, a metaphor for the things I have been using, the different processes and systems. 14 | 15 | Discover we, i-DAT is using Django, try and provide two live demo, only one now, because some of these didn't survive the train journey up here. 16 | 17 | I am from institute of digital art and technology, we are an open research lab for playful experimentation with creative technology. Very fancy. I didn't come up with that, my boss did. 18 | 19 | We exist at Plymouth and support the digital art and technology undergrad course, research, environmental things, social stuff, domes and different environments, biological and lots of other key things. 20 | 21 | Key line from our description of our strands tat bottom. From data to code to experience to behaviour. 22 | 23 | This is the process and this is what the systems and what we can do enables. So as we go through, keep that in mind and keep thinking, what kind of things, what stuff you can enable, tools and technologies we can play with as we go through this stuff. 24 | 25 | So, the data system. This is my model with lovely ASCII art I am proud of this. Start at the top. Circular system because it goes around in circles. 26 | 27 | At the top we have sense and collect. This is sensors, these are these devices, things that you know, like sensors, a few other things, they transmit to somewhere we can store and process that data. This is where Django comes in and that is where I will talk about that. Then that enables interpretation and understanding of that data. This is visualisation, this is oculus rifts, and cool stuff at the end. 28 | 29 | Hopefully through all of it. So first step. Sense and collect. Which transmits to somewhere we store and process. 30 | 31 | In here, this set of transactional props comes from PhD projects this is done with myself and one of my colleagues, John and in here, we have these tiny little formally sparkled now particle. So I have got the re-wipe that bit of code in my head. Renaming things it is annoying. 32 | 33 | These are little Arduino light devices, programme them using the same languages, wired directly into the device. 34 | 35 | So, what is going to show that but because, in the interest of time and with a few network issues, what happens with this project two people sit down. Then, these devices all have different sensors the funnel has an fsr, you squeeze and then it, certain cups vibrate and little nozzle tips light up and do things. The idea you are using the sensors and exploring the relationship and the system beneath. So behind this, there is this Django page which is receiving all the data over something called message cue ... transport. 36 | 37 | All these devices sending up to here, we can see this going on, this goes to another back end, we can explore and see the data then different stuff happens there., I may need to ask whether somebody has a soldering iron. 38 | 39 | Pretty standard code, except extra bits for connecting to a broker, connecting to NQTP. It is a publishing subscribe protocol, nice and easy to connect with., here we are connecting to our NQTP broker, then publishing our information our messages, so, the green glass, what happens here in its loop, checks if it is connected. Every time I tap that, that would then send that message, that fault it received over NQTP then make it vibrate, but we will show you that later. 40 | 41 | So that is sensor, those are Arduino's and different devices but, at the essence of that, that is just data, data can be any kind of thing, we have done a lot of project and research with arts organisations around different, about how you gain and manage feedback. Traditionally someone would pull, go around an art gallery, someone pull you aside with a clipboard to answer lots of boring questions. What comes to your mind when you think of science? 42 | 43 | That is, then you have got this open ended, this event did not match my expectations dry and not interesting boring things. You start to see lots of ways to get around this. This is a happy or not sensor, the question here: Please rate our check outs. 44 | 45 | You may have seen these at airports as you go through the security gates. You go through, then slam on the button say, hey I enjoyed it or this went badly. 46 | 47 | I can imagine sometime next week you might see something like this, dotted around Cardiff! just in case you need to voted on Zain, say you are a one direction manager, find out who next to put on the bottle of fragrance, we will get back to that later. 48 | 49 | This is developed into our quali project, this is where the mobile apps come in. This is the same kind of thing, an app for the Cheltenham Festivals. As you go around the festival, as you explore and find out stuff about it you get to rate and leave feedback. Say what mood you are in or did you enjoy the event. In the micro-interactions, instead of having a big long essay of things to fill out. Tiny bits of data, as we collect more and more of that, we build up a better picture of what is going on. 50 | 51 | So, devices, sensors, mobile apps all cool. They all transmit back to somewhere to store and process the information then enables interpretation and understanding. 52 | 53 | So, we could use fi base or pass or all the platforms of the service thing, we are at Djangocon, I would encourage you, why not build your own? A good question. You could save time with those, but you want to learn and, boar reed this quote from my boss's talk mike. I will give it my best Tom Hardy impersonation. 54 | 55 | "take control of your city. This is the instrument of your liberation!" 56 | 57 | I really should have been an actor not a developer clearly. 58 | 59 | But that is it. It is for us, it is being able to control a platform rather than rely on someone else or worry about things degrading, things being unable and falling apart so, patch ... cosm and xively, lots of stuff out in the field broke. Great. Amazing that. 60 | 61 | So you learn and that ability to control and build stuff really is valuable. This is an old screen shot from digital ocean, but the cost of computation, the cost of running the server is so small you know, you can easily do quite a lot of big project work on just a tiny VPS, easy peasy, -- got 5 minutes left. 62 | 63 | Dive through the last few bits, why Django? Why use it? Because it is awesome. Why else? Obviously you need a few more reasons than that. 64 | 65 | So top of my list, models and migrations, that makes it easier to prototype the data. Here is my model our happy or not button, ignore the code, only for demos, I have forgotten to remove a certain someone from the member choices, that is depressing, the value of Django, that makes it easy for us to prototype, we can iterate, get stuff out. Get people playing with stuff. 66 | 67 | REST API libraries, allows us to enable different things so we can talk to tasty py and the rest, there is the data from earlier, of course you have got Python. The only way to describe the power of that, well with that. You have got all the sorts of things, as you have been listening today, you have got numpy, scipi all sorts, takes the work away from you, you can get on with doing amazing cool things. Of course, the kit most important thing in Django, is the community, is you lot. Everyone who is really friendly all the core developers, or core committers are so friendly and helpful. That makes a big difference when we are teaching and working with people, then aren't afraid to get involved, mix in, ask questions, that is brilliant. 68 | 69 | So lastly, so we have stored it somewhere, built our Django back end, now we need to interpret and understand the data. Because we are working with arts organisations we can do something like this, just the templating language, so build basic views on demographics, feedback, we can look at hot spots and send Norwegian puppeteers where people are building the apps. Create systems to create questions, get interested and involved in the data we have the immersive vision theatre which is our planetarium, here we can fly you to the edge of space or through the bosses colon, which is the weirdest experience I don't want to experience again! 70 | 71 | Or take you into data scapes. So this is something we have been developing for one of our conferences and lastly, I can dive straight into another demo. 72 | 73 | Fingers crossed. A ha. 74 | 75 | Fantastic. 76 | 77 | So, interesting effects, so in here, I can now can't see you obviously. You are all just floating bits of data. But, if I look up there is some pictures been down loaded through one of our back ends, here some blobs of data, bits of orange there. You can come along and experience that later. 78 | 79 | But that is all about engaging and getting people involved in the interpretation and the exploring what is available in that data. 80 | 81 | Okay. How much longer have I got? 82 | 83 | One minute. 84 | 85 | Cool. Fantastic. 86 | 87 | That means I can do the last few examples, from i-DAT's work, we have a building, we have sensors in a building including a vision system. Can you see this thing moving? Should now start going backwards because the video is looping backwards. So this is our Slofbot, using the whole model. So the sensor is at the top of the atrium, that is looking for detecting people going across the room, as you go along to your lecture, there is suddenly a wall in the way. The idea of that is to kind of get you thinking about the space because you don't think about this corridor, then something is there, I must realise what is going on. 88 | 89 | Or, this is very old video now, but or you, or you will look at how people use the space and the building. Then you decide as a long term intervention you put a random duff button in the lift, to get people exploring through the data. 90 | 91 | That is the data system, that is all the elements, I will open up to questions before I get pulled off the stage, thank you very much. (APPLAUSE). 92 | 93 | NEW SPEAKER: Can I take any, Chris take any questions? 94 | 95 | So you mentioned briefly at the start of your talk, how is your work explaining -- do you want to explain? 96 | 97 | CHRISTOPHER HUNT: So, the internet thing was, when you say interneter things, you think a smart house, smart car, smart things going on. I don't like using that term, so that is why I use the models with the students and the people I work with, to break down the system going on. It isn't just remote controlling something, but it is interesting things going on with that data. 98 | 99 | 100 | 101 | FROM THE FLOOR: So obviously Python and Django on the server side, but the nasty language in the ... side of things, is there a way of fixing that? 102 | 103 | CHRISTOPHER HUNT: That is a good question. There has been some attempts at porting, having Python then generate that C code for you? But, unfortunately, you can't just run Python on these sadly. 104 | 105 | RUSSELL KEITH-MAGEE: Is it a hard way limitation? 106 | 107 | CHRISTOPHER HUNT: It is a so, on here, what that C code is done, compiled down and then run on a devices. What these devices are, they are essentially dumb. All these are doing is sending their data up to the Django server and then waiting for messages to come back. So we can add all the intelligence, all the interactivity server side and manipulate that and change that without having to change the code on these devices. 108 | 109 | FROM THE FLOOR: There are slightly more powerful devices that can run. 110 | 111 | CHRISTOPHER HUNT: Yes, these are simple ones here, raspberry pies or eagle bones, it is all becomes enabled and available. 112 | 113 | FROM THE FLOOR: How did you make Django talk in PDP? 114 | 115 | CHRISTOPHER HUNT: Django is using the pay, ... library, then a written a management command which is supported by supervisor, then runs in the background, listening for messages coming in, validating them and then to the models. If you are interested I can show you the core stuff that is going on. 116 | 117 | NEW SPEAKER: I think we have time for one more quick question? If not, then we can thank Christopher Hunt again. 118 | 119 | (APPLAUSE). 120 | 121 | NEW SPEAKER: While the next talk is getting set up, there has been a slight alteration to the time for tonight’s meal, aiming to be at the restaurant for quarter past 7 now. 122 | 123 | NEW SPEAKER: Could you repeat that? 124 | 125 | NEW SPEAKER: Change in the time for the meal, aiming for quarter past 7 now. 126 | -------------------------------------------------------------------------------- /transcripts/open_day/daniele_procida.rst: -------------------------------------------------------------------------------- 1 | ================================================= 2 | Daniele Procida: Welcome to DjangoCon Europe 2015 3 | ================================================= 4 | 5 | DANIELE PROCIDA: 6 | Good morning, welcome to Cardiff and welcome to Djangocon Europe 2015 our open day so I hope there are a few people at least who are not part of the main conference but have come just for today. Oh great. 2 people twice as worthwhile as 3. Put your hand up if you are here just for the opening. That's great wonderful. {applause}. 7 | 8 | Unfortunately slightly bad timing because it's half term and middle of exams so I don't think we'll get all the sixth-formers who might have been here otherwise. Obviously it's quite early on a Sunday morning for sixth-formers and because of the debacle we had with one direction we had to change our dates a bit so that hasn't held with the timing for school pupils but any way ... 9 | 10 | First of all, if you need help, just ask a volunteer and a volunteer is wearing a blue lanyard. Any Committee Members in here could you stand up - there is Vincent and David. Any volunteers apart from the Committee? There is Ben. So you'll see a few of us wearing these and just ask us for anything and if we know the answer we will help you. 11 | 12 | Speaking of lanyards at this conference we have a photography policy so if someone is wearing a black lanyard which is most people that mean they're happy to be photographed. If they're wearing a white lanyard they don't wish to be photographed, they don't wish to be asked if they're sure and they don't wish to be asked why they don't want to be photographed. People have various reasons so please respect this policy. If someone is wearing a blue lanyard I think they want to be photographed as much as possible! 13 | 14 | If you are an open day visitor and don't have a lanyard but don't want to be photographed you can borrow a white one for the day. 15 | 16 | As every Python or Django conference we've governed by a code of conduct and the code of conduct is there to ensure everyone who attends is there to enjoy the event, that everyone feels welcome and feels like they'd like to come back to this again. If you've got a programme booklet it's in full in there. If you want to look at it, have a look at our web-site it's one of the most prominent things on there. 17 | 18 | In brief, it is that nobody at the event is to suffer harassment or abuse of any kind and no one should behave in a way that causes distress to anyone else. If you become aware of a problem or something bother S you please come and speak to a volunteer immediately and we have a written procedure for dealing with it. Not that we expect anything to happen, partly they don't happen because we have these policies. 19 | 20 | So, what is a Django con? 21 | 22 | It's an open source software community conference. It's a non-profit conference run by volunteers. When I say volunteers, even we the members of the Committee are unpaid volunteers. In fact everybody who comes to Djangocon including the members of the Committee who organise it have to buy their own tickets. That's the way it works that everybody pays to attend. The only people who don't pay to attend are people who need financial assistance and can apply for financial help for a free ticket or even for things like transport and accommodation. So, bear that in mind. It might be different from other software conferences you've been to. But it is important and it's why it feels more like a festival or a party than a conference and why the first thing people do when they turn up and ask how can I help. Yes a bunch of attendees asking how they could help by volunteering so it's a nice thing to be involved with. 23 | 24 | So thank you to all our ad hoc volunteers who have volunteered. 25 | 26 | This is our programme for our 6 days. It's our open day which will give you a taste of it. Monday to Wednesday we'll have our formal programme of talks not at the university but at Cardiff City Hall. Then on Thursday and Friday we'll be back here at the university for 2 more days of workshops, clinics and sprints. 27 | 28 | If you want to look at the web-site it's at Djangocon.eu. Timetable is on the web-site in your programme booklet and is up on the walls in various places and we'll get more copies printed as we speak. 29 | 30 | We've got various workshops there is Django Girls all day. This is another non-profit organisation that has been set up to help encourage more women into computing and software development. It's been extraordinarily successful, it's been running less than a year and already has held workshops in I'm not sure how many dozen countries. 31 | 32 | During the day we've got various workshops in different places starting from 11 o'clock. Very briefly we have Python and Django for PHP coders not because we're trying to poach anyone. 33 | 34 | NEW SPEAKER: Yes we are! 35 | 36 | DANIELE PROCIDA: 37 | Yes we are ... Tracey Osborn, not sure if she is here but she's doing a Django tutorial specially aimed at people with a background in web design but not in programming. 38 | Stefan is doing Django CMS. An introduction if you are interested in web content management. Marcus is doing a tutorial for people who have some Python experience already but would like to start applying it to the web. 39 | Leonardo is offering a workshop to dive into object oriented Python for people with some Python but want to understand more. And Erik is doing a tutorial on cryptography which will be suitable for people who only have a minimal grasp of Python and mathematics. 40 | 41 | Go to them and have fun. You should have registered for them if you want to go but if you haven't registered ask nicely at the door and there might be a place for you. 42 | 43 | The talks are in batches, 2 before lunch and 2 after lunch. We'll try and compress the time that we have lost a bit. We have breaks at 11 o'clock, lunch will be served from 12.30 to 14.30 at Aberdare hall there will be signs for people to take you there, and there will be an afternoon break at 4 o'clock. And we aim to finish by about half-past 5. 44 | 45 | This only applies to the people who signed up for the whole conference. Please, you must tell us which meals and dinners you are planning to come to. So if you haven't you need to come and see somebody in the registration desk as soon as possible otherwise there may not be dinners for you. This is part of our policy on food waste. We don't want to be catering for people who don't turn up for meals so we only cater for people who have told us they are coming to meals. That includes the main conference dinner tomorrow night if you haven't told us that you're coming for that it means you do not have a ticket and if you do want to come and don't have a ticket it means you will have to go on a waiting list so come and see us about that as soon as possible. If there is a mean you signed up for but you're not coming to please either tell us or remove it from your ticket on-line so we can allocate it to someone else. We'd be very grateful. 46 | 47 | Also on the topic of waste you'll notice that everyone who registered for the full conference has a bottle - can you wave that bottle - so we're not serving, not using plastic cups or any other plastic bottles. There are water coolers. Fill up your bottle. That bottle will not last for ever but as long as you do if you look after it. 48 | 49 | Our sponsors are setting up in the Jones gallery in the foyer. Go and talk to them. They're as much part of this community as everyone else is. Some are here just for the hell of it because they want to participate in the community. Drop by, say hello, they'll appreciate you talking to them and there will be a jobs fair so they'll be expecting to see you, a lot of them are recruiting at the moment, drop by between 12 and 2. They're making a huge contribution to the conference and we're very grateful for that, couldn't possibly happen without the sponsors, would be about 2 or 3 times the price if it weren't for our sponsors. 50 | 51 | Finally there is Cardiff university that's a really important part of this conference and we're very grateful for the contributions they've made. 52 | 53 | Several members of the committee are from Cardiff University. Most of the volunteers are students of Cardiff University and they've provided facilities resources and the staff so thank you for giving up your Sunday for us {applause}. 54 | 55 | The university through the Vice Chancellors Office has provided a number of scholarships for Cardiff University students to attend conference. A number of the schools have offered funding to their own students separately or given tickets as prizes to their students so we've got a lot of Cardiff University involvement. Also got some speakers 3 of whom you'll be hearing this morning and we also have 3 very special visitors who have travelled from Namibia and that is also partly in thanks to Cardiff University so welcome to Maria, Michael and Jessica all the way from Windhoek {applause}. 56 | 57 | If you are functioning on twitter do please mention and thank Cardiff University because they have made a huge contribution to this - or whatever social media.... 58 | That's enough from me. I am going to introduce Prof. Roger Whitaker who is Dean research in the College of Physical and Engineering Sciences. Physical sciences engineering. And do you need a - no... 59 | 60 | PROF WHITAKER: Just going to say a few words. 61 | 62 | DANIELE PROCIDA: Thank you Roger. {Applause}. 63 | -------------------------------------------------------------------------------- /transcripts/open_day/index.rst: -------------------------------------------------------------------------------- 1 | ======== 2 | Open Day 3 | ======== 4 | 5 | .. toctree:: 6 | :maxdepth: 2 7 | 8 | daniele_procida 9 | roger_whitaker 10 | russell_keith_magee 11 | mark_steadman 12 | rhiannon_titcomb 13 | tom_bakx 14 | cory_benfield 15 | amit_nabarro 16 | yamila_moreno 17 | raphael_barrois 18 | arni_st_sigurosson 19 | adrienne_lowe 20 | zan_anderle 21 | alasdair_nicol 22 | christopher_hunt 23 | katharine_jarmul 24 | rivo_laks 25 | jamie_hannaford 26 | -------------------------------------------------------------------------------- /transcripts/open_day/mark_steadman.rst: -------------------------------------------------------------------------------- 1 | ==================================================== 2 | Mark Steadman: A web framework for the creative mind 3 | ==================================================== 4 | 5 | NEW SPEAKER: Our next speaker is Mark - {inaudible} he's going to be speaking about web framework for the creative mind. Whenever you are ready Mark and as you are running out of time I'll be putting up pointers. 6 | 7 | MARK STEADMAN: I am timing myself any way and the time starts now. Hello. My name is Mark. I wanted to talk about making the case for Django as the web framework for the creative mind so I like to think of myself as creative, I'm a decent programmer, I'm good, I'll get on to me and what I do in a tick but that's the case I wanted to put forward. 8 | 9 | Introductions, my name is Mark, I have been a developer since 2001 and like I said I'm an OK programmer but I have lots of different passions I'm interested in, I'm a musician, I write songs, I try and write comedy songs and also make pod casts. In my day job I work for Substract. I am technical director there; I'm in charge of the technical strategy making sure things work and keep running and stuff like that. We're do you sign led organisation and deal a lot with creative businesses so it's kind of the exact right job for me really. 10 | 11 | And when I'm not doing that I run a thing called poddle which is a podcast and entertainment network that I created for me and my friends so that we can make stuff and share it and have fun doing it and start to build a community. I have been a fan of that medium podcasting and those various arts and pursuits since I left university in 2004 and I made my first pod cast in 2008 and I haven't shut my mouth since. I'm a fan. 12 | 13 | So, previously on Djangocon, I was at Djangocon Europe 2 years ago in Poland and gave a 5 minute lightning talk so this is my second of any talks like this so if I ramble, if it goes off the rails, you have my apologies. But stick with me. 14 | 15 | So, 2 years ago I talked about contributing to a community via open source and I was also about 3 and a half stone heavier at the time so that was - over a good thing, nothing dreadful happened - and since then I've been able to contribute to the community and be part of it so the kind of things Russell has been talking about I've been lucky enough to do, contributed open source code via the web-site hub and I've had that stuff come back, people have had improvements to make to my code and you start to build something really cool. 16 | 17 | So, speaking of building something really cool because this talk was an open day I'm not going to go into big technical conceits here. But one of the things I wanted to do was - I make one of the shows I make is me doing other things and sort of talking while I'm doing other things, it used to be called thoroughly distracted, and I wanted to make that pod cast entirely on my phone so I wanted to be able to record it on my phone with a head set and up load it and have it available to people to listen to and I did it via drop box and I was able to build a solution thanks to Django in apart 5 hours on an evening, got home from work thought this is what I want to do and I was able to build a working solution where I could up load a piece of audio from a drop box folder and my thing would read the meta base using - some of the batteries included in Python using some of the extensions in the Python package or the {inaudible} I was able to read the meta data, get the audio, images and text and put it into the {inaudible} for the podcast. And one of the reasons I was doing that is because I'm using this amazing language, a language that not only has a lot of stuff in it that comes free but it also means because it is such a popular language there are APIs available for pretty much anything that you want to work with whether that's twitter and Facebook which I'll get on to in a bit or it's drop box or it's some Apple web service or something else, there are Python packages available to let you work with those things because you are using a popular language that makes a big thing of having an extensive library. 18 | 19 | When you start getting into Django itself if you not familiar with Django you'll soon become familiar with the admin. It's a content management system that comes included in your project so when you start writing your model which is how you want to store your data, you start to get with only a little bit of work you start to get a full content management back end if you like that you can start to up load your content with and there are ways to customise that. That is huge if you want to be able to build something that is based on creativity because it means you are not having to build a content management system to do all of that stuff, you get it for free, that's one of the big bonuses you get over something like ruby on rails if you are making a choice for a web framework. 20 | 21 | Django is really good at handling media not just on its own it does it really well but also there are some amazing libraries that handle that so we deal a lot with images and when you are dealing with images whether running a store or something else you might want to - for example with poddle we have big feature images for articles and with a library like sore thumbnail as an example that lets you deal so simply with images that you can say here's my main image I want it in lots of different sizes, I don't have to know what those sighs are beforehand I can tinker and try things in my image tags and see how it looks and make different response image size whatever it needs and you've got the tools to do that in an incredibly simple way with very little code no functional code, it's all in Django template tags and it's really simple so if you are dealing with images that is one of the great ways that you can get up and running really quickly so you can focus on making stuff rather than writing programmes. 22 | 23 | So also you've got file browser which is a fantastic thing that plugs into your admin so if you want to re-use the same images or content, audio, video whatever, if you want to put part of it on a store or link to it on a blog post you don't have to up load same content multiple times so with Django file browser which is an extension on top of an extension but very easy to use this gives you not only a way to select a file from a server be that your own server or be it Amazon cloud storage it also gives you the ability to embed those images in a text box, you can embed those easily select the file, it also gives you for images gives you more sizes so you've still got flexibility there and it's a great way of being able to manage the content within your project. 24 | 25 | So, one of the things that I mentioned about twitter and Facebook is trying to build a community so when you've built something cool and something that you want people to look at maybe you want to say, well, it's a small web app and I want people to be able to log in and check it out and share and that kind of thing and one of the little batteries you can plug into your project is Django social. It's a lovely, very simple way of being able to authenticate your users you are not worrying about building authentication system. Django has a solid system to use but if you don't want your user to create user name and password because sometimes people are funny about that or don't want to fill in from they simply want to get in authenticate from twitter or Facebook and say I'm happy for this site to use my profile and come back to your site then that is a fantastic tool to be able to do that and these are things you can use with writing very little code because the point is what I was able to do with my drop box example is I was able to connect lots of pieces together so I wasn't really creating anything new, I was simply stitching things together so it made my ability to make stuff a lot easier and a lot simpler. 26 | 27 | What's wonderful about Django itself is it doesn't prescribe that you have to build things in certain ways. It gives you a bit of flexibility to say if you want to write your views which is the functional views that maps URL to something that you can see effectively, if you want to write that in an object oriented way you are familiar with or write it more functionally you've got options to do that, you've got options to write things in lots of different ways and structure your project in lots of different ways. There are project templates that exist that are created in Django that allow people to have that flexibility so you absolutely get to build it your way by - it's configuration over I don't know what the ... any way - thank you, configuration over convention. You get to host it your way and there are lots of ways you can host it, I used to use Apache and my SQL and there are people in here sucking their teeth going ... but there are lots of different ways you can do it and Django lets you do that and I then started to use a host called digital ocean which gave me a bit more speed and I thought OK I'm going to learn how to do this properly using services like engine X, which is another web server, but the idea is because Django is abstracted from that, you can choose the layers that connect these different pieces together so you are not having to think OK it must be on - it has to be on Linux and Apache and started building my site on windows because I was a windows guy before I started and someone encouraged me to use Django. Window was what I used. So because Python as Russell says is cross platform it doesn't care what operating system it's on I was able to build my first Django web-site and get them running on a server so you've got huge level of flexibility whether you use Amazon web services to host your site or small host digital ocean, you want to put it on a shared box with lots of other web-sites you've got huge flexibility to do that. 28 | 29 | And then once you've got your site hosted you can scale it up. Django is by default really scalable. It knows how to handle a lot of things but there are also lots of great system that's plug into Django to help with things like cashing so when you view a web page and lots of people are viewing the same web-site the same home page if you like, Django isn't having to constantly go back to the database figure out how to display it, put it into the template, it goes I have just done this I'll get it direct from memory and show it to the user and that can make your web-site incredibly fast. You have huge levels of flexibility in terms of how you can configure that caching. 30 | 31 | It's not just about caching, it's about other things in terms of scalability but caching is one of those things people will talk about. 32 | 33 | And you've got fantastic support community in Django. There are people who are incredibly helpful. You'll meet people here who'll give you all sorts of advice; people tend to be very open. You've got places like stack overflow and the Django users Google group is useful. Also the IRC channel and there is a small plug, set up a slack community, called Django launch, it's very, very small at the moment but it does mean - I use slack every day so it's a room I can sit in and if people have questions then we're able to hopefully answer those and at least commiserate and go yet I've had the same problem don't know how to fix it - but at least you've got someone to talk. 34 | 35 | So that's it really. Let's see how we did. Not too bad at all I'm quite happy with that. I've got a lot of details here where you can find the various things. All the stuff I've been talking about the pod casting stuff is on a web-site called poddle and there is a load of code stuff you can see of mine as well and you'll find me bumbling around the conference. 36 | 37 | So I want to say thank you to Django guys Djangocon organisers for letting me speak. I am visually impaired so this kind of thing is a bit daunting but I couldn't be with a better community and I couldn't be using a better platform, Django is my favourite platform to use. In my day job I use PHP, Word Press, I use a few other things, mainly those things but Django is always a thing if I want to build something that I care about in terms of or something that's a hobby, I go straight back to Django and I always will because you get stuff up quickly and you can focus on the stuff you want to do rather than the nuts and bolts of the problem. If you are new to it, get involved, it is so much fun, so thank you very much and I thought I would leave a bit of time if anyone had any questions other than that thank you. 38 | 39 | {Applause}. 40 | 41 | NEW SPEAKER: Thank you Mark. Does anyone have any questions for Mark? My question is you put up a whole bunch of great tools that you say are helpful to what it is you do. For an absolute beginner who've been told you want to build a web-site use Django and more or less nothing else. In my experience it is sometimes hard to find these tools in these communities so what is the best advice - 42 | 43 | MARK STEADMAN: For me it was the Django project web-site, it was starting with the building of a small web-site with the poll and how you work with the area so I am a digital programmer but I didn't know how to work with Python this was the first time I worked with Python so it took me all the way through even on windows, it didn't judge me for trying to build a web-site on windows, it said it's fine we've got this and took you through the whole process so when I speak to people and they say where's the best place to start one of the few frameworks I can say actually start from the official web-site because the documentation and starter help are really, really good. 44 | 45 | NEW SPEAKER: Anyone else like to ask anything? 46 | 47 | NEW SPEAKER: {Inaudible} when did you create - a couple of month ago? 48 | 49 | MARK STEADMAN: Yeah it was only a couple of month ago so it is still very small but if you find me around I can give you the details but I think it is Django noughts dot slash dot com. 50 | 51 | NEW SPEAKER: Is that a hand going up over there? anything else? OK thank you. {Applause}. 52 | -------------------------------------------------------------------------------- /transcripts/open_day/raphael_barrois.rst: -------------------------------------------------------------------------------- 1 | ======================================================= 2 | Raphaël Barrois: Cyberponies - Django talks to machines 3 | ======================================================= 4 | 5 | NEW SPEAKER: Hello everybody. So, our final talk on this section, please don't go away for lunch, there will be plenty of food left. So we're going to have one more talk by Raphael on cyber ponies. Thank you very much. {Applause}. 6 | 7 | RAPHAEL BARROIS: I have one option one is I go very, very fast and everybody will be ready soon or I can try to present things in an able manner which I'll do. Today we're going to talk about {inaudible} cyberponies, Django and machines. What do I mean by machines? Where I work we are entering car sharing system in Paris, Lyon, Bordeaux, soon in {inaudible} ... some are cars so they're good with some systems and units and some are charging points so you get a big {inaudible} ... so devices I'm thinking of, you can think of all devices, you can think of traffic lights or small {inaudible} to know what temperature is so what I'm going to talk about days vices that are full of sensors around them that you can promote {inaudible} in terms of traffic light green ... and local interaction like swiping your card on a point. And all those 3,000 cars and points with Django and I'm going to explain {inaudible}. 8 | 9 | What do we need to do? First you need to manage {inaudible} - your inventory, what devices I have {inaudible} when did I buy them {inaudible} new devices as they come out of the factory or when they come in. Hopefully you will have to push from {inaudible} new features, basically because we want to {inaudible}. 10 | 11 | Monitor devices. Sensors, things coming up, record everything that happens, everything, road, or ... 12 | 13 | And you want to detect issues, sometimes you'll lose a device, drops off or perhaps the {inaudible} is broken or you want to know about it and you want to be able to tell the officer oops there is a problem you cannot transfer this car it's not available right now. 14 | 15 | Actually use the device, {inaudible} on your board, it is there, shiny and you want to interact with it. 16 | 17 | So you might want to aggregate information from all your devices and put them to your end-users and you want to be able to convert user request from your web-site from your API, from your internal application to actual {inaudible} the devices. 18 | 19 | Inventory ... OK the device will {inaudible} inventory,, once a year when replace port ... but you've got serial number, model, manufacturer, mac addresses, registration number, lots and lots of numbers, versions and information to keep, and it has components and subcomponents, when you have a car, hundreds of items in the car and you want to track everything to know perhaps if one batch is malfunctioning. 20 | 21 | So just a model, kiosk, that's my internal reference and it's maybe a new kiosk model ... {inaudible} small kiosks, {inaudible} then you've got your actual {inaudible} you install somewhere ..., it has a model, belongs to a customer, it's somewhere in France. Basically you want to describe your objects Django will be pretty efficient for describing whereabouts. Put them in and you already have your whole database. Just with Django. 22 | 23 | So if you want to {inaudible} perfect. If you want history you can use various libraries for instance I think Django reversion keep track of changes, you can use libraries for recording building nice graphs. You can build a simple APIs {inaudible} information system can access that data. Your devices can push inventory database and request for API. 24 | 25 | OK a few things Django cannot solve. How do you registering inventory. If the board is about to scan all parts all serial numbers and push - {inaudible} provided you have device and a huge {inaudible} ... have to scan them manually, and when you want to push on upgrade you want to push up-grade with Django, perhaps you say with Django I want the device to be updated to that from a version but actual {inaudible} on to the device is going to be something else so yeah you have to do something else. 26 | 27 | I'm looking for some very, very important thing when you have lots of devices ... internet... {inaudible}. Security, you want something that says when I am here - it is the right device but it is giving you serial number, someone trying to fake it and when you send data to your devices you want to make sure it's the right data and it's not been altered and it's basically your proper data and someone is not {inaudible} ... that's a few important things when you will have to rely on other tools via Django for instance useful for your place, lots of tools are coming in recently. So that's more what it is what Django is, the perfect tool because it's {inaudible} devices, you don't want to run Django on your device. 28 | 29 | You want also to monitor devices. Let's say for instance device crashed OK it crashes so {inaudible} it's not working. OK. What happened? Why? I need to get the last 5 minutes usage or things like that. I just push a new {inaudible} to all my cards, are they performing better, worse? I have to know that. Actually the devices are same source with the charge points, how do we know whether a car is parked in front of charge point? We need to get that information to know whether we can {inaudible} the charge point or not. We don't have eyes on the thing. Our sensors our monitoring - only way we can know what is happening in the interface. So yeah be prepared to get a huge amount of monitoring traffic. Sometimes if you get a message once every 5 minutes but 3,000 devices it means you get 10 updates per se second. Say you wanted to have one once every 5 seconds want to switch to {inaudible} some sort of system so take that into account when deciding your network and system. But actually if you just want to spread the load of {inaudible} images, send them to the database no problem, {inaudible} application servers running Django because Django is designed you may put several {inaudible} database so if your database is big enough you can {inaudible} ... 30 | 31 | A table {inaudible} around {inaudible} lines right now, we can query it pretty fast, postgres is amazing {inaudible} ... elastic, choices to choose from. 32 | 33 | That's what I advise is to get all your requests through Django that may if you want to get for instance information about how do the latest engine perform you can look through {inaudible} recorded, {inaudible} then ... monitoring through {inaudible} through Django ... put that in your report. 34 | 35 | A few important things to keep in mind when you are distributing system. You will lose messages. At some point they will be full or have to miss messages or some will be broken, you will lose messages. Some messages will arrive late because while the car was parked in another {inaudible} then it has to send 5 hours of data at once. Sometimes you'll have some issues because your devices have clocks of their own which aren't synchronised so one says this happened 2 p.m. oh actually it was 2.30 when it happened. You won't be able to do anything. 36 | 37 | So tips. When send message to database just put {inaudible} that may if you have lost an event well, you'll catch up later on next message. 38 | 39 | Send the time since last change for all binary sensors. I know what happened when it happened and I can fix my data. And what we found very useful is to keep a last known state cache in the database which means we have one line instead of in? Device so it's much more manageable and have access to all the current state very, very easy. Good, reports ... 40 | 41 | OK now we've got our inventory and we want to use our devices at this point. Yeah one problem you have is your users they want information about for instance {inaudible} home. Sources in their home. So data to provide a global view of the situation and they have lots of devices to consult that are on. Mobile phones, tablets, they've got their web-site, so you want to put all that information in an agreement so you use {inaudible} proper {inaudible} for err users where Django helps and you want to send commands to your devices when someone acts on its interface, participant, or when your computer needs to reboot or reset some device. Well, here it helps with Django because for instance let's say I want to reserve a charge point I want to make sure it has {inaudible} received monitoring message recently and it's not used but can create reservation but keep in my Django database for anything else then I send a manual command, blue, that's the logic to charge point and here use the users, I want a reservation, you do that from Django, check the form and you just code your process, {inaudible} user swiping a card. 42 | 43 | Huge changes to solve. You cannot send request from {inaudible} to devices ... here it is more complex - split brain effect which is what happened last time it received message from device. Partial view world has changed. You cannot know what has happened you have to guess and have to design and keep that in mind when designing your apps. 44 | 45 | That's all so do you have any questions? {Applause}. 46 | 47 | RUSSELL KEITH-MAGEE: Are you running Django on both ends of this on the server, devices or just on the server... 48 | 49 | RAPHAEL BARROIS: Just on the server. {Inaudible} on the devices but Django {inaudible}. 50 | 51 | NEW SPEAKER: How do you send out {inaudible} devices the software permit of it. 52 | 53 | RAPHAEL BARROIS: For now we're using the {inaudible} packages so {inaudible} should be now using version of that much of our meta package so it starts a new package with all occurrences of all versions. It's not perfect but it works for? ? And we're looking at oceans like {inaudible} snappy which is going to have {inaudible} devices. 54 | 55 | NEW SPEAKER: How you deal with tests like for instance you have a device that sends its state, how do you make sure if you use {inaudible} for instance that the device doesn't change over time that you're using the wrong {inaudible} for instance? 56 | 57 | RAPHAEL BARROIS: We are building tests where we are running basically the whole ward on the {inaudible} we basically send fake messages to fake device {inaudible} sends a message to the app and back again and so we can {inaudible} like that and build for complex scenario but it's kind of tricky and so we've had project to design simple ways of running full integration tests. We don't have to run the actual device code which will send {inaudible} want them check the device runs properly and we use some database working to ensure we don't have {inaudible} for the same thing at the same time. 58 | 59 | NEW SPEAKER: How do you detect that some sensors are broken? 60 | 61 | RAPHAEL BARROIS: Broken sensors for instance we detect that a sensor is changing states too fast, for instance when a charge point says hey people have been connecting disconnecting 1,000 times in one day you think it's not physically possible so it's broken. {Inaudible} at all in the time where it should have because we have a few different {inaudible} for instance got to open the charge point to get access to the cable so never opens while you connect disconnect the cable probably is it's broken {inaudible}. 62 | 63 | NEW SPEAKER: {Inaudible}. 64 | 65 | RAPHAEL BARROIS: Well, for our next generation vices using web {inaudible} which allows us to send messages direct {inaudible} registration time for comments we want to send to devices. {Inaudible} more connected state. It can work for charge points for the cars. It's going to be slightly harder. Good. Contact information and if you have any questions about this or perhaps {inaudible} I'm making and perhaps {inaudible} feel free to ring me any time. {Applause}. 66 | 67 | NEW SPEAKER: We're going to break for lunch now. Be back with the timetable by the time you come back. 68 | 69 | (APPLAUSE) 70 | 71 | (LUNCH) 72 | -------------------------------------------------------------------------------- /transcripts/open_day/rhiannon_titcomb.rst: -------------------------------------------------------------------------------- 1 | ========================================================= 2 | Rhiannon Titcomb: Understanding Bezier curves with Python 3 | ========================================================= 4 | 5 | Before we set up the next speaker we're going to see if we can get the light system a bit better. So with a little bit of pride and immense of pleasure I'm introducing Rhiannon, Rhiannon is a first year student at the school of mathematics and she is going to be telling you about how she uses Python to get a ticket to some here really. 6 | 7 | [adjusting laptop and projector] It is the frequency. 8 | 9 | Let's again, Rhiannon. 10 | 11 | RHIANNON TITCOMB: Hi everyone, thank you for the opportunity to be here. I am going the be talking to you about bézier curves today, I will tell you about who I am and I am here. 12 | 13 | I am Rhiannon; I am a student at Cardiff university and studying math. I am first year, this year I had a module called computing for mathematics in which I was taught how the use Python and various other things. This was my first look at coding, never done anything before, but I really loved it. 14 | 15 | So, I did a piece of course work in this module and I ended up winning a Djangocon ticket as a prize for doing well in the course work, so that is why I have got a ticket. 16 | 17 | (APPLAUSE). 18 | 19 | Thanks. So, when I found out I could talk here, I thought it is a really great opportunity and I thought to make it easier on myself I would talk about what that course work was about because clearly it was good. 20 | 21 | So, I am talking about bézier curves today. What is it? Well they curves obviously and used a lot in the computer graphics and drawing and stuff on the computers. I will show you a couple of examples. So this is quite simple bézier curve and this is a slightly more complex looking bézier curve. So to describe it, it is a curve starting at one point and ending at another and it is curvature is defined by control points which are movable and you can have as many as you wanted, that is what shapes it. 22 | 23 | So, why are they used? Well they are the most intuitive for a user to draw in these programmes, they are very, it is easy to see where you can move them. 24 | 25 | Okay. Yes, so, they are used a lot because they are really intuitive and to manipulate. I will show you an example in a minute. They are also really simple and quick for the computer to draw on, take it and compute it. 26 | 27 | So I will show you a quick example of drawing a bézier curve. So, so there is a tool here that draws bézier curves, it is a control point and you can bend it and those are more control points you can see there I am moving it around and stuff. 28 | 29 | You can do whatever you want, that is a bézier curve there, if I click on this now. Those that you can see all up and down the control points and those are what shapes it. 30 | 31 | Yes, so, how do they work? Well here is where it goes to the maths bit! (LAUGHTER). So, hopefully this will come up. Yes. No! 32 | 33 | It is based on something called the Berstein... polynomial ... the T as the increases over time ... so, this, you can't see it but it draws out, sort of shows how the control points can be reduced to draw it. 34 | 35 | (APPLAUSE). 36 | 37 | Yes. So this image here sort of shows how the control points are used to help sketch out the curves you can see as it increases it goes increases goes to each point and stretches it out. Very simply I am trying not to confuse you. 38 | 39 | But yes. So, moving on to what I did? I decided to try and approximate these bézier curves and using an algorithm. What this does is algorithm takes the control pointings and finds the midpoints and then finds the midpoints of the midpoints and keeps going until you reach some point. At this point it will draw the curve however I chose to use it an approximation and draw the lines between the mid points so, this is what it will look like, obviously it is very rough. Yes? I will get ton why that is in a second because it is basically the more a control points that you have in this curve, the better and approximation of the curve that this algorithm will give because it will have more midpoints to find and more line segments to draw. You will see a better curve. 40 | 41 | So, I decided to try and create this algorithm and use it and so, I made a function here that I focused on the bézier curves, I made a function that take control points and this bit here is just a sort of ... what is control points are, like the X and Y coordinates. Then next it calculates the midpoints between those, so it takes the X and the Y's of two consecutive points add the both the X's and the Y's divide by two. Then it does it again for the midpoints found and then once more, down the one point. 42 | 43 | After this I used (INAUDIBLE) to plot all of the points that I had and lines between each the first and the last of each generation, I am trying to call it. So it will do the first control point and then the last control point and then the first of the midpoints and the last and keep going like that. 44 | 45 | So, that is what I started off doing. 46 | 47 | I then realised it wasn't very, it didn't show the approximation for a cue bit one, I wanted to see if it worked so I decided to extend it for a bézier curve with 5 points and I will hopefully now it will work and I will draw a bézier curve with 5 control points and then put those coordinates in and show you what it does and hopefully, you will be able to see that it is an approximation of the curve. I will draw a cubit curve. 48 | 49 | I will try and translate this using the -- I have to do coordinates to make it work. I will write this in down here, the first one is, minus 8... 50 | 51 | Minus 8, 8. 52 | 53 | Then the next. 54 | 55 | So there are the control points, the first control point was minus 8, 8, then the second one is minus 6, minus 4. And then the next one is, I will call that the 2, 8. Then 2, 1.5. 56 | 57 | Then 7, 3. 58 | 59 | So, from this, hopefully, sometimes it takes a while to load. So bear with me. 60 | 61 | Okay so. This is the approximation that my algorithm has given. So you can see it is a rough approximation, it has the right kind of shape and it looks like on a really rough basis. So, yeah it works, awesome. 62 | 63 | So. I have already mentioned how you can get better approximations of the curves by using more line segments and stuff. However I notice that whenever I wanted to try and do a curve with more control points to get a better approximation, I couldn't because I would have to keep extending my curve, it was very badly written and inefficient because I couldn't do it as many points as I wanted. 64 | 65 | So what I have been trying to do recently and it is not complete yet, I am in the middle of exams. I have been trying to write a function that using an end number of points and it will still work out. So this is the code for this. Input a list of points as X and Y coordinates that is before, so however many coordinate points you have on that, it takes the X part and the Y part and adds those to a list and then it will plot those X and Y points. Then after that. It will however many X and Y values there are, it will take the first X value and the consecutive X value in that list and then find out the midpoint then add those as coordinates to another list of midpoints which will then plot. So, I am going the show you that as well. Hopefully that works as well. 66 | 67 | I will just use; I have got some points in there already. I think I have got 8 control points there, so I will just run that. Show you what it does. 68 | 69 | Okay, so you can see that it has got in red are the control points and in blue are the midpoints and you can see that there aren't any lines or anything there, that is because I haven't got yet to the point where it keeps finding the midpoints, I haven't got it to take the midpoints of the midpoints, that is the next step. I am on the way there. That is good. Then, that is the end. I would have on the screen my e-mail address if you wanted to contact me and I link to I have got all the files on-line. So if you wanted to, you can down load those, I have put the piece of course work on there in case you wanted to read it. That is it, thank you very much. (APPLAUSE). 70 | 71 | VINCE: A tremendous well done in dealing with a situation, you did exceptionally well. Any questions to ask for Rhiannon? 72 | 73 | FROM THE FLOOR: I don't know much about the bézier curves but what is the motivation behind using ... as oppose to using splining? 74 | 75 | RHIANNON TITCOMB: I don't know much about anything about splining. For me I wanted to use it from a mathematical point of view, which is interesting, as a maths student my work focuses on that. In terms of why it would be a good way of producing it? I don't really know. I think it is you can use it to draw, draw the curve ifs you implemented the (INAUDIBLE) I mentioned but I don't know if that is the most traditional way of doing it. It is a way as of a maths student I thought it would be a good way to take that. VINCE: Anymore questions? Let's thank Rhiannon again. 76 | 77 | (APPLAUSE). 78 | 79 | DANIELE PROCIDA: If you would like to find some nice fresh cold water for your bottles go back through the foyer where you came in where all the sponsors have set up and in the corridor just off there is the restaurant and at the back of the restaurant is the water cooler so we'll get some more signs out as soon as we find some tape. 80 | -------------------------------------------------------------------------------- /transcripts/open_day/rivo_laks.rst: -------------------------------------------------------------------------------- 1 | ======================================= 2 | Rivo Laks: Django and the real-time web 3 | ======================================= 4 | 5 | So, you have got 20 minutes including questions. So, Rivo Laks travelled from Estonia, on the real-time web with Django, thank you very much. (APPLAUSE). 6 | 7 | RIVO LAKS: Thanks, I am Rivo, I come from an Estonian product development agency, we use lots of Django in our products and we try to change the world. Here I am here to talk about Django and the real-time web and how the two link together. 8 | 9 | So Django is ten years old and it is certainly a stable and mature framework but when you think about it and the web has changed so much during the last ten years, in 2005 we didn't have small personal computers in our pockets, mobile web didn't exist, Gmail just came out. It looks like that, paradox 1.0 was also something new. So the question is, is Django still relevant with all the change requirements that today's web puts on it? 10 | 11 | Or has the pony become the dinosaur? 12 | 13 | No I don't think so. Because, Django is actually really modular and really flexible and you can use it to you can use the parts that help you and will show that you can just add a real-time functionality into your application really easily and keep your application up to date so that it hits today’s needs. 14 | 15 | So, a small disclaimer real-time web isn't obviously something that must be used everywhere. My Blog for example doesn't really need real-time updates but, on the other hand it also has some really good news cases where it makes the UI more flexible and fluid and makes the user experience better which is what matters in the end. 16 | 17 | So, probably the easiest way that is you just need to push some updates from the server side into the client side when some data changes. This is commonly known as the Pub Sub. It is really easy to do in the sense that there are many external services that provide this functionality for you and it is always good use insisting services or libraries where possible you don't really want to reinvent the wheel, but you want to focus on your application and use whatever building blocks are there. 18 | 19 | So some of the services include pusher and pusher is what I am going the show today. They all work pretty much the same way so it doesn't really matter that much which one you want to pick. 20 | 21 | You just basically go the pusher website, sign up for a free account and first thing you do is you need to add some code to your server and it is really easy. First you create the pusher instance, give it your ID and credentials. Next you can already start sending messages with the trigger function. The trigger function has 3 important parameters. First we have the channel which is kind of like chat channels in the sense that when you send a message to the channel then all the clients which are subscribed to the channel and listening to it will receive this message. The second in this case show message is the message type itself or the name. So if we are building a chat we could have a show message we could also have join and leave in the names. Then we have the actual data that we want to send in this case, the message itself and so, with less than 20 lines of code we already have some way of proactively sending updates into the browser whenever something happens. 22 | 23 | The next obviously we have to actually receive those messages on the client side in the browser. This is almost as easy, again we create the pusher instance then we say that we are interested in a certain channel or the message is sent to that channel and then, event handler which reacts to messages of a certain type in, in this case the show message. 24 | 25 | Here, in simple demo we just show the model with the receive message. 26 | 27 | I want to show a live demo here, there is one, I will give you the link and you can try it afterwards. 28 | 29 | You probably also want to have the other direction you want to send the data from the client or the browser to the server and the easiest way to do that is actually bios requests, so you don't need anything fancy there, when the client or the user types something and wants to show a message you do the usual post request to the Django and then Django can push this message forward to all the clients listening. 30 | 31 | So, as you can see, it is really easy to add some real-time functionality into your application, talk about the 20 lines of code would probably take about 5 minutes to integrate it and the external services are good again in the sense that you don't have to have your own infrastructure, you don't have to build the building blocks. You can instead use existing libraries to build your application and focus on what is important for you. 32 | 33 | But, sometimes it is not really enough what the external services provide. For example, you might want to have faster messages or the full control over the messages that you send. This is where web sockets come in. So web sockets sees a protocol standardised in 2011 supported on every modern browser. What web sockets is give you the connection between the browser and the server and it is very low overhead, it is very fast. It also supports both text and binary data. In fact we used this binary web sockets where we used to it to work with street lights. So it is versatile. 34 | 35 | Let's also look at how web sockets can be used and integrated within Django, using asyncio library, we will also be using web sockets package which gives you again the building blocks or primitives that you can use to just focus on sending and receiving the messages instead of implementing the web sockets protocol yourself. 36 | 37 | Because the web sockets should run on a separate port from your main application, we are also going the need a custom server process for that. 38 | 39 | I am skipping some of the code. But the important part is this, define a handler that gets called whenever a client connects. Then you can use the web socket to send and receive messages. 40 | 41 | Again, very simple. You can expand on that to basically create the loop that reads messages from client and then processes them in some way like printing them out to the standard output. 42 | 43 | On the client code web socket has pretty good standard API so you don't really need any third party library, you can use ... JRS, but also use simple rapper library, I am using something called sawkit. 44 | 45 | When the connection is made, it sends a message to the server and waits for incoming messages and reacts to them. Again, showing the alert. 46 | 47 | So I hope I have managed to show that Django and real-time web can relate really easily., easy to use external services like pusher. Also simple with websockets. It is not difficult but often some third party service will also get you off quite well. 48 | 49 | There is also demo up at Djangocon.thorgate.eu. There is code. We also have a stand at the front, please come and see me if you are interested in more. I will tweet the location of the slides thank you. (APPLAUSE). 50 | 51 | NEW SPEAKER: Does anyone have any questions? 52 | 53 | FROM THE FLOOR: Not really a question, more a remark, there is a new ... called web bush and ... (INAUDIBLE) we have made an implementation that is called web push and there is an implementation, ... so if you want to ... you can use it. Basically, when the clients connect to the server, ... you can post ... web socket. 54 | 55 | RIVO LAKS: Okay thank you, that is really interesting to know. 56 | 57 | FROM THE FLOOR: What sort of things would you recommend if you wanted to have a mobile native type app. 58 | 59 | RIVO LAKS: I think pusher has made ... it depends on your needs, for something pusher might be enough or you can use websockets. 60 | 61 | FROM THE FLOOR: How would you handle anything other than a client ... you could (INAUDIBLE) something like a mobile app, so is it just for websites and browsers? Or can it lead to anything? 62 | 63 | RIVO LAKS: Use it between any two, in the project we are using it to communicate between server and not browser, but many devices which controls street lamps. So, street lamps, so yes, it is quite versatile. 64 | 65 | FROM THE FLOOR: Try out ... dragon, which is a library that is made for Django, using websockets. 66 | 67 | RIVO LAKS: I have heard of it, but not tried it yet. 68 | 69 | NEW SPEAKER: Okay, let's thank the speaker again. 70 | 71 | (APPLAUSE). 72 | -------------------------------------------------------------------------------- /transcripts/open_day/roger_whitaker.rst: -------------------------------------------------------------------------------- 1 | =================================================== 2 | Prof. Roger Whitaker: Welcome to Cardiff University 3 | =================================================== 4 | 5 | PROF WHITAKER: Good morning everybody and thank you for the invitation to come along. I'm Roger Whitaker Dean of research for physical sciences and engineering and I'm also here in a personal professional capacity because I'm a researcher in computer science and in particular mobile and social computing and the group that I work with have made really good use of Django over the years so it's something we like to see prosper. But on behalf of Cardiff university and on behalf of the Vice Chancellor it's a really great pleasure to welcome again the event at Cardiff and it's nice to see so many people here, it requires dedication to come along, as a delegate on a Sunday morning when it's raining, so very impressed indeed. 6 | 7 | I'm biased because I'm in the discipline but Django is really important and I was asked by some senior staff in the university what Django was and I managed to recall the tag line around helping perfectionists meet their deadlines and I think that sums it up really well. 8 | 9 | I think also what particularly pleasing about this event and much of the activity going on at Cardiff in this area is that it is very much grassroots participation and snow balling of people's interest collectively that has led to so much activity in this area. And that goes hand in hand with what the university is trying to achieve and is much higher on the university agenda at the moment and the umbrella term is innovation and innovation in whatever form is something the university is keen to help try and catalogue and I just thought I would say to close, I know we're running behind so I just want to keep this short and sweet, but I just thought I'd give a few pointers around some of the investments that the university is making in terms of innovation in ways that the university here at Cardiff hasn't done so in the past, this is very much new activity. 10 | 11 | First and foremost, there is a very large project going on in the order of £200 million and innovation system which is an extension to our campus on the Maindy Road site and there are a number of facilities and centres that have been earmarked and developed to go forward around the area of innovation. 12 | 13 | One of them on that site is the university social science park which will be one of the first kinds of facilities certainly in the UK and beyond and within that there will be a computational social science lab where people from different disciplines will be interacting with ways that we haven't seen before. 14 | 15 | There is also going to be an innovation centre there on site, a separate facility, which will allow SMEs and companies to come in and work alongside Cardiff university staff, Cardiff university research. 16 | 17 | The university is also planning data innovation institute which is going to be a large pan university facility that will be working across biological and life sciences, arts, humanity social sciences and also physical sciences and engineering bringing together people around data science and broadly speaking pulling knowledge from data in new ways. So these are really exciting times for innovation at Cardiff not least in the technological domain. 18 | 19 | Last but not least I should mention my home school computer science and informatics which is developing a new way of teaching software engineering so that is going to be coming forward and advertised very shortly but something that is intimately connected to Django and this conference and I am sure there will be a way to link those activities together. 20 | 21 | So, on behalf of the university I hope it is a great success, I am sure it will be and thanks to everybody involved organisation. 22 | 23 | {Applause}. 24 | -------------------------------------------------------------------------------- /transcripts/open_day/tom_bakx.rst: -------------------------------------------------------------------------------- 1 | ============================= 2 | Tom Bakx: Python in Astronomy 3 | ============================= 4 | 5 | I'm very pleased to welcome Tom Bakx who is a doctoral student here in the school of astronomy and physics. He is from the Netherlands studying here for the next few years and he is going to be talking to you about his work in Python and astronomy. 6 | 7 | TOM BAKX: So, in 1995 a group of research astronomers used the Hubble Space Telescope to observe a small piece of sky over Christmas, they didn't know any galaxies to be in this piece of sky and not even stars and it's a very small region they looked at, so optimistic people were assuming there to be say 100 galaxies in a single viewing and normal people were thinking about a handful of galaxies but researchers were astonished when they found out that 6,000 galaxies were in this small piece of sky. 8 | 9 | So, 6,000 galaxies is a lot to process and a lot of data to gather from a single image and back then there was a lot of galaxies but now there are samples of 3 million galaxies and recently has been launched a satellite going to observe one billion stars and observing that many different sources is a thing you really want to reserve to code as going through it by hand takes a lot of PhD students. 10 | 11 | About this image it's called the Hubble B fuel image and some images are so far away that the universe was a lot smaller when the light was emitted back and ever since the light has been emitted the universe has expanded and while the universe expands the light travelling towards us has expanded as well, expanded from bluer colours towards more red colours and if we're able to find out how much it shifts towards the red we're able to find out what the distribution through cosmic time is of the different properties of the galaxies. 12 | 13 | Now to do this researchers use Python and other programming languages, especially the open source ones as astronomy has a very big community and mostly the easy to use ones as we're pretty lazy. So, what did the researchers find when they plotted the activity of the galaxies through cosmic time? 14 | 15 | They found that we live in a rather dull time. We're at 13.8 billion years since the big bang but 8 to 10 million years ago when the universe was 3 times smaller than it is now star formation and other very active processes peaked and these can be seen in these galaxies here but optical light does not give the full breadth of spectrum of star formation. Star formation is very important to understand why we see as many galaxies with as many stars around as to day and it is crucial for our understanding of the entire problems. However when a star forms a large clump of gas falls together to form a smaller clump of gas, gas heats up, a star forms in the centre but cannot radiate its heat away because there is dust and gas in the way and the gas and dust absorbs the light, becomes warm and starts radiating heat radiation and this heat radiation we can see in sub millimetre wavelengths but as you can see from the optical image and sub millimetre image there is no way of saying these are the same images. The optical shows a lot of detail and the sub millimetre shows 5 things you can call to be galaxies and they don't correlate to each other, the bright box in the centre of the optical doesn't correlate to the bright box in the sub millimetre and this is the thing {inaudible} statistical properties Python enables us to use allows us to correlate the optical and sub millimetre in a way that we can be sure we're looking at the same optical. The very brightly coloured spot in sub millimetre is so far away it is a 8 per cent of the age of the universe it is now, it is forming stars at the rate of a thousand solar masses per year where around us nowadays we only see galaxies forming one solar mass per year, so this a very, very active region in the universe. 16 | 17 | Not only is it very far away, it is extremely bright, but it is being helped by something, and it is helped by a galaxy that is in the way, but instead of the galaxy in the way absorbing the light in the line of sight, the mass of the galaxy that is in the way bends the light around it and makes it appear less like this high resolution image can show us. This is recently been observed with a large observation array and Chile and it shows an Einstein ring as it is called of the lens image of the galaxy behind, image has been magnified 80 times and that allows us to peer even deeper into the universe. My PhD thesis is based around finding as many of these as possible because we can do some amazing science with this. 18 | 19 | These galaxies are very, very heavy intense phase in their lives especially the far away ones and they're bumping into each other a lot. Like these galaxies these are 2 galaxies - in the midst of a merger. You can see the 2 spiral arms of the different galaxies swirling round each other and the structure they had before, 2 spirals has been destroyed you can only see the small rings next to them and it brings with it a burst of star formation. Now we understand star formation a bit and can trace it from elementary physics but if we want to understand how it really works we have to use Python in a different way to data analysis. We use it to simulate and this is a simulation of the Illustris model where we can see on the left hand side the optical light, the light we were able to see with our telescopes and on the right hand side we see the gas intensity where there is a lot of gas where a lot of gas is able to form. And as these central 3 sources, or central 3 galaxies move closer together they come entangled and the value you want to look at is rather small but says SSR as the third digit and that means star formation rate, covers around 100 the entire time but as the merger starts to occur you'll see it will peak to around 200 causing a phase of star formation throughout the galaxy, the galaxy we just saw in the sub millimetre is probably in the midst of a merger. 20 | 21 | This is a small phase dwindling right now as we move closer to the present time, the number dwindles and falls below what it started as becoming not spiral galaxies but elliptical galaxies {inaudible}red, and dead galaxies because they don't form any {inaudible} and these correspond very well to galaxies we see today. 22 | 23 | This is only a snapshot of the big simulation which I'd love to show you now because this simulation is of a cosmic scale, it shows a very significant piece of the universe and what you can see here is dark matter distribution within it you can see sort of {inaudible} light structure of the dark matter and the dark matter is {inaudible} like the web indeed and consists of 5 times more mass than the normal matter we can see. However it's invisible to optical light, doesn't interact with it, so the only way we're able to detect it is either by simulations or by the way it curves light. 24 | 25 | Now {inaudible} the gas inside the galaxies and you can see there will occur explosions which happen at the centre. Supernovas exposures very big galaxies form very big stars; very big stars live a short time but go out with a bang creating heavier elements. Heavier elements we need to understand the formation of plants to understand the formation of water and perhaps the formation of life. In a nutshell, Python helps us understand the data we're looking at to make sure we get the most out of it and helps us figure out if the theory we're thinking about actually corresponds to the data we get from our measurements. 26 | 27 | So, I think Python is a tool to put us in a bigger, in a cosmic perspective. Thank you. {Applause}. 28 | 29 | VINCE: Any questions for Tom? 30 | 31 | NEW SPEAKER: Wonder if you could dig into a bit more detail how you're using Python, it is numerical computation or how the graphics are rendering or - 32 | 33 | TOM BAKX: Python is able to do all the things I showed you here but I assume I didn't use Python for the simulation I showed you - just for some cool images, probably used C {inaudible} because it's faster but you could use Python. 34 | 35 | NEW SPEAKER: Specifically you say you use Python to crunch the data. Do you use any packages like I don't know {inaudible} or do you write everything from scratch? 36 | 37 | TOM BAKX: There is a module called astro pi(?) and I use that mostly to {inaudible} data. Let me grab an image ... what happens here is if you were to just state the peak value of this image, you will get a less good estimation of the intensity the source has so you have to assume the profile you expect it to have then fit it and I use Python as a function to {inaudible} but I use it as a means of getting the shift from the red out of these galaxies just with functioning filling and do that and I use LM fit which is a different model but I'm not really into the module heavy stuff in Python. Thank you. 38 | 39 | NEW SPEAKER: When you do simulations do you do everything on your local machine or use a computer and which set up you use like purely Python or you have some more supporting programmes? 40 | 41 | TOM BAKX: The stuff I do myself I am able to do on my mac myself because it is not computationally heavy, it will take at most a couple of minutes, enough time to get a cup of coffee, but for example if you want to do large scale simulations you really have to go to super computers. It would take for the simulation I showed in the end to run it would take 2000 years on a normal computer but you are used to these {inaudible} because super computers? Yes, does that answer your question? 42 | 43 | VINCE: Time for perhaps one last short question. Let's just thank Tom again. {Applause}. 44 | 45 | A couple of announcements after we've finished that first session. There will be coffee in the foyer and otherwise one of the workshops is more or less started the Django 4 for PHP programmers. If you go to foyer where coffee is people will take you there. Finally thank all speakers from the session one last time. {Applause}. 46 | -------------------------------------------------------------------------------- /transcripts/talks_day_one/index.rst: -------------------------------------------------------------------------------- 1 | ============= 2 | Talks day one 3 | ============= 4 | 5 | .. toctree:: 6 | :maxdepth: 2 7 | 8 | -------------------------------------------------------------------------------- /transcripts/talks_day_two/benjamin_wohlwend.rst: -------------------------------------------------------------------------------- 1 | ====================================== 2 | Benjamin Wohlwend: Give your pony wings 3 | ======================================= 4 | 5 | OLA: So our next speaker is Benjamin, works at (NAME - INAUDIBLE) works in Copenhagen. He is going to talk about best practices and how to give your pony wings. (APPLAUSE). 6 | 7 | BENJAMIN WOHLWEND: So Hi everybody, my name is Benjamin and I have to make a confession. I am a lazy programmer which I mean what I mean with that is I like my code to be lazy or in other words I like my code to do not too much work. That is something I learned after a few dozen Django projects I am not a fast learner so the thing is, making your code faster or making your code not do too much work makes your code faster. 8 | 9 | To illustrate this, I would like to take you on a journey on a project that may or may not have happened in 2009 my boss said to build a stack overflow clone, but with a twist, should be for pony owners. I have Django, should be a piece of cake right? 10 | 11 | Jump in, create a few models, question model, easy stuff with the foreign key to a user, a title, body. Then an answer model can with the key to the question, again with the foreign key to user, body, because it was 2009 and it was cool back then, added a tag field, yes, then let's move on to views. There we didn't really have class based views back then, I never said that this story was true. (LAUGHTER). 12 | 13 | Yes, really simple stuff. To finish it up we added some templates, again really basic stuff. Here we have a template for a question list, we looked through the questions, we displayed the title and the user name, the body, back then we had the mark down filter then we show how many answers the question got and the text of the question. 14 | 15 | So I guess we are finished with the stack overflow clone, let's put it live, so everybody is happy, fist pumping and clapping and partying until this happened. Somebody linked to us from this cool site called pony news, where people hang out to yell at each other. So yes, what happened? 16 | 17 | Apparently we have a performance problem. Or a more realistically have several performance problems. 18 | 19 | So, problem now is how do you even find where your performance issues are? That is the really hard work, everything before it was just child's play. 20 | 21 | What I usually do, I run tools that people run that are way smarter than me, different kind of tools, tools to use when you are developing locally and tools to run in production. I am concentrating on a few local tools on this talk. Especially Django debug tool bar and Django deverser. 22 | 23 | If you not heard of Django debug tool bar, I use it all the time, gives you insight into the cache access, but gives you a nice overview of all your sequel queries, it is more the visual impression that you can see here, lots of sequel queries, it is an indicator that something is wrong. 24 | 25 | If we zoom in, remember we just are displaying a few questions, so why should it take 121 queries, that is insane. Something is wrong here. Let's look at what Django defserver, it is similar to the tool bar, but with the more bare bones interface, outputs everything to the console, really nice having it running on the site. Sit on the side while developing what is going on. 26 | 27 | What is really cool, there is 59 queries, we queried the same thing 59 times, something is wrong there. Found ourselves an issue. What are we going to do now? 28 | 29 | I usually have to, big three-points I am looking at when I try to fix performance issues, first to reduce database queries and round trips database, then what seems obvious, do less work with the code. If everything else fails start to cache stuff. 30 | 31 | Django gives two really cool tools, select related first. 32 | 33 | Select related is nice if you have a foreign key and you want to pre-fetch or preload the data in one single query. In our code if you remember we had this question model with the author and we are looping through the questions to display the user name. So, when we don't use select related what happens in the database is, first we get all the questions in one query, and then for every single time we access the user model we do another query to get the user. So if you count it you can see we queried first user three times and the second 12 times, that is where the applicants come from. Did a lot of round trips that are necessary. 34 | 35 | Select related there. Select related and the name of the field and what happens then is we do it all in one query, so we get all the objects that we need at once and Django maps it for us and everything works beautifully. Back in Django devserver, we are back to sixty one queries, we had 1,211th, half of them are gone, we don't have duplicates anymore. That is great, let's move on to pre-fetch related. 36 | 37 | This is really cool for reverse foreign key relations and many o to many fields, we have examples of those in our code and the tech model which is a many to many field. We loop over the questions in the template and display all the terms for that question. Without pre-fetch related. This happens. Again we get all the questions in the first fetch and then for every single time we loop over the questions again, we go back to the database and then get the text related to that question, which again is not ideal. 38 | 39 | So let's add pre-fetch related. Pretty easy, cool API, what happens then is we do two queries first we get all the questions and then Django magically figures out which text needs to do, gets them all in one query and matches them back to the questions we got before. 40 | 41 | So, in the end we end up with three sequel queries, 121 first, then back to, we can say we accomplished our mission to reduce the queries. 42 | 43 | The next chapter is do less work, which seems less obvious, different ways to achieve that. One way is to move work out of your request response cycle because that is our priority here to reply to the user or to sent cob tent back to the user as quickly as possible, so you can move work that is not necessary for the response out of that code path we are can answer to the user way quicker like API calls to track accounts or stuff like that. 44 | 45 | Another one is to not, another way is to not fetch data, Django by default fetches all the columns for a model when you query for it. There is a cool thing, defer, you can tell Django not to fetch data that you don't need. If you have a huge column, which contains the body of the question, you can say defer, and then the data won't come over the wire. 46 | 47 | What I like the most is to let other people or other layers do the work. One thing that we can do in our code that we looked at is to calculate stuff with annotate or aggregate, if you remember, we are showing in the question overview or in the question list how many answers the question got. To do that we are fetching all the answers from the database and then counting them which seems kind of not very smart to get all the questions and just count them. So let the database do that count. That is really easy to do with annotate if you look at the code there, we just tell Django to count all the answers and put it on a property called answer count and all we end up there in the end is a number which we can display to the user and we are done. 48 | 49 | So, this actually talk about this 20 past noon I think, if you are interested in annotate and aggregate, check the talk out. 50 | 51 | Meanwhile let's move on to caching. It is an interesting topic. If you do it properly, you can like scale to infinity basically but, doing it properly is really, really hard. Cache invalidation is a hard part because the danger that you are running in if you do caching is that you end up serving stale data to your users which might be okay in certain cases like in a Blog or in a stack overflow clone, there sit doesn't really matter if the content that you are showing is couple of minutes old but if you are running a web shop organisers perhaps an e-banking website that might be pretty bad if you served account balance from a few minutes ago, so caching is dangerous, after experience, adding caching to your code can make it hard to test and to reason about how your code actually works so, my advice is to use caching only when it is really necessary. 52 | 53 | I am not saying that caching is bad not at all. It is one of the more important tools to have at our disposal but only start using it when you think it is really necessary. Let's say it is necessary for our case. I really easy way to get started with caching is to cache page decorator. What you do here is you just wrap your view with the cache page decorator, Django will check if it served that request in a, the last 60 seconds in this example. If it did, it return it from the cache if not, recreate the content and put that in the cache. Really easily cache the content of that view. There is a few problems with that, there is a couple of box open in the Django box checker, but generally it is a nice way to get started with caching. 54 | 55 | There is way more options to do with caching. The cache template tech, wrap complete pieces of code of your template in a cache tag and then Django caches the content of the template tech, what is nice, there is ORM caching, really cooed tools for, that one is Johnny cache which is the best named cache out there. Another one caching machine. They give you a quick win. Then there is the big ones like varnish for instance which handles a lot of caching up for you, but it is difficult to set it up correctly. 56 | 57 | If this has peeked your interest, look at high performance Django which came out a few months ago, there is a lot of stuff in there about caching and a lot of ways to get your Django side faster, I recommend to read it. 58 | 59 | So in retrospect, really watch out for those sequel queries they tend to come back and bite you. Being lazy is good, don't do too much work in your code, try and reduce the work that your code does. If everything else fails bring out the big caching guns and start caching. So, yep. That is all. (APPLAUSE). 60 | 61 | OLA SITARSKA: Yeah we've got time for a couple of questions. 62 | 63 | NEW SPEAKER: Great talk, thanks. You mention defer. I don't think you mentioned only which is a parallel to defer with the logic going that way. I wondered if you had any thoughts about when you draw that line, when it is worth deferring because obviously there is a service side cost you pay for constructing a slightly more complex object and there is a long term engineering cost weight you've got to carry in terms of if you accidentally start using an attribute that you said you were deferring then you introduce additional queries so do you have any suggestions about when to make that decision, what sort of criteria you use to make that decision to use defer or - 64 | 65 | BENJAMIN WOHLWEND: So my brother is a carpenter and he told me always measure before you cut so benchmark, try it out with defer, try it out without defer, see what happens. Yeah, that's I guess most important point. Always benchmark before you try it out. 66 | 67 | NEW SPEAKER: Sure thanks. 68 | 69 | NEW SPEAKER: So the devserver looks like a very good top level profiling tool. Do you have any favourite one that delves a little more, gives you more data, more finally carrying data? 70 | 71 | BENJAMIN WOHLWEND: Well, it depends a bit what you want to do. I mean the Django debug tool bar for local development gives you fine grain data about what's going on in your request, for production tools there is stuff like nurelike or upbeat(?) which this company - which gives you fine great data about your production code so yeah there are so many tools in the market just find to write one for your task. 72 | 73 | NEW SPEAKER: Thank you. 74 | 75 | DANIELE PROCIDA: I don't think you have to feel shy about mentioning upbeat because it's exactly part of this endeavour so do go and visit the upbeat stand they're one of our sponsors one of the companies making this possible so thank you very much. {Applause}. 76 | -------------------------------------------------------------------------------- /transcripts/talks_day_two/daniele_procida.rst: -------------------------------------------------------------------------------- 1 | ============ 2 | Introduction 3 | ============ 4 | 5 | DANIELE PROCIDA: Good morning everyone for day two of Djangocon Europe, welcome back if you have just arrived welcome to Djangocon. 6 | 7 | I just want to remind you about the wellbeing support sessions that we have arranged. The appointment cards are on that little partition at the back just pull off a post it note and you have got your appointment with the room and the time. So help yourself to one of those. The counsellors from the university will be here between 10 and 12 and between two and four. 8 | 9 | We had two or three very strong and candied statements made by speakers from this podium yesterday about mental health and wellbeing matters that had affected them personally. 10 | 11 | I want to say that I was having a really awful time a few years ago; when I was working for the university I was able to make use of that same counselling service. It didn't solve my problems for me. But, it did give me a bit of space and time and a way to think about them which helped, helped me find a way to deal with them without being maddened by them, which is what you can expect from a counselling service. Nothing is going to solve your problems by itself, but I am glad I did that and if you have been affected by any of the things that other speakers have already talked about in the last couple of days, then, feel free to take that as a first step. 12 | 13 | I hope you had a good night's sleep, I did until I had, until my dream and I dreamt that I was running a conference and that there was a code of conduct violation caused by Mick Jagger! Who was writing down lists mocking other people’s names and Python code and then I woke up (LAUGHTER). 14 | 15 | So maybe I am becoming maddened in a slightly different way. 16 | 17 | We talk a lot about community and you have all got a special membership card on your lanyard for the community now, I hereby invest you with the power to induct anyone else into our Pythonic sister and brotherhood, into the international society of Djangonaut, before you go home, get the cards, slip into their wallets, so when they get held up at a border or held up at a nightclub, they can show this, yes please, you are very welcome, so we will scatter them around, take some of them and we are the most inclusive society in the world and let it stay that way. 18 | 19 | I am sorry, I meant to show you, there we are. 20 | 21 | Take advantage of that. 22 | 23 | If you can't find one, come and see one of the volunteers. 24 | 25 | I mentioned very briefly that we would like to try to get together people who are working with Django or in Django or and in some way have a project that is aimed at increasing social value or social good. We will have an informal meeting in here at the back of this room towards the end of the lunch break, so we have got half an hour, tomorrow at 2:00 o'clock, so if your company is doing something, if you have got an idea, if there is a need that you think could be solved with a Django project somehow, we will come and talk, maybe we can set something up that, some kind of umbrella, some kind of framework for organising ourselves and see what comes out of that. 26 | 27 | I don't know what will, but at least we will know who we are. 28 | 29 | The first thing of course that we might be doing is returning the favour to the counselling service of the university by collaborating with them during the sprints to see if maybe we as Django developers can create something that solves a problem for them, we don't know what that is, but if we talk to them, we will find out. 30 | 31 | About to welcome our first keynote speaker of the day, I will let Ola introduce her, thank you, enjoy the day, see us if there is anything that you need. (APPLAUSE). 32 | -------------------------------------------------------------------------------- /transcripts/talks_day_two/index.rst: -------------------------------------------------------------------------------- 1 | ============= 2 | Talks day two 3 | ============= 4 | 5 | .. toctree:: 6 | :maxdepth: 2 7 | 8 | daniele_procida 9 | ola_sendecka 10 | benjamin_wolhwend 11 | david_gouldin 12 | stefan_foulis 13 | xavier_dutreilh 14 | theofanis_despoudis 15 | yulia_zozulya 16 | kat_stevens 17 | thomas_turner 18 | shai_berger 19 | markus_holtermann 20 | aaron_bassett 21 | loek_van_gent 22 | matthew_somerville 23 | -------------------------------------------------------------------------------- /transcripts/talks_day_two/matthew_somerville.rst: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | Matthew Somerville: Using Django’s StreamingHTTPResponse for JSON & HTML 3 | ======================================================================== 4 | 5 | MATTHEW SOMERVILLE: Hi, I work for mySociety, a charity that builds things that 6 | empower citizens, in the UK and around the world, such as FixMyStreet and 7 | Alaveteli (FOI). 8 | 9 | MapIt is a Django application for mapping points or postcodes to administrative 10 | areas, either standalone or within a Django project. Our UK installation powers 11 | many of our own and others’ projects such as TheyWorkForYou; Global MapIt is an 12 | installation that uses all the administrative boundaries from OpenStreetMap. 13 | 14 | A few months ago, one of our servers fell over, due to running entirely out of 15 | memory. Looking into what had caused this, it was a request for information on 16 | every “level 8” boundary in Global MapIt. This turned out to be just under 17 | 200,000 rows from one table, along with associated data in other tables. Most 18 | uses of Global MapIt are for point lookups, returning only the few areas 19 | covering a particular latitude and longitude. 20 | 21 | Using python’s resource module, I manually ran through the steps of this 22 | particular view: 23 | 24 | 50Mb initially. Plus 500Mb fetching/creating a lookup of associated identifiers 25 | for each area, plus 675Mb attaching those identifiers to their areas, which 26 | runs the query to fetch the areas, plus 400Mb creating a dictionary of the 27 | areas for output, plus 250Mb outputting the dictionary as JSON. A total of 1875Mb! 28 | 29 | The associated identifiers were added in Python code because doing the join in 30 | the database (with select_related) was far too slow, but I clearly needed a way 31 | to make this request using less memory. There’s no reason why this request 32 | should not be able to work, but it shouldn’t be loading everything into memory, 33 | only to then output it all to the client asking for it. We want to stream the 34 | data from the database to the client as JSON as it arrives; we want in some way 35 | to use Django’s StreamingHTTPResponse. 36 | 37 | The first straightforward step was to sort the areas list in the database, not 38 | in code, as doing it in code meant all the results needed to be loaded into 39 | memory first. I then tweaked our JSONP middleware so that it could cope when 40 | given a StreamingHTTPResponse as well as an HTTPResponse. The next step was to 41 | use the json module’s iterencode function to have it output a generator of the 42 | JSON data, rather than one giant dump of the encoded data. We’re still 43 | supporting Django 1.4 until it end-of-lifes, so I included workarounds in this 44 | for the possibility of StreamingHTTPResponse not being available. 45 | 46 | But having a StreamingHTTPResponse is not enough if something in the process 47 | consumes the generator, and as we want to output a dictionary, creating a 48 | dictionary for json’s iterencode will suck everything into memory, only then 49 | iterating for the output – not much use! I need a way to have it be able to 50 | iterate over a dictionary… 51 | 52 | The solution was to invent the iterdict, which is a subclass of dict that isn’t 53 | actually a dict, but only puts an iterable (of key/value tuples) on items and 54 | iteritems. This tricks python’s JSON module into being able to iterate over 55 | such a “dictionary”, producing dictionary output but not requiring the dict to 56 | be created in memory; just what we want. I then made sure that the whole request 57 | workflow was lazy and evaluated nothing until it would reach the end of the 58 | chain and be streamed to the client. I also stored the associated identifiers 59 | on the area directly in another iterator, not via an intermediary of (in the 60 | end) unneeded objects that just take up more memory. 61 | 62 | I could now look at the new memory usage. Starting at 50Mb again, it added 63 | 140Mb attaching the associated codes to the areas, and actually streaming the 64 | output took about 25Mb. Whilst it took a while to start returning data, it also 65 | let the data stream to the client when the database was ready, rather than wait 66 | for all the data to be returned to Django first. 67 | 68 | But I was not done. Doing the above then revealed a couple of bugs in Django 69 | itself when using StreamingHTTPResponse with GZip middleware: 70 | 71 | * It would die with any Unicode data; 72 | * Gzipped responses were larger than non-gzipped. 73 | 74 | Both of these I patched and were included in Django 1.8. 75 | 76 | Lastly, in all the above, I’ve ignored the HTML version of our JSON output. 77 | This contains just as many rows, is just as big an output, and could just as 78 | easily cripple our server. But sadly, Django templates do not act as 79 | generators, they read in all the data for output. So what MapIt does here is a 80 | bit of a hack – it has in its main template a placeholder, and creates an 81 | iterator out of the template before/after that placeholder, and one compiled 82 | template for each row of the results. 83 | 84 | Now Django 1.8 is out, the alternate Jinja2 templating system supports a 85 | generate() function to render a template iteratively, which would be a cleaner 86 | way of dealing with the issue (though the templates would need to be translated 87 | to Jinja2, of course, and it would be more awkward to support less than 1.8). 88 | Alternatively, creating a generator version of Django’s Template.render() is 89 | Django ticket #13910, and it might be interesting to work on that at the Django 90 | sprint later this week. Thank you! 91 | -------------------------------------------------------------------------------- /transcripts/talks_day_two/shai_berger.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | Shai Berger: Lispisms 3 | ===================== 4 | 5 | DANIELE PROCIDA: ... I am very pleased to introduce Shai, Shai is one of my colleagues in the Django team and he will be talking about lispisms. 6 | 7 | Thank you Shai. 8 | 9 | SHAI BERGER: Okay. Hi there. I am going the talk about things that Python in general in Django in particular could take from lisp and how we could do this and also introducing here a library at a time I have been developing. 10 | 11 | The first question that you could be asking is, why lisp? What is so special about lisp? What is interesting about it? 12 | 13 | It is not a very new language. It is, it doesn't look very nice. It is hard to read if you are not used to weird things. Yet, it gets people very excited about it. You probably don't know Erik Raymond, like fifteen, twenty years ago, he was an important voice and an earlier adopter of Python. 14 | 15 | What really is interesting. So, lisp actually pioneered many things that we take today for granted. Recursion, dynamic typing was first seen in lisp, garbage collection was first seen in lisp. So the question is, basically, are we done pulling things out of lisp or are there still things we could find interesting there? 16 | 17 | Or, rather, did these things come first out of lisp just because it happened to be there first, or are there things in lisp that help foster innovation and allow us to and then give reason to their being more things that we should pick up. 18 | 19 | People who know lisp usually when you say, let's take a feature from lisp to another language usually the thing that comes to mind is macros, lisp macros are powerful. People start adding similar features to Python, perhaps ... does that and it was rejected. There is libraries that does that, similar, sorry, does limited macros in Python. 20 | 21 | But, actually that is not what I want to talk about here. I will have more about it if there is time later. 22 | 23 | I want to talk about dynamically scoped variables. 24 | 25 | So, what is the problem that dynamically scoped variables solve? 26 | 27 | People everywhere for years have wanted access global access to request. Also to other of things it was just last weekend I think someone asked on the developers list for the current app to be available globally. Sorry. Whenever people make those requests on the developers list, it usually get the same answer: No. Globals are evil. 28 | 29 | Why are globals evil? 30 | 31 | Globals are evil because when you use globals in your code your piece of code is tied down to a specific system and you can't pull it out and reuse it. Because, when you are using globals and you call out to other code that other code can change it under your feet and it is hard to reason about the behaviour of your code. 32 | 33 | All that is only, if you use thread locals, you can use those and things like thread safety to worry about. 34 | 35 | Yet, evil is more than about being bad. You don't hear six hundred line functions being described as evil. Don't hear spaghetti code being defined as evil. Why are we saying globals are evil? 36 | 37 | Because they are mighty convenient! 38 | 39 | We like it that we can make ORM queries without passing the connections explicitly, we like to have access to settings whenever we like. In normal Python not related to Django, we like to have the STD out available by default for print and available not by default if we needed to press it. 40 | 41 | So, globals are evil because it is hard to control them. 42 | 43 | But what if you could have globals that do behave? 44 | 45 | Globals were the values can only change down the call chain, so they can change from under your feet. Like a "with" statement where everybody change to the global would be like a "with" statement. Then each piece of code makes sense in isolation, you don't need to know what all your calls do to realise what your globals do. 46 | 47 | You can set up local environments, so you can reuse codes that reuse the globals. 48 | 49 | So, back to lisp. Lisp local change is the norm. Use let for assignments. What let does is not what assignment do in Python, but introduces a new binding, when ... disappears and then all bindings come back. After the inner let is finished, that is returned is the a from the external let and its values. 50 | 51 | Equivalent in Python, you into deuce that shed all the old bindings, this is the equivalent Python to the previous lisp. 52 | 53 | Let's keep this because it is not really important and we are short on time. 54 | 55 | So, for Python, you still have the "with" statement in mind right? The thing is for Python it is not enough to introduce those bindings with "with," because Python likes objects and mutables with lisp with the examples we have seen before, all the values for atomic. With Python you can change parts of the variable without changing the variable. So, that would not be enough. 56 | 57 | Then the obvious problem with the code, you give it a global, it changes its inner parts, you are back to where we were before. So, we need to make the objects immutable if we wanted to do this. 58 | 59 | Slightly less obvious problem. Sometimes we do want it to change even in a restorable way we do want to change just part of the object and then changing bindings will again not be a good solution. So, we'll use something special for attribute change. 60 | 61 | What we do and now I'm introducing the solution. Library called lispism which explores a special object called D and its attributes are the dynamically scoped variables and this way we have them marked specifically so you don't mistake them for normal variables. And for atomic values this looks exactly like the equivalent lisp. You do with D let and then you have the values for the variables. And then this prints first 1 when the value is 1, then 3 in the inner with and then goes back to 1. . And once you are out of the external with, you get a name error. 62 | 63 | For containers, we do special frozen containers so after this, after the first let, you see that A has turned from a list to a topple which is immutable but the thing is they're deeply immutable, they're containers that also freeze their contents so if you access - so B is itself a topple but if you access its members in the originals they were lists. 64 | 65 | And if I have a user defined type, with its own attributes, and its own - sorry some of them are just normal, some of them are containers themself, there are 2, one can only read and the other changes state of the object. 66 | 67 | So, as long as I have tried to just read the object I get that I can access the attributes and that's OK. 68 | 69 | If I try to modify an attribute I get a type error because it's a frozen object. 70 | 71 | And attributes are controlled inside methods. I can call the reader and get the frozen attributes. If I call the rider I get a type error. 72 | 73 | And I use ORM inspired syntax for changing specific attributes of objects. 74 | 75 | Limitations of what I've done here. First of all, the whole freezing thing is a consenting adults API. That means that there are ways to go around it if you really want to. The intention behind it is to prevent values from being changed by mistake, not to force them to be frozen. That's one way you could just change attributes on a dynamically scoped variable without using let. 76 | 77 | This a good thing because if anyone actually went to the trouble of writing something like this I suppose they know what they're doing. 78 | 79 | And this is not as I said, not designed with security in mind, just with engineering. 80 | 81 | I can't control extension models. If anything is written in seasonally it's not really controlled by the pattern library that I wrote. 82 | 83 | I can and do try to make sure that values returned from extension methods even though they - sorry, if - dynamically scoped variable holds an object with extension methods and they return objects I make sure those are frozen but I can't enforce that they don't change the variable. 84 | 85 | There is this annoying quality of generators that if you write a generator using a dynamically coped variable you change with let and under that you do yield and the variable is changed so that doesn't work yet. I have some things to do about it in mind but not done yet. 86 | 87 | Dict access is currently a problem but again this will be handled. 88 | 89 | And the future directions to go with this. The library is currently public, you can't pip install it yet. The repository is public. And the next places I'm going to go is, 1, handling threading, if you have a set of dynamically scoped variables and I open a thread they should be inherited but currently they just use thread local storage so they are not inherited by new threads. 90 | 91 | Macro py the library I alluded to earlier, I could use that to make better sub object control. And it intend to do that. I could do things like here, to do things like, for example, for I can access not just attribute access. 92 | 93 | And another thing that is interesting and dynamically scoped variables enable is something called restarts which is an error mechanism which is in lisp, has not been adapted by any other language I'm aware of and I want to talk about restarts a little. 94 | 95 | The idea behind restarts is that when you try to handle errors you're basically in a conflict. The code protecting the error may be in the best position to do something about it, but it is not in the best position to make decisions. Code higher up knows the big picture, knows what needs to be done, but has no access to details to actually do it. So, when you try to catch an exception higher up most of the thing that caused the exceptions to be strong, to be raised are already gone because the stack was unwound. 96 | 97 | So, the idea here is basically that the inner code instead of actually defining what to do defines options, it defines the different restart and each restart - the example is reading a set of a log file or a set of rows trying to pass each row, and recover when things go wrong. And there are 3 options for recovery. You could return a special record indicating error, you could return a default record saying this is OK, and you could drop in a debugger. But the decision of what is the right choice is not made my read rows by the function at the top, it's made by the function at the bottom which is the one calling things, and test parsers defines how to handle each of the errors that could come about, it maps exceptions to selection of restarts. 98 | 99 | So, with the setting as it is here, if a record shows and the parser decides it's out of date then it returns an error record, but if it calls a parsing error it drops into the bug because it's still in development what we wanted at the moment. 100 | 101 | And another important point about it is that the function in the middle, read file, knows nothing of this. It just goes over rows and return - and read each row and collects - sorry just the function just holds opening the file, it doesn't need to know anything about the specifics of - neither of policy nor of details of error correction. And that is only enabled by dynamically scope variables. 102 | 103 | This is like research for the future project. This is like - of course not valid python code just pseudo code. 104 | 105 | There is a great paper explaining this in detail how it works in lisp not in Python. 106 | 107 | So, that's pretty much what I have to say today. Library will be released on PY PI soon but for now it's just a public repository. I think greenspun's 10th rule of programming does not apply as strongly to Python programmes but it does in some degree. 108 | 109 | That's all I have. {Applause}. 110 | 111 | DANIELE PROCIDA: Thank you very much. We've got time for 2 quick questions. 112 | 113 | NEW SPEAKER: Thanks it looks awesome and clever and dangerous I don't know. I was wondering, is there any library that provides immutable that has structures for Python? 114 | 115 | SHAI BERGER: Not that I'm aware of. 116 | 117 | NEW SPEAKER: And have you heard about HY? 118 | 119 | SHAI BERGER: Implementation in Python yes. 120 | 121 | NEW SPEAKER: Thanks. 122 | 123 | NEW SPEAKER: Thanks that was great so the question is yes have you used it for anything apart from like hey this will be cool? Is it in use for like a real production system for doing that and what is that and why was that a good idea? 124 | 125 | SHAI BERGER: Well, this is not yet in production for anything. This is just something I thought would be cool at this point. But, thought it would be call cool is the applications I have in mind for it are in Django. I think doing this sort of making things globally available because most of the things that people want globally available they want usually for read only access - 126 | 127 | NEW SPEAKER: Request object - 128 | 129 | SHAI BERGER: Like the request object. People want mostly read only access so we could give it to them with acceptable guarantees that they're not going to make too much trouble. And I think that the thing with restarts would be very valuable for error ending an URL(?) for example. 130 | -------------------------------------------------------------------------------- /transcripts/talks_day_two/theofanis_despoudis.rst: -------------------------------------------------------------------------------- 1 | ==================================================== 2 | Theofanis Despoudis: Django aggregations demystified 3 | ==================================================== 4 | 5 | NEW SPEAKER: Just a brief announcement we are going the take a group photo before lunch in the lecture theatre here, if you want to be on the photo, please stay here for a minute or two, if you don't want to be on the photo, you can go straight to lunch. 6 | 7 | Thank you. 8 | 9 | VINCE: Next speaker is Theofanis talking about aggregations. 10 | 11 | THEOFANIS DESPOUDIS: Look it is the guy with the windows! 12 | 13 | So, thanks for having me today. My name is Theo, I am a Greek man, I am living in Cyprus for now. Today we are going to talk about like one thing that, for you, for the developers is a set of tools for doing aggregation, and annotations on your data. So, a little bit of thing about me, I used to be the PHP developer, a pretty horrible pages developer I think a lot of people so you started. 14 | 15 | I recently, I mean about six months ago starting programming with Python. I have this you know, sound that the snakes do ssss and I work at social airways which is a platform for managing your flights, you can set flights and you can have friends on the flight and you can also do a lot of things with your account and stuff. 16 | 17 | So, we can, it is going to be a small talk, not a big one, we are going the talk about aggregations. Then we are going to continue with annotations and then they complement the aggregations notion and then we are going the maybe say a tips and tricks about this and then we are going the answer some questions. 18 | 19 | So what are they? What are the aggregations? Basically, database functions, they are functions of the database. Django has a nice layer on top of it. You only have to deal with the effect you know. You just call the method aggregate or annotate. If your parameters are okay, it will return the result for you. So it is useful for producing summaries and collections of objects. You will have a look at collections of objects. It will produce something you say that you need to produce. So, we are going to see some examples later. 20 | 21 | It is similar to the reduce function, you have a collection and then it applies the function and then it returns the results for you. 22 | 23 | As a single volume. These are some of the functions, that is, those are all supported in Django. They are probably more in the database level but that is, the database limitations specific, some database support, some database don't support. But the average marks means, in this, on the right hand side is the return value. Return the float or the same field or any, or you know. 24 | 25 | So we are going to just for this purpose of this demonstration, I have devised like a small database which is we have like this company so this company has like a mini games, on-line games. It has this you know, database schema, then we have gamers, the gamer may like have a gender or a name or whatever he has. We have a game, let's say the game is like on-line risk or on-line strategy game or whatever which is like strategy or an action, whatever we need to categorise it. 26 | 27 | We have a game server, where the gamers register themselves. Might be the chance that the gamer registers in multiple servers that is why we have the field here. 28 | 29 | The game station, records the games played. We have the game, when it is started, ended, linker to the server and then this mainly we save the result of the game. Then we make sure that the session and the users is unique, so we have this session, this user has won or lost and these, he has accumulated like some points. They might be a chance that we have like a game with like ten users, ten gamers? Maybe some of them have lost, some of them have won and they will just record the result. 30 | 31 | Just for a simple minimal database for we need to work on. 32 | 33 | Then say let's say okay, how do you use this? So let's say we need to count how many unique this is probably, how does it work? We generate the query that is we apply the function and then we return the result. It is 55 mate. 34 | 35 | That is probably the yes. So let's say we need to filter the results so we can apply filtering on the query sets and any kind of filtering, all the tricks and the things you know. You can apply the filters about the user or find the user one or whatever. Then we need to find the number of wins. So, we remove the you know, the losses and we need to count only the wins. 36 | 37 | This is the actually, query in the database. So you want to do it by hand you probably do something like this. But the nice thing is, that Django for this functionality for you, you don't have to do this, the other parts. So left to use the API, the interface and then it will, it will help you build the query and look at the results. That is a bonus for Django. 38 | 39 | Also you can do like, you also have a standard deviation and variance, they have a lot of functions so you can while you are there, just compute the average of the scores and the session, then you can also add multiple you know, multiple results so you can have the average standard variation, with the sample and the variance. 40 | 41 | All comes one the single results for its function you asked for. So, let's continue with annotations. So annotations helps you also, it is another way to have a summary. This is a method that maps the differences, the aggregations aggregate, but these maps a summary value for each object. So, any query set equates it. 42 | 43 | So let's say, want to find the sum of all scores by each user, so we need to go for each user and find all the collective summary of all of these scores. So how do we do this? We just annotate the sum and nothing would do here, we just the ... we find the score. So now, every scores, every gamer this score is a gamer object of course will have in addition a field game session result, because I didn't name it, it will give it to this name and then we will have this score, maybe the second will have another score. This really great tool to just helps you know, collect all of those results in your, in the same place. 44 | 45 | So let's say, min, max, sum. Find the score of the session with the most scores accumulated. So what we can do here. We can annotate of course over the game session objects now. We calculate all the sum of each game session object across the relationship then we can aggregate and we can continue with aggregation and we can use the sum of course and apply the Max function on it. While we are there, you can also add all this game, access the free things because when we are over there, we can ask another thing. 46 | 47 | The result is of course, the game with the maximum sum of scores, that is, it show it is result and the oldest game is like a daytime object. 48 | 49 | Then what we can do is also slice and order our you know, annotations, so let's say you have, you want to ask what is the top five players by awarded points? So annotate the gamer object. You want to find his score, the sum of his score of all his games. We want to filter some because they will appear in our as a result. Then we need to apply ordering. Descending, so the first one will be the highest score, the second the next highest score etc. We also slice the first five. 50 | 51 | Then we can see that you know, the first gamer is like this guy and his points are like in these extra field. Because we specified on the annotate you know, function that method. 52 | 53 | So what else we can do? We can group that is a really cool thing because grouping is a really nice thing to do. You can use the values method of the related manager and if you do that it will just transform itself and it will group according to the fields specified. What I mean by that, see in the example the results can be used later on for annotated or aggregated queries and then we will be merged into the common groups. What I mean by that? So let's say we have like three servers. So we have, we can get the values and then we can annotate the count of the number of gamers. So the servers in the US, have users registered, the Asia and the Europe. If you want to group some of those results you could, you could make the reads the same for two values, that is probably the best way to do it but again for the demonstration, you could group the values for the Asia and the US and now if you go to the same, you can call the same method again it will merge the results so we have like six users from US and four from Asia, total ten from Asia, then the other one. So it is really, if you are into the sequel, you know what grouping means, groups the values into the common group parameter, so in practice you should always check the generator query, you can do this with, like from the Django tool bar or you can use the you know, the go I, you can easily see what is being generated over the request or you can simply print the query set query class, which holds the generated query. 54 | 55 | So this links to another presentation, if you can do it in this sequel, try to do it in Python. If you have the option to do it in sequel, just do it in sequel. Apply the function where the data is you can do it as Python but, I mean, it doesn't look good sometimes. 56 | 57 | It can be aggregated. 58 | 59 | So what I, this also linkers to another yesterday you know, and to another presentation, how do we use a proxy? Maybe you can use it like this? Maybe collect all your queries related to this what you want to do, what you want to achieve, it may be applied different ordering, maybe you want to display another page with another statistics, so you can put the proxy class and apply different ordering. It maybe you can also create your own manager and then you can do all sorts of things as long as you stay with the boundaries of the proxy you know, proxy class. 60 | 61 | So this is the last did for me, try to keep it simple. You can get easily into you need to think of what is your problem basically because you can easily get, you know, you cannot easily get away with a lot of things. You need to find what the problem is, what you are trying to achieve, how Django can help you solve that problem. For us, for developers really easy, because we have a vast library of tools to use and so we have to think about what we are doing every time. So, so all that the results, you need to think about if the result is actually worth it. I mean, can we count it? Cannot it be counted, I mean, what is the point? You have to think about what you are doing so any questions? 62 | 63 | (APPLAUSE). 64 | 65 | VINCE: First questions, come to the mic. 66 | 67 | FROM THE FLOOR: Can you hear me? Thanks for the talk, so, you mentioned that we shouldn't do something in Python, if it can be done in SQL, I agree with that., we have a situation where we need to fetch the objects anyway? We need to list them somewhere. So is it better to do another SQL query, where we have to aggregate, or to use the same queries we fetch to do the? 68 | 69 | THEOFANIS DESPOUDIS: If you have the results in hand you can use it. It is better if you reuse those capabilities so if you have like a function with, you have this aggregated function okay, if you use it one way, which will only one way, use it only once that is okay. But if you want to use it many times maybe later on in your code, you might be putting it in the function, maybe in the aggregated query, to reuse it, so you don't have to deal with the situation of how do I filter? How do I aggregate the result again? Om have to call the mb, only have to call the manager and it will take care of the results for you. 70 | 71 | FROM THE FLOOR: Okay just another question, that is probably a question that is all over the internet, I didn't find the answer. 72 | 73 | Can you filter the objects that you are annotating on? 74 | 75 | THEOFANIS DESPOUDIS: I think so, you can, because it is a query set it is, you can filter the query set. 76 | 77 | FROM THE FLOOR: I think it is an F object, it is not a query search. I mean if you want to annotate for example, only. 78 | 79 | THEOFANIS DESPOUDIS: Because if you see the SQL generated it is a new field that gets applied so it is just like alliance, so you get this field back, so if it is like an F field you can, I think you can filter it. 80 | 81 | FROM THE FLOOR: For example, your example if I want to see how many won games for each user was, not all the games, only the ones that you won? 82 | 83 | THEOFANIS DESPOUDIS: If you want to find all the won games for each user, you have to count them first. Then put them in an annotated you know, field. So you have to annotate the count and find the, for each user, what is his number of wins. Or maybe if you think about what the problem S you need to find the count of the wins for each user. 84 | 85 | FROM THE FLOOR: Okay thank you. 86 | 87 | NEW SPEAKER: Hello thank you for your talk. I am wondering if we can use annotation with some simple mathematical operations like if you want to subscribe to 2 fields? 88 | 89 | THEOFANIS DESPOUDIS: Well, that where it gets really complicated because you can do things but cannot over exaggerate over things because there are probably more ways to do mathematics in Python than SQL. 90 | 91 | NEW SPEAKER: For instance if you want to calculate the distance of the object - 92 | 93 | THEOFANIS DESPOUDIS: You can do it but it's really tricky and it's gets into the rabbit hole experience, you're trying to find something that it might be easier to solve with another method. So that's how you have to poor prioritise and say OK what is the data, what do I have in my disposal, what tools do I have and what's the end result? So, you can try a lot of things but you may be - it may be not worth it sometimes so you may have to just use Python. 94 | 95 | NEW SPEAKER: Of course thanks. 96 | 97 | NEW SPEAKER: One very quick last question. 98 | 99 | NEW SPEAKER: Direct response on that. I'm not completely sure it's 1.8 or 1.9 and there will be some statistic functions in Django {inaudible} that have been launched a couple of weeks ago, at least there is something in that area going to happen. 100 | 101 | VINCE: Thank you very much. {Applause}. 102 | -------------------------------------------------------------------------------- /transcripts/talks_day_two/thomas_turner.rst: -------------------------------------------------------------------------------- 1 | ==================================================== 2 | Thomas Turner: Using Django in a desktop application 3 | ==================================================== 4 | 5 | NEW SPEAKER: Hello everybody, like to introduce Tom from Joinerysoft; Joinerysoft is the UK's biggest supplier of joinery software and talking about using it in a Django application so hello. {applause}. 6 | 7 | THOMAS TURNER: I did it the wrong way round ... other way round, start again, that's better. Right so it's a bit unique this talk. It's using Django in a desktop application. About me, I'm Thomas Turner, I own 2 - am part of 2 family companies. One is somcom which does technical web-sites, done stuff to do with people like NICEIC, which does all the electrical stuff and has done technical searching web sites. The other company is joinerysoft which does joinery software for joinery manufacturing or carpentry. I've been using Django since - for about 7 years since 0.96 I think, there is my twitter account and git hub account. 8 | 9 | Using Django as a desktop application. Is it a good idea or a bad idea? Let's find out. 10 | 11 | So, as I said, the programme that I'm talking about is joinery programme which is called JMS so if I call it JMS, I refer to the programme. So JMS, it is a desktop application but is running Django so let's find a bit more information. 12 | 13 | What technologies do we use? Python and Django obviously otherwise I wouldn't be here. It's an MFC application so it's Microsoft foundation classes. We use a library called DHTMLx for all our grids and all the sort of tables and all our sort of framework. We use reportlab for all our printing. And we use fire Bird SQL database and we use CEF as our web browser which is basically Google chrome. And we use openGL and sikuli for testing. 14 | 15 | Why did we choose Django for a desktop application? It makes it future proof. So, in the end we want to make the programme go on to the internet to actually go on to as a cloud service. It's faster writing - well can be faster writing in Python than C++. HTML can look better than normal Microsoft dialogue boxes and becomes more network compatible and we did a similar thing before. 16 | 17 | What problems did we have? Lots! One was securing Python and Django code. One was securing the HTML code. And one was finding a Django web server that could be embedded into C++. We also found there were too many programming languages. It's quite a nightmare that is. Finding a database engine that is simple to install. Our customers don't even know what a mouse is so they wouldn't know how to install postgres. It gets picked up by virus checkers because it's using port and it's harder to distribute tan the normal bog standard application and it's a nonstandard set up. And testing, we had a lot of problems with testing. 18 | 19 | So, securing the Django and Python code. We put our own encryption into python. We took Python and found where the - so we took Python and put our own encryption into it. We had to build Python and so people could stop reverse engineering because we only distribute the PYC files not the PY files and of course you can still reverse engineer PYC files to get back to a PY file so we stopped that by putting our own encryption into Python. 20 | 21 | We also had to modify Django to allow for the PYC because there is one bit that says asterix dot PY. It would be great if it said asterix dot PYC. 22 | 23 | We also had problems securing the HTML code. The HTML code we didn't want our customers to be able to change it and do something wacky on the page so we actually put our own encryption I won't go through all the how we encrypted down the side. So we wrote our own template loader to do it first of all I didn't even know template loaders existed so I overrode all the template class but then we worked out that you could override the template loader. 24 | 25 | So, finding a web server that could be embedded into C++. We tried Django development server - that's a really bad idea, at the time we were using Django 1.1 and that was a bad idea because it wasn't multi-threaded. It says not to do that. 26 | 27 | We tried somebody's project, somebody's own C++ web server and that was too slow and too unreliable. 28 | 29 | So, we settled on cherry py. Cherry py if you have used it, it is all written in Python, it is a very good web server, so we embed cherry py into our C++ app. 30 | 31 | So finding a database that is easy to install. As I said earlier, our customers don't even know what a mouse is or some of them don't. So they wouldn't have known how to install postgres and postgres actually conflicts - because this is a windows application, it actually conflicts with other software. So, we found it's easier, so we couldn't really use postgres. And SQ light is not very good for networks. Our current version which is out there in the field, we use both of those products and we've had problems with both SQLite and postgres. 32 | 33 | So the one we chose was firebird. Has anyone used firebird? Anyone know about it, put your hands up? A few of you but not many. So, it's easy to install. It's open source. It is not owned by oracle. And it works with Django using a third party plugin. 34 | 35 | It actually came from a D base so there is the logo. 36 | 37 | So, finding a - obviously we needed to put a web browser into the programme so we had to embed a whole web browser into our C++ application. We tried to embed Microsoft internet explorer and me we ran like a mile. It's a nightmare, we didn't want to go there. So we went for CEF. CEF is basically Google Chrome. 38 | 39 | Why CEF? It's open source, it's cross platform, it's used in many big applications. I expect a lot of you have got these programmes installed or some of them installed: spotify, steamclient, github and Dreamweaver. 40 | 41 | So what CEF is, it's a web browser, it's basically Google Chrome so yes it can be embedded thanks to somebody taking Google code and putting it into - making it so you can embed it into a C++ application. 42 | 43 | So, another thing we had problems with was testing we couldn't get selenium to work because there was no web driver, we went for Sikuli, it works by image recognition, it is a bit of a nightmare, the problem is, if you do a star sheet change, you have to redo all the tests again. So that is basically why we had to use Sikuli. 44 | 45 | Reports. We needed a way of generating our own pdf, we, a Django application will be running on a different thread to what the C plus plus is using, so we can't directly talk to a printer, so we had to go via a print preview. So we had to generate a pdf but settled on reportLab it wasn't up to the job, so we had to modify it. It is sort of written in Python, not well coded it is actually written like a C plus plus act, one letter variables, so, that was another problem we had. 46 | 47 | So, yes. It was obviously hard to understand the code. So I am going the show you a little demo of the programme now. 48 | 49 | So this is right. I can't see that side. Let me go over here, forgotten not duplicating. Hopefully. I can work out which side it is. Right. So, that is the database there obviously so it is a single file database and I am just about to call the programme up here. Yes, at the top is all the files, so it doesn't really look like a Django application. 50 | 51 | So back to call it up. So to a user, they wouldn't even know it is written in, they wouldn't even know it is a web application. So back to log in. Obviously that is Django. 52 | 53 | Obviously this is all written in, this is all the html web pages and obviously these are all in Django as well. About to get something more interesting, so don't fall asleep yet. 54 | 55 | So about to call up a window. So. All of this is written in, apart from this bit here, this bit over on the right hand side is actually written in C plus plus, so we had some difficulties getting information from Python to the C plus plus engine. 56 | 57 | So back to come out. Again that is all written in Python, the costing. Back to print a report. 58 | 59 | Obviously this is reportLab so we had to modify this so it worked for our requirements, this is the sort of thing that our customer send out to their customers, so that is it anyway for the thing. 60 | 61 | Go back to that. Slide show from current slide. Not from the beginning. 62 | 63 | Be there in a second. 64 | 65 | Right. So was it a good idea? You tell me. 66 | 67 | We are currently recruiting, do a small sale pitch, just in Bristol, if you want to get more involved, join our team, any questions? 68 | 69 | (APPLAUSE). 70 | 71 | DANIELE PROCIDA: Thank you very much Tom that was absolutely amazing. I don't think anyone here has seen anybody try to do something like that. Was really Django the best way to do this? Was there, surely (LAUGHTER), I mean it is. 72 | 73 | THOMAS TURNER: I wouldn't do it again. No! I proved it could be done, I proved its been done. 74 | 75 | DANIELE PROCIDA: I think that shows another round of I (APPLAUSE). (APPLAUSE). 76 | 77 | I am slightly lost for words because that is honestly one of the most radically, different ways of using Django that I have ever seen, congratulations. 78 | 79 | THOMAS TURNER: I was expecting them ... 80 | 81 | FROM THE FLOOR: Excuse me, I am here mostly to disprove what Daniele just said about 2009 I think I did something similar. We wrote an outlook plug in actually which was presenting html generated by Django for very similar concerns of making the thing, network transparent with intention to later make it available from servers. 82 | 83 | We also, we had a lot of the same experiences and just wanted to say that I share a lot of your ... 84 | 85 | THOMAS TURNER: Thank you very much. 86 | 87 | FROM THE FLOOR: Thanks for the great talk, different application how to use Django, I thought about using Django or in particular for application for desk top application, basically as a data source for (NAME - INAUDIBLE) would you recommend me to do it or not do it? 88 | 89 | THOMAS TURNER: Just don't do this! just stay away seriously, just don't do desk top, it is too complex! I just would stick with a desk top, stick with something like C sharp if you are going to do desk top work. 90 | 91 | FROM THE FLOOR: Hello, thanks for the talk. NFC and Django, that is kind of a weird combination, is there a reason why you didn't try to use something like GDK or something like that? 92 | 93 | THOMAS TURNER: The reason we did it we wanted to go on to the internet. My other company did web applications, I prefer doing web applications than desk top applications, so I probably pushed more for doing this than we should have done it. 94 | 95 | FROM THE FLOOR: Yes but for the desk top part why not use GDK or another Python solution? 96 | 97 | THOMAS TURNER: Our current version is written in MSC, so it is an extension, it evolved to this. We didn't get there by taking a browser, we only had half the window as a browser at the start. That is why, we got there in iterative steps rather than one big sweep. 98 | 99 | FROM THE FLOOR: Okay. 100 | 101 | FROM THE FLOOR: Hi there, thanks for your talk, it was interesting. I have got two questions, one you have embedded Django in a C plus plus application, did it ever cross your mind to try and, I don't know how it is easy to do, embed the C plus plus into the Django web page? 102 | 103 | THOMAS TURNER: We thought of doing that, our customers wouldn't want to call it up in a web browser, they would want to call it up as an application, we would have still needed an exe for them to call up. So that is why we have done it this way. We use a lot of open GL which is also rendering to the page. So, some of the views we use a, one of the main view uses a canvas which actually does all the open GL part. 104 | 105 | FROM THE FLOOR: Yes and my second question was, you mentioned at one point your users don't really know what a mouse is. At the same time, ... to hide it away from them, worried about the users fiddling? Is this copyright... 106 | 107 | THOMAS TURNER: The programme is protected with a dongle okay, so one of these dongles so, people would hack it but it is, it ranges from the type of users. Some of them don't even know what a mouse is, but some are large organisations which would have technical people yourselves in there which could reverse engineer. 108 | 109 | FROM THE FLOOR: Thanks very much. 110 | 111 | THOMAS TURNER: No problem. 112 | 113 | FROM THE FLOOR: The question I wanted to ask was just ask before but I wanted to congratulated you for making windows, inside windows, inside windows (APPLAUSE). 114 | 115 | I wanted to say we did a similar thing and we experienced many of the same problems you have some others with some other stuff we have a lot of hardware communication going on, I may do a lightening talk. 116 | 117 | THOMAS TURNER: Those were a brief amount of the problems, I could carry on and on, seven years’ worth of problems. So. 118 | 119 | DANIELE PROCIDA: Thanks again very much Tom. 120 | 121 | (APPLAUSE). 122 | 123 | Go and visit Tom at his stand in the sponsor’s hall if you would like a chat with him. 124 | -------------------------------------------------------------------------------- /transcripts/talks_day_two/under_the_hood.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | Django Under The Hood 3 | ===================== 4 | 5 | NEW SPEAKER: Hi, I am highjacking the schedule for a brief unscheduled lightning talk. Thank you to Daniel for organising the crèche which is allowing me to attend the conference, unfortunately I can't make the lightning talks so I have slotted in here. So it's back for those who don't recognise my branding what it is Django under the hood. It's different conference to Djangocon which we ran for the first time last year. If you were paying close attention to Baptistes keynote you'll be familiar with it. It's conference aimed at high level Django developers where we get long deep level talks on various areas of Django and other parts of the system. It was a huge success last year. We had 100 people come and it sold out quickly, talks went really well, great feedback and I'm pleased to announce we're doing it again this year and we're going to make it bigger, so with a bit of luck you won't have to be so quick on your key board to get a ticket, we're going to make it longer so we're going to have 9 amazing talks every day aunt half, start at lunch time on Thursday, 3 talks on the Thursday then 5 talks on the Saturday and sprints on the Saturday, one of the great things about Django under hood are the prints and we're going to make sure we're there properly this time is we're going to have at least 18 members of the core team who've signed up to say they're going to come already so there is really good ratio between those of you trying to contribute to Django and those who allegedly know what we're on about. The other things it's going to have is lots of sponsors. At the moment however we have none so I'm looking at you. Please come and talk us if you'd like to be involved with sponsoring the event, there are tickets included for sponsors, please talk to myself, Baptiste or anybody else on the team. I'm also excited to announce a lot of health duel today so hopefully get you excited about what's coming up we'll start with everyone's famous Australian. Russell Keith Magee is going to give a keynote cryptically entitled once upon a Django. I don't know what it means either and Jacob Kaplan Moss explaining about how Django gets from a wsgi server to your http request and how it goes back the other way. We'll have Lacopo Spaletti a core member of the team talking about Django works for it. Florien a Django core dev and is one of the people who receives your email when you email at security at Django.com to explain what measures we have in Django and how they work. We're going to have Josh Smeaton who is responsible for the enormous expressions patch that landed at Django under the hood last year. For those who haven't used 1.8 yet {inaudible} is going to talk about this today and later today. Following on from her talk yesterday we'll have Ola Sitarska talking about the admin talking about how the admin does things and we'll have James talking about files in Django and how it deals with static files, media files and technical constraints there. There will be a couple of more talks announced to I'm finalising what's going on. We'll be in Amsterdam from 5 to 7 November this year tickets approximately 150 euros. They are likely to sell out fast follow us on fitter find the web-site and look forward to seeing you there thank you very much. {Applause}. 6 | -------------------------------------------------------------------------------- /transcripts/talks_day_two/yulia_zozulya.rst: -------------------------------------------------------------------------------- 1 | ================================================= 2 | Yulia Zozulya: Using Python to load-test web apps 3 | ================================================= 4 | 5 | DANIELE PROCIDA: While we're getting connected to let you know at lunch time lunch will be served both on that side and in the other dining room at that end so you can go to either one. Peter Finch's city walks are both now fully booked up for this evening and tomorrow evening, so if you've got a ticket you don't want please cancel it to give somebody else a chance. If you are going to the clink tonight or tomorrow night it's not really compatible with going on the city walk so cancel the walk for that night. OK. 6 | 7 | VINCE: Before we start remind everybody about the photo that will be in this room, we'll do that just before lunch. Which brings me to introduce Yulia who will talk about load tests {applause}. 8 | 9 | YULIA ZOZULYA: Hello everybody my name is Yulia and work for {inaudible} we develop tools for developers to make their lives better and the most recognisable in this community would be of course {inaudible} Python but we do not only make desktop tools. We also provide a bunch of services such as tracking system, bug tracking system or CI servers or code review tools and when we started our latest web servers which was review tool named outsource we decided we want to somehow re-think the way how we do the performance testing. And this thought brought us to a lot of questions for example the first one would always be what tool to use to do the performance testing? 10 | 11 | There are a lot of tools out there from {inaudible} ones to encryption languages which provide a lot of frameworks for you and they can be configured via XML any files so vast majority of options are really hard to cover in one slide. 12 | 13 | So if you actually select scription language to do performance testing you might want to understand why you do that and choosing Python over other scription language might not be a question in this community because you already use that language to the web server development. 14 | 15 | And why to use scripting language at all? It's quite easy to load servers which require some complicated logic for example for the game in our services me even use sockets for the task and it's not easy with IO oriented tools or if you need complicated data over complicated requests over performance testing it's also easy just to write code tan to fill all those strange forms with a lot of fields and stuff. 16 | 17 | Still, in Python there are a lot of tools which provide you such ability and I will cover only few of them and I would like to start with funk load here because it is the simplest one. As you can see it looks a lot like simple unit tests here with test set up and tear down method so you get code in easy recognisable matter and has special set up and cycle methods which I'll explain later. It configured with a in you like configuration file. It may scary because of a lot of parameters but it helps you to tune to your needs. And it can be easily reduced actually. So it is not that bad at all. 18 | 19 | So what actually happens when you run crunch runner over your written tests? it actually spawns a number of configurate number of threads one by one with a little day so you don't get all your tests run in a single moment which almost never happens in real life and in each thread test is run in a loop. During configured of amount of time and this time starts only when the last thread had been spawned so you don't get into situations where you don't have all the concurrency that you configured. 20 | 21 | When this has ended all the tests attempted to be created are killed so this should not be a problem. 22 | 23 | Top cycle and down cycle methods I mentioned before, those are meant to be for configuration parameters that all the users have in common for example URL, web server or some other configuration you might want to pick up from your files. 24 | 25 | Those cycles - sorry ... those cycles form a branch in which you can configure different amounts of concurrent threads and this allows you just to compare the performance of your web server over different amount of load. 26 | 27 | So why do you actually use funk load? 28 | 29 | It allows you to write your tests in easy manner just like your IT or unit tests and there is a runner provided that allows you to run this in single user mode so you can use them as smoke tests for example. 30 | 31 | And other advantage would be that it has benchmark more, benchmark - it has a distributed mode and you can easily adapt for virtual glance to your load environment just by 2 lines in the configuration file. 32 | 33 | Other thing about funk load is that it is extremely well documented. It has a lot of examples it has a lot of tips and tricks about performance and I really advise its recommendation. 34 | 35 | And the last thing would be that it is written in a way that it can be easily extensible. In our company we are actually over written some methods of default bench runner so it would communicate with our CI server and provide the data to our default graphics and it was really easy actually. But why not to use it? The main reason would be it uses default Python threading module only and that's quite a problem because Python threads can use only one cord, Python internal architecture, and it might be OK with IO tasks but if there is at least something you do which is CPO which loads your CPU, you will have ... hmm... sorry, just a moment ... 36 | 37 | There might be a problem with that and you won't get to use all the resources of your motive {inaudible} glands(?) and ..., and the other thing about funk load is default reports of this framework is not really good because there is only one type of graphics here and it is not configurable at all, you just get the timers that library think you should get and you are not able to influence it in any way. 38 | 39 | And a lot of problems of - some of the problems of funk load library can be solved with multi-mechanise framework and the core here of this framework is transaction class basically an object which should have a run method defined. And it has configuration file in your like - just like the funk load library. It has a lot less parameters here so it looks more light weight than funk load. So it would be easier to start with it actually. 40 | 41 | So, what happens when you run multi-mechanise runner over your written class. It loads your transaction into configured number of threads which is spawned one by one with a little delay and it seems a lot like funk load up to this point but the main difference that those threads can be formed into user groups and those user groups are spawned not in different processes using different processing model of Python. Its user group is started simultaneously and if you want - you may turn up the load with several user groups and configure amount of threads so you get load you need. 42 | 43 | So why to use multi-mechanise, it uses multi-processing along with threading so you use multi-core with your clients easily and default report graphics is more configurable in multi-mechanise, just for example you can configure your own timers and it show you the results and graphics that you really want to see and actually it has more types of graphics - more than one - it is quite easy - and it looks better for my taste because it uses different graphics back end so it's generally better. 44 | 45 | But why not to use it? For me API is not as obvious as simple unit testing because you are not get the idea from the start which helps object would be peak topped by the runner which are not and it's quite frustrating not to understand what's happening and the other draw back would be that distributors work flow of them is not supported out of the box and you will have to come up with the solution to that yourself, for example with some other Python module which you prefer. 46 | 47 | And the last but not least would be rather fresh and actually developed framework called locust IO. The runner actually forms randomised locust which will fled your server and the rules of how they will be formed actually described in the related tasks set class which is basically set of tasks. The frequency of each task for each locust are defined with weight attributes and weight time between those tasks are also is not fixed but in some interval so it's getting really randomised here. 48 | 49 | And what actually happens when you run locust scripts. The key difference here is that this runner doesn't use threads at all. It uses {inaudible} and greenlets and those are proven to be more efficient in IO tasks than threads and ... that would be it I guess. So while locust IO? Greenlets are much more faster with IO tasks than default p.threads and thing I forgot to mention locust runs light weight web, web server in the background saw you can share the results of testing between your colleagues or even you can monitor what's happening in the real-time or you can change parameters of the load and it is really convenient. 50 | 51 | The other thing would be that distributed work flow is supported is not that easy as in funk load but you just need to run slave for agent on your clients so it will, you will get distributed load here. 52 | 53 | The other thing would be you'll get total heterogenic tests it's not like in other frameworks where you get all your tests run in a loop one by one. It is completely randomised and that's a good thing because you get something like real life experience here. 54 | 55 | And last but not least it doesn't have any configuration files, all the configuration is done in Python code and there is not much to consider actually. 56 | 57 | The only thing why not to use locust is it has rather tricky terminology and all this weird weighted randomised relations can be really hard to get into but once you get into you will see the bite brightness of it. 58 | 59 | And all of the examples why not to use Python for performance testing and by Python I mean Python 2 here because all of the frameworks I've covered today can be run only under Python 2 even the fresh locust guys picked up Python 2 and if you already migrated to Python 3 I am sorry for you guys and the reason would be is level interpret to log which doesn't allow you to fully use all the resources of your load glands and you will have to end up with some solutions with multi-processing or adding clients to your load cluster. 60 | 61 | In je(?) we ended up with using multi-mechanise along with jeneta(?) because we need a big load here and that is the reason why we abandoned Python because for the performance testing is not as perform itself. 62 | 63 | So if you have any complaints about how the things are going in performance testing, please share them with me, I know that feeling, I've been there. Thank you for listening. Do you have any questions? {Applause}. 64 | 65 | VINCE: Thank you very much. I see 4 people have gone up keep the questions short in interests of time. 66 | 67 | NEW SPEAKER: Do you know of any of the tools you mention have some kind of functionality that allow you to see the synchronised impact on the server like the CP usage, memory usage and the server - 68 | 69 | YULIA ZOZULYA: In Python no they don't but jeneta I mention that use Java it has this. 70 | 71 | NEW SPEAKER: Thanks for your talk, I always struggle with understanding the output of my load test, I can run them compare them with previous runs and get a sense if it's faster or slower than previous ones but do you have any tips on how to get more information to that? More knowledge? 72 | 73 | YULIA ZOZULYA: Um ... actually what knowledge do you mean? 74 | 75 | NEW SPEAKER: For example I would like to know which URLs should I consider for improvement to make my service health better in general based on globe testing I guess that should be possible. 76 | 77 | YULIA ZOZULYA: Actually if you see on the graphics that all the tools are or providing that some of the requests are not replying in the way you need them to, you can compare them between each other and actually a lot about impact on each URL as in locust 2 you have weight attribute for example which defines how much users will use this URL for example and if those weighted URLs are not performing really good probably you should look into them at first and only after that compare them with another for example. I guess that would be my answer. 78 | 79 | NEW SPEAKER: Thank you very much. 80 | 81 | VINCE: One last question I'm afraid in the interests of time. 82 | 83 | NEW SPEAKER: . 84 | 85 | YULIA ZOZULYA: I am here for the rest of the conference. 86 | 87 | NEW SPEAKER: It is not really a question. Actually I'm more keen that modular cloud services team and we have the same problem each time we want to release a service and we built a tool that is called load and can spawn the test on many machines at the same time and it chooses statistics D to get some real-time statistics as well as CPU and memory and you write it is almost like funk load, you write a send are you how you want to test, what a user will do with your application and then it runs it a lot of time and it break everything. And we built second version using doc S and now you can write your loader in any languages then spawn 2000 machine running your documentation at the same time and break everything again so if you are interested contact me. 88 | 89 | VINCE: Thank you very much. Thank Yulia one more time. {Applause} various people pointing at each other. We're going to do the photo now. 90 | 91 | DANIELE PROCIDA: So you'll direct us for the photo. You are the photographer. You give instructions. If you want to be in the photo stay here for a couple more minutes. It only takes 150th of a second to take a photo. The Django for social will be on Wednesday not today. 92 | 93 | (Lunch) 94 | --------------------------------------------------------------------------------