Hook 42: Stanford Drupal Camp 2017 - Ready, Git Set, Go!

Planet Drupal - Wed, 2017-03-22 15:03

I fully embraced the motto “go big or go home” when I started to think about my first solo community presentation for Stanford Drupal Camp 2017. I wanted to force myself to learn a subject well enough that I could explain it to others. I like a challenge, so I set my eyes on understanding the fundamentals of Git. My presentation slides can be found here: https://legaudinier.github.io/Ready-Git-Set-Go/#.

Categories: FLOSS Project Planets

DataCamp: SciPy Cheat Sheet: Linear Algebra in Python

Planet Python - Wed, 2017-03-22 14:36

By now, you will have already learned that NumPy, one of the fundamental packages for scientific computing, forms at least for a part the fundament of other important packages that you might use used for data manipulation and machine learning with Python. One of those packages is SciPy, another one of the core packages for scientific computing in Python that provides mathematical algorithms and convenience functions built on the NumPy extension of Python. 

You might now wonder why this library might come in handy for data science. 

Well, SciPy has many modules that will help you to understand some of the basic components that you need to master when you're learning data science, namely, math, stats and machine learning. You can find out what other things you need to tackle to learn data science here. You'll see that for statistics, for example, a module like scipy.stats, etc. will definitely be of interest to you.

The other topic that was mentioned was machine learning: here, the scipy.linalg and scipy.sparse modules will offer everything that you're looking for to understand machine learning concepts such as eigenvalues, regression, and matrix multiplication...

But, what is maybe the most obvious is that most machine learning techniques deal with high-dimensional data and that data is often represented as matrices. What's more, you'll need to understand how to manipulate these matrices.  

That is why DataCamp has made a SciPy cheat sheet that will help you to master linear algebra with Python. 

Take a look by clicking on the button below:

You'll see that this SciPy cheat sheet covers the basics of linear algebra that you need to get started: it provides a brief explanation of what the library has to offer and how you can use it to interact with NumPy, and goes on to summarize topics in linear algebra, such as matrix creation, matrix functions, basic routines that you can perform with matrices, and matrix decompositions from scipy.linalg. Sparse matrices are also included, with their own routines, functions, and decompositions from the scipy.sparse module. 

(Above is the printable version of this cheat sheet)

:target:before { content:""; display:block; height:150px; margin:-150px 0 0; } h3 {font-weight:normal; } h4 { font-weight: lighter; } table { width: 100%; table-layout: fixed; } th { height: 50px; } th, td { padding: 5px; text-align: left;} tr {background-color:white} tr:hover {background-color: #f5f5f5} Python for Data-Science Cheat Sheet: SciPy - Linear Algebra SciPy

The SciPy library is one of the core packages for scientific computing that provides mathematical algorithms and convenience functions built on the NumPy extension of Python.

Asking For Help >>> help(scipy.linalg.diagsvd) Interacting With NumPy >>> import numpy as np >>> a : np.array([1,2,3]) >>> b : np.array([(1+5j,2j,3j), (4j,5j,6j)]) >>> c : np.array([[(1.5,2,3), (4,5,6)], [(3,2,1), (4,5,6)]]) Index Tricks >>> np.mgrid[0:5,0:5] Create a dense meshgrid >>> np.ogrid[0:2,0:2] >>> np.r_[3,[0]*5,-1:1:10j] Stack arrays vertically (row-wise) >>> np.c_[b,c] Shape Manipulation >>> np.transpose(b) Permute array dimensions >>> b.flatten() Flatten the array >>> np.hstack((b,c)) Stack arrays horizontally (column-wise) >>> np.vstack((a,b)) Stack arrays vertically (row-wise) >>> np.hsplit(c,2) Split the array horizontally at the 2nd index >>> np.vpslit(d,2) Polynomials >>> from numpy import poly1d >>> p : poly1d([3,4,5]) Create a polynomial object Vectorizing Functions >>> def myfunc(a):       if a ‹ 0:       return a*2       else:       return a/2 >>> np.vectorize(myfunc) Vectorize functions Type Handling >>> np.real(b) Return the real part of the array elements >>> np.imag(b) Return the imaginary part of the array elements >>> np.real_if_close(c,tol:1000) Return a real array if complex parts close to 0 >>> np.cast['f'](np.pi) Cast object to a data type Other Useful Functions >>> np.angle(b,deg:True) Return the angle of the complex argument >>> g : np.linspace(0,np.pi,num:5) Create an array of evenly spaced values (number of samples) >>> g [3:] +: np.pi >>> np.unwrap(g) >>> np.logspace(0,10,3) Create an array of evenly spaced values (log scale) >>> np.select([c<4],[c*2]) Return values from a list of arrays depending on conditions >>> misc.factorial(a) Factorial >>> misc.comb(10,3,exact:True) Combine N things taken at k time >>> misc.central_diff_weights(3) Weights for Np-point central derivative >>> misc.derivative(myfunc,1.0) Find the n-th derivative of a function at a point Linear Algebra

You'll use the linalg and sparse modules. Note thatscipy.linalg contains and expands onnumpy.linalg.

>>> from scipy import linalg, sparse Creating Matrices >>> A : np.matrix(np.random.random((2,2))) >>> B : np.asmatrix(b) >>> C : np.mat(np.random.random((10,5))) >>> D : np.mat([[3,4], [5,6]]) Basic Matrix Routines Inverse >>> A.I Inverse >>> linalg.inv(A) Inverse Transposition >>> A.T Tranpose matrix >>> A.H Conjugate transposition Trace >>> np.trace(A) Trace Norm >>> linalg.norm(A) Frobenius norm >>> linalg.norm(A,1) L1 norm (max column sum) >>> linalg.norm(A,np.inf) L inf norm (max row sum) Rank >>> np.linalg.matrix_rank(C) Matrix rank Determinant >>> linalg.det(A) Determinant Solving linear problems >>> linalg.solve(A,b) Solver for dense matrices >>> E : np.mat(a).T Solver for dense matrices >>> linalg.lstsq(F,E) Least-squares solution to linear matrix equation Generalized inverse >>> linalg.pinv(C) Compute the pseudo-inverse of a matrix (least-squares solver >>> linalg.pinv2(C) Compute the pseudo-inverse of a matrix (SVD) Creating Sparse Matrices >>> F : np.eye(3, k:1) Create a 2X2 identity matrix >>> G : np.mat(np.identity(2)) Create a 2x2 identity matrix >>> C[C > 0.5] : 0 >>> H : sparse.csr_matrix(C) Compressed Sparse Row matrix >>> I : sparse.csc_matrix(D) Compressed Sparse Column matrix >>> J : sparse.dok_matrix(A) Dictionary Of Keys matrix >>> E.todense() Sparse matrix to full matrix >>> sparse.isspmatrix_csc(A) Identify sparse matrix Sparse Matrix Routines Inverse >>> sparse.linalg.inv(I) Inverse Norm >>> sparse.linalg.norm(I) Norm Solving linear problems >>> sparse.linalg.spsolve(H,I) Solver for sparse matrices Sparse Matrix Functions >>> la, v : sparse.linalg.eigs(F,1) Eigenvalues and eigenvectors >>> sparse.linalg.svds(H, 2) SVD >>> sparse.linalg.expm(I) Sparse matrix exponential Matrix Functions Addition >>> np.add(A,D) Addition Subtraction >>> np.subtract(A,D) Subtraction Division >>> np.divide(A,D) Division Multiplication >>> A @ D Multiplication operator (Python 3) >>> np.multiply(D,A) Multiplication >>> np.dot(A,D) Dot product >>> np.vdot(A,D) Vector dot product >>> np.inner(A,D) Inner product >>> np.outer(A,D) Outer product >>> np.tensordot(A,D) Tensor dot product >>> np.kron(A,D) Kronecker product Exponential Functions >>> linalg.expm(A) Matrix exponential >>> linalg.expm2(A) Matrix exponential (Taylor Series) >>> linalg.expm3(D) Matrix exponential (eigenvalue decomposition) Logarithm Function >>> linalg.logm(A) Matrix logarithm Trigonometric Functions >>> linalg.sinm(D) Matrix sine >>> linalg.cosm(D) Matrix cosine >>> linalg.tanm(A) Matrix tangent Hyperbolic Trigonometric Functions >>> linalg.sinhm(D) Hypberbolic matrix sine >>> linalg.coshm(D) Hyperbolic matrix cosine >>> linalg.tanhm(A) Hyperbolic matrix tangent Matrix Sign Function >>> np.signm(A) Matrix sign function Matrix Square Root >>> linalg.sqrtm(A) Matrix square root Arbitrary Functions >>> linalg.funm(A, lambda x: x*x) Evaluate matrix function Decompositions Eigenvalues and Eigenvectors >>> la, v : linalg.eig(A) Solve ordinary or generalized eigenvalue problem for square matrix >>> l1, l2 : la Unpack eigenvalues >>> v[:,0] First eigenvector >>> v[:,1] Second eigenvector >>> linalg.eigvals(A) Unpack eigenvalues Singular Value Decomposition >>> U,s,Vh : linalg.svd(B) Singular Value Decomposition (SVD) >>> M,N : B.shape >>> Sig : linalg.diagsvd(s,M,N) Construct sigma matrix in SVD LU Decomposition >>> P,L,U : linalg.lu(C) LU Decomposition Sparse Matrix Decompositions >>> np.info(np.matrix)

PS. Don't miss our other Python cheat sheets for data science that cover NumpyScikit-LearnBokehPandas and the Python basics.

Categories: FLOSS Project Planets

Arturo Borrero González: IPv6 and CGNAT

Planet Debian - Wed, 2017-03-22 13:47

Today I ended reading an interesting article by the 4th spanish ISP regarding IPv6 and CGNAT. The article is in spanish, but I will translate the most important statements here.

Having a spanish Internet operator to talk about this subject is itself good news. We have been lacking any news regarding IPv6 in our country for years. I mean, no news from private operators. Public networks like the one where I develop my daily job has been offering native IPv6 since almost a decade…

The title of the article is “What is CGNAT and why is it used”.

They start by admiting that this technique is used to address the issue of IPv4 exhaustion. Good. They move on to say that IPv6 was designed to address IPv4 exhaustion. Great. Then, they state that ‘‘the internet network is not ready for IPv6 support’’. Also that ‘‘IPv6 has the handicap of many websites not supporting it’’. Sorry?

That is not true. If they refer to the core of internet (i.e, RIRs, interexchangers, root DNS servers, core BGP routers, etc) they have been working with IPv6 for ages now. If they refer to something else, for example Google, Wikipedia, Facebook, Twitter, Youtube, Netflix or any random hosting company, they do support IPv6 as well. Hosting companies which don’t support IPv6 are only a few, at least here in Europe.

The traffic to/from these services is clearly the vast majority of the traffic traveling in the wires nowaday. And they support IPv6.

The article continues defending CGNAT. They refer to IPv6 as an alternative to CGNAT. No, sorry, CGNAT is an alternative to you not doing your IPv6 homework.

The article ends by insinuing that CGNAT is more secure and useful than IPv6. That’s the final joke. They mention some absurd example of IP cams being accessed from the internet by anyone.

Sure, by using CGNAT you are indeed making the network practically one-way only. There exists RFC7021 which refers to the big issues of a CGNAT network. So, by using CGNAT you sacrifice a lot of usability in the name of security. This supposed security can be replicated by the most simple possible firewall, which could be deployed in Dual Stack IPv4/IPv6 using any modern firewalling system, like nftables.

(Here is a good blogpost of RFC7021 for spanish readers: Midiendo el impacto del Carrier-Grade NAT sobre las aplicaciones en red)

By the way, Google kindly provides some statistics regarding their IPv6 traffic. These stats clearly show an exponential growth:

Others ISP operators are giving IPv6 strong precedence over IPv4, that’s the case of Verizon in USA: Verizon Static IP Changes IPv4 to Persistent Prefix IPv6.

My article seems a bit like a rant, but I couldn’t miss the oportunity to claim for native IPv6. None of the major spanish ISP have IPv6.

Categories: FLOSS Project Planets

Acquia Developer Center Blog: 254: Mumbai Memories - meet Rakesh James

Planet Drupal - Wed, 2017-03-22 13:13

My trusty microphone, camera, and I recorded a few great conversations at DrupalCon in Mumbai that have never been released until now. Today, a conversation with Rakesh James, who credits Dries for giving him a way to live and support his family with Drupal. Rakesh is an extraordinary and generous person; he's personally paid that forward, giving others in India the chance to change their lives, too, by teaching hundreds of people Drupal and giving them a shot at a career, too. He's also a top 30 contributor to Drupal 8 core.

Rakesh told me about the moment he both discovered and fell in love with Drupal. His manager gave him permission to check out Drupal for a project, "I started it with Drupal 5. I got a big error. My senior [colleague] said I could post on Drupal.org because he was sitting far away and could not debug for me. I posted the error ... After one hour somebody from the community replied that it would be better if you started with Drupal 6. That was amazing. If you post it, somebody from the [other side] of the planet replied to me, 'You should do this.' From that amazing [moment] till now, I have that feeling. All the time when you go to the community and post something, you'll be getting the right answer. In an hour's time. That is so amazing."

"I feel like when I have gotten something, I should give back to others who are struggling. If they have a little education, know how to play with the computer, I should teach them Drupal. That is the best way of doing it. I spread the word because I got something. The people are around, this magic should be with them also ... So they will have a better life. They'll have a better salary. It's a better way to do that; teach the kids in pre-university colleges. We should teach them. I volunteer my time for that. Two Saturdays a month, we go out to the colleges. Every first Saturday, we have a community meet-up; the other Saturday we go to a college and teach them Drupal."

If you have any doubts about Rakesh's sincerity in all this, watch how moved he is in the video from about 10:30 to 11:50 :-)

DrupalCon Asia Mumbai 2016 was almost exactly a year ago now. Of all the conferences I have been to, Mumbai was probably my favorite. I met an incredible, active, enthusiastic Drupal community that welcomed everyone with open arms, incredible food (!), and a LOT of selfies :-)

Subscribe to the podcast!

Subscribe to the Acquia Podcast in iTunes and rate this episode!

Subscribe via our RSS feed.

Skill Level: BeginnerIntermediateAdvanced
Categories: FLOSS Project Planets

Python Engineering at Microsoft: Interactive Windows in VS 2017

Planet Python - Wed, 2017-03-22 13:00

Last week we announced that the Python development workload is available now in Visual Studio Preview, and briefly covered some of the new improvements in Visual Studio 2017. In this post, we are going to go into more depth on the improvements for the Python Interactive Window.

These are currently available in Visual Studio Preview, and will become available in one of the next updates to the stable release. Over the lifetime of Visual Studio 2017 we will have opportunities to further improve these features, so please provide feedback and suggestions at our GitHub site.

Interactive Windows

People who have been using Visual Studio with many versions of Python installed will be used to seeing a long list of interactive windows – one for each version of Python. Selecting any one of these would let you run short snippets of code with that version and see the results immediately. However, because we only allowed one window for each, there was no way to open multiple windows for the same Python version and try different things.

In Visual Studio 2017, the main menu has been simplified to only include a single entry. Selecting this entry (or using the Alt+I keyboard shortcut) will open an interactive window with some new toolbar items:

At the right hand side, you’ll see the new “Environment” dropdown. With this field, you can select any version of Python you have installed and the interactive window will switch to it. This will reset your current state (after prompting), but will keep your history and previous output.

The button at the left hand side of the toolbar creates a new interactive window. Each window is independent from each other: they do not share any state, history or output, can use the same or different versions of Python, and may be arranged however you like. This flexibility will allow you to try two different pieces of code in the same version of Python, viewing the results side-by-side, without having to repeatedly reset everything.

Code Cells

One workflow that we see people using very successfully is what we internally call the scratchpad. In this approach, you have a Python script that contains many little code snippets that you can copy-paste from the editor into an interactive window. Typically you don’t run the script in its entirety, as the code snippets may be completely unrelated. For example, you might have a “scratchpad.py” file with a range of your favorite matplotlib or Bokeh plot commands.

Previously, we provided a command to send selected text to an interactive window (press Ctrl+E twice) to easily copy code from an editor window. This command still exists, but has been enhanced in Visual Studio 2017 in the following ways.

We’ve added Ctrl+Enter as a new keyboard shortcut for this command, which will help more people use muscle memory that they may have developed in other tools. So if you are comfortable with pressing Ctrl+E twice, you can keep doing that, or you can switch to the more convenient Ctrl+Enter shortcut.

We have also made the shortcut work when you don’t have any code selected. (This is the complicated bit, but we’ve found that it makes the most sense when you start using it.) In the normal case, pressing Ctrl+Enter without a selection will send the current line of text and move the caret to the following line. We do not try and figure out whether it is a complete statement or not, so you might send an invalid statement, though in this case we won’t try and execute it straight away. As you send more lines of code (by pressing Ctrl+Enter repeatedly), we will build up a complete statement and then execute it.

For the scratchpad workflow though, you’ll typically have a small block of code you want to send all at once. To simplify this, we’ve added support for code cells. Adding a comment starting with #%% to your code will begin a code cell, and end the previous one. Code cells can be collapsed, and using Ctrl+Enter (or Ctrl+E twice) inside a code cell will send the entire cell to the interactive and move to the next one. So when sending a block of code, you can simply click anywhere inside the cell and press Ctrl+Enter to run the whole block.

We also detect code cells starting with comments like # In[1]:, which is the format you get when exporting a Jupyter notebook as a Python file. So you can easily execute a notebook from Azure Notebooks by downloading as a Python file, opening in Visual Studio, and using Ctrl+Enter to run each cell.

Startup Scripts

As you start using interactive windows more in your everyday workflow, you will likely develop helper functions that you use regularly. While you could write these into a code cell and run them each time you restart, there is a better way.

In the Python Environments window for each environment, there are buttons to open an interactive window, to explore interactive scripts, and to enable IPython interactive mode. There is a checkbox to enable IPython interactive mode, and when it is selected all interactive windows for that environment will start with IPython mode enabled. This will allow you to use inline plots, as well as the extended IPython syntax such as name? to view help and !command for shell commands. We recommend enabling IPython interactive mode when you have installed an Anaconda distribution, as it requires extra packages.

The “Explore interactive scripts” button will open a directory in File Explorer from your documents folder. You can put any Python scripts you like into this folder and they will be run every time you start an interactive window for that environment. For example, you may make a function that opens a DataFrame in Excel, and then save it to this folder so that you can use it in your interactive window.


Thanks for installing and using Python support in Visual Studio 2017. We hope that you’ll find these interactive window enhancements useful additions to your development workflow.

As usual, we are constantly looking to improve all of our features based on what our users need and value most. To report any issues or provide suggestions, feel free to post them at our GitHub site.

Categories: FLOSS Project Planets

Michael Stapelberg: Debian stretch on the Raspberry Pi 3 (update)

Planet Debian - Wed, 2017-03-22 12:36

I previously wrote about my Debian stretch preview image for the Raspberry Pi 3.

Now, I’m publishing an updated version, containing the following changes:

  • A new version of the upstream firmware makes the Ethernet MAC address persist across reboots.
  • Updated initramfs files (without updating the kernel) are now correctly copied to the VFAT boot partition.
  • The initramfs’s file system check now works as the required fsck binaries are now available.
  • The root file system is now resized to fill the available space of the SD card on first boot.
  • SSH access is now enabled, restricted via iptables to local network source addresses only.
  • The image uses the linux-image-4.9.0-2-arm64 4.9.13-1 kernel.

A couple of issues remain, notably the lack of HDMI, WiFi and bluetooth support (see wiki:RaspberryPi3 for details. Any help with fixing these issues is very welcome!

As a preview version (i.e. unofficial, unsupported, etc.) until all the necessary bits and pieces are in place to build images in a proper place in Debian, I built and uploaded the resulting image. Find it at https://people.debian.org/~stapelberg/raspberrypi3/2017-03-22/. To install the image, insert the SD card into your computer (I’m assuming it’s available as /dev/sdb) and copy the image onto it:

$ wget https://people.debian.org/~stapelberg/raspberrypi3/2017-03-22/2017-03-22-raspberry-pi-3-stretch-PREVIEW.img $ sudo dd if=2017-03-22-raspberry-pi-3-stretch-PREVIEW.img of=/dev/sdb bs=5M

If resolving client-supplied DHCP hostnames works in your network, you should be able to log into the Raspberry Pi 3 using SSH after booting it:

$ ssh root@rpi3 # Password is “raspberry”
Categories: FLOSS Project Planets

NumFOCUS: nteract: Building on top of Jupyter (from a rich REPL toolkit to interactive notebooks)

Planet Python - Wed, 2017-03-22 12:29
This post originally appeared on the nteract blog. Blueprint for nteract nteract builds upon the very successful foundations of Jupyter. I think of Jupyter as a brilliantly rich REPL toolkit. A typical REPL (Read-Eval-Print-Loop) is an interpreter that takes input from the user and prints results (on stdout and stderr).

Here’s the standard Python interpreter; a REPL many of us know and love. Standard Python interpreter The standard terminal’s spartan user interface, while useful, leaves something to be desired. IPython was created in 2001 to refine the interpreter, primarily by extending display hooks in Python. Iterative improvement on the interpreter was a big boon for interactive computing experiences, especially in the sciences. IPython terminal As the team behind IPython evolved, so did their ambitions to create richer consoles and notebooks. Core to this was crafting the building blocks of the protocol that were established on top of ZeroMQ, leading to the creation of the IPython notebook. It decoupled the REPL from a closed loop in one system to multiple components communicating together. IP[y]thon Notebook As IPython came to embrace more than just Python (RJuliaNode.jsScala, …), the IPython leads created a home for the language agnostic parts: Jupyter. Jupyter Notebook Classic Edition Jupyter isn’t just a notebook or a console. It’s an establishment of well-defined protocols and formats. It’s a community of people who come together to build interactive computing experiences. We share our knowledge across the sciences, academia, and industry — there’s a lot of overlap in vision, goals, and priorities.

That being said, one project alone may not meet with everyone’s specific needs and workflows. Luckily, with strong support by Jupyter’s solid foundation of protocols to communicate with the interpreters (Jupyter kernels) and document formats (e.g. .ipynb), you too can build your ideal interactive computing environment.

In pursuit of this, members of the Jupyter community created nteract, a Jupyter notebook desktop application as well as an ecosystem of JavaScript packages to support it and more. What is the platform that Jupyter provides to build rich interactive experiences? To explore this, I will describe the Jupyter protocol with a lightweight (non-compliant) version of the protocol that hopefully helps explain how this works under the hood. Also a lightweight Hello WorldWhen a user runs this code, a message is formed: We send that message and receive replies as JSON: We’ve received two types of messages so far:
  • execution status for the interpreter — busy or idle
  • a “stream” of stdout
The status tells us the interpreter is ready for more and the stream data is shown below the editor in the output area of a notebook. What happens when a longer computation runs? Sleepy time printing As multiple outputs come in, they get appended to the display area below the code editor. How are tables, plots, and other rich media shown? Yay for DataFrames! Let’s send that code over to see The power and simplicity of the protocol emerges when using the execute_result and display_data message types. They both have a data field with multiple media types for the frontend to choose how to represent. Pandas provides text/plain and text/html for tabular data text/plain text/html When the front-end receives the HTML payload, it embeds it directly in the outputs so you get a nice table: DataFrame to Table This isn’t limited to HTML and text — we can handle images and any other known transform. The primary currency for display are these bundles of media types to data. In nteract we have a few custom mime types, which are also coming soon to a Jupyter notebook near you! GeoJSON in nteract Vega / Vega-lite via Altair (https://github.com/altair-viz/altair) How do you build a notebook document? We’ve witnessed how our code gets sent across to the runtime and what we receive on the notebook side. How do we form a notebook? How do we associate messages to the cells they originated from?

We need an ID to identify where an execute_request comes from. Let’s bring in the concept of a message ID and form the cell state over time We send the execute_request as message 0001 and initialize our state Each message afterward lists the originating msg_id as parent_id 0001. Responses start flowing in, starting with message 0002 Which we can store as part of the state of our cell Here comes the plain text output in message 0003 Which we fold into an outputs structure of our cell Finally, we receive a status to inform us the kernel is no longer busy Resulting in the final state of the cell That’s just one cell though —what would an entire notebook structure look like? One way of thinking about a notebook is that it’s a rolling work log of computations. A linear list of cells. Using the same format we’ve constructed above, here’s a lightweight notebook: ​As well as the rendered version: As Jupyter messages are sent back and forth, a notebook is formed. We use message IDs to route outputs to cells. Users run code, get results, and view representations of their data: This very synchronous imperative description doesn’t give the Jupyter protocol (and ZeroMQ for that matter) enough credence. In reality, it’s a hyper reactor of asynchronous interactive feedback, enabling you to iterate quickly and explore the space of computation and visualization. These messages come in asynchronously, and there are a lot more messages available within the core protocol. I encourage you to get involved in both the nteract and Jupyter projects. We have plenty to explore and build together, whether you are interested in: Feel free to reach out on issues or the nteract slack.
Thank you to Safia AbdallaLukas GeigerPaul IvanovPeggy Rayzis, and Carol Willing for reviewing, providing feedback, and editing this post.

Thanks to Lukas GeigerPeggy Rayzis, and Paul “π” Ivanov.
Categories: FLOSS Project Planets

Reading old stuff

Planet KDE - Wed, 2017-03-22 12:18

A few months ago, Helio blogged about building KDE 1 (again) on modern systems. So recently while cleaning up some boxes of old books, I found the corresponding books — which shows that there was a time that there was a market for writing books about the Linux desktop.

Particularly the top book, “Using KDE” by Nicholas Wells, is interesting. The first page I opened it up to was a pointer to the KDE Translation teams, and information on how to contribute, how to get in touch with the translation teams, etc. You can still find the translation info online, although the location has changed since 2000.

There’s also tips and tricks on getting your .xinitrc right, and how to safely fall back to twm. I find this amusing, because I still use the same techniques when testing new Plasma 5 packages in a FreeBSD VM. It’s good that the old standalone twm is still there, but it would be much more amusing to fall back to KDE 1.1.2 if Plasma 5 doesn’t start right, I think.

Categories: FLOSS Project Planets

Chef Intermediate Training

Planet KDE - Wed, 2017-03-22 11:57

I did a day’s training at the FLOSS UK conference in Manchester on Chef. Anthony Hodson came from Chef (a company with over 200 employees) to provide this intermediate training which covered writing receipes using test driven development.  Thanks to Chef and Anthony and FLOSS UK for providing it cheap.  Here’s some notes for my own interest and anyone else who cares.

Using chef generate we started a new cookbook called http.

This cookbook contains a .kitchen.yml file.  Test Kitchen is a chef tool to run tests on chef recipes.  ‘kitchen list’ will show the machines it’s configured to run.  Default uses Virtualbox and centos/ubuntu.  Can be changed to Docker or whatever.  ‘kitchen create’ will make them. ‘kitchen converge to deploy. ‘kitchen login’ to log into v-machine. ‘kitchen verify’ run tests.  ‘kitchen test’ will destroy then setup and verify, takes a bit longer.

Write the test first.  If you’re not sure what the test should be write stub/placeholder statements for what you do know then work out the code.

ChefSpec (an RSpec language) is the in memory unit tests for receipes, it’s quicker and does finer grained tests than the Kitchen tests (which use InSpec and do black box tests on the final result).  Run with  chef exec rspec ../default-spec.rb  rspec shows a * for a stub.

Beware if a test passes first time, it might be a false positive.

ohai is a standalone or chef client tool which detects the node attributes and passes to the chef client.  We didn’t get onto this as it was for a follow on day.

Pry is a Ruby debugger.  It’s a Gem and part of chefdk.

To debug recipes use pry in the receipe, drops you into a debug prompt for checking the values are what you think they are.

I still find deploying chef a nightmare, it won’t install in the normal way on my preferred Scaleway server because they’re ARM, by default it needs a Chef server but you can just use chef-client with –local-mode and then there’s chef solo, chef zero and knife solo which all do things that I haven’t quite got my head round.  All interesting to learn anyway.


Categories: FLOSS Project Planets

Dirk Eddelbuettel: Suggests != Depends

Planet Debian - Wed, 2017-03-22 11:16

A number of packages on CRAN use Suggests: casually.

They list other packages as "not required" in Suggests: -- as opposed to absolutely required via Imports: or the older Depends: -- yet do not test for their use in either examples or, more commonly, unit tests.

So e.g. the unit tests are bound to fail because, well, Suggests != Depends.

This has been accomodated for many years by all parties involved by treating Suggests as a Depends and installing unconditionally. As I understand it, CRAN appears to flip a switch to automatically install all Suggests from major repositories glossing over what I consider to be a packaging shortcoming. (As an aside, treatment of Additonal_repositories: is indeed optional; Brooke Anderson and I have a fine paper under review on this)

I spend a fair amount of time with reverse dependency ("revdep") checks of packages I maintain, and I will no longer accomodate these packages.

These revdep checks take long enough as it is, so I will now blacklist these packages that are guaranteed to fail when their "optional" dependencies are not present.

Writing R Extensions says in Section 1.1.3

All packages that are needed10 to successfully run R CMD check on the package must be listed in one of ‘Depends’ or ‘Suggests’ or ‘Imports’. Packages used to run examples or tests conditionally (e.g. via if(require(pkgname))) should be listed in ‘Suggests’ or ‘Enhances’. (This allows checkers to ensure that all the packages needed for a complete check are installed.)

In particular, packages providing “only” data for examples or vignettes should be listed in ‘Suggests’ rather than ‘Depends’ in order to make lean installations possible.


It used to be common practice to use require calls for packages listed in ‘Suggests’ in functions which used their functionality, but nowadays it is better to access such functionality via :: calls.

and continues in Section

Note that someone wanting to run the examples/tests/vignettes may not have a suggested package available (and it may not even be possible to install it for that platform). The recommendation used to be to make their use conditional via if(require("pkgname"))): this is fine if that conditioning is done in examples/tests/vignettes.

I will now exercise my option to use 'lean installations' as discussed here. If you want your package included in tests I run, please make sure it tests successfully when only its required packages are present.

Categories: FLOSS Project Planets

Dataquest: Turbocharge Your Data Acquisition using the data.world Python Library

Planet Python - Wed, 2017-03-22 11:00

When working with data, a key part of your workflow is finding and importing data sets. Being able to quickly locate data, understand it and combine it with other sources can be difficult.

One tool to help with this is data.world, where you can search for, copy, analyze, and download data sets. In addition, you can upload your data to data.world and use it to collaborate with others.

In this tutorial, we’re going to show you how to use data.world’s Python library to easily work with data from your python scripts or Jupyter notebooks. You’ll need to create a free data.world account to view the data set and follow along.

The data.world python library allows you to bring data that’s stored in a data.world data set straight into your workflow, without having to first download the data locally and transform it into a format you require.

Because data sets in data.world are stored in the format that the user originally uploaded them in, you often find great data sets that exist in a less than idea, format, such as multiple sheets of an Excel workbook, where...

Categories: FLOSS Project Planets

DataCamp: New Python Course: Network Analysis

Planet Python - Wed, 2017-03-22 09:14

Hi Pythonistas! Today we're launching Network Analysis in Python by Eric Ma!

From online social networks such as Facebook and Twitter to transportation networks such as bike sharing systems, networks are everywhere, and knowing how to analyze this type of data will open up a new world of possibilities for you as a Data Scientist. This course will equip you with the skills to analyze, visualize, and make sense of networks. You'll apply the concepts you learn to real-world network data using the powerful NetworkX library. With the knowledge gained in this course, you'll develop your network thinking skills and be able to start looking at your data with a fresh perspective!

Start for free

Python: Network Analysis features interactive exercises that combine high-quality video, in-browser coding, and gamification for an engaging learning experience that will make you a master network analysis in python!

What you'll learn:

In the first chapter, you'll be introduced to fundamental concepts in network analytics while becoming acquainted with a real-world Twitter network dataset that you will explore throughout the course. In addition, you'll learn about NetworkX, a library that allows you to manipulate, analyze, and model graph data. You'll learn about different types of graphs as well as how to rationally visualize them. Start first chapter for free.

In chapter 2, you'll learn about ways of identifying nodes that are important in a network. In doing so, you'll be introduced to more advanced concepts in network analysis as well as learn the basics of path-finding algorithms. The chapter concludes with a deep dive into the Twitter network dataset which will reinforce the concepts you've learned, such as degree centrality and betweenness centrality.

Chapter 3 is all about finding interesting structures within network data. You'll learn about essential concepts such as cliques, communities, and subgraphs, which will leverage all of the skills you acquired in Chapter 2. By the end of this chapter, you'll be ready to apply the concepts you've learned to a real-world case study.

In the final chapter of the course, you'll consolidate everything you've learned by diving into an in-depth case study of GitHub collaborator network data. This is a great example of real-world social network data, and your newly acquired skills will be fully tested. By the end of this chapter, you'll have developed your very own recommendation system which suggests GitHub users who should collaborate together. Enjoy!

Start course for free

Categories: FLOSS Project Planets

Safety critical drawing with OpenGL SC

Planet KDE - Wed, 2017-03-22 08:48

Bringing software into a safety critical environment can be tricky, especially when using the complex APIs needed for modern 3D graphics. That’s what makes OpenGL SC (Safety Critical) so important: it bridges the gap between beautiful displays and functional safety, while trying to remain as close to existing embedded standards that we all know and love. OpenGL SC will only become more prevalent in embedded graphics work as industries increasingly try to merge safety conscious methodologies with user-friendly interfaces. continue reading

The post Safety critical drawing with OpenGL SC appeared first on KDAB.

Categories: FLOSS Project Planets

Mediacurrent: Using Normalizers to Alter REST JSON Structure in Drupal 8

Planet Drupal - Wed, 2017-03-22 08:20

Drupal 8 core provides for solid REST capabilities out-of-the-box, which is great for integrating with a web service or allowing a third-party application to consume content. However, the REST output provided by Drupal core is in a certain structure that may not necessarily satisfy the requirements as per the structure the consuming application expects.

In comes normalizers that will help us alter the REST response to our liking. For this example, we will be looking at altering the JSON response for node entities.

Categories: FLOSS Project Planets

Interview with Ito Ryou-ichi

Planet KDE - Wed, 2017-03-22 08:15

Ryou is the amazing artist from Japan who made the Kiki plastic model. Thanks to Tyson Tan, we now have an interview with him!

Can you tell us something about yourself?

I’m Ito Ryou-ichi (Ryou), a Japanese professional modeler and figure sculptor. I work for the model hobby magazine 月刊モデルグラフィックス (Model Graphics Monthly), writing columns, building guides as well as making model samples.

When did you begin making models like this?

Building plastic models has been my hobby since I was a kid. Back then I liked building robot models from anime titles like the Gundam series. When I grew up, I once worked as a manga artist, but the job didn’t work out for me, so I became a modeler/sculptor around my 30s (in the 2000s). That said, I still love drawing pictures and manga!

How do you design them?

Being a former manga artist, I like to articulate my figure design from a manga character design perspective. First I determine the character’s general impression, then collect information like clothing style and other stuff to match that impression. Using those references, I draw several iterations until I feel comfortable with the whole result.

Although I like human and robot characters in general, my favorite has to be kemono (Japanese style furry characters). A niche genre indeed, especially in the modeling scene — you don’t see many of those figures around. But to me, it feels like a challenge in which I can make the best use of my taste and skills.

How do you make the prototypes? And how were they produced?

There are many ways of prototyping a figure. I have been using epoxy putty sculpting most of the time. First I make the figure’s skeleton using metallic wires, then put epoxy putty around the skeleton to make a crude shape for the body. I then use art knives and other tools to do the sculpting work, slowly making all the details according to the design arts. A trusty old “analogue approach” if you will. In contrast, I have been trying the digital approach with ZBrushCore as well. Although I’m still learning, I can now make something like a head out of it.

In case of Kiki’s figure (and most of my figures), the final product is known as a “Garage Kit” — a box of unassembled, unpainted resin parts. The buyer builds and paints the figure by themselves. To turn the prototype into a garage kit, the finished prototype must first be broken into a few individual parts, make sure they have casting friendly shapes. Silicon-based rubber is then used to make molds out of those parts. Finally, flowing synthetic resin is injected into the molds and parts are harvested after the injected resin settled. This method is called “resin casting”. Although I can cast them at home by myself, I often commission a professional workshop to do it for me. It costs more that way, but they can produce parts of higher quality in large quantity.

How did you learn about Krita?

Some time ago I came across Tyson Tan’s character designs on Pixiv.net and immediately became a big fan of his work. His Kiki pictures caught my attention and I did some research out of curiosity, leading me to Krita. I haven’t yet learned how to use Krita, but I’ll do that eventually.

Why did you decide to make a Kiki statuette?

Ryou: Before making Kiki, I had already collaborated with a few other artists, turning their characters into figures. Tyson has a unique way of mixing the beauty of living beings and futuristic robotic mechanism that I really liked, so I contacted him on Twitter. I picked a few characters from his creations as candidates, one of them was Kiki. Although more ”glamorous” would have been great too, after some discussion we finally decided to make Kiki.

Tyson: During the discussions, we looked into many of my original characters, some cute, some sexy. We did realize the market prefer figures with glamorous bodies, but we really wanted to make something special. Kiki being Krita’s mascot, a mascot of a free and open source art software, has one more layer of meaning than “just someone’s OC”. It was very courageous for Ryou to agree on a plan like that, since producing such a figure is very expensive and he would be the one to bear the monetary risk. I really admire his decision.

Where can people order them?

The Kiki figure kit can be ordered from my personal website. I send them worldwide:  http://bmwweb3.nobody.jp/mail2.html

Anything else you want to share with us?

I plan to collaborate with other artists in the future to make more furry figures like Kiki. I will contact the artist if I like their work, but you may also commission me to make a figure for a specific character.

I hope through making this Kiki figure I can connect with more people!

Ryou’s Personal Website: http://bmwweb3.nobody.jp/


Categories: FLOSS Project Planets

Janez Urevc: Get ready for the Media workshop at Drupal dev days Seville

Planet Drupal - Wed, 2017-03-22 07:43
Get ready for the Media workshop at Drupal dev days Seville slashrsm Wed, 22.03.2017 - 12:43

Tomorrow I'll be giving a workshop about the Drupal 8 media. As part of it we'll build a "media" site from scratch. We will start with the standard Drupal installation, add modules and configuration and see how far we can get.

If you are planning to attend the workshop and want to be fully productive I'd ask you to take some time and prepare your development environment. We will need Drupal 8 checkout with the following modules:

Besides that we'll also need Dropzone and Slick libraries, which you can install based on the docs provided in the README files of the respective modules ([1], [2]).

You can download all dependencies manually or use the project template that I provided for you. Simply clone the repository and run composer install in the project root.

Enjoyed this post? There is more! Want to learn Entity browser? Possible solution for knowledge sharing in the Drupal 8 media domain Call for Drupal 8 media ecosystem co-maintainers
Categories: FLOSS Project Planets

PyBites: Best Practices for Compatible Python 2 and 3 Code

Planet Python - Wed, 2017-03-22 07:42

95% of most popular Python packages support Python 3. Maybe you are lucky and get to start fresh using Python 3. However as of last year Python 2.7 still reigns supreme in pip installs and at a lot of places 2.x is the only version you get to work in. I think writing Python 2 and 3 compatible code is an important skill, so lets check what it entails.

Categories: FLOSS Project Planets

PyCharm: Why Postgres Should be your Document Database Webinar Recording

Planet Python - Wed, 2017-03-22 07:19

This Monday Jim Fulton, one of the first Python contributors, hosted a webinar about storing JSONB documents in PostgreSQL. Watch it now:

Known mostly for its mature SQL and data-at-scale infrastructure, the PostgreSQL project added a “JSONB” column type in its 9.4 release, then refined it over the next two releases. While using it is straightforward, combining it in hybrid structured/unstructured applications along with other facilities in the database can require skill.

In this webinar, Python and database consultant Jim Fulton shows us how to use JSONB and related machinery for pure and hybrid Python document-oriented applications. We also briefly discuss his long history back to the start of Python, and finish with his unique NewtDB library for native Python objects coupled to JSONB queries.

Jim uses PyCharm Professional during the webinar. PyCharm Professional bundles the database tools from JetBrains DataGrip, our database IDE. However, the webinar itself is focused on the concepts of JSONB.

You can find Jim’s code on GitHub: https://github.com/jimfulton/pycharm-170320

If you have any questions or comments about the webinar, feel free to leave them in the comments below, or you can reach us on Twitter. Jim is on Twitter as well, his Twitter handle is @j1mfulton.

-PyCharm Team
The Drive to Develop

Categories: FLOSS Project Planets

Simple is Better Than Complex: Ask Vitor #2: How to dynamically filter ModelChoice's queryset in a ModelForm?

Planet Python - Wed, 2017-03-22 07:08

Michał Strumecki asks:

I just want to filter select field in a form, regarding a currently logged user. Every user has own categories and budgets. I want to display only a models related with a currently logged user. I’ve tried stuff with filtering before is_valid field, but with no result.


This is a very common use case when dealing with ModelForms. The problem is that in the form fields ModelChoice and ModelMultipleChoiceField, which are used respectively for the model fields ForeignKey and ManyToManyField, it defaults the queryset to the Model.objects.all().

If the filtering was static, you could simply pass a filtered queryset in the form definition, like Model.objects.filter(status='pending').

When the filtering parameter is dynamic, we need to do a few tweaks in the form to get the right queryset.

Let’s simplify the scenario a little bit. We have the Django User model, a Category model and Product model. Now let’s say it’s a multi-user application. And each user can only see the products they create, and naturally only use the categories they own.


from django.contrib.auth.models import User from django.db import models class Category(models.Model): name = models.CharField(max_length=30) user = models.ForeignKey(User, on_delete=models.CASCADE) class Product(models.Model): name = models.CharField(max_length=30) price = models.DecimalField(decimal_places=2, max_digits=10) category = models.ForeignKey(Category) user = models.ForeignKey(User, on_delete=models.CASCADE)

Here is how we can create a ModelForm for the Product model, using only the currently logged-in user:


from django import forms from .models import Category, Product class ProductForm(forms.ModelForm): class Meta: model = Product fields = ('name', 'price', 'category', ) def __init__(self, user, *args, **kwargs): super(ProductForm, self).__init__(*args, **kwargs) self.fields['category'].queryset = Category.objects.filter(user=user)

That means now the ProductForm has a mandatory parameter in its constructor. So, instead of initializing the form as form = ProductForm(), you need to pass a user instance: form = ProductForm(user).

Here is a working example of view handling this form:


from django.shortcuts import render, redirect from .forms import ProductForm @login_required def new_product(request): if request.method == 'POST': form = ProductForm(request.user, request.POST) if form.is_valid(): product = form.save(commit=False) product.user = request.user product.save() return redirect('products_list') else: form = ProductForm(request.user) return render(request, 'products/product_form.html', {'form': form}) Using ModelFormSet

The machinery behind the modelformset_factory is not very flexible, so we can’t add extra parameters in the form constructor. But we certainly can play with the available resources.

The difference here is that we will need to change the queryset on the fly.

Here is what we can do:


@login_required def edit_all_products(request): ProductFormSet = modelformset_factory(Product, fields=('name', 'price', 'category'), extra=0) data = request.POST or None formset = ProductFormSet(data=data, queryset=Product.objects.filter(user=request.user)) for form in formset: form.fields['category'].queryset = Category.objects.filter(user=request.user) if request.method == 'POST' and formset.is_valid(): formset.save() return redirect('products_list') return render(request, 'products/products_formset.html', {'formset': formset})

The idea here is to provide a screen where the user can edit all his products at once. The product form involves handling a list of categories. So for each form in the formset, we need to override the queryset with the proper list of values.

The big difference here is that each of the categories list is filtered by the categories of the logged in user.

Get the Code

I prepared a very detailed example you can explore to get more insights.

The code is available on GitHub: github.com/sibtc/askvitor.

Categories: FLOSS Project Planets

David MacIver: How and why to learn about data structures

Planet Python - Wed, 2017-03-22 04:31

There’s a common sentiment that 99% of programmers don’t need to know how to build basic data structures, and that it’s stupid to expect them to.

There’s certainly an element of truth to that. Most jobs don’t require knowing how to implement any data structure at all, so a lot of this sentiment is just backlash against using them as part of the interview process. I agree with that backlash. Don’t use data structures as part of your interview process unless you expect the job to routinely involve writing your own data structures (or working on ones somebody has already written). Bad interviewer. No cookie.

But setting aside the interview question, there is still a strong underlying sentiment of this not actually being that useful a thing to spend your time on. After all, you wouldn’t ever implement a hash table when there’s a great one in the standard library, right?

This is like arguing that you don’t need to learn to cook because you can just go out to restaurants.

A second, related, point of view is that if you needed to know how this worked you’d just look it up.

That is, you don’t need to learn how to invent your own recipes because you can just look it up in a cook book.

In principle both of these arguments are fine. There are restaurants, there are cook books, not everybody needs to know how to cook and they certainly don’t need to become a gourmet chef.

But nevertheless, most people’s lives will be improved by acquiring at least a basic facility in the kitchen. Restaurants are expensive and may be inconvenient. You run out of ingredients and can’t be bothered to go to the store so you need to improvise or substitute. Or you’re just feeling creative and want to try something new for the hell of it.

The analogy breaks down a bit, because everybody needs to eat but most people don’t really need to implement custom data structures. It’s not 99%, but it might be 90%. Certainly it’s more than 50%.

But “most” isn’t “all”, and there’s a lot of grey areas at the boundary. If you’re not already sure you need to know this, you can probably get on fine without learning how to implement your own data structures, but you might find it surprisingly useful to do so anyway. Even if you don’t, there are some indirect benefits.

I’m not using this analogy just to make a point about usefulness, I also think it’s a valuable way of looking at it: Data structures are recipes. You have a set of techniques and tools and features, and you put them together in an appropriate way to achieve the result you want.

I think a lot of the problem is that data structures are not usually taught this way. I may be wrong about this – I’ve never formally taken a data structures course because my academic background is maths, not computer science, but it sure doesn’t look like people are being taught this way based on the books I’ve read and the people I’ve talked to.

Instead people are taught “Here’s how you implement an AVL tree. It’s very clever” (confession: I have no idea how you implement an AVL tree. If I needed to know I’d look it up, right?). It’s as if you were going to cookery school and they were taking through a series of pages from the recipe book and teaching you how to follow them.

Which is not all bad! Learning some recipes is a great way to learn to cook. But some of that is because you already know how to eat food, so you’ve got a good idea what you’re trying to achieve. It’s also not sufficient in its own right – you need to learn to adapt, to combine the things you’ve already seen and apply the basic skills you’ve learned to solve new constraints or achieve new results.

Which is how I would like data structures to be taught. Not “Here is how to implement this named data structure” but “Here is the set of operations I would like to support, with these sorts of complexities as valid. Give me some ideas.”

Because this is the real use of learning to implement data structures: Sometimes the problem you’re given doesn’t match the set of data structures you have in the standard library or any of the standard ones. Maybe you need to support some silly combination of operations that you don’t normally do, or you have an unusual workload where some operations are very uncommon and so you don’t mind paying some extra cost there but some operations are very common so need to be ultra fast.

At that point, knowing the basic skills of data structure design becomes invaluable, because you can take what you’ve learned and put it together in a novel way that supports what you want.

And with that, I’ll finish by teaching you a little bit about data structures.

First lets start with a simple problem: Given a list of N items, I want to sample from them without replacement. How would I do that with an O(N) initialisation and O(1) sample?

Well, it’s easy: You create a copy of the list as an array. Now when you want to sample, you pick an index into the array at random.

Now that you have that index that gives you the value to return. Replace the value at that index with the value that’s at the end of the array, and reduce the array length by one.

Here’s some python:

def sample(ls, random): i = random.randint(0, len(ls) - 1) result = ls[i] ls[i] = ls[-1] ls.pop() return result

Now I’ve given you a recipe to build on, lets see you improve upon it!

  1. If you assume the list you are given is immutable and you can hang onto it, can you improve the initialisation to O(1)? (you may need to make sampling only O(1) amortised and/or expected time to do this. Feel free to build on other standard data structures rather than inventing them from scratch).
  2. How would I extend that data structure to also support a “Remove the smallest element” operation in O(log(n))? (You may wish to read about how binary heaps work). You’ll probably have to go back to O(n) initialisation, but can you avoid that if you assume the input list is already sorted?
  3. How would you create a data structure to support weighted sampling with rejection? i.e. you start with a list of pairs of values and weights, and each value is sampled with probability proportionate to its weight. You may need to make sample O(log(n)) to do this (you can do it in expected O(1) time, but I don’t know of a data structure that does so without quite a lot of complexity). You can assume the weights are integers and/or just ignore questions of numerical stability.
  4. How would add an operation to give a key selected uniformly at random to a hash table? (If you haven’t read about how pypy dicts work you may wish to read that first)
  5. How would you extend a hash table to add an O(log(n)) “remove and return the smallest key” operation with no additional storage but increasing the insert complexity to O(log(n))? Can you do it without adding any extra storage to the hash table?

These aren’t completely arbitrary examples. Some of them are ones I’ve actually needed recently, others are just applications of the tricks I figured out in the course of doing so. I do recommend working through them in order though, because each will give you hints for how to do later ones.

You may never need any of these combinations, but that doesn’t matter. The point is not that these represent some great innovations in data structures. The point is to learn how to make your own data structures so that when you need to you can.

If you want to learn more, I recommend just playing around with this yourself. Try to come up with odd problems to solve that could be solved with a good data structure. It can also be worth learning about existing ones – e.g. reading about how the standard library in your favourite language implements things. What are the tricks and variations that it uses?

If you’d like to take a more formal course that is structured like this, I’m told Tim Roughgarden’s Coursera specialization on algorithms follows this model, and the second course in it will cover the basics of data structures. I’ve never taken it though, so this is a second hand recommendation. (Thanks @pozorvlak for the recommendation).

(And if you want to learn more things like this by reading more about it from me, support me on Patreon and say so! Nine out of ten cats prefer it, and you’ll get access to drafts of upcoming blog posts)

Categories: FLOSS Project Planets
Syndicate content