background preloader

S humble adode - John Anderson

S humble adode - John Anderson
$ git clone $ cd dotfiles $ ./install.sh vim Download PDF Version Back in 2008, I wrote the article Python with a modular IDE (Vim). Years later, I have people e-mailing me and commenting daily asking for more information, even though most of the information in it is outdated. Because one of the most important parts about a development environment is the ability to easily reproduce across machines, we are going to store our vim configuration in git: $ mkdir ~/.vim/ $ mkdir ~/.vim/{autoload,bundle} $ cd ~/.vim/ $ git init The purpose of the autoload directory is to automatically load the vim plugin Pathogen, which we'll then use to load all other plugins that are located in the bundle directory. You'll need to add the following to your ~/.vimrc so that pathogen will be loaded properly. filetype off call pathogen#runtime_append_all_bundles() call pathogen#helptags() Now lets add all of the vim plugins we plan on using as submodules to our git repository: Related:  Py:Tips

Accelerating Python Libraries with Numba (Part 2) Accelerating Python Libraries with Numba (Part 2) Introduction Welcome. In this Continuum Open Notebook, you’ll learn more about how Numba works and how it reduces your programming effort, and see that it achieves comparable performance to C and Cython over a range of benchmarks. If you are reading the blog form of this notebook, you can run the code yourself on our cloud-based Python-in-the-browser app, Wakari. How Does Numba Work? Numba is a Continuum Analytics-sponsored open source project. c = a+b We’ll assume that a and b are both floating-point numbers. The same statement in Python will generate dozens of instructions. Numba is our bridge between Python and performance. Benchmarking This notebook provides a benchmark comparison between Python, C interfaced through ctypes, Cython, and Numba - all from an IPython notebook in the cloud that you can run yourself! We will start with two variants of a vector sum benchmark, then look at the GrowCut benchmark introduced in the last notebook.

Don't do this [citation needed]» Blog Archive » The homogenization of scientific computing, or why Python is steadily eating other languages’ lunch Over the past two years, my scientific computing toolbox been steadily homogenizing. Around 2010 or 2011, my toolbox looked something like this: Ruby for text processing and miscellaneous scripting;Ruby on Rails/JavaScript for web development;Python/Numpy (mostly) and MATLAB (occasionally) for numerical computing;MATLAB for neuroimaging data analysis;R for statistical analysis;R for plotting and visualization;Occasional excursions into other languages/environments for other stuff. In 2013, my toolbox looks like this: You may notice a theme here. The increasing homogenization (Pythonification?) These days, tools for almost every aspect of scientific computing are readily available in Python. Take R, for example. Flash forward to The Now. Mind you, I don’t mean to imply that Python can now do everything anyone could ever do in other languages. Speaking only for myself, I’ve now arrived at the point where around 90 – 95% of what I do can be done comfortably in Python.

Why Python? | Keeping It Classless If you're new here, you may want to subscribe to my RSS feed, or follow me on Twitter! That way you can stay up to date with all Keeping It Classless posts! It’s been really interesting to see the industry in an all-out zerg rush to adopt Python as a skill-set. What is it about this seemingly arbitrary selection in the vast array of programming languages available out there? This post has been in drafts for some time, and I was motivated to finish it up by this Packet Pushers episode, where Jeremy Schulman and others discuss Python and its impact to networking. Let’s think about what we’re trying to do when it comes to network programmability. The networking industry (in general) tends to fall back on what’s easy, and what’s cheap – interoperability tends to trump every other consideration. A better, and perhaps even more practical example would be the education of engineers new to networking. Matt O

30 Python Language Features and Tricks You May Not Know About 1 Introduction Since I started learning Python, I decided to maintain an often visited list of "tricks". Any time I saw a piece of code (in an example, on Stack Overflow, in open source software, etc.) that made me think "Cool! I didn't know you could do that!" I experimented with it until I understood it and then added it to the list. Each trick or language feature is demonstrated only through examples, with no explanation. The list is very roughly ordered by difficulty, with the easier and more commonly known language features and tricks appearing first. A table of contents is given at the end. Update - April 9th, 2014 As you can see the article has been growing with currently 38 items in it, mostly thanks to comments from readers. Update - March 14th, 2014 Roy Keyes made a great suggestion of turning this article into a GitHub repository to allow readers to make improvements or additions through pull requests. Update - March 8th, 2014 1.1 Unpacking 1.2 Unpacking for swapping variables

Real Python Blog - Real Python aws, devops, python flask, front-end, python api, django, python fundamentals, python django, python, redis flask, python devops, django, python fundamentals, nosql, python python, testing aws, devops, django, python analytics, data science, python devops, python python devops, django, docker, python editors, fundamentals, python django, python flask, fundamentals, nosql, python api, pyramid, python flask, python, testing devops, django, docker, python, redis devops, docker, flask, python api, fundamentals, python nosql, python, scraping devops, docker, python data science, opencv, python api, flask, fundamentals, python devops, flask, python analytics, docker, python devops, flask, front-end, python flask, python, redis django, front-end, python data science, flask, python django, migrations, python data science, fundamentals, python django, flask, python django, python, testing flask, nosql, python front-end, python bottle, python python, sql, web2py

Keep This Python Cheat Sheet On Hand When Learning To Code Python is one of the best programming languages to learn. As you get started, this one-page reference sheet of variables, methods and formatting options could come in handy. Provided by Dave Child, the cheat sheet includes both built-in system and operating system variables, as well as standard methods for working with lists, files and strings. You can download it for free in PDF or PNG version or view it online at the link below. Python Cheat Sheet [AddedBytes]

Your #Python Performance By @Monitis | @DevOpsSummit #DevOps #Containers #Microservices Seven Ways to Improve Your Python Performance Python is really a language which has swept the scene in recent years in terms of popularity, elegance, and functionality. Research shows that 8 out 10 computer science departments in the U.S. now teach their introductory courses with Python, surpassing Java. Top-ranked CS departments at MIT and UC Berkeley have switched their introductory courses to Python. As powerful as Python is, there’s always room for improvement. 1. Python has developed a reputation as a solid, high-performance language. 2. Generators are helpful in memory optimization because they allow you to create a function that returns one item at a time rather than all the items at once. Also, when you’re sorting items in a list, be sure to use keys and the default sort() method whenever possible. import operator somelist = [(1, 5, 8), (6, 2, 4), (9, 7, 5)] somelist.sort(key=operator.itemgetter(0)) somelist #Output = [(1, 5, 8), (6, 2, 4), (9, 7, 5)] 3. 4. for x in a: for y in b: 5.

Pygrunn: Python, WebRTC and You - Saúl Ibarra Corretgé Tags: pygrunn, python, django (One of the summaries of the 2015 Pygrunn conference ) Saúl Ibarra Corretgé does telecom and VOIP stuff for his work, which is what webRTC calls legacy :-) webRTC is Real-Time Communication for the web via simple APIs. So: voice calling, video chat, P2P file sharing without needing internal or external plugins. Basically it is a big pile of C++ that sits in your browser. There are several javascript libraries for webRTC. Once you have a connection, you have an RTCDataChannel. As a testcase, he wrote Call Roulette. He made the toy app in python 3.3 because it is new. So: users connect from their browser with a websocket connection to the app. Fun: light-weight django-models-like models via ! He did a live demo with web video with someone from the audience.

Related: