A talk on debugging of Python applications given at a local KharkivPy event.
A brief introduction into a set of tools that allow Python developers to debug common issues in their applications.
This document discusses extending Perl with C libraries using XS. It explains that XS provides an interface between C and Perl by handling data conversion between their different types. The document outlines the components of a basic XS file and how it is compiled. It also discusses typemaps which define how C types are mapped to Perl types to allow values to be passed between the languages. Further details are provided on developing the XS interface and common tools like h2xs and a new converter tool.
What you need to remember when you upload to CPANcharsbar
Perlのモジュールを公開するときに気をつけておいた方がよい個のこと
This document provides tips for publishing Perl modules to CPAN. It discusses things to be aware of such as distributions being permanently archived on BackPAN even if deleted, CPAN accepting almost anything, and several testing services that can improve modules like PAUSE, CPAN Testers, CPANTS, and more. It also covers best practices for metrics evaluated by these services around availability, integrity, file layout, prerequisites and more. Developers are encouraged to use better tools from the Perl Toolchain Gang to avoid issues.
Streams are a fundamental programming primitive for representing the flow of data through your system. It's time we brought this powerful tool to the web. What if we could stream data from a HTTP request, through a web worker that transforms it, and then into a <video> tag? Over the last year, I've been working on the WHATWG streams specification, which builds upon the lessons learned in Node.js, to provide a suitable abstraction for needs of the extensible web.
I'll discuss briefly why streams are important, what they enable, and the role we envision them playing in the future of the web platform. Mostly, though, I want to help you understand streams, at a deep level. In the course of writing this specification, I've learned a lot about streams, and I want to share that knowledge with you. At the core, they are a very simple and beautiful abstraction. I think we've done a good job capturing that abstraction, and producing an API the web can be proud of. I'd love to tell you all about it.
UnQLite is an embedded key-value and document-oriented database with a simple API similar to SQLite. It uses a BSD license and supports cross-platform usage. Benchmarks show it has comparable or better performance than SQLite, Berkeley DB and other databases for common operations like storing, fetching, and iterating over large amounts of data. The developer is working on adding new storage engines to UnQLite.
The document discusses improvements made to the tDiary blogging engine to improve performance. Profiling with StackProf identified areas for optimization, including replacing the REXML XML parser with Oga for faster parsing, and improving the calendar generation method. Benchmarks show the changes led to a 4x speedup of the Amazon plugin and over 1.2x speedup of calendar generation. Loading plugins was also optimized by evaluating the code in a single pass rather than per file.
Go Go Gadget! - An Intro to Return Oriented Programming (ROP)Miguel Arroyo
ROP (return-oriented programming) is a technique that allows executing malicious code on systems with non-executable stacks by chaining short instruction sequences ("gadgets") already present in memory. The document provides an overview of ROP, including its origins as a generalization of ret2libc attacks. It describes how ROP chains gadgets by controlling the instruction pointer to execute desired sequences ending in return instructions. Finally, it walks through a simple ROP exploit on x86 as a demonstration.
The document summarizes Jersey Framework, a Java REST framework. It provides an overview of Jersey's features such as supporting JAX-RS APIs, Servlet 3.0, JSON/JAXB, and integration with Spring. A code sample demonstrates a simple "hello world" RESTful service using Jersey with annotations like @Path, @GET and @Produces. The document also covers additional Jersey concepts like request/response processing, URI building, exception handling, and security.
The document provides an overview of basic Linux commands and utilities for PHP developers, including commands for navigating directories (pwd, ls, cd), viewing file contents (cat, less, more), piping output between commands, file redirection, accessing systems via SSH/SCP, managing file permissions (chmod, chown), and more. The document is intended as an introduction to basic "Linux-Fu" or skills for PHP developers working with Linux systems.
This document discusses extending Perl with C libraries using XS. It explains that XS provides an interface between C and Perl by handling data conversion between their different types. The document outlines the components of a basic XS file and how it is compiled. It also discusses typemaps which define how C types are mapped to Perl types to allow values to be passed between the languages. Further details are provided on developing the XS interface and common tools like h2xs and a new converter tool.
What you need to remember when you upload to CPANcharsbar
Perlのモジュールを公開するときに気をつけておいた方がよい個のこと
This document provides tips for publishing Perl modules to CPAN. It discusses things to be aware of such as distributions being permanently archived on BackPAN even if deleted, CPAN accepting almost anything, and several testing services that can improve modules like PAUSE, CPAN Testers, CPANTS, and more. It also covers best practices for metrics evaluated by these services around availability, integrity, file layout, prerequisites and more. Developers are encouraged to use better tools from the Perl Toolchain Gang to avoid issues.
Streams are a fundamental programming primitive for representing the flow of data through your system. It's time we brought this powerful tool to the web. What if we could stream data from a HTTP request, through a web worker that transforms it, and then into a <video> tag? Over the last year, I've been working on the WHATWG streams specification, which builds upon the lessons learned in Node.js, to provide a suitable abstraction for needs of the extensible web.
I'll discuss briefly why streams are important, what they enable, and the role we envision them playing in the future of the web platform. Mostly, though, I want to help you understand streams, at a deep level. In the course of writing this specification, I've learned a lot about streams, and I want to share that knowledge with you. At the core, they are a very simple and beautiful abstraction. I think we've done a good job capturing that abstraction, and producing an API the web can be proud of. I'd love to tell you all about it.
UnQLite is an embedded key-value and document-oriented database with a simple API similar to SQLite. It uses a BSD license and supports cross-platform usage. Benchmarks show it has comparable or better performance than SQLite, Berkeley DB and other databases for common operations like storing, fetching, and iterating over large amounts of data. The developer is working on adding new storage engines to UnQLite.
The document discusses improvements made to the tDiary blogging engine to improve performance. Profiling with StackProf identified areas for optimization, including replacing the REXML XML parser with Oga for faster parsing, and improving the calendar generation method. Benchmarks show the changes led to a 4x speedup of the Amazon plugin and over 1.2x speedup of calendar generation. Loading plugins was also optimized by evaluating the code in a single pass rather than per file.
Go Go Gadget! - An Intro to Return Oriented Programming (ROP)Miguel Arroyo
ROP (return-oriented programming) is a technique that allows executing malicious code on systems with non-executable stacks by chaining short instruction sequences ("gadgets") already present in memory. The document provides an overview of ROP, including its origins as a generalization of ret2libc attacks. It describes how ROP chains gadgets by controlling the instruction pointer to execute desired sequences ending in return instructions. Finally, it walks through a simple ROP exploit on x86 as a demonstration.
The document summarizes Jersey Framework, a Java REST framework. It provides an overview of Jersey's features such as supporting JAX-RS APIs, Servlet 3.0, JSON/JAXB, and integration with Spring. A code sample demonstrates a simple "hello world" RESTful service using Jersey with annotations like @Path, @GET and @Produces. The document also covers additional Jersey concepts like request/response processing, URI building, exception handling, and security.
The document provides an overview of basic Linux commands and utilities for PHP developers, including commands for navigating directories (pwd, ls, cd), viewing file contents (cat, less, more), piping output between commands, file redirection, accessing systems via SSH/SCP, managing file permissions (chmod, chown), and more. The document is intended as an introduction to basic "Linux-Fu" or skills for PHP developers working with Linux systems.
TensorFlow XLAの中では、
XLA Client を Pythonで利用できるようになっています。
また、2018年2月に開催されたSysMLの論文(JAX@Google)についても追記しました。
In TensorFlow XLA,
XLA Client is now available in Python.
Also added about SysML's paper (JAX @ Google) held in February 2018.
Devel::NYTProf 2009-07 (OUTDATED, see 201008)Tim Bunce
The slides of my "State-of-the-art Profiling with Devel::NYTProf" talk at OSCON in July 2009.
I'll upload a screencast and give the link in a blog post at http://blog.timbunce.org
This document summarizes two PHP monitoring tools: APM (Alternative PHP Monitor) and Pinba.
APM is a tool dedicated to error handling in PHP applications. It provides functions to retrieve error events and slow requests from a database. Pinba is focused on real-time performance monitoring. It allows setting timers and retrieving performance metrics like request time and memory usage. Both tools have low overhead and are open source alternatives to commercial monitoring solutions.
"Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ...Vadym Kazulkin
This document summarizes highlights from Java 10 and 11 and discusses the future of Java. Key points include new features in Java 10 like local variable type inference and improvements to the G1 garbage collector. Java 11 focuses on long term support and includes new features like local variable syntax for lambda parameters. Future projects aim to simplify syntax, add pattern matching, and value types. GraalVM allows running code from multiple languages on a single runtime for high performance. Project Loom plans to add lightweight fibers and continuations.
Streams are often underestimated and skipped as possible solutions. In many cases, we created much more complex solutions than their streams counterpart. Why?
It's hard to answer, but in this presentation, I would like to tell you a story about how we started to use FS2, without sacrificing purity and code readability. (https://github.com/functional-streams-for-scala/fs2)
A Replay Approach to Software ValidationJames Pascoe
The document discusses a replay approach to software validation using regular expressions in C++11 and Python. It describes replaying log files to recreate events and find bugs faster. It also explains how regular expressions can be used to parse log files and validate replayed logs by comparing them to the originals. Regular expressions in C++11 and Python are compatible, which is useful for cross-language validation tools.
Le slide deck de l'Université que nous avons donnée avec Rémi Forax à Devoxx France 2019.
Comme promis, Java sort sa version majeure tous les 6 mois. Le train passe et amène son lot de nouveautés. Parmi elles, certaines sont sorties : une nouvelle syntaxe pour les clauses switch et l'instruction de byte code CONSTANT_DYNAMIC. D'autres sont en chantier, plus ou moins avancé : une nouvelle façon d'écrire des méthodes de façon condensée, un instanceof 'intelligent', des constantes évaluées au moment où elles sont utilisées. Les projets progressent. Loom, et son nouveau modèle de programmation concurrente que l'ont peut tester avec Jetty. Amber, qui introduit les data types et des nouvelles syntaxes. Valhalla, dont les value types donnent leurs premiers résultats. S'il est difficile de prévoir une date de sortie pour ces nouveautés, on sait en revanche qu'une fois prêtes elles sortiront en moins de 6 mois. De tout ceci nous parlerons donc au futur et en public, avec des démonstrations de code, des slides, du code, de la joie et de la bonne humeur !
This document discusses using ngx_lua with UPYUN CDN. It provides examples of using Lua with Nginx for tasks like caching, health checking, and configuration as a service. Key points include using Lua for base64 encoding, Redis lookups, and upstream health checking. Lua provides a more flexible alternative to C modules for tasks like these by leveraging its embedding in Nginx via ngx_lua.
The document discusses extending Nginx functionalities with Lua. It provides an overview of Nginx architecture and how the lua-nginx-module allows running Lua scripts inside Nginx. This provides a powerful and performant programming environment while leveraging Nginx's event-driven architecture. Examples show how to access Nginx variables and APIs from Lua, issue subrequests, and handle requests non-blockingly using cosockets. Libraries like lua-resty-memcached reuse these extensions to build applications in a scalable manner.
Introduction to source{d} Engine and source{d} Lookout source{d}
Join us for a presentation and demo of source{d} Engine and source{d} Lookout. Combining code retrieval, language agnostic parsing, and git management tools with familiar APIs parsing, source{d} Engine simplifies code analysis. source{d} Lookout, a service for assisted code review that enables running custom code analyzers on GitHub pull requests.
Boost.Python allows extending C++ code with Python by exposing C++ functions, classes, and objects to Python. It provides a simpler approach than other tools by using only C++. Boost.Python handles interfacing C++ and Python types and memory management. The document discusses exposing C++ code like functions, classes with inheritance and special methods, constants, and enums. It also covers passing objects between C++ and Python like lists and custom types. While Boost.Python enables seamless integration, there are still challenges around complex C++ features and performance. The document ends by demonstrating embedding Python in C++.
The document contains multiple choice questions about various Linux/Unix commands and concepts. It tests knowledge of commands like ls, grep, chmod, cp, sort, find, ps and more. It also covers concepts like file permissions, symbolic links, pipes, redirection and the role of the kernel.
Performance tweaks and tools for Linux (Joe Damato)Ontico
The document discusses various Linux performance analysis tools including lsof to list open files, strace to trace system calls, tcpdump to dump network traffic, perftools from Google for profiling CPU usage, and a Ruby library called perftools.rb for profiling Ruby code. Examples are provided for using these tools to analyze memory usage, slow queries, Ruby interpreter signals, thread scheduling overhead, and identifying hot spots in Ruby web applications.
Perl 5.24 was released in 2016 with several notable changes including hashbang redirection to Perl 6, removal of autodereferencing, and performance enhancements. Perl 6 development progressed with the release of the Christmas roast specification tests and Rakudo becoming more stable on MoarVM while work continued on implementations for other platforms like JVM and JavaScript. The Perl community continued to enhance CPAN and develop new features for Perl 6 like TWEAK submethods and lexical module loading.
O'Reilly Velocity New York 2016 presentation on modern Linux tracing tools and technology. Highlights the available tracing data sources on Linux (ftrace, perf_events, BPF) and demonstrates some tools that can be used to obtain traces, including DebugFS, the perf front-end, and most importantly, the BCC/BPF tool collection.
Interceptors: Into the Core of PedestalKent Ohashi
Pedestal is a Clojure library for building server-side web applications. It uses interceptors, which are similar to middleware, to modify the request-response context as it passes through the system. The document shows how to create a basic Pedestal project, define routes and handlers, and use interceptors like body-params to extract parameters from requests. Further reading sections provide links to learn more about Pedestal, interceptors, related concepts, and alternative routing libraries.
This document contains questions and answers related to Linux/Unix shells. Some key points:
- It asks about common shell commands like date, who, pwd, rm, grep, ps, kill, mail, etc. and how to use them.
- It covers shell scripting concepts like variables ($VAR), conditionals (if/else), loops (for, while), I/O redirection, functions, and more.
- Questions address shells basics like finding the shell, users, processes, directories and files as well as more advanced topics like process IDs, background processes, command line arguments, and Boolean/conditional operators.
Avec la version 9 sortie en septembre 2017, Java appuie sur la pédale ! Le rythme des livraisons passe à une version majeure tous les 6 mois. Java 10 est sorti en mars, prochaine version en septembre. Java 10 apporte le 'var' et l'inférence de type pour les variables locales. D'autres nouveautés sont en préparation : les constantes dynamiques, les classes de données, un nouveau switch à base de lambda, des interfaces fermées, de nouvelles choses du coté des génériques et bien plus encore.
Cela viendra-t-il en 11, 12, 15 ? Ne spéculons pas, mais quand ces nouveautés seront prêtes, elles sortiront en quelques mois. On se propose de présenter ces nouveautés, celles qui sont presque prêtes, celles qui seront prêtes bientôt, et celles qui ne seront pas prêtes avant un moment. Quels seront les impacts sur le langage, sur la JVM et donc sur les performances ? Que cela va-t-il nous apporter au quotidien, en tant que développeurs ? Quels seront les nouveaux patterns ? Voici le programme de cette présentation, avec des slides, du code, de la joie et de la bonne humeur !
ManageIQ currently runs on Ruby on Rails 3. Aaron "tenderlove" Patterson presents his effort to migrate to RoR 4, which entails some changes in the code to take advantage of the latest advances in RoR.
For more on ManageIQ, see http://manageiq.org/
Hierarchical free monads and software design in fpAlexander Granin
I invented the approach I call "Hierarchical Free Monads". It helps to build applications in Haskell with achieving all the needed code quality requirements. I tested this approach in several real world projects and companies, and it works very well.
TensorFlow XLAの中では、
XLA Client を Pythonで利用できるようになっています。
また、2018年2月に開催されたSysMLの論文(JAX@Google)についても追記しました。
In TensorFlow XLA,
XLA Client is now available in Python.
Also added about SysML's paper (JAX @ Google) held in February 2018.
Devel::NYTProf 2009-07 (OUTDATED, see 201008)Tim Bunce
The slides of my "State-of-the-art Profiling with Devel::NYTProf" talk at OSCON in July 2009.
I'll upload a screencast and give the link in a blog post at http://blog.timbunce.org
This document summarizes two PHP monitoring tools: APM (Alternative PHP Monitor) and Pinba.
APM is a tool dedicated to error handling in PHP applications. It provides functions to retrieve error events and slow requests from a database. Pinba is focused on real-time performance monitoring. It allows setting timers and retrieving performance metrics like request time and memory usage. Both tools have low overhead and are open source alternatives to commercial monitoring solutions.
"Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ...Vadym Kazulkin
This document summarizes highlights from Java 10 and 11 and discusses the future of Java. Key points include new features in Java 10 like local variable type inference and improvements to the G1 garbage collector. Java 11 focuses on long term support and includes new features like local variable syntax for lambda parameters. Future projects aim to simplify syntax, add pattern matching, and value types. GraalVM allows running code from multiple languages on a single runtime for high performance. Project Loom plans to add lightweight fibers and continuations.
Streams are often underestimated and skipped as possible solutions. In many cases, we created much more complex solutions than their streams counterpart. Why?
It's hard to answer, but in this presentation, I would like to tell you a story about how we started to use FS2, without sacrificing purity and code readability. (https://github.com/functional-streams-for-scala/fs2)
A Replay Approach to Software ValidationJames Pascoe
The document discusses a replay approach to software validation using regular expressions in C++11 and Python. It describes replaying log files to recreate events and find bugs faster. It also explains how regular expressions can be used to parse log files and validate replayed logs by comparing them to the originals. Regular expressions in C++11 and Python are compatible, which is useful for cross-language validation tools.
Le slide deck de l'Université que nous avons donnée avec Rémi Forax à Devoxx France 2019.
Comme promis, Java sort sa version majeure tous les 6 mois. Le train passe et amène son lot de nouveautés. Parmi elles, certaines sont sorties : une nouvelle syntaxe pour les clauses switch et l'instruction de byte code CONSTANT_DYNAMIC. D'autres sont en chantier, plus ou moins avancé : une nouvelle façon d'écrire des méthodes de façon condensée, un instanceof 'intelligent', des constantes évaluées au moment où elles sont utilisées. Les projets progressent. Loom, et son nouveau modèle de programmation concurrente que l'ont peut tester avec Jetty. Amber, qui introduit les data types et des nouvelles syntaxes. Valhalla, dont les value types donnent leurs premiers résultats. S'il est difficile de prévoir une date de sortie pour ces nouveautés, on sait en revanche qu'une fois prêtes elles sortiront en moins de 6 mois. De tout ceci nous parlerons donc au futur et en public, avec des démonstrations de code, des slides, du code, de la joie et de la bonne humeur !
This document discusses using ngx_lua with UPYUN CDN. It provides examples of using Lua with Nginx for tasks like caching, health checking, and configuration as a service. Key points include using Lua for base64 encoding, Redis lookups, and upstream health checking. Lua provides a more flexible alternative to C modules for tasks like these by leveraging its embedding in Nginx via ngx_lua.
The document discusses extending Nginx functionalities with Lua. It provides an overview of Nginx architecture and how the lua-nginx-module allows running Lua scripts inside Nginx. This provides a powerful and performant programming environment while leveraging Nginx's event-driven architecture. Examples show how to access Nginx variables and APIs from Lua, issue subrequests, and handle requests non-blockingly using cosockets. Libraries like lua-resty-memcached reuse these extensions to build applications in a scalable manner.
Introduction to source{d} Engine and source{d} Lookout source{d}
Join us for a presentation and demo of source{d} Engine and source{d} Lookout. Combining code retrieval, language agnostic parsing, and git management tools with familiar APIs parsing, source{d} Engine simplifies code analysis. source{d} Lookout, a service for assisted code review that enables running custom code analyzers on GitHub pull requests.
Boost.Python allows extending C++ code with Python by exposing C++ functions, classes, and objects to Python. It provides a simpler approach than other tools by using only C++. Boost.Python handles interfacing C++ and Python types and memory management. The document discusses exposing C++ code like functions, classes with inheritance and special methods, constants, and enums. It also covers passing objects between C++ and Python like lists and custom types. While Boost.Python enables seamless integration, there are still challenges around complex C++ features and performance. The document ends by demonstrating embedding Python in C++.
The document contains multiple choice questions about various Linux/Unix commands and concepts. It tests knowledge of commands like ls, grep, chmod, cp, sort, find, ps and more. It also covers concepts like file permissions, symbolic links, pipes, redirection and the role of the kernel.
Performance tweaks and tools for Linux (Joe Damato)Ontico
The document discusses various Linux performance analysis tools including lsof to list open files, strace to trace system calls, tcpdump to dump network traffic, perftools from Google for profiling CPU usage, and a Ruby library called perftools.rb for profiling Ruby code. Examples are provided for using these tools to analyze memory usage, slow queries, Ruby interpreter signals, thread scheduling overhead, and identifying hot spots in Ruby web applications.
Perl 5.24 was released in 2016 with several notable changes including hashbang redirection to Perl 6, removal of autodereferencing, and performance enhancements. Perl 6 development progressed with the release of the Christmas roast specification tests and Rakudo becoming more stable on MoarVM while work continued on implementations for other platforms like JVM and JavaScript. The Perl community continued to enhance CPAN and develop new features for Perl 6 like TWEAK submethods and lexical module loading.
O'Reilly Velocity New York 2016 presentation on modern Linux tracing tools and technology. Highlights the available tracing data sources on Linux (ftrace, perf_events, BPF) and demonstrates some tools that can be used to obtain traces, including DebugFS, the perf front-end, and most importantly, the BCC/BPF tool collection.
Interceptors: Into the Core of PedestalKent Ohashi
Pedestal is a Clojure library for building server-side web applications. It uses interceptors, which are similar to middleware, to modify the request-response context as it passes through the system. The document shows how to create a basic Pedestal project, define routes and handlers, and use interceptors like body-params to extract parameters from requests. Further reading sections provide links to learn more about Pedestal, interceptors, related concepts, and alternative routing libraries.
This document contains questions and answers related to Linux/Unix shells. Some key points:
- It asks about common shell commands like date, who, pwd, rm, grep, ps, kill, mail, etc. and how to use them.
- It covers shell scripting concepts like variables ($VAR), conditionals (if/else), loops (for, while), I/O redirection, functions, and more.
- Questions address shells basics like finding the shell, users, processes, directories and files as well as more advanced topics like process IDs, background processes, command line arguments, and Boolean/conditional operators.
Avec la version 9 sortie en septembre 2017, Java appuie sur la pédale ! Le rythme des livraisons passe à une version majeure tous les 6 mois. Java 10 est sorti en mars, prochaine version en septembre. Java 10 apporte le 'var' et l'inférence de type pour les variables locales. D'autres nouveautés sont en préparation : les constantes dynamiques, les classes de données, un nouveau switch à base de lambda, des interfaces fermées, de nouvelles choses du coté des génériques et bien plus encore.
Cela viendra-t-il en 11, 12, 15 ? Ne spéculons pas, mais quand ces nouveautés seront prêtes, elles sortiront en quelques mois. On se propose de présenter ces nouveautés, celles qui sont presque prêtes, celles qui seront prêtes bientôt, et celles qui ne seront pas prêtes avant un moment. Quels seront les impacts sur le langage, sur la JVM et donc sur les performances ? Que cela va-t-il nous apporter au quotidien, en tant que développeurs ? Quels seront les nouveaux patterns ? Voici le programme de cette présentation, avec des slides, du code, de la joie et de la bonne humeur !
ManageIQ currently runs on Ruby on Rails 3. Aaron "tenderlove" Patterson presents his effort to migrate to RoR 4, which entails some changes in the code to take advantage of the latest advances in RoR.
For more on ManageIQ, see http://manageiq.org/
Hierarchical free monads and software design in fpAlexander Granin
I invented the approach I call "Hierarchical Free Monads". It helps to build applications in Haskell with achieving all the needed code quality requirements. I tested this approach in several real world projects and companies, and it works very well.
This document discusses porting, scaling, and optimizing applications on Cray XT systems. It covers topics such as choosing compilers, profiling and debugging applications at scale, understanding CPU affinity, and improvements in the Cray Message Passing Toolkit (MPT). The document provides guidance on leveraging different compilers, collecting performance data using hardware counters and CrayPAT, understanding MPI process binding, and enhancements in MPT 4.0 related to MPI standards support and communication optimizations.
The document discusses building testable PHP applications. It covers topics like testing code, testable architecture, dependency injection, and static code analysis tools like PHP Code Sniffer, PHP Mess Detector, and PHP Copy Paster Detector. The document emphasizes that writing tests and designing for testability leads to fewer bugs and more maintainable code. It provides examples of unit testing and recommends test-driven development practices.
Cray XT Porting, Scaling, and Optimization Best PracticesJeff Larkin
The document discusses optimization best practices for Cray XT systems. It covers choosing compilers and compiler flags, profiling and debugging codes at scale with hardware performance counters and CrayPAT tools, optimizing communication with MPI by using techniques like pre-posting receives and reducing collectives, and optimizing I/O. The document emphasizes testing optimizations on the number of nodes the application will actually run on.
Presto is an open source distributed SQL query engine for running interactive analytic queries against data sources of all sizes ranging from gigabytes to petabytes. It is written in Java and uses a pluggable backend. Presto is fast due to code generation and runtime compilation techniques. It provides a library and framework for building distributed services and fast Java collections. Plugins allow Presto to connect to different data sources like Hive, Cassandra, MongoDB and more.
Automatic and Interpretable Machine Learning with H2O and LIMEJo-fai Chow
The document discusses automatic and interpretable machine learning using H2O and LIME. It provides an introduction and agenda, then discusses why interpretability is important. It introduces the LIME framework for interpreting complex machine learning models locally. It also discusses H2O AutoML for automatically training and tuning many models. Examples are provided for regression using the Boston Housing dataset, where a random forest model is trained and its predictions are explained locally using LIME.
The why and how of moving to PHP 5.5/5.6Wim Godden
With PHP 5.6 out and many production environments still running 5.2 or 5.3, it's time to paint a clear picture on why everyone should move to 5.5 and 5.6 and how to get code ready for the latest version of PHP. In this talk, we'll look at some handy tools and techniques to ease the migration.
This document provides an overview of Node.js application performance analysis and optimization as well as distributed system design. It discusses analyzing and optimizing CPU, memory, file I/O and network I/O usage. It also covers profiling Node.js applications using tools like Linux profiling tools, Node.js libraries, and V8 profiling tools. Lastly it discusses designing distributed systems using single machine and cluster approaches.
Golang Performance : microbenchmarks, profilers, and a war storyAerospike
Slides for Brian Bulkowski's talk about Golang performance:
microbenchmarks, profilers, and a war story about optimizing the Aerospike Database Go client.
http://www.meetup.com/Go-lang-Developers-NYC/events/216650022/
The why and how of moving to php 5.4/5.5Wim Godden
With PHP 5.5 out and many production environments still running 5.2 (or older), it's time to paint a clear picture on why everyone should move to 5.4 and 5.5 and how to get code ready for the latest version of PHP. In this talk, we'll look at some handy tools and techniques to ease the migration.
Presto generates Java bytecode at runtime to optimize query execution. Key query operations like filtering, projections, joins and aggregations are compiled into efficient Java methods using libraries like ASM and Fastutil. This bytecode generation improves performance by 30% through techniques like compiling row hashing for join lookups directly into machine instructions.
Debugging: Rules And Tools - PHPTek 11 VersionIan Barber
The document provides rules and tools for debugging. It discusses understanding the system, making failures reproducible, quitting thinking and closely observing behaviors, dividing problems into smaller pieces, changing one thing at a time, and maintaining an audit trail of changes. Tools mentioned include Xdebug, Selenium, PHPUnit, strace, and source control systems. Logging, instrumentation, and testing techniques are also covered.
ClojureScript loves React, DomCode May 26 2015Michiel Borkent
This document provides an overview of ClojureScript and compares it to ReactJS. It discusses the current status of JavaScript, how ClojureScript targets JavaScript using Google Closure libraries and optimizations. The core features of ClojureScript are summarized, including its use of persistent immutable data structures, functional programming, sequence abstraction, and isolation of mutable state with atoms. Syntax differences between JavaScript and ClojureScript are shown through examples.
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)JiandSon
This document provides debugging tips for Xcode including using breakpoint actions, exception breakpoints, symbolic breakpoints, and static analysis. It compares ARC and non-ARC debugging and discusses diagnostic tools like memory management and logging. Finally, it introduces DTrace as a dynamic tracing facility for macOS and iOS.
Brian Bouterse discusses using the GNU Debugger (GDB) to debug hung Python processes. GDB can be used to attach to running Python processes and debug issues that occur in production or with remote/rarely occurring problems. The debugger provides tools like stack traces and examining local variables. Python extensions for GDB provide additional functionality for listing source code, switching threads, and more. Debugging with GDB requires installing debug symbols and dealing with optimized-out code. Alternative tools like strace and rpdb can also provide debugging assistance.
http://imatge-upc.github.io/telecombcn-2016-dlcv/
Deep learning technologies are at the core of the current revolution in artificial intelligence for multimedia data analysis. The convergence of big annotated data and affordable GPU hardware has allowed the training of neural networks for data analysis tasks which had been addressed until now with hand-crafted features. Architectures such as convolutional neural networks, recurrent neural networks and Q-nets for reinforcement learning have shaped a brand new scenario in signal processing. This course will cover the basic principles and applications of deep learning to computer vision problems, such as image classification, object detection or text captioning.
Starting with the premise that "Performance is a Feature", Matt Warren will show you how to measure, what to measure and how to get the best performance from your .NET code.
We will look at real-world examples from the Roslyn code-base and StackOverflow (the product), including how the .NET Garbage Collector needs to be tamed!
The presentation covers:
Why we should care about performance
Pitfalls to avoid when measuring performance
How the .NET Garbage Collector can hurt performance
Real-world performance lessons from open-source code
The webinar recording can be found here: http://www.postsharp.net/blog/post/webinar-recording-performance-is-a-feature
Similar to Debugging of (C)Python applications (20)
How Can Hiring A Mobile App Development Company Help Your Business Grow?ToXSL Technologies
ToXSL Technologies is an award-winning Mobile App Development Company in Dubai that helps businesses reshape their digital possibilities with custom app services. As a top app development company in Dubai, we offer highly engaging iOS & Android app solutions. https://rb.gy/necdnt
Most important New features of Oracle 23c for DBAs and Developers. You can get more idea from my youtube channel video from https://youtu.be/XvL5WtaC20A
E-commerce Development Services- Hornet DynamicsHornet Dynamics
For any business hoping to succeed in the digital age, having a strong online presence is crucial. We offer Ecommerce Development Services that are customized according to your business requirements and client preferences, enabling you to create a dynamic, safe, and user-friendly online store.
WWDC 2024 Keynote Review: For CocoaCoders AustinPatrick Weigel
Overview of WWDC 2024 Keynote Address.
Covers: Apple Intelligence, iOS18, macOS Sequoia, iPadOS, watchOS, visionOS, and Apple TV+.
Understandable dialogue on Apple TV+
On-device app controlling AI.
Access to ChatGPT with a guest appearance by Chief Data Thief Sam Altman!
App Locking! iPhone Mirroring! And a Calculator!!
What to do when you have a perfect model for your software but you are constrained by an imperfect business model?
This talk explores the challenges of bringing modelling rigour to the business and strategy levels, and talking to your non-technical counterparts in the process.
Using Query Store in Azure PostgreSQL to Understand Query PerformanceGrant Fritchey
Microsoft has added an excellent new extension in PostgreSQL on their Azure Platform. This session, presented at Posette 2024, covers what Query Store is and the types of information you can get out of it.
Consistent toolbox talks are critical for maintaining workplace safety, as they provide regular opportunities to address specific hazards and reinforce safe practices.
These brief, focused sessions ensure that safety is a continual conversation rather than a one-time event, which helps keep safety protocols fresh in employees' minds. Studies have shown that shorter, more frequent training sessions are more effective for retention and behavior change compared to longer, infrequent sessions.
Engaging workers regularly, toolbox talks promote a culture of safety, empower employees to voice concerns, and ultimately reduce the likelihood of accidents and injuries on site.
The traditional method of conducting safety talks with paper documents and lengthy meetings is not only time-consuming but also less effective. Manual tracking of attendance and compliance is prone to errors and inconsistencies, leading to gaps in safety communication and potential non-compliance with OSHA regulations. Switching to a digital solution like Safelyio offers significant advantages.
Safelyio automates the delivery and documentation of safety talks, ensuring consistency and accessibility. The microlearning approach breaks down complex safety protocols into manageable, bite-sized pieces, making it easier for employees to absorb and retain information.
This method minimizes disruptions to work schedules, eliminates the hassle of paperwork, and ensures that all safety communications are tracked and recorded accurately. Ultimately, using a digital platform like Safelyio enhances engagement, compliance, and overall safety performance on site. https://safelyio.com/
Project Management: The Role of Project Dashboards.pdfKarya Keeper
Project management is a crucial aspect of any organization, ensuring that projects are completed efficiently and effectively. One of the key tools used in project management is the project dashboard, which provides a comprehensive view of project progress and performance. In this article, we will explore the role of project dashboards in project management, highlighting their key features and benefits.
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesQuickdice ERP
Explore the seamless transition to e-invoicing with this comprehensive guide tailored for Saudi Arabian businesses. Navigate the process effortlessly with step-by-step instructions designed to streamline implementation and enhance efficiency.
2. Why debugging?
• open source cloud platform
• dozens of (micro-)services
• new features are important, but
making OpenStack stable, scalable
and HA is even more important
• every day performance testing on
hundreds of bare metal nodes
• nightly CI jobs running functional
and destructive tests
• things break… pretty much all the
time!
4. Typical environment
• CentOS 6 or Ubuntu 14.04
• CPython 2.6 or 2.7
• eventlet-based concurrency model for Python
services
• MySQL (Galera), memcache [, MongoDB]
• RabbitMQ
5. Credits
• “Debugging Python applications in Production”
by Vladimir Kirillov (https://www.youtube.com/
watch?v=F9FHIghn_Vk)
• Brendan Gregg’s Blog (http://
www.brendangregg.com/blog/index.html)
7. printf() debugging: python-memcache
def _get_server(self, key):
if isinstance(key, tuple):
serverhash, key = key
else:
serverhash = serverHashFunction(key)
if not self.buckets:
return None, None
for i in range(Client._SERVER_RETRIES):
server = self.buckets[serverhash % len(self.buckets)]
if server.connect():
# print("(using server %s)" % server,)
return server, key
serverhash = serverHashFunction(str(serverhash) + str(i))
return None, None
8. printf() debugging: just don’t do that!
• the most primitive way of introspection at runtime
• either always enabled or explicitly commented in
the code
• limited to stdout/stderror streams
• information is only (barely) usable for developers
• pollutes the code when committed to VCS
repositories
14. Logging: log processing
• logs are collected from different sources and parsed
(Logstash)
• then they are imported into a full-text search system
(ElasticSearch)
• Web UI is used for providing easy access to results and
querying (Kibana)
15. Logging: log processing
title: Kernel Neighbour table overflow
query: >
filename:kernel.log
AND level:warning
AND message:neighbour AND message:overflow
title: Neutron Skipping router removal
query: >
filename:neutron-l3-agent.log
AND location:neutron.agent.l3_agent
AND message:skipping AND message:removal
title: Neutron OVS lib errors and warnings
query: >
filename:neutron-openvswitch-agent.log
AND location:neutron.agent.linux.ovs_lib
AND level:(error OR warning)
title: Neutron race condition at subnet deletion
query: >
filename:neutron
AND level:trace
AND message:AttributeError
16. Logging: summary
• useful for both developers and operators
• developers define verbosity by the means of
logging levels
• configurable handlers (file, syslog, network, etc)
• advanced tooling for log processing / monitoring
25. pdb: summary
• bread and butter of Python developers
• usually the easiest and the quickest way of debugging scripts/apps
• integrated with popular test runners
• greenlet-friendly
• requires stdin/stdout, thus not usable for debugging daemons or
embedded Python code (like Gimp or Blender plugins)
• not suitable for debugging of multithreaded/multiprocessing
applications
• can’t attach to a running process (if not modified in advance)
27. winpdb: attaching to a process
rpodolyaka@rpodolyaka-pc:~/sandbox/debugging$ rpdb2 -d search.py
A password should be set to secure debugger client-server communication.
Please type a password:r00tme
Password has been set
rpodolyaka@rpodolyaka-pc:~$ rpdb2
RPDB2 - The Remote Python Debugger, version RPDB_2_4_8,
Copyright (C) 2005-2009 Nir Aides.
> password r00tme
Password is set to: "r00tme"
> attach
Connecting to 'localhost'...
Scripts to debug on 'localhost':
pid name
--------------------------
3706 /home/rpodolyaka/sandbox/debugging/search.py
> attach 3706
> *** Attaching to debuggee...
28. winpdb: attaching to a process
> bp binary_search
> bl
List of breakpoints:
Id State Line Filename-Scope-Condition-Encoding
------------------------------------------------------------------------------
0 enabled 15 /home/rpodolyaka/sandbox/debugging/search.py
binary_search
> go
> *** Debuggee is waiting at break point for further commands.
> stack
Stack trace for thread 140416296978176:
Frame File Name Line Function
------------------------------------------------------------------------------
> 0 ...ndbox/debugging/search.py 15 <module>
1 ....7/dist-packages/rpdb2.py 14220 StartServer
2 ....7/dist-packages/rpdb2.py 14470 main
3 /usr/bin/rpdb2 31 <module>
29. winpdb: embedded debugging
def add_lease(mac, ip_address):
"""Set the IP that was assigned by the DHCP server."""
import rpdb2; rpdb2.start_embedded_debugger('r00tme')
api = network_rpcapi.NetworkAPI()
api.lease_fixed_ip(context.get_admin_context(), ip_address, CONF.host)
dnsmasq daemon forks and executes this like:
nova-dhcpbridge add AA:BB:CC:DD:EE:FF 10.0.0.2
30. winpdb: debugging of threads
def allocate_ips(engine, host):
while True:
with engine.begin() as conn:
result = conn.execute(
ip_addresses.select()
.where(ip_addresses.c.host.is_(None))
).first()
if result is None:
# no IPs left
break
id, address = result.id, result.address
rows = conn.execute(
ip_addresses.update()
.values(host=host)
.where(ip_addresses.c.id == id)
.where(ip_addresses.c.address == address)
.where(ip_addresses.c.host.is_(None))
)
if not rows:
# concurrent update
continue
31. winpdb: debugging of threads
t1 = threading.Thread(target=allocate_ips, args=(eng, 'host1'))
t1.start()
t2 = threading.Thread(target=allocate_ips, args=(eng, 'host2'))
t2.start()
t1.join()
t2.join()
> attach $PID
…
> thread
List of active threads known to the debugger:
No Tid Name State
-----------------------------------------------
0 140456866166528 MainThread waiting at break point
> 1 140456389068544 Thread-1 waiting at break point
2 140456380675840 Thread-2 waiting at break point
32. winpdb: debugging of threads
> thread 2
Focus was set to chosen thread.
> stack
Stack trace for thread 140456380675840:
Frame File Name Line Function
------------------------------------------------------------------------------
> 0 /home/rpodolyaka/sa.py 30 allocate_ips
1 ...ib/python2.7/threading.py 763 run
> go
> break
> *** Debuggee is waiting at break point for further commands.
> stack
Stack trace for thread 140456380675840:
Frame File Name Line Function
------------------------------------------------------------------------------
> 0 ...alchemy/engine/default.py 409 do_commit
1 ...sqlalchemy/engine/base.py 525 _commit_impl
2 ...sqlalchemy/engine/base.py 1364 _do_commit
33. winpdb: summary
• allows to debug multithreaded Python
applications
• remote debugging (which effectively means, no
stdout/stdint limitations as with pdb)
• wxWidgets-based GUI
• to attach to a running process you need to
modified it in advance (embedded debugging) or
start it with rpdb2
42. cProfile: summary
• easy CPU profiling of Python code with low
overhead
• text/binary representation of profiling results (the
latter can be used for merging results and/or
visualisation done by external tools)
• can’t attach to a running process
• can’t profile Python interpreter-level code
(Py_EvaluateFrameEx, etc)
50. strace: summary
• allows tracing of applications interactions with `outside
world`
• points possible problems with performance (like
excessive system calls, polling of events with too
small timeout, etc)
• limited to tracing of system calls of one process and
its forks
• use cautiously on production environments as it
greatly affects performance
53. gdb: basics
• python-dbg is a CPython binary built with
‘--with-debug -g’ options. It’s slow and verbose
about memory management
• you can debug regular CPython processes in
production using the debug symbols shipped separately
• gdb has Python bindings to write scripts for it
• CPython is shipped with a gdb script allowing to
analyse interpreter-level stack frames to get app-level
backtraces
54. gdb: `hanging` app
def allocate_ips(eng, host):
while True:
with eng.begin() as conn:
row = conn.execute(
ip_addresses.select()
.where(ip_addresses.c.host.is_(None))
).fetchone()
if row is None:
break
id, address = row.id, row.address
updated_rows = conn.execute(
ip_addresses.update()
.values(host=host)
.where(ip_addresses.c.id == id)
.where(ip_addresses.c.host.is_(None))
)
if not updated_rows:
continue
t = threading.Thread(target=allocate_ips, args=(eng, 'host1'))
t.start()
t.join()
55. gdb: `hanging` app
rpodolyaka@rpodolyaka-pc:~$ strace -p 20267
Process 20267 attached
futex(0x7fea50000c10, FUTEX_WAIT_PRIVATE, 0, NULL
rpodolyaka@rpodolyaka-pc:~$ gdb /usr/bin/python3.4 -p 20216
(gdb) t a a frame
Thread 2 (Thread 0x7f7702c83700 (LWP 20353)):
#0 sem_timedwait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S:101
101 ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: No such file or
directory.
Thread 1 (Thread 0x7f770a03b700 (LWP 20350)):
#0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
85 ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S: No such file or directory.
56. gdb: `hanging` app
(gdb) t a 2 py-bt
Thread 2 (Thread 0x7f7702c83700 (LWP 20353)):
Traceback (most recent call first):
File "/usr/lib/python3.4/threading.py", line 294, in wait
gotit = waiter.acquire(True, timeout)
File "/home/rpodolyaka/venv3/lib/python3.4/site-packages/sqlalchemy/util/
queue.py", line 157, in get
self.not_empty.wait(remaining)
File "/home/rpodolyaka/venv3/lib/python3.4/site-packages/sqlalchemy/pool.py", line
1039, in _do_get
return self._pool.get(wait, self._timeout)
File "/home/rpodolyaka/venv3/lib/python3.4/site-packages/sqlalchemy/engine/
base.py", line 2037, in contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "/home/rpodolyaka/venv3/lib/python3.4/site-packages/sqlalchemy/engine/
base.py", line 1906, in begin
conn = self.contextual_connect(close_with_result=close_with_result)
File "sa.py", line 31, in allocate_ips
with eng.begin() as conn:
File "/usr/lib/python3.4/threading.py", line 868, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
self.run()
File "/usr/lib/python3.4/threading.py", line 888, in _bootstrap
self._bootstrap_inner()
57. gdb: virtualenv pitfalls
rpodolyaka@rpodolyaka-pc:~$ gdb -p 20656 # WARN: executable not passed!
(gdb) py-bt
Undefined command: "py-bt". Try "help".
(gdb) bt
#0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
#1 0x00000000004cdff5 in PyThread_acquire_lock_timed ()
#2 0x0000000000522039 in ?? ()
#3 0x00000000004ee01a in PyEval_EvalFrameEx ()
#4 0x00000000004ec9fc in PyEval_EvalCodeEx ()
#5 0x00000000004f25a9 in PyEval_EvalFrameEx ()
#6 0x00000000004ec9fc in PyEval_EvalCodeEx ()
#7 0x00000000004f25a9 in PyEval_EvalFrameEx ()
#8 0x00000000004ec9fc in PyEval_EvalCodeEx ()
#9 0x0000000000581115 in ?? ()
#10 0x00000000005ab019 in PyRun_FileExFlags ()
#11 0x00000000005aa194 in PyRun_SimpleFileExFlags ()
#12 0x00000000004cb4cb in Py_Main ()
#13 0x00000000004ca8ef in main ()
58. gdb: summary
• allows to debug multithreaded applications
• allows to attach to a running process at any given moment of time
• can be used for analysing of core dumps (e.g. if we don’t want to
stop a process, or if it died unexpectedly)
• can be used for debugging of C-extensions, CFFI calls, etc
• success depends on how CPython was built and whether you
have installed debug symbols or not
• used by pyringe to provide pdb-like experience (https://
github.com/google/pyringe)