Feeds

KnackForge: How to update Drupal 8 core?

Planet Drupal - Sat, 2018-03-24 01:01
How to update Drupal 8 core?

Let's see how to update your Drupal site between 8.x.x minor and patch versions. For example, from 8.1.2 to 8.1.3, or from 8.3.5 to 8.4.0. I hope this will help you.

  • If you are upgrading to Drupal version x.y.z

           x -> is known as the major version number

           y -> is known as the minor version number

           z -> is known as the patch version number.

Sat, 03/24/2018 - 10:31
Categories: FLOSS Project Planets

GDquest launched a new Kickstarter campaign to show you how to make 2d games with the open source game engine Godot

Planet KDE - 51 min 26 sec ago

Last year, GDGuest’s Nathan Lovato ran a succesful kickstarter: “Create Professional 2D Game Art: Krita Video Training”. Over the past year, he has produced a great number of videos for Krita, and has helped the Krita team out with release videos as well.

This year, he’s going to teach you how to use your art in a real game. Learn how to use Godot to create games with GDQuest, on Kickstarter now to bring you the first premium course for the engine, with the support of the Godot developers.

During the campaign, you get a free game creation tutorial on YouTube, every day!

Please check it out now, and spread the word: Make Professional 2d Games: Godot Engine Online Course

GDQuest reached the goal in less than 12 hours. Everything above it means more
content for the backers, but also for everyone! GDQuest will also contribute to
Godot 3.0’s demos and documentation. All the money will go to the
course’s production and official free educational resources.

Check out the <a href=”https://youtube.com/playlist?list=PLhqJJNjsQ7KEr_YlibZ3SBuzfw9xwGduK”>Free daily tutorials on youtube!</a>

Categories: FLOSS Project Planets

Robin Parmar: Arduino IDE: Best practices and gotchas

Planet Python - 4 hours 19 min ago
Programming for the Arduino is designed to be easy for beginners. The Integrated Development Environment (IDE) provides a safe place to write code, and handles the make and compiler steps that are required to create processor instructions from your C++ code.

This is fine for trivial applications and school exercises. But as soon as you try to use structured code (including classes and custom libraries) on a larger project, mysterious errors and roadblocks become the order of the day.

This article will consider best practices for working within the IDE. I will document a number of common errors and their workarounds. My perspective is of an experienced Python coder who finds C++ full of needless obfuscation. But we can make it work!

Why not switch?On encountering limitations with the Arduino IDE, the natural thing to do is switch to a mature development environment. For example, you could use Microsoft Visual Studio by way of Visual Micro, a plugin that enables Arduino coding. Or, use Eclipse with one of several available plugins: Sloeber, PlatformIO, or AVR-eclipse.

But there are cases when it is advantageous to stick with the Arduino IDE. For example, I might be working on a team with other less-experienced developers. While I might wish to carry the cognitive burden of Eclipse plus plugins plus project management, they might not.

Or I could be in a teaching environment where my code must be developed with the same tools my students will be using.

Language features... and what's missingThe Arduino IDE gives you many basic C++ language features plus hardware-specific functions. Control structures, values, and data types are documented in the Reference.

But you don't get modern features such as the Standard Template Library (STL). If you want to use stacks, queues, lists, vectors, etc. you must install a library. Start with those by Marc Jacobi (last updated 2 years ago) and Andy Brown (updated 1 year ago). I am sure there are plenty of articles discussing the relative merits of these or other solutions.

You also don't get new and delete operators, and there's good reason. Dynamic memory management is discouraged on microprocessor boards, since RAM and other resources are limited. There are libraries that add these to your toolkit, but the IDE encourages us to use C++ as though it was little more than plain vanilla C. It can be frustrating, but my advice is to adapt.

Code structureAs you know, when using the Arduino IDE you start coding with a sketch that is your application's entry point. As an example, I'll use project.ino.

Inside this file are always two functions, setup() and loop(). These take no parameters and return no values. There's not much you can do with them... except populate them with your code. These functions are part of an implicit code structure that could be written as follows:

void main() {

// declaration section

setup(); // initialisation (runs once)

while (true) {
loop(); // process-oriented code (runs forever)
}
}
In the IDE you never see the main() function and neither can you manipulate it.

Declaration sectionThe declaration section comes at the top of your project.ino. It is effectively outside any code block. Yes, even though it is in an implicit main() function. This means that only declarations and initializations are valid here. You cannot call methods of a class, nor access properties. This is our first rule:

Rule 1. The declaration section should contain only includes, initialisations of variables, and instantiations of classes.

This restriction can result in subtle errors when using classes. The declaration section is naturally where you will be instantiating classes you wish to use throughout the sketch. This means that the same restrictions just stated must apply to each and every class constructor. For this reason, you cannot use instances or methods of other classes in a constructor. No, not even for built-in libraries like Serial or Wire. Because the order of instantiation of classes is non-deterministic. All instances must be constructed before any instances are used.

Rule 2. A class constructor should have no arguments and do nothing but set default values for any properties.

Follow the example of the library classes for your own custom classes. Provide a begin() method that does take needed parameters and performs any initialization tasks. In other words, begin() should do everything you might otherwise expect the constructor to do. Call this method in the setup() block.

By the way, this solves another problem. A class that might be passed to another class requires a constructor that takes no parameters. Normally you would provide this in addition to another constructor template. But if you follow the rule two, this condition is already met.

Care with instantiationThe next discussion will prevent a syntax error. When instantiating a class with a constructor, you would normally do something like the following, assuming class Foo is defined elsewhere.

const byte pin = 10;
Foo bar(pin);

void setup() {}

void loop() {
int result = bar.read();
}But following our previous rule, constructors will never have arguments. You might quite naturally write this instead:

const byte pin = 10;
Foo bar();

void setup() {
bar.begin(pin);
}
void loop() {
int result = bar.read();
}This generates the error "request for member 'read' in 'bar' which is of non-class type 'Foo'. That appears nonsensical, because Foo is most definitely a class. Spot the syntax error?

To the compiler, bar() looks like a function call. You need to rewrite that line as:

Foo bar;

Abandoning the sketchBefore you even get to this point of sophistication in your code, you will be seeing all sorts of mystifying compiler output. "Error: 'foo' has not been declared" for a foo that most certainly has been declared. "Error: 'foo' does not name a type" for a foo that is definitively a type. And so on.

These errors occur because the compiler is generating function prototypes for you, automatically, even if you don't need them. These prototypes will even over-ride your own perfectly good code. The only thing to do is abandon the sketch! Move to the lifeboats! Compiler error! Danger, Will Robinson!

Ahem.

Do the following:

1. Create a new .cpp file, ensuring it is not named the same as your sketch, and also not named main.cpp. These are both name conflicts. As an example, let's call it primary.cpp.

2. Copy all the code from project.ino to primary.cpp.

3. Add #include <Arduino.h> to the top of primary.cpp, before your other includes. This ensures that your code can access the standard prototypes.

4. In project.ino leave only your #include statements. Delete everything else.

This will solve all those mysterious issues. You can now prototype your own functions and classes without the IDE getting in your way. You will, however, need to remember that every time you add an #include to primary.cpp, you need to also add it to project.ino. But it's a small price to pay.

Rule 3. Use a top-level C++ file instead of a sketch file.

Simple includesIt's easy to get confused about include files. But all an include represents is a copy and paste operation. The referenced code is inserted at the point where the include directive is located.

Here are the rules.

1. You need a .h header file for each .cpp code file.

2. The .cpp should have only one include, that being its corresponding header (a file with the same name but different extension).

3. The header file must have all the includes necessary for the correct running of the .h and .cpp code. And, in the correct order, if there are dependencies.

4. A header guard is required for each .h file. This prevents the header from being included in your project multiple times. It doesn't matter what variable name you choose for the test, so long as it is unique.
#ifndef LIB_H
#define LIB_H

// everything else

#endif5. If you have any sort of complex chaining, with circular pointer referencing, you may have to use forward referencing. But you should be avoiding this complexity in the sort of projects likely to run on an Arduino. So I won't count this rule in our next meta-rule.

Rule 4. Follow the four rules of correct header use.

Using librariesThe IDE limits how you use libraries to the very simplest case. Libraries get installed in one standard location across all your projects. You can put a library nowhere else. Why might you want to?

I am currently developing three modules as part of a single project. The code for each module is in its own folder. They have shared library code that I would like to put in a parallel folder, so I would have a folder hierarchy something like this:

/myproject
/module-1
/module-2
/module-3
/commonThen I could easily archive "myproject" into a ZIP file to share with the rest of the team.

Can I do this? No. It is not possible, since relative paths cannot be used in the IDE. And absolute paths are evil.

Rule 5. There is no rule to help manage libraries. Sorry.

Final WordsI have personally wasted dozens of hours before discovering these tips and working methods. It has been an enormous process of trial-and-error. If you are lucky enough to read this article first, you will never know the pain.

I have a donate button in the sidebar, in case you wish to thank me with a coffee.

In turn I'd like to thank Nick Gammon for an article I wish I'd read a bit sooner.

If there's interest, I might follow up with some words about general C++ syntax and issues that are not so Arduino-centric.
Categories: FLOSS Project Planets

Bryan Pendleton: It's not just a game ...

Planet Apache - 4 hours 22 min ago

... it's a mini-series: The Witcher Is Getting A Netflix Series.

... and it's a story that stays with you, years later: Reading The Game: Witcher 3

It is the story of a man looking for his daughter. It is the story of a lot of people looking for a lot of missing things — friends, comrades, nations, history

...

It is rare for a big game to be so focused on the small things. Exceedingly rare for it to be made up, more or less, of a thousand trivial, funny, sad, often pointless stories which all, in their way, cut the path that the plot will ultimately follow.

Good games are epic. Great games are true. And Wild Hunt is that rarest of modern, digital myths: One that is both.

Categories: FLOSS Project Planets

Programming Ideas With Jake: Lots of Programming Videos!

Planet Python - Thu, 2017-05-25 17:53
A whole bunch of videos have recently dropped from programmer conferences. Like, a LOT!
Categories: FLOSS Project Planets

Sixteen new GNU releases in the month of May

FSF Blogs - Thu, 2017-05-25 16:55

(as of May 25, 2017):

For announcements of most new GNU releases, subscribe to the info-gnu mailing list: https://lists.gnu.org/mailman/listinfo/info-gnu.

To download: nearly all GNU software is available from https://ftp.gnu.org/gnu/, or preferably one of its mirrors from https://www.gnu.org/prep/ftp.html. You can use the URL https://ftpmirror.gnu.org/ to be automatically redirected to a (hopefully) nearby and up-to-date mirror.

This month, we welcome Bernhard Voelker as a new co-maintainer of GNU Findutils and John Darrington as maintainer of the new package GNU spread-sheet-widget.

A number of GNU packages, as well as the GNU operating system as a whole, are looking for maintainers and other assistance: please see https://www.gnu.org/server/takeaction.html#unmaint if you'd like to help. The general page on how to help GNU is at https://www.gnu.org/help/help.html.

If you have a working or partly working program that you'd like to offer to the GNU project as a GNU package, see https://www.gnu.org/help/evaluation.html.

As always, please feel free to write to us at maintainers@gnu.org with any GNUish questions or suggestions for future installments.

Categories: FLOSS Project Planets

FeatherCast: Jagadish Venkatraman, ApacheCon North America and How Companies are using Apache Samza

Planet Apache - Thu, 2017-05-25 09:57

Jagadish Venkatraman from the Apache Samza project talks to us about Samza, his presenation at ApacheCon North America 2017 and how Samza is being used by some very well known companies like LinkedIn and Uber.

https://feathercastapache.files.wordpress.com/2017/05/samza-ventkatraman.mp3

 

 


Categories: FLOSS Project Planets

PyBites: How to Write a Python Class

Planet Python - Thu, 2017-05-25 09:44

In this post I cover learning Python classes by walking through one of our 100 days of code submissions.

Categories: FLOSS Project Planets

Code Positive: 3 Great SEO tools for Drupal content managers

Planet Drupal - Thu, 2017-05-25 09:06

Here's three tools that work straight out of the box to quickly and dramatically improve the SEO of the content on your Drupal website.

READ MORE

 

Categories: FLOSS Project Planets

Device detection in Qt for Device Creation 5.9

Planet KDE - Thu, 2017-05-25 08:55

Qt for Device Creation provides ready disk images for a variety of devices. When you flash it to a device, start enterprise Qt Creator and plug the device in via USB, it will be detected automatically. You are ready to run, debug and profile your applications right on the device. From a user’s point of view the green marker for a ready device just appears.

But how do we actually see the device? There have been changes here for 5.9 and in this post I’ll discuss what we ended up doing and why.

How things used to be

Previous versions of Qt for Device Creation use Android Debug Bridge (ADB) for the device discovery. As you can guess from the name, it’s the same component that is used in the development of Android applications. It was a natural choice early in the development of the Boot2Qt when Android was a supported platform along with embedded Linux. But nowadays we focus on embedded Linux only. (In Device Creation with the device images, Qt can of course still be used to build applications on Android.)

Due to requiring Google’s USB drivers, ADB has made installing more complicated than desired for our users on Windows. And when they jumped through the hoops, they could end up with a different version than we tested against. There’s also the risk of mixups with Android development environments, who may include their own versions of ADB. There were also some things missing, which required working around inside our Qt Creator integration.

Recognizing USB devices

So to avoid those issues we decided to decided to write our own debug bridge, which we without extraneous imagination called QDB. It looks for Boot2Qt devices in a similar way as the purpose of other USB devices is discovered. When a device is enumerated in the universal serial bus, it describes its class, subclass and protocol. For example for my mouse the command lsusb -v reveals:

      bInterfaceClass         3 Human Interface Device       bInterfaceSubClass      1 Boot Interface Subclass       bInterfaceProtocol      2 Mouse

There is a vendor-defined class 255. We have picked a subclass and protocol inside that which our devices use, thus allowing QDB to find them. Finding them is of course not enough, since there needs to a way to transfer data between the host computer and the device.

Network over USB

ADB implements file transfers and port forwards. It transfers the data over the USB connection using its own protocol. One obvious option would have been to do the same thing. That would have been reinventing the wheel, as was quickly pointed out by many. There was also a second place where duplication of effort to accomplish the same thing was happening. The Boot2Qt plugin for Qt Creator was implementing support for running, debugging and profiling applications with ADB. But Qt Creator also supports these things with any Linux device over SSH through the RemoteLinux plugin. If we were able to use SSH, all of that duplication could be gotten rid of (after the support window for older Qt for Device Creation releases runs out).

Linux allows a device to present itself as an USB Ethernet adapter with the kernel module usb_f_rndis. The device then shows up as a network card in both Linux and Windows. This way we can have a network connection between the host computer and the device, which allows the use of SSH and thus the desired reuse. And apart from Qt Creator activity, the user can also use regular SSH to connect to the device. It has a properly resizing terminal, unlike adb shell! All the other things you might do over the network also become possible, even if the embedded device has no Ethernet socket.

But there’s something we glossed over. Networks don’t configure themselves. If the user would need to set the right IP address and subnet mask on both the computer and the device, then we certainly wouldn’t meet the bar of just plugging in the device and being ready to go.

Configuring the network

Now despite what I just said there actually are efforts for networks to configure themselves. Under the umbrella term zeroconf there are two things of interest in particular: link-local IPv4 addresses as specified in RFC 3927 and mDNS/DNS-SD, which allows finding out the addresses of devices in the network. For a while we tried to use these to accomplish the configuration of the network. However, getting the host computer to actually use link-local addresses for our network adapter proved fiddly and even if it worked there was a bit too long delay. The connection only works after both the host computer and device have gotten their IP which wasn’t predictable. I hope we will be able to revisit mDNS/DNS-SD at some point, because it might allow us to provide device discovery when devices are connected over Ethernet instead of USB, but for now zeroconf required too much configuration.

Another thing which we looked at was using IPv6 link-local addresses. Unlike their IPv4 cousin they are part of the protocol and always available, which would eliminate the delays and configuration burden. Here the downside is that they are a bit more local to the link. An IPv4 link-local IP is from the block 169.254.0.0/16 and you can just connect to it regularly. IPv6 versions use the prefix fe80::/10, but they also require a “scope ID” to describe the network adapter to use. I’d rather not write

ssh user@fe80::2864:3dff:fe98:9b3a%enp0s20f0u4u4u3

That’s superficial, but there was also a more important issue: All the tools would need to support IPv6 addresses and giving these scope IDs. GDB – which we use for debugging – didn’t.

Back to the drawing board. The simplest approach would be picking up a fixed IP address for the devices. That has two issues. First, you can’t connect more than one device. Second, the fixed IP address might already be in use on the host computer. We ended up using the following approach to circumvent these problems: The same process that recognizes the USB devices knows a list of candidate network configurations in the private use IPv4 ranges. When a new device is connected, it looks at the networks the host computer currently has and then picks a candidate that doesn’t conflict. The device is told the configuration, sets its own IP address accordingly and then acts as a DHCP server that provides an IP for the host computer.

After this process is done, the host computer and device have matching network configurations, Qt Creator knows the IP of the device and everything is ready. If you connect a second device, a different candidate configuration is picked, since the first one is already in use. The DHCP server is disabled when the device is disconnected, because otherwise host computer could get an IP from a previous configuration when it is connected again.

The post Device detection in Qt for Device Creation 5.9 appeared first on Qt Blog.

Categories: FLOSS Project Planets

Agiledrop.com Blog: AGILEDROP: DrupalCon sessions about Drupal Showcase

Planet Drupal - Thu, 2017-05-25 04:05
Last time, we gathered together DrupalCon Baltimore sessions about Coding and Development. Before that, we explored the area of Project Management and Case Studies. And that was not our last stop. This time, we looked at sessions that were presented in the area of Drupal Showcase. Ain’t No Body: Not Your Mama’s Headless Drupal by Paul Day from Quotient, Inc. This session explores disembodied Drupal, also known as bodiless Drupal- an application that uses Drupal’s powerful framework to do things it does well while storing the actual domain data in a remote repository. Moreover, it explores… READ MORE
Categories: FLOSS Project Planets

Python Bytes: #27 The PyCon 2017 recap and functional Python

Planet Python - Thu, 2017-05-25 04:00
<ul> <li>All videos available: <a href="https://www.youtube.com/channel/UCrJhliKNQ8g0qoE_zvL8eVg">https://www.youtube.com/channel/UCrJhliKNQ8g0qoE_zvL8eVg</a></li> <li>Lessons learned: <ul> <li>pick up swag on day one. vendors run out.</li> <li>take business cards with you and keep them on you</li> <li>Not your actual business cards unless you are representing your company.</li> <li>Cards that have your social media, github account, blog, or podcast or whatever on them.</li> <li>3x3 stickers are too big. 2x2 plenty big enough</li> <li>lightening talks are awesome, because they are a lot of ranges of speaking experience</li> <li>will definitely do that again</li> <li>try to go to the talks that are important to you, but don’t over stress about it, since they are taped. However, it would be lame if all the rooms were empty, so don’t everybody ditch.</li> <li>lastly: everyone knows Michael. </li> </ul></li> </ul> <p><strong>Michael #2:</strong> <a href="https://www.fullstackpython.com/blog/aws-lambda-python-3-6.html"><strong>How to Create Your First Python 3.6 AWS Lambda Function</strong></a></p> <ul> <li>Tutorial from <a href="https://www.fullstackpython.com/">Full Stack Python</a></li> <li>Walks you through creating an account</li> <li>Select your Python version (3.6, yes!)</li> <li><code>def lambda_handler(event, context): …</code> # write this function, done!</li> <li>Set and read environment variables (could be connection strings and API keys)</li> </ul> <p><strong>Brian #3:</strong> <a href="https://blog.jetbrains.com/pycharm/2017/05/how-to-publish-your-package-on-pypi/"><strong>How to Publish Your Package on PYPI</strong></a></p> <ul> <li>jetbrains article <ul> <li>structure of the package</li> <li>oops. doesn't include src, see https://pythonbytes.fm/22</li> <li>decent discussion of a the contents of the setup.py file (but interestingly absent is an example setup.py file)</li> <li>good discussion of .pypirc file and links to the test and production PyPi</li> <li>example of using twine to push to PyPI</li> <li>overall: good discussion, but you'll still need a decent example.</li> </ul></li> </ul> <p><strong>Michael #4:</strong> <a href="http://coconut-lang.org/"><strong>Coconut: Simple, elegant, Pythonic functional programming</strong></a></p> <ul> <li>Coconut is a functional programming language that compiles to Python. </li> <li>Since all valid Python is valid Coconut, using Coconut will only extend and enhance what you're already capable of in Python.</li> <li><code>pip install coconut</code> <ol> <li>Some of Coconut’s major features include built-in, syntactic support for:</li> <li>Pattern-matching,</li> <li>Algebraic data-types,</li> <li>Tail call optimization,</li> <li>Partial application,</li> <li>Better lambdas,</li> <li>Parallelization primitives, and</li> <li>A whole lot more, all of which can be found in <a href="http://coconut.readthedocs.io/en/master/DOCS.html">Coconut’s detailed documentation</a>.</li> </ol></li> <li>Talk Python episode coming in a week</li> </ul> <p><strong>Brian #5:</strong> <a href="https://choosealicense.com/"><strong>Choose a licence</strong></a></p> <ul> <li>MIT : simple and permissive</li> <li>Apache 2.0 : something extra about patents.</li> <li>GPL v3 : this is the contagious one that requires derivitive work to also be GPL v3</li> <li>Nice list with overviews of what they all mean with color coded bullet points: <a href="https://choosealicense.com/licenses/">https://choosealicense.com/licenses/</a></li> </ul> <p><strong>Michael #6:</strong> <a href="http://pythonforengineers.com/python-for-scientists-and-engineers/"><strong>Python for Scientists and Engineers</strong></a></p> <ul> <li><strong>Table of contents</strong>:</li> <li><strong>Beginners Start Here:</strong> <ul> <li><a href="http://pythonforengineers.com/create-a-word-counter-in-python/"><strong>Create a Word Counter in Python</strong></a></li> <li><a href="http://pythonforengineers.com/an-introduction-to-numpy-and-matplotlib/"><strong>An introduction to Numpy and Matplotlib</strong></a></li> <li><a href="http://pythonforengineers.com/introduction-to-pandas/"><strong>Introduction to Pandas with Practical Examples (New)</strong></a></li> </ul></li> <li><strong>Main Book</strong> <ul> <li><a href="http://pythonforengineers.com/image-and-video-processing-in-python/"><strong>Image and Video Processing in Python</strong></a></li> <li><a href="http://pythonforengineers.com/data-analysis-with-pandas/"><strong>Data Analysis with Pandas</strong></a></li> <li><a href="http://pythonforengineers.com/audio-and-digital-signal-processingdsp-in-python/"><strong>Audio and Digital Signal Processing (DSP)</strong></a></li> <li><a href="http://pythonforengineers.com/control-your-raspberry-pi-from-your-phone-tablet/"><strong>Control Your Raspberry Pi From Your Phone / Tablet</strong></a></li> </ul></li> <li><strong>Machine Learning Section</strong> <ul> <li><a href="http://pythonforengineers.com/machine-learning-with-an-amazon-like-recommendation-engine/"><strong>Machine Learning with an Amazon like Recommendation Engine</strong></a></li> <li><a href="http://pythonforengineers.com/machine-learning-for-complete-beginners/"><strong>Machine Learning For Complete Beginners:</strong></a> <em><em></em></em>Learn how to predict how many Titanic survivors using machine learning. No previous knowledge needed!</li> <li><a href="http://pythonforengineers.com/cross-validation-and-model-selection/"><strong>Cross Validation and Model Selection</strong></a>: In which we look at cross validation, and how to choose between different machine learning algorithms. Working with the Iris flower dataset and the Pima diabetes dataset.</li> </ul></li> <li><strong>Natural Language Processing</strong> <ul> <li><a href="http://pythonforengineers.com/natural-language-processing-and-sentiment-analysis-with-python/"><strong>Introduction to NLP and Sentiment Analysis</strong></a></li> <li><a href="http://pythonforengineers.com/introduction-to-nltk-natural-language-processing-with-python/"><strong>Natural Language Processing with NTLK</strong></a></li> <li><a href="http://pythonforengineers.com/intro-to-nltk-part-2/"><strong>Intro to NTLK, Part 2</strong></a></li> <li><a href="http://pythonforengineers.com/build-a-sentiment-analysis-app-with-movie-reviews/"><strong>Build a sentiment analysis program</strong></a></li> <li><a href="http://pythonforengineers.com/practice-session-sentiment-analysis-with-twitter/"><strong>Sentiment Analysis with Twitter</strong></a></li> <li><a href="http://pythonforengineers.com/analysing-the-enron-email-corpus/"><strong>Analysing the Enron Email Corpus</strong></a>: The Enron Email corpus has half a million files spread over 2.5 GB. When looking at data this size, the question is, where do you even start?</li> <li><a href="http://pythonforengineers.com/build-a-spam-filter/"><strong>Build a Spam Filter using the Enron Corpus</strong></a></li> </ul></li> </ul> <p><strong>In other news</strong>:</p> <ul> <li><a href="https://pragprog.com/book/bopytest/python-testing-with-pytest">Python Testing with pytest</a> Beta release and initial feedback is going very well.</li> </ul>
Categories: FLOSS Project Planets

Michael Prokop: The #newinstretch game: new forensic packages in Debian/stretch

Planet Debian - Thu, 2017-05-25 03:48

Repeating what I did for the last Debian releases with the #newinwheezy and #newinjessie games it’s time for the #newinstretch game:

Debian/stretch AKA Debian 9.0 will include a bunch of packages for people interested in digital forensics. The packages maintained within the Debian Forensics team which are new in the Debian/stretch release as compared to Debian/jessie (and ignoring jessie-backports):

  • bruteforce-salted-openssl: try to find the passphrase for files encrypted with OpenSSL
  • cewl: custom word list generator
  • dfdatetime/python-dfdatetime: Digital Forensics date and time library
  • dfvfs/python-dfvfs: Digital Forensics Virtual File System
  • dfwinreg: Digital Forensics Windows Registry library
  • dislocker: read/write encrypted BitLocker volumes
  • forensics-all: Debian Forensics Environment – essential components (metapackage)
  • forensics-colorize: show differences between files using color graphics
  • forensics-extra: Forensics Environment – extra console components (metapackage)
  • hashdeep: recursively compute hashsums or piecewise hashings
  • hashrat: hashing tool supporting several hashes and recursivity
  • libesedb(-utils): Extensible Storage Engine DB access library
  • libevt(-utils): Windows Event Log (EVT) format access library
  • libevtx(-utils): Windows XML Event Log format access library
  • libfsntfs(-utils): NTFS access library
  • libfvde(-utils): FileVault Drive Encryption access library
  • libfwnt: Windows NT data type library
  • libfwsi: Windows Shell Item format access library
  • liblnk(-utils): Windows Shortcut File format access library
  • libmsiecf(-utils): Microsoft Internet Explorer Cache File access library
  • libolecf(-utils): OLE2 Compound File format access library
  • libqcow(-utils): QEMU Copy-On-Write image format access library
  • libregf(-utils): Windows NT Registry File (REGF) format access library
  • libscca(-utils): Windows Prefetch File access library
  • libsigscan(-utils): binary signature scanning library
  • libsmdev(-utils): storage media device access library
  • libsmraw(-utils): split RAW image format access library
  • libvhdi(-utils): Virtual Hard Disk image format access library
  • libvmdk(-utils): VMWare Virtual Disk format access library
  • libvshadow(-utils): Volume Shadow Snapshot format access library
  • libvslvm(-utils): Linux LVM volume system format access librar
  • plaso: super timeline all the things
  • pompem: Exploit and Vulnerability Finder
  • pytsk/python-tsk: Python Bindings for The Sleuth Kit
  • rekall(-core): memory analysis and incident response framework
  • unhide.rb: Forensic tool to find processes hidden by rootkits (was already present in wheezy but missing in jessie, available via jessie-backports though)
  • winregfs: Windows registry FUSE filesystem

Join the #newinstretch game and present packages and features which are new in Debian/stretch.

Categories: FLOSS Project Planets

Kristian Polso: Blockchain, GDPR, Migrate API... Videos from DrupalCamp Nordics 2017 are live!

Planet Drupal - Thu, 2017-05-25 03:15
I have just finished editing the session videos from the very first DrupalCamp Nordics. DrupalCamp Nordics 2017 was held in Helsinki, on 11th to 12th of May 2017. The event was a great success, with over 120 participants from more than 10 different countries! The topics of the sessions ranged from more high-level technology-related like Blockchain and GDPR to more practical developer-oriented matters like using the Migrate API and introduction to Drupal 8 caching.
Categories: FLOSS Project Planets

Jaldhar Vyas: For Downtown Hoboken

Planet Debian - Thu, 2017-05-25 00:34

Q: What should you do if you see a spaceman?

A: Park there before someone takes it, man.

Categories: FLOSS Project Planets

Experienced Django: Return of pylint

Planet Python - Wed, 2017-05-24 21:22

Until last fall I was working in python 2 (due to some limitations at work) and was very happy to have the Syntastic module in my Vim configuration to flag error each time I save a python file.  This was great, especially after writing in C/C++ for years where there is no official standard format and really poor tools to enforce coding standards.

Then, last fall when I started on Django, I made the decision to move to Python 3.  I quickly discovered that pylint is very version-dependent and running the python2.7 version of pylint against Python3 code was not going to work.

I wasn’t particularly familiar with virtualenv at the time, so I gave up and moved on with other things at the time.  I finally got back to fixing this and thus getting pylint and flake8 running again on my code.

Syntastic

I won’t cover the details of how to install Syntastic as it depends on how you manage your plugins in Vim and is well documented.  I will only point out here that Syntastic isn’t a checker by itself, it’s merely a plugin to run various checkers for you directly in Vim.  It run checkers for many languages, but I’m only using it for Python currently as the C code I use for work is so ugly that it will never pass.

Switching versions

The key to getting pylint to run against different versions of python is to not install pylint on a global level, but rather to install it in each virtualenv.  This seems obvious now that I’m more familiar with virtualenv, but I’ll admit it wasn’t at the time I first ran into the problem.

The other key to getting this to work is to only initiate Vim from inside the virtualenv.  This hampers my overall workflow a bit, as I tend to have gVim up and running for the long-term and just add files in new tabs as I go.  To get pylint to work properly, I’ll need to restart Vim when I switch python versions (at a minimum).  This shouldn’t be too much of a problem, however, as I’m doing less and less python2x coding these days.

Coding Style Thoughts

As I beat my head against horrible C code on a daily basis at work, I find myself appreciating more-and-more the idea of PEP-8 and having good tools for coding style enforcement.  While I frequently find some of the rules odd (two spaces here, but only one space there?) I really find it comforting to have a tool which runs, and runs quickly, to keep the code looking consistent.  Now if I could only get that kind of tool for C…….

 

Categories: FLOSS Project Planets

Daniel Bader: In Love, War, and Open-Source: Never Give Up

Planet Python - Wed, 2017-05-24 20:00
In Love, War, and Open-Source: Never Give Up

I’ll never forget launching my first open-source project and sharing it publicly on Reddit…

I had spent a couple of days at my parents’ place over Christmas that year and decided to use some of my spare time to work on a Python library I christened schedule.

The idea behind schedule was very simple and had a narrow focus (I find that that that’s always a good idea for libraries by the way):

Developers would use it like a timer to periodically call a function inside their Python programs.

The kicker was that schedule used a funky “natural sounding” syntax to specify the timer interval. For example, if you wanted to run a function every 10 minutes you’d do this:

schedule.every(10).minutes.do(myfunc)

Or, if you wanted to run a particular task every day at 10:30 in the morning, you’d do this:

schedule.every().day.at('10:30').do(mytask)

Because I was so frustrated with Cron’s syntax I thought this approach was really cool. And so I decided this would be the first Python module I’d release as open-source.

I cleaned up the code and spent some time coming up with a nice README file—because that’s really the first thing that your potential users will see when they check out your library.

Once I had my module available on PyPI and the source code on GitHub I decided to call some attention to the project. The same night I posted a link to the repository to Reddit and a couple of other sites.

I still remember that I had shaky hands when I clicked the “submit” button…

It’s scary to put your work out there for the whole world to judge! Also, I didn’t know what to expect.

Would people call me stupid for writing a “simple” library like that?

Would they think my code wasn’t good enough?

Would they find all kinds of bugs and publicly shame me for them? I felt almost a physical sense of dread about pushing the “submit” button on Reddit that night!

The next morning I woke up and immediately checked my email. Were there any comments? Yes, about twenty or so!

I started reading through all of them, faster and faster—

And of course my still frightful mind immediately zoomed in on the negative ones, like

“Cool idea, but not particularly useful”,

and

“The documentation is not enough”,

or

“Not a big fan of the pseudo-english syntax. Way too clever and gimmicky.”

At this point I was starting to feel a little discouraged… I’d never really shared my code publicly before and to be honest I my skin receiving criticism on it was paper thin. After all, this was just something I wrote in a couple of hours and gave away for free.

The comment that really made my stomach churn was one from a well known member of the Python community:

“And another library with global state :-( … Such an API should not even exist. It sets a bad example.”

Ouch, that stung. I really looked up to that person and had used some of their libraries in other projects… It was almost like my worst fears we’re confirmed and we’re now playing out in front of me!

I’d never be able to get another job as a Python developer after this…

At the time I didn’t see the positive and supportive comments in that discussion thread. I didn’t see the almost 70 upvotes. I didn’t see the valuable lessons hidden in the seemingly rude comments. I dwelled on the negative and felt terrible and depressed that whole day.

So how do you think this story ends?

Did I delete the schedule repo, switched careers and never looked at Reddit again?

Wrong!

schedule now has almost 3,000 stars on GitHub and is among the top 70 Python repositories (out of more than 215,000). When PyPI’s download statistics we’re still working I saw that it got several thousand downloads per month. I get emails every week from people asking questions about it or thanking me for writing it…

Isn’t that crazy!? How’s that possible after all of these disheartening comments?

My answer is “I don’t know”—and I also don’t think that schedule is a particularly great library that deserves all this attention, by the way.

But, it seems to solve a problem for some people. It also seems to have a polarizing effect on developers who see it—some love it, some hate it.

Today I’m glad I shipped schedule that night.

Glad because it was helpful to so many people over the years and glad because it helped me develop a thicker skin when it comes to sharing and launching things publicly.

I’m partly writing this meandering post because not very long ago I found this comment buried in my Reddit message history:

As someone who has posted a number of projects and blog posts in r/Python, just wanted to drop you a line and encourage that you don’t let the comments in your thread get you down. You see all those upvotes?

Those are people that like your library, but don’t really have a comment to make in the thread proper. My biggest issue with /r/Python is that it tends towards cynicism and sometimes cruelty rather than encouragement and constructive criticism.

Keep up the great work,

Rob

Wow! What a positive and encouraging comment!

Back when I felt discouraged by all of these negative comments I must’ve missed it. But reading it a few years later made me re-live that whole situation and it showed me how much I’d grown as a developer and as a person in the meantime.

If you find yourself in a similar situation, maybe feeling bogged down by the developer community who can be unfiltered and pretty rude sometimes, don’t get discouraged.

Even if some people don’t like what you did there can be thousands who love your work.

It’s a big pond, and sometimes the best ideas are polarizing.

The only way to find out is to ship, ship, ship.

Categories: FLOSS Project Planets

Justin Mason: Links for 2017-05-24

Planet Apache - Wed, 2017-05-24 19:58
  • Skot Olsen — Blessed Saint Architeuthis

    Classic piece of freaky squid-related art, now purchaseable on giclee for $200! (very tempted)

    Saint Architeuthis is the patron saint of doomed sailors. While the origins of the saint remain unclear, it’s recent history and worship are well documented. Whalers who turned their attention to catching giant squid and sea serpents in the 19th century, began asking Saint Architeuthis for mercy whenever a hunt would go awry, which was fairly frequent. When hunting for such animals, one would sometimes be thrown over board or a boat would sink exposing the men to whatever was in the water at the time. A sailor would ask Saint Architeuthis for the quick and relatively painless death of drowning, rather than the hideous demise of being ripped apart by the beak of the squid or chewed up in the sea serpent’s hideous maw. Often, men would have visions of Saint Architeuthis who would appear before them in the form of a gigantic, yet benevolent squid wearing a bishop’s mitre and carrying tools of the squid hunter’s trade.

    (tags: art squid skot-olsen prints giclees toget weird)

Categories: FLOSS Project Planets

Steve Kemp: Getting ready for Stretch

Planet Debian - Wed, 2017-05-24 17:00

I run about 17 servers. Of those about six are very personal and the rest are a small cluster which are used for a single website. (Partly because the code is old and in some ways a bit badly designed, partly because "clustering!", "high availability!", "learning!", "fun!" - seriously I had a lot of fun putting together a fault-tolerant deployment with haproxy, ucarp, etc, etc. If I were paying for it the site would be both retired and static!)

I've started the process of upgrading to stretch by picking a bunch of hosts that do things I could live without for a few days - in case there were big problems, or I needed to restore from backups.

So far I've upgraded:

  • master.steve
    • This is a puppet-master, so while it is important killing it wouldn't be too bad - after all my nodes are currently setup properly, right?
    • Upgrading this host changed the puppet-server from 3.x to 4.x.
    • That meant I had to upgrade all my client-systems, because puppet 3.x won't talk to a 4.x master.
    • Happily jessie-backports contains a recent puppet-client.
    • It also meant I had to rework a lot of my recipes, in small ways.
  • builder.steve
    • This is a host I use to build packages upon, via pbuilder.
    • I have chroots setup for wheezy, jessie, and stretch, each in i386 and amd64 flavours.
  • git.steve
    • This is a host which stores my git-repositories, via gitbucket.
    • While it is an important host in terms of functionality, the software it needs is very basic: nginx proxies to a java application which runs on localhost:XXXX, with some caching magic happening to deal with abusive clients.
    • I do keep considering using gitlab, because I like its runners, etc. But that is pretty resource intensive.
    • On the other hand If I did switch I could drop my builder.steve host, which might mean I'd come out ahead in terms of used resources.
  • leave.steve
    • Torrent-box.
    • Upgrading was painless, I only run rtorrent, and a simple object storage system of my own devising.

All upgrades were painless, with only one real surprise - the attic-backup software was removed from Debian.

Although I do intend to retry using Larss' excellent obnum in the near future pragmatically I wanted to stick with what I'm familiar with. Borg backup is a fork of attic I've been aware of for a long time, but I never quite had a reason to try it out. Setting it up pretty much just meant editing my backup-script:

s/attic/borg/g

Once I did that, and created some new destinations all was good:

borg@rsync.io ~ $ borg init /backups/git.steve.org.uk.borg/ borg@rsync.io ~ $ borg init /backups/master.steve.org.uk.borg/ borg@rsync.io ~ $ ..

Upgrading other hosts, for example my website(s), and my email-box, will be more complex and fiddly. On that basis they will definitely wait for the formal stretch release.

But having a couple of hosts running the frozen distribution is good for testing, and to let me see what is new.

Categories: FLOSS Project Planets

Filipe Saraiva: LaKademy 2017

Planet Python - Wed, 2017-05-24 16:37

LaKademy 2017 group photo

Some weeks ago we had the fifth edition of the KDE Latin-America summit, LaKademy. Since the first edition, KDE community in Latin-America has grown up and now we has several developers, translators, artists, promoters, and more people from here involved in KDE activities.

This time LaKademy was held in Belo Horizonte, a nice city known for the amazing cachaça, cheese, home made beers, cheese, hills, and of course, cheese. The city is very cosmopolitan, with several options of activities and gastronomy, while the people is gentle. I would like to back to Belo Horizonte, maybe in my next vacation.

LaKademy activites were held in CEFET, an educational technological institute. During the days of LaKademy there were political demonstrations and a general strike in the country, consequence of the current political crisis here in Brazil. Despite I support the demonstrations, I was in Belo Horizonte for event. So I focused in the tasks while in my mind I was side-by-side with the workers on the streets.

Like in past editions I worked a lot with Cantor, the mathematical software I am the maintainer. This time the main tasks performed were an extensive set of reviews: revisions in pending patches, in the bug management system in order to close very old (and invalid) reports, and in the task management workboard, specially to ping developers with old tasks without any comment in the last year.

There were some work to implement new features as well. I finished a backends refactoring in order to provide a recommended version of the programming language for each backend in Cantor. How each programming language has its own planning and scheduling, it is common some programming language version not be correctly supported in a Cantor backend (Sage, I am thinking you). This feature presents a “recommended” version of the programming language supported for the Cantor backend, meaning that version was tested and it will work correctly with Cantor. It is more like a workaround in order to maintain the sanity of the developer while he try to support 11 different programming languages.

Other feature I worked but it is not finished is a option to select different LaTeX processors in Cantor. Currently there are several LaTeX processors available (like pdflatex, pdftex, luatex, xetex, …), some of them with several additional features. This option will increased the versatility of Cantor and will allow the use of moderns processors and their features in the software.

I addition to these tasks I fixed some bugs and helped Fernando Telles, my past SoK student, with some tasks in Cantor.

(Like in past editions)², in LaKademy 2017 I also worked in other set of tasks related to the management and promotion of KDE Brazil. I investigated how to bring back our unified feed with Brazilian blogs posts as in the old Planet KDE Português, utilized to send updates about KDE in Brazil to our social networks. Fred implemented the solution. So I updated this feed in social networks, updated our e-mail contact utilized in this networks, and started a bootstrap version of LaKademy website (but the team is migrating to WordPress, I think it will not be used). I also did a large revision in the tasks of KDE Brazil workboard, migrated past year from the TODO website. Besides all this we had the promo meeting to discuss our actions in Latin-America – all the tasks were documented in the workboard.

Of course, just as we worked intensely in those days, we also had a lot of fun between a push and other. LaKademy is also a opportunity to find old friends and make new ones. It is amazing see again the KDE fellows, and I invite the newcomers to stay with us and go to next LaKademy editions!

This year we had a problem that we must to address in next edition – all the participants were Brazilians. We need to think about how to integrate people from other Latin-America countries in LaKademy. It would be bad if the event become only an Akademy-BR.

Filipe and Chicão

So, I give my greetings to the community and put myself in the mission to continue to work in order to grown the Latin-America as an important player to the development and future of KDE.

Categories: FLOSS Project Planets
Syndicate content