This document describes how the author used Python, PHP, JQuery and Linux to visualize the oxygen saturation levels of his stepdaughter Anouschka, who has several medical conditions. He connected an oxygen saturation measurement device to his computer via serial port and wrote a Python script to log the data to a MySQL database. He then used PHP and the DyGraph JavaScript library to visualize the oxygen saturation and heart rate data over time based on the logged data, allowing doctors to better monitor her levels. This helped provide more data to understand her varying oxygen levels during sleep.
The Ring programming language version 1.5.2 book - Part 76 of 181Mahmoud Samir Fayed
The document describes the Trace Library in Ring which provides functions for tracing code execution and debugging. It shows examples of using the Trace Library to:
1. Trace all events like function calls and returns across multiple functions and methods.
2. Trace the control flow between functions by logging function entries and exits.
3. Handle errors by passing them to the trace function instead of crashing.
4. Provide an interactive debugger that allows setting breakpoints and inspecting variables when a breakpoint is hit.
The Ring programming language version 1.10 book - Part 94 of 212Mahmoud Samir Fayed
The document describes the Trace Library in Ring and how it can be used to trace program execution, debug code, and step through a program line by line. It provides examples of loading the Trace Library, tracing all events, tracing control flow between functions, and using the pass error functionality to continue execution after an error. Key functions and capabilities of the Trace Library discussed include tracing specific events, setting breakpoints, accessing trace data, and redefining see and give behavior.
The document discusses Python decorators and namespaces. It begins by asking if the reader understands what happens when a function or class is decorated using the @ symbol. It then explains that it will look at how decorators work under the hood and discuss Python namespaces and scopes. It provides examples of recursive functions and how namespaces allow the same name to be used in different contexts without conflict.
We aren't sure about you, but working with Java 8 made one of the speakers lose all of his hair and the other lose his sleep (or was it the jetlag?). If you still haven't reached the level of Brian Goetz in mastering lambdas and strings, this talk is for you. And if you think you have, we have some bad news for you, you should attend as well.
This document contains the source code for an integration project that allows a user to choose from 18 different programs to run. It includes methods for tasks like echoing input, integer division, finding the birthday month from a number, running a for loop, working with arrays and array lists, and an example of inheritance with a Car class extending a Machine class. The main method uses a switch statement to call the appropriate method based on the user's selection and ensures the programs can be continuously run with a while loop.
This document summarizes Benjamin Eberlei's talk on using Doctrine to interact with databases in PHP applications. Doctrine provides an object relational mapper (ORM) and database abstraction layer (DBAL) that allow developers to work with various database systems in a consistent way. The DBAL component handles driver abstraction, SQL dialects, convenience APIs, SQL types and database schema handling to simplify common database tasks.
The document describes how to build a fantasy football team manager application in Erlang. It first shows an implementation using plain processes and message passing to manage adding and removing players from a team. It then shows how to implement the same functionality using the GenServer behavior to provide a more robust API. The GenServer implementation stores the team state internally and provides functions to add, remove, and retrieve the team via callbacks that handle state updates and replies.
The Ring programming language version 1.5.2 book - Part 76 of 181Mahmoud Samir Fayed
The document describes the Trace Library in Ring which provides functions for tracing code execution and debugging. It shows examples of using the Trace Library to:
1. Trace all events like function calls and returns across multiple functions and methods.
2. Trace the control flow between functions by logging function entries and exits.
3. Handle errors by passing them to the trace function instead of crashing.
4. Provide an interactive debugger that allows setting breakpoints and inspecting variables when a breakpoint is hit.
The Ring programming language version 1.10 book - Part 94 of 212Mahmoud Samir Fayed
The document describes the Trace Library in Ring and how it can be used to trace program execution, debug code, and step through a program line by line. It provides examples of loading the Trace Library, tracing all events, tracing control flow between functions, and using the pass error functionality to continue execution after an error. Key functions and capabilities of the Trace Library discussed include tracing specific events, setting breakpoints, accessing trace data, and redefining see and give behavior.
The document discusses Python decorators and namespaces. It begins by asking if the reader understands what happens when a function or class is decorated using the @ symbol. It then explains that it will look at how decorators work under the hood and discuss Python namespaces and scopes. It provides examples of recursive functions and how namespaces allow the same name to be used in different contexts without conflict.
We aren't sure about you, but working with Java 8 made one of the speakers lose all of his hair and the other lose his sleep (or was it the jetlag?). If you still haven't reached the level of Brian Goetz in mastering lambdas and strings, this talk is for you. And if you think you have, we have some bad news for you, you should attend as well.
This document contains the source code for an integration project that allows a user to choose from 18 different programs to run. It includes methods for tasks like echoing input, integer division, finding the birthday month from a number, running a for loop, working with arrays and array lists, and an example of inheritance with a Car class extending a Machine class. The main method uses a switch statement to call the appropriate method based on the user's selection and ensures the programs can be continuously run with a while loop.
This document summarizes Benjamin Eberlei's talk on using Doctrine to interact with databases in PHP applications. Doctrine provides an object relational mapper (ORM) and database abstraction layer (DBAL) that allow developers to work with various database systems in a consistent way. The DBAL component handles driver abstraction, SQL dialects, convenience APIs, SQL types and database schema handling to simplify common database tasks.
The document describes how to build a fantasy football team manager application in Erlang. It first shows an implementation using plain processes and message passing to manage adding and removing players from a team. It then shows how to implement the same functionality using the GenServer behavior to provide a more robust API. The GenServer implementation stores the team state internally and provides functions to add, remove, and retrieve the team via callbacks that handle state updates and replies.
The document summarizes updates to Tagomoris' Fluentd cluster and new Fluentd plugins. It states that the cluster has grown from 89 processes on 12 nodes to 92,000 messages per second and 184Mbps, and the number of plugins has increased from 10 to 19, including new plugins for routing, monitoring, filtering, and outputting data. It promotes developing plugins to expand Fluentd's capabilities for real-time data processing.
The Ring programming language version 1.5.4 book - Part 79 of 185Mahmoud Samir Fayed
The document discusses the Trace library in Ring for debugging programs. It provides examples of using the Trace library to trace all events, control flow between functions, handle errors, use an interactive debugger, execute line by line, set breakpoints, disable breakpoints, and use the interactive debugger at breakpoints. The Trace library allows tracing programs, passing errors, debugging interactively by setting and handling breakpoints.
Using New Web APIs For Your Own Pleasure – How I Wrote New Features For My Vi...GeilDanke
The document discusses using web APIs to interact with Bluetooth devices. It provides an overview of the Bluetooth protocol and describes how to use the Web Bluetooth and Web Audio APIs to connect to Bluetooth devices, read audio data, detect vowels in speech, and send commands to control devices. Code examples are given for connecting to a device, reading frequency data from the audio stream, analyzing it to determine vowels, and writing messages to a Bluetooth characteristic to trigger actions like vibration. The goal is to enable creative uses of web APIs to experiment with Bluetooth and audio.
JavaFX is a software platform for creating and delivering desktop applications, as well as rich internet applications (RIAs) that can run across a wide variety of devices. Some key aspects of the JavaFX platform include its base classes like Application, Scene and Stage; the use of FXML for building the user interface with CSS styling and JavaScript capabilities; JavaFX properties and bindings for observing value changes; and support for animation. The JavaFX architecture provides objects, APIs and utilities to help developers create visually-engaging and responsive user experiences.
This document provides an introduction to JavaFX 2. It discusses the history of desktop applications in Java, including AWT, Swing, and issues with the old approaches. It then summarizes the announcement and initial challenges of JavaFX 1. It outlines the core concepts of JavaFX 2, including the architecture with Application, Scene, Stage, and FXML. It also briefly discusses controllers, properties, bindings, collections, charts, animation, effects, media, and tools like SceneBuilder and Scenic View.
This document contains the code for a Java application with a graphical user interface (GUI) that calculates employee payroll. It defines classes and methods to:
1. Create panels to input employee data like name, ID, salary and select deduction options.
2. Calculate deductions for judicial, loans, alimony based on selected checkboxes and salary amount.
3. Calculate total deductions, net salary and update text fields on button click.
4. Clear all fields and reset selections on "New" button click and exit application on "Exit" button click.
Euro python2011 High Performance PythonIan Ozsvald
I ran this as a 4 hour tutorial at EuroPython 2011 to teach High Performance Python coding.
Techniques covered include bottleneck analysis by profiling, bytecode analysis, converting to C using Cython and ShedSkin, use of the numerical numpy library and numexpr, multi-core and multi-machine parallelisation and using CUDA GPUs.
Write-up with 49 page PDF report: http://ianozsvald.com/2011/06/29/high-performance-python-tutorial-v0-1-from-my-4-hour-tutorial-at-europython-2011/
The Ring programming language version 1.7 book - Part 12 of 196Mahmoud Samir Fayed
The Ring documentation release notes summarize new features and improvements in Ring version 1.7. Key updates include better documentation generation for extensions, new Ring VM tracing functions for debugging, and more syntax flexibility options when defining packages, classes and functions. The release also introduces a type hints library to support static analysis and improved editor features.
This document defines a Java class called Quiniela that creates a GUI application for a football betting game. The class contains fields to track winners and scores, initializes GUI components like labels and text fields, and defines event handler methods like one for a "Listo" button that calculates results.
The document contains code for a C# program that merges employee wage and tip data from multiple text files into a single output file. It reads configuration settings from an XML file to determine the input and output file paths. It then reads the input files, merges the data based on employee identifiers, handles null values, and writes the results to the output file. It also writes log information to another output file. The key steps are: 1) reading the configuration, 2) reading and parsing the input files, 3) merging and formatting the data, and 4) writing the merged data and log to output files.
Prezentace z jOpenSpace 2011.
Jak pomocí jedné třídy vytvořit system tray notifikátor pro vzdálené použití (běží jako HTTP server).
Více na:
https://github.com/kwart/Notifier
Commit ускоривший python 2.7.11 на 30% и новое в python 3.5PyNSK
Автор доклада: Александр Сапронов.
Обзорный мини-доклад. В докладе вы найдете причину релиза 2.7.11 и новинки Python 3.5
Доклад сделан на 2 встрече сообщества PyNSK
The document contains code snippets in Java for getting different types of information. This includes code to get the hostname, month from a date, IP address, memory size and usage, and more. The code uses various Java classes and methods like InetAddress, DateFormat, Runtime etc. to retrieve the desired information and print/return the output.
Using Flow-based programming to write tools and workflows for Scientific Comp...Samuel Lampa
The document summarizes Samuel Lampa's talk on using flow-based programming for scientific computing. It provides biographical information on Samuel Lampa, including his background in pharmaceutical bioinformatics and current work. It then gives an overview of flow-based programming, describing it as using black box processes connected by data flows, with connections specified separately from processes. Benefits mentioned include easy testing, monitoring, and changing connections without rewriting components. Examples of using FBP in Go are also presented.
Dagger is a dependency injection framework that allows injecting collaborators into objects without requiring manual passing of dependencies. RxJava implements reactive programming, allowing observable streams to be manipulated through operators like map and filter. Retrofit makes REST API calls simply by defining an interface and allows results to be easily converted to Java objects. Together these libraries help create testable Android applications by decoupling classes and managing dependencies and asynchronous processes in a declarative way.
In which Richard will tell you about some things you should never (probably ever) do to or in Python. Warranties may be voided. The recording of this talk is online at http://www.youtube.com/watch?v=H2yfXnUb1S4
The document discusses various Python interpreters:
- CPython is the default interpreter but has a Global Interpreter Lock (GIL) limiting performance on multi-core systems.
- Jython and IronPython run Python on the JVM and CLR respectively, allowing true concurrency but can be slower than CPython.
- PyPy uses a just-in-time (JIT) compiler which can provide huge performance gains compared to CPython as shown on speed.pypy.org.
- Unladen Swallow aimed to add JIT compilation to CPython but was merged into Python 3.
The document discusses Python generators and how they can be used for iterating over lists, tuples, dictionaries, strings, files and custom iterable objects. It provides examples of using generators and the yield keyword to iterate over a countdown and generate values. The document also discusses two problems - analyzing log files using generators and finding files matching patterns using the os.walk generator.
The Ring programming language version 1.5.3 book - Part 26 of 184Mahmoud Samir Fayed
This document describes various file and system functions in the Ring programming language. It explains functions for reading and writing files (Fread, Fwrite), checking if a file exists (Fexists), getting environment variables (SysGet), determining the operating system (IsWindows, IsLinux), getting file paths (ExeFileName, CurrentDir), and executing system commands (System, SystemCmd). Examples are provided for many of the functions.
This document discusses Python and web frameworks. It begins with an introduction to Python and its advantages for web development. It then discusses several popular Python web frameworks including web.py, Flask, and Django. It also covers related topics like WSGI, templating with Jinja2, asynchronous programming, and deployment with virtualenv.
Slides for the Cluj.py meetup where we explored the inner workings of CPython, the reference implementation of Python. Includes examples of writing a C extension to Python, and introduces Cython - ultimately the sanest way of writing C extensions.
Also check out the code samples on GitHub: https://github.com/trustyou/meetups/tree/master/python-c
Beyond php - it's not (just) about the codeWim Godden
Most PHP developers focus on writing code. But creating Web applications is about much more than just wrting PHP. Take a step outside the PHP cocoon and into the big PHP ecosphere to find out how small code changes can make a world of difference on servers and network. This talk is an eye-opener for developers who spend over 80% of their time coding, debugging and testing.
The document summarizes updates to Tagomoris' Fluentd cluster and new Fluentd plugins. It states that the cluster has grown from 89 processes on 12 nodes to 92,000 messages per second and 184Mbps, and the number of plugins has increased from 10 to 19, including new plugins for routing, monitoring, filtering, and outputting data. It promotes developing plugins to expand Fluentd's capabilities for real-time data processing.
The Ring programming language version 1.5.4 book - Part 79 of 185Mahmoud Samir Fayed
The document discusses the Trace library in Ring for debugging programs. It provides examples of using the Trace library to trace all events, control flow between functions, handle errors, use an interactive debugger, execute line by line, set breakpoints, disable breakpoints, and use the interactive debugger at breakpoints. The Trace library allows tracing programs, passing errors, debugging interactively by setting and handling breakpoints.
Using New Web APIs For Your Own Pleasure – How I Wrote New Features For My Vi...GeilDanke
The document discusses using web APIs to interact with Bluetooth devices. It provides an overview of the Bluetooth protocol and describes how to use the Web Bluetooth and Web Audio APIs to connect to Bluetooth devices, read audio data, detect vowels in speech, and send commands to control devices. Code examples are given for connecting to a device, reading frequency data from the audio stream, analyzing it to determine vowels, and writing messages to a Bluetooth characteristic to trigger actions like vibration. The goal is to enable creative uses of web APIs to experiment with Bluetooth and audio.
JavaFX is a software platform for creating and delivering desktop applications, as well as rich internet applications (RIAs) that can run across a wide variety of devices. Some key aspects of the JavaFX platform include its base classes like Application, Scene and Stage; the use of FXML for building the user interface with CSS styling and JavaScript capabilities; JavaFX properties and bindings for observing value changes; and support for animation. The JavaFX architecture provides objects, APIs and utilities to help developers create visually-engaging and responsive user experiences.
This document provides an introduction to JavaFX 2. It discusses the history of desktop applications in Java, including AWT, Swing, and issues with the old approaches. It then summarizes the announcement and initial challenges of JavaFX 1. It outlines the core concepts of JavaFX 2, including the architecture with Application, Scene, Stage, and FXML. It also briefly discusses controllers, properties, bindings, collections, charts, animation, effects, media, and tools like SceneBuilder and Scenic View.
This document contains the code for a Java application with a graphical user interface (GUI) that calculates employee payroll. It defines classes and methods to:
1. Create panels to input employee data like name, ID, salary and select deduction options.
2. Calculate deductions for judicial, loans, alimony based on selected checkboxes and salary amount.
3. Calculate total deductions, net salary and update text fields on button click.
4. Clear all fields and reset selections on "New" button click and exit application on "Exit" button click.
Euro python2011 High Performance PythonIan Ozsvald
I ran this as a 4 hour tutorial at EuroPython 2011 to teach High Performance Python coding.
Techniques covered include bottleneck analysis by profiling, bytecode analysis, converting to C using Cython and ShedSkin, use of the numerical numpy library and numexpr, multi-core and multi-machine parallelisation and using CUDA GPUs.
Write-up with 49 page PDF report: http://ianozsvald.com/2011/06/29/high-performance-python-tutorial-v0-1-from-my-4-hour-tutorial-at-europython-2011/
The Ring programming language version 1.7 book - Part 12 of 196Mahmoud Samir Fayed
The Ring documentation release notes summarize new features and improvements in Ring version 1.7. Key updates include better documentation generation for extensions, new Ring VM tracing functions for debugging, and more syntax flexibility options when defining packages, classes and functions. The release also introduces a type hints library to support static analysis and improved editor features.
This document defines a Java class called Quiniela that creates a GUI application for a football betting game. The class contains fields to track winners and scores, initializes GUI components like labels and text fields, and defines event handler methods like one for a "Listo" button that calculates results.
The document contains code for a C# program that merges employee wage and tip data from multiple text files into a single output file. It reads configuration settings from an XML file to determine the input and output file paths. It then reads the input files, merges the data based on employee identifiers, handles null values, and writes the results to the output file. It also writes log information to another output file. The key steps are: 1) reading the configuration, 2) reading and parsing the input files, 3) merging and formatting the data, and 4) writing the merged data and log to output files.
Prezentace z jOpenSpace 2011.
Jak pomocí jedné třídy vytvořit system tray notifikátor pro vzdálené použití (běží jako HTTP server).
Více na:
https://github.com/kwart/Notifier
Commit ускоривший python 2.7.11 на 30% и новое в python 3.5PyNSK
Автор доклада: Александр Сапронов.
Обзорный мини-доклад. В докладе вы найдете причину релиза 2.7.11 и новинки Python 3.5
Доклад сделан на 2 встрече сообщества PyNSK
The document contains code snippets in Java for getting different types of information. This includes code to get the hostname, month from a date, IP address, memory size and usage, and more. The code uses various Java classes and methods like InetAddress, DateFormat, Runtime etc. to retrieve the desired information and print/return the output.
Using Flow-based programming to write tools and workflows for Scientific Comp...Samuel Lampa
The document summarizes Samuel Lampa's talk on using flow-based programming for scientific computing. It provides biographical information on Samuel Lampa, including his background in pharmaceutical bioinformatics and current work. It then gives an overview of flow-based programming, describing it as using black box processes connected by data flows, with connections specified separately from processes. Benefits mentioned include easy testing, monitoring, and changing connections without rewriting components. Examples of using FBP in Go are also presented.
Dagger is a dependency injection framework that allows injecting collaborators into objects without requiring manual passing of dependencies. RxJava implements reactive programming, allowing observable streams to be manipulated through operators like map and filter. Retrofit makes REST API calls simply by defining an interface and allows results to be easily converted to Java objects. Together these libraries help create testable Android applications by decoupling classes and managing dependencies and asynchronous processes in a declarative way.
In which Richard will tell you about some things you should never (probably ever) do to or in Python. Warranties may be voided. The recording of this talk is online at http://www.youtube.com/watch?v=H2yfXnUb1S4
The document discusses various Python interpreters:
- CPython is the default interpreter but has a Global Interpreter Lock (GIL) limiting performance on multi-core systems.
- Jython and IronPython run Python on the JVM and CLR respectively, allowing true concurrency but can be slower than CPython.
- PyPy uses a just-in-time (JIT) compiler which can provide huge performance gains compared to CPython as shown on speed.pypy.org.
- Unladen Swallow aimed to add JIT compilation to CPython but was merged into Python 3.
The document discusses Python generators and how they can be used for iterating over lists, tuples, dictionaries, strings, files and custom iterable objects. It provides examples of using generators and the yield keyword to iterate over a countdown and generate values. The document also discusses two problems - analyzing log files using generators and finding files matching patterns using the os.walk generator.
The Ring programming language version 1.5.3 book - Part 26 of 184Mahmoud Samir Fayed
This document describes various file and system functions in the Ring programming language. It explains functions for reading and writing files (Fread, Fwrite), checking if a file exists (Fexists), getting environment variables (SysGet), determining the operating system (IsWindows, IsLinux), getting file paths (ExeFileName, CurrentDir), and executing system commands (System, SystemCmd). Examples are provided for many of the functions.
This document discusses Python and web frameworks. It begins with an introduction to Python and its advantages for web development. It then discusses several popular Python web frameworks including web.py, Flask, and Django. It also covers related topics like WSGI, templating with Jinja2, asynchronous programming, and deployment with virtualenv.
Slides for the Cluj.py meetup where we explored the inner workings of CPython, the reference implementation of Python. Includes examples of writing a C extension to Python, and introduces Cython - ultimately the sanest way of writing C extensions.
Also check out the code samples on GitHub: https://github.com/trustyou/meetups/tree/master/python-c
Beyond php - it's not (just) about the codeWim Godden
Most PHP developers focus on writing code. But creating Web applications is about much more than just wrting PHP. Take a step outside the PHP cocoon and into the big PHP ecosphere to find out how small code changes can make a world of difference on servers and network. This talk is an eye-opener for developers who spend over 80% of their time coding, debugging and testing.
Sq lite python tutorial sqlite programming in pythonMartin Soria
This document provides an overview of using SQLite with Python. It discusses prerequisites, connecting to a database, getting the SQLite version, inserting data using various methods, and retrieving the last inserted row ID.
Beyond php - it's not (just) about the codeWim Godden
Most PHP developers focus on writing code. But creating Web applications is about much more than just wrting PHP. Take a step outside the PHP cocoon and into the big PHP ecosphere to find out how small code changes can make a world of difference on servers and network. This talk is an eye-opener for developers who spend over 80% of their time coding, debugging and testing.
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.
Beyond php - it's not (just) about the codeWim Godden
Most PHP developers focus on writing code. But creating Web applications is about much more than just wrting PHP. Take a step outside the PHP cocoon and into the big PHP ecosphere to find out how small code changes can make a world of difference on servers and network. This talk is an eye-opener for developers who spend over 80% of their time coding, debugging and testing.
This document provides an overview of how to contribute to the cPython source code. It discusses running benchmarks to understand performance differences between loops inside and outside functions. It encourages contributing to improve coding skills and help the open source community. The steps outlined are to clone the cPython source code repository, resolve any dependencies during building, review open issues on bugs.python.org, and work on resolving issues - starting with easier ones. Tips are provided such as commenting when taking ownership of an issue, reproducing bugs before working on them, writing tests for code changes, and updating documentation.
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...DRVaibhavmeshram1
Python
Language
is uesd in engineeringStory adapted from Stephen Covey (2004) “The Seven Habits of Highly Effective People” Simon & Schuster).
“Management is doing things right, leadership is doing the right things”
(Warren Bennis and Peter Drucker)
Story adapted from Stephen Covey (2004) “The Seven Habits of Highly Effective People” Simon & Schuster).
“Management is doing things right, leadership is doing the right things”
(Warren Bennis and Peter Drucker)
Story adapted from Stephen Covey (2004) “The Seven Habits of Highly Effective People” Simon & Schuster).
“Management is doing things right, leadership is doing the right things”
(Warren Bennis and Peter Drucker)
The Sponsor:
Champion and advocates for the change at their level in the organization.
A Sponsor is the person who won’t let the change initiative die from lack of attention, and is willing to use their political capital to make the change happen
The Role model:
Behaviors and attitudes demonstrated by them are looked upon by everyone else. . Hence, they must be willing to go first.
Employees watch leaders for consistency between words and actions to see if they should believe the change is really going to happen.
The decision maker:
Leaders usually control resources such as people, budgets, and equipment, and thus have the authority to make decisions (as per their span of control) that affect the initiative.
During change, leaders must leverage their decision-making authority and choose the options that will support the initiative.
The Decision-Maker is decisive and sets priorities that support change.
The Sponsor:
Champion and advocates for the change at their level in the organization.
A Sponsor is the person who won’t let the change initiative die from lack of attention, and is willing to use their political capital to make the change happen
The Role model:
Behaviors and attitudes demonstrated by them are looked upon by everyone else. . Hence, they must be willing to go first.
Employees watch leaders for consistency between words and actions to see if they should believe the change is really going to happen.
The decision maker:
Leaders usually control resources such as people, budgets, and equipment, and thus have the authority to make decisions (as per their span of control) that affect the initiative.
During change, leaders must leverage their decision-making authority and choose the options that will support the initiative.
The Decision-Maker is decisive and sets priorities that support change.
The Sponsor:
Champion and advocates for the change at their level in the organization.
A Sponsor is the person who won’t let the change initiative die from lack of attention, and is willing to use their political capital to make the change happen
The Role model:
Behaviors and attitudes demonstrated by them are looked upon by everyone else. . Hence, they must be willing to go first.
Employees watch leaders for consistency between words and actions to see if they s
The document discusses the Just-In-Time (JIT) compiler that was introduced in PHP 8. It provides a brief history of JIT in PHP, explaining that early prototypes showed that the rest of PHP was too slow to benefit from JIT. It then discusses how optimizations from JIT were integrated into opcache without needing a full JIT. It provides information on configuring and using the JIT compiler, and shows performance improvements on benchmarks. It also provides an example of how a function is compiled to machine code by the JIT compiler.
This document compares the performance of using XML-RPC versus Psycopg2 to access and update data in an OpenERP database. It describes programs written in Python using each method and measures the execution times. XML-RPC was slower, taking 3.27 seconds to run compared to 0.25 seconds for Psycopg2. Psycopg2 provides better performance by allowing direct SQL queries rather than going through the ORM. The document concludes that while XML-RPC provides security and compatibility with the OpenERP ORM, Psycopg2 is faster and allows standard SQL queries for better portability.
This document provides an overview and agenda for pcDuino, an open source hardware and software platform. It describes how pcDuino combines the processing power of a mini PC with Arduino compatibility. Users can program pcDuino using Arduino IDE, Python, Java, Go and other languages. It also supports IDEs like Cloud 9 and programming via Ubuntu, Android, and command line. Example projects are showcased using sensors, shields and programming interfaces.
Managing MariaDB Server operations with Percona ToolkitSveta Smirnova
This document summarizes various tools from Percona Toolkit that can be used to manage and monitor MariaDB server operations. It describes how pt-summary, pt-mysql-summary, and pt-stalk can be used to gather hardware, OS, and server information. It also outlines how pt-query-digest analyzes slow query logs, pt-online-schema-change allows online schema changes, pt-kill terminates connections, and pt-heartbeat and pt-slave-find help manage replication.
The Ring programming language version 1.8 book - Part 95 of 202Mahmoud Samir Fayed
The document provides code examples for creating a GUI application with Ring that includes two buttons. It shows how to create a main window and two buttons, set their properties like geometry, text, and click events. It also shows how to call a function from a button click event and create a second window.
Beyond php - it's not (just) about the codeWim Godden
Most PHP developers focus on writing code. But creating Web applications is about much more than just wrting PHP. Take a step outside the PHP cocoon and into the big PHP ecosphere to find out how small code changes can make a world of difference on servers and network. This talk is an eye-opener for developers who spend over 80% of their time coding, debugging and testing.
Beyond PHP - It's not (just) about the codeWim Godden
Most PHP developers focus on writing code. But creating Web applications is about much more than just wrting PHP. Take a step outside the PHP cocoon and into the big PHP ecosphere to find out how small code changes can make a world of difference on servers and network. This talk is an eye-opener for developers who spend over 80% of their time coding, debugging and testing.
This document provides an overview of the Python programming language. It discusses that Python is a popular, object-oriented scripting language that emphasizes code readability. The document summarizes key Python features such as rapid development, automatic memory management, object-oriented programming, and embedding/extending with C. It also outlines common uses of Python and when it may not be suitable.
The document discusses analyzing crashes using WinDbg. It provides tips on reconstructing crashed call stacks and investigating what thread or lock is causing a hang. The debugging commands discussed include !analyze, !locks, .cxr, kb to find the crashing function and stuck thread.
Python programming Workshop SITTTR - KalamasserySHAMJITH KM
This document provides an overview of Python programming. It begins with an introduction and outlines topics to be covered including what Python is, its features, basics of syntax, importing, input/output functions, and more. Various Python concepts and code examples are then presented throughout in areas such as data types, operators, decision making with if/else statements, loops (for and while), functions, and classes. Examples include calculating square roots, the volume of a cylinder, checking for prime numbers, and a multiplication table. The document serves as teaching material for a Python programming course.
The document provides best practices for handling performance issues in an Odoo deployment. It recommends gathering deployment information, such as hardware specs, number of machines, and integration with web services. It also suggests monitoring tools to analyze system performance and important log details like CPU time, memory limits, and request processing times. The document further discusses optimizing PostgreSQL settings, using tools like pg_activity, pg_stat_statements, and pgbadger to analyze database queries and performance. It emphasizes reproducing issues, profiling code with tools like the Odoo profiler, and fixing problems in an iterative process.
Similar to T-DOSE 2015: Using Python, PHP, JQuery and Linux to visualize the heartrate and blood oxygen saturation level of my stepdaughter (20)
Running your mainframe on linux (for fun and profit)Jeroen Baten
Yes, this talk is about running your own mainframe on your own hardware.
Mainframes are old, yes, but they are still very much alive.
New hardware is still being developed and there are a lot of fresh jobs
in this area too.
A lot of mainframes run COBOL workloads. COBOL is far from a dead language.
It processes an estimated 85% of all business transactions, and 5 billion lines of new COBOL code are written every year.
In this session the speaker will help you in take your first steps
towards running your own mainframe. If you like then after this session you can continue
to build your knowledge of mainframe systems using the links provided during the talk.
Come on in and learn the basics of a completely different computer system!
And it will take you less than an hour to do that!
A new document_workflow_for_the_governmentJeroen Baten
A talk about how the conbimation of blockchain with GPG can potentially change the world. Including a demo of a small proof of concept software program.
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
Skybuffer SAM4U tool for SAP license adoptionTatiana Kojar
Manage and optimize your license adoption and consumption with SAM4U, an SAP free customer software asset management tool.
SAM4U, an SAP complimentary software asset management tool for customers, delivers a detailed and well-structured overview of license inventory and usage with a user-friendly interface. We offer a hosted, cost-effective, and performance-optimized SAM4U setup in the Skybuffer Cloud environment. You retain ownership of the system and data, while we manage the ABAP 7.58 infrastructure, ensuring fixed Total Cost of Ownership (TCO) and exceptional services through the SAP Fiori interface.
Webinar: Designing a schema for a Data WarehouseFederico Razzoli
Are you new to data warehouses (DWH)? Do you need to check whether your data warehouse follows the best practices for a good design? In both cases, this webinar is for you.
A data warehouse is a central relational database that contains all measurements about a business or an organisation. This data comes from a variety of heterogeneous data sources, which includes databases of any type that back the applications used by the company, data files exported by some applications, or APIs provided by internal or external services.
But designing a data warehouse correctly is a hard task, which requires gathering information about the business processes that need to be analysed in the first place. These processes must be translated into so-called star schemas, which means, denormalised databases where each table represents a dimension or facts.
We will discuss these topics:
- How to gather information about a business;
- Understanding dictionaries and how to identify business entities;
- Dimensions and facts;
- Setting a table granularity;
- Types of facts;
- Types of dimensions;
- Snowflakes and how to avoid them;
- Expanding existing dimensions and facts.
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc
How does your privacy program stack up against your peers? What challenges are privacy teams tackling and prioritizing in 2024?
In the fifth annual Global Privacy Benchmarks Survey, we asked over 1,800 global privacy professionals and business executives to share their perspectives on the current state of privacy inside and outside of their organizations. This year’s report focused on emerging areas of importance for privacy and compliance professionals, including considerations and implications of Artificial Intelligence (AI) technologies, building brand trust, and different approaches for achieving higher privacy competence scores.
See how organizational priorities and strategic approaches to data security and privacy are evolving around the globe.
This webinar will review:
- The top 10 privacy insights from the fifth annual Global Privacy Benchmarks Survey
- The top challenges for privacy leaders, practitioners, and organizations in 2024
- Key themes to consider in developing and maintaining your privacy program
Project Management Semester Long Project - Acuityjpupo2018
Acuity is an innovative learning app designed to transform the way you engage with knowledge. Powered by AI technology, Acuity takes complex topics and distills them into concise, interactive summaries that are easy to read & understand. Whether you're exploring the depths of quantum mechanics or seeking insight into historical events, Acuity provides the key information you need without the burden of lengthy texts.
Your One-Stop Shop for Python Success: Top 10 US Python Development Providersakankshawande
Simplify your search for a reliable Python development partner! This list presents the top 10 trusted US providers offering comprehensive Python development services, ensuring your project's success from conception to completion.
Main news related to the CCS TSI 2023 (2023/1695)Jakub Marek
An English 🇬🇧 translation of a presentation to the speech I gave about the main changes brought by CCS TSI 2023 at the biggest Czech conference on Communications and signalling systems on Railways, which was held in Clarion Hotel Olomouc from 7th to 9th November 2023 (konferenceszt.cz). Attended by around 500 participants and 200 on-line followers.
The original Czech 🇨🇿 version of the presentation can be found here: https://www.slideshare.net/slideshow/hlavni-novinky-souvisejici-s-ccs-tsi-2023-2023-1695/269688092 .
The videorecording (in Czech) from the presentation is available here: https://youtu.be/WzjJWm4IyPk?si=SImb06tuXGb30BEH .
Introduction of Cybersecurity with OSS at Code Europe 2024Hiroshi SHIBATA
I develop the Ruby programming language, RubyGems, and Bundler, which are package managers for Ruby. Today, I will introduce how to enhance the security of your application using open-source software (OSS) examples from Ruby and RubyGems.
The first topic is CVE (Common Vulnerabilities and Exposures). I have published CVEs many times. But what exactly is a CVE? I'll provide a basic understanding of CVEs and explain how to detect and handle vulnerabilities in OSS.
Next, let's discuss package managers. Package managers play a critical role in the OSS ecosystem. I'll explain how to manage library dependencies in your application.
I'll share insights into how the Ruby and RubyGems core team works to keep our ecosystem safe. By the end of this talk, you'll have a better understanding of how to safeguard your code.
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxSitimaJohn
Ocean Lotus cyber threat actors represent a sophisticated, persistent, and politically motivated group that poses a significant risk to organizations and individuals in the Southeast Asian region. Their continuous evolution and adaptability underscore the need for robust cybersecurity measures and international cooperation to identify and mitigate the threats posed by such advanced persistent threat groups.
Generating privacy-protected synthetic data using Secludy and MilvusZilliz
During this demo, the founders of Secludy will demonstrate how their system utilizes Milvus to store and manipulate embeddings for generating privacy-protected synthetic data. Their approach not only maintains the confidentiality of the original data but also enhances the utility and scalability of LLMs under privacy constraints. Attendees, including machine learning engineers, data scientists, and data managers, will witness first-hand how Secludy's integration with Milvus empowers organizations to harness the power of LLMs securely and efficiently.
Driving Business Innovation: Latest Generative AI Advancements & Success StorySafe Software
Are you ready to revolutionize how you handle data? Join us for a webinar where we’ll bring you up to speed with the latest advancements in Generative AI technology and discover how leveraging FME with tools from giants like Google Gemini, Amazon, and Microsoft OpenAI can supercharge your workflow efficiency.
During the hour, we’ll take you through:
Guest Speaker Segment with Hannah Barrington: Dive into the world of dynamic real estate marketing with Hannah, the Marketing Manager at Workspace Group. Hear firsthand how their team generates engaging descriptions for thousands of office units by integrating diverse data sources—from PDF floorplans to web pages—using FME transformers, like OpenAIVisionConnector and AnthropicVisionConnector. This use case will show you how GenAI can streamline content creation for marketing across the board.
Ollama Use Case: Learn how Scenario Specialist Dmitri Bagh has utilized Ollama within FME to input data, create custom models, and enhance security protocols. This segment will include demos to illustrate the full capabilities of FME in AI-driven processes.
Custom AI Models: Discover how to leverage FME to build personalized AI models using your data. Whether it’s populating a model with local data for added security or integrating public AI tools, find out how FME facilitates a versatile and secure approach to AI.
We’ll wrap up with a live Q&A session where you can engage with our experts on your specific use cases, and learn more about optimizing your data workflows with AI.
This webinar is ideal for professionals seeking to harness the power of AI within their data management systems while ensuring high levels of customization and security. Whether you're a novice or an expert, gain actionable insights and strategies to elevate your data processes. Join us to see how FME and AI can revolutionize how you work with data!
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceIndexBug
Imagine a world where machines not only perform tasks but also learn, adapt, and make decisions. This is the promise of Artificial Intelligence (AI), a technology that's not just enhancing our lives but revolutionizing entire industries.
Programming Foundation Models with DSPy - Meetup SlidesZilliz
Prompting language models is hard, while programming language models is easy. In this talk, I will discuss the state-of-the-art framework DSPy for programming foundation models with its powerful optimizers and runtime constraint system.
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slackshyamraj55
Discover the seamless integration of RPA (Robotic Process Automation), COMPOSER, and APM with AWS IDP enhanced with Slack notifications. Explore how these technologies converge to streamline workflows, optimize performance, and ensure secure access, all while leveraging the power of AWS IDP and real-time communication via Slack notifications.
T-DOSE 2015: Using Python, PHP, JQuery and Linux to visualize the heartrate and blood oxygen saturation level of my stepdaughter
1. 1
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
Using Python, PHP, JQuery and Linux to
visualize the heartrate and blood oxygen
saturation level of my stepdaughter
Jeroen Baten
T-DOSE 2015
2. 2
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
TOC
Who am I
Who is Anouschka?
What happened
What I did
How it worked out
The end...
3. 3
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
Who am I?
●
Jeroen Baten
●
Open Source geek since 1997
●
Sofar 9 books and 2 columns
●
Job title : all-round IT problem fixer
●
(former) Volunteer Firefighter
●
Scouting
4. 4
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
Who am I ? (in pics)
5. 5
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
Who the f*ck is this Anouschka?
Name: Anouschka van G.
DOB: 18-1-1997
Current age: 18 years
Diagnosis:
Spina Bifida Aperta L3-L5
Arnold Chiari Malformation
Hydrocephalus
Number of surgeries till today: 43
Number of hospital sessions: stopped counting
6. 6
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
Hospital life….
7. 7
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
Some surgery examples
8. 8
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
The surgery session where our journey starts
Reason: chronic pain in hip joint
Cause: insufficient joint development
Post surgery:
Low oxygen levels during sleep
Questions:
Source/origin?
How severe?
How to fix?
9. 9
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
Actions taken by pediatrician at WKZ
Polysomnografy at AMC. This takes 24 hours.
Result: varying (85-90%) O2-levels at night.
Values found are in “grey” area.
Oxygen measures introduced at home.
Pediatrician: “If only we had more data….”
“But please not a huge table with data.”
10. 10
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
Oxygen concentrator + saturation measurement
Oxygen concentrator for producing O2:
Philips Everflo oxygen concentrator
No matter what people say: these
things are loud at night!
Saturation measurement for correct level
feedback + alarm:
Masimo RAD-8 saturation
measurement device.
And so we begin
But what is that I see on the back of the
Rad-8?
11. 11
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
RS-232!
That looks like….
No, it IS an RS-232 port!
Google….
Masimo-Rad-8-User-Manual.pdf
12. 12
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
Manual adventures
What does the manual say?
09/01/14 04:01:41 SN=0000051252 SPO2=092% BPM=086 PI=01.03%
SPCO=--.-% SPMET=--.-% DESAT=-- PIDELTA=+-- ALARM=0000 EXC=000800
What do we get….?
13. 13
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
Step 1: make database
Use simple database: MySQL
Make simple table:
CREATE TABLE `data` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tijd` datetime DEFAULT NULL,
`data` varchar(150) DEFAULT NULL,
`spo2` int(11) DEFAULT NULL,
`bpm` int(11) DEFAULT NULL,
`session` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`tijd3` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
KEY `id` (`id`),
KEY `session_index` (`session`),
KEY `tijd_index` (`tijd`),
KEY `spo2_index` (`spo2`)
)
14. 14
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
Step 2: python
#!/usr/bin/python
print "Loading libraries"
import serial, time, os
import logging
import logging.handlers
import MySQLdb
import datetime
version="1.0"
def log(msg):
print msg
my_logger.debug(os.path.basename(__file__)+":"+msg)
print "Initialising logging"
my_logger = logging.getLogger('MyLogger')
my_logger.setLevel(logging.DEBUG)
handler = logging.handlers.SysLogHandler(address = '/dev/log')
my_logger.addHandler(handler)
log("Log-RAD-8 version "+version)
log("Copyright 2014 J. Baten")
log("")
log("Logging serial data from Masimo RAD-8 serial port")
log("Note: Works only with RAD-8 serial port set to 'ASC1'")
log("")
#my_logger.debug('this is debug')
#my_logger.critical('this is critical')
log("Initialising database connection")
#setting up database connection
#create table data (id int auto_increment, tijd timestamp, data varchar(150), key(id) );
#+-------+--------------+------+-----+-------------------+-----------------------------+
#| Field | Type | Null | Key | Default | Extra |
#+-------+--------------+------+-----+-------------------+-----------------------------+
#| id | int(11) | NO | MUL | NULL | auto_increment |
#| tijd | timestamp | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
#| data | varchar(150) | YES | | NULL | |
#+-------+--------------+------+-----+-------------------+-----------------------------+
try:
conn = MySQLdb.connect(host= "10.1.1.1", user="lograd8", passwd="lograd8", db="lograd8")
except MySQLdb.Error, e:
log( "ERROR %d IN CONNECTION: %s" % (e.args[0], e.args[1]))
#except MySQLdb.Error:
#log("ERROR IN CONNECTION")
exit(2)
x = conn.cursor()
#x.execute("SELECT * FROM anooog1")
#x.execute (" INSERT INTO anooog1 VALUES ('%s','%s') ", (188,90))
#row = x.fetchall()
now = datetime.datetime.now()
#print now
log("Program started at "+str(now))
#today8am = now.replace(hour=8, minute=0, second=0, microsecond=0)
today = datetime.datetime.today()
#print today
one_day = datetime.timedelta(days=1)
tomorrow = today + one_day
#print 'Tomorrow :', tomorrow
endtime= tomorrow.replace(hour=8, minute=0, second=0, microsecond=0)
log("Logging should stop at "+ str(endtime))
#initialization and open the port
#possible timeout values:
# 1. None: wait forever, block call
# 2. 0: non-blocking mode, return immediately
# 3. x, x is bigger than 0, float allowed, timeout block call
log( "Initializing port")
ser = serial.Serial()
#ser.port = "/dev/ttyUSB0"
ser.port = "/dev/ttyS0"
#ser.port = "/dev/ttyS2"
ser.baudrate = 9600
ser.bytesize = serial.EIGHTBITS #number of bits per bytes
ser.parity = serial.PARITY_NONE #set parity check: no parity
ser.stopbits = serial.STOPBITS_ONE #number of stop bits
#ser.timeout = None #block read
ser.timeout = 1 #non-block read
#ser.timeout = 2 #timeout block read
ser.xonxoff = False #disable software flow control
ser.rtscts = False #disable hardware (RTS/CTS) flow control
ser.dsrdtr = False #disable hardware (DSR/DTR) flow control
ser.writeTimeout = 2 #timeout for write
try:
log( "Trying to open serial port")
ser.open()
except Exception, e:
log( "error open serial port: " + str(e))
exit(1)
if ser.isOpen():
log( "Port succesfully opened")
try:
log( "Flushing port data")
ser.flushInput() #flush input buffer, discarding all its contents
ser.flushOutput()#flush output buffer, aborting current output
#and discard all that is in buffer
#write data
#ser.write("AT+CSQ")
#time.sleep(0.5) #give the serial port sometime to receive the data
while True:
response = ser.readline()
print response
response = MySQLdb.escape_string(response)
print(response)
if (len(response)>5):
try:
x.execute ("INSERT INTO data (tijd,data) VALUES (now(),%s) ", response)
conn.commit()
except MySQLdb.Error, e:
log( "ERROR %d IN CONNECTION: %s" % (e.args[0], e.args[1]))
log( "Last query was: "+ x._last_executed )
# Is it time to stop yet?
#endtime= now+ datetime.timedelta(seconds=5)
now = datetime.datetime.now()
if (now > endtime):
break
ser.close()
except Exception, e1:
log( "error communicating...: " + str(e1))
else:
log( "cannot open serial port ")
conn.close()
15. 15
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
Step 3:
What do we have?
MySQL [(none)]> use lograd8
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MySQL [lograd8]> show tables;
+-------------------+
| Tables_in_lograd8 |
+-------------------+
| data |
+-------------------+
1 row in set (0.00 sec)
MySQL [lograd8]> select count(*) from data;
+----------+
| count(*) |
+----------+
| 717298 |
+----------+
1 row in set (0.68 sec)
MySQL [lograd8]>
select * from data limit 5;
+----+---------------------+-----------------------------------------------------------------------------------------------------------------------------------+------+------+---------------------+---------------------+
| id | tijd | data | spo2 | bpm | session | tijd3 |
+----+---------------------+-----------------------------------------------------------------------------------------------------------------------------------+------+------+---------------------+---------------------+
| 9 | 2014-09-02 15:00:18 | 00/00/00 00:00:03 SN=0000051252 SPO2=---% BPM=--- PI=--.--% SPCO=--.-% SPMET=--.-% DESAT=-- PIDELTA=+-- ALARM=0000 EXC=000000rn | 0 | 0 | 2014-09-02 03:00:18 | 0000-00-00 00:00:00 |
| 10 | 2014-09-02 15:00:19 | 09/02/14 04:58:09 SN=0000051252 SPO2=---% BPM=--- PI=--.--% SPCO=--.-% SPMET=--.-% DESAT=-- PIDELTA=+-- ALARM=0000 EXC=000000rn | 0 | 0 | 2014-09-02 03:00:19 | 0000-00-00 00:00:00 |
| 11 | 2014-09-02 15:00:20 | 09/02/14 04:58:10 SN=0000051252 SPO2=---% BPM=--- PI=--.--% SPCO=--.-% SPMET=--.-% DESAT=-- PIDELTA=+-- ALARM=0000 EXC=000000rn | 0 | 0 | 2014-09-02 03:00:20 | 0000-00-00 00:00:00 |
| 12 | 2014-09-02 15:00:21 | 09/02/14 04:58:11 SN=0000051252 SPO2=---% BPM=--- PI=--.--% SPCO=--.-% SPMET=--.-% DESAT=-- PIDELTA=+-- ALARM=0000 EXC=000000rn | 0 | 0 | 2014-09-02 03:00:21 | 0000-00-00 00:00:00 |
| 13 | 2014-09-02 15:00:22 | 09/02/14 04:58:12 SN=0000051252 SPO2=---% BPM=--- PI=--.--% SPCO=--.-% SPMET=--.-% DESAT=-- PIDELTA=+-- ALARM=0000 EXC=000000rn | 0 | 0 | 2014-09-02 03:00:22 | 0000-00-00 00:00:00 |
+----+---------------------+-----------------------------------------------------------------------------------------------------------------------------------+------+------+---------------------+---------------------+
5 rows in set (0.02 sec)
MySQL [lograd8]>
MySQL [lograd8]> select count(*),date_format(session,"%d/%m/%Y") from data group
by date(session);
+----------+---------------------------------+
| count(*) | date_format(session,"%d/%m/%Y") |
+----------+---------------------------------+
| 181711 | 00/00/0000 |
| 11200 | 02/09/2014 |
| 36399 | 03/09/2014 |
| 34166 | 04/09/2014 |
| 42495 | 05/09/2014 |
| 38313 | 09/09/2014 |
| 37392 | 10/09/2014 |
| 37279 | 11/09/2014 |
| 35972 | 12/09/2014 |
| 35467 | 13/09/2014 |
| 35761 | 14/09/2014 |
| 34845 | 15/09/2014 |
| 36510 | 16/09/2014 |
| 38400 | 17/09/2014 |
| 37797 | 18/09/2014 |
| 23 | 23/09/2014 |
| 43568 | 26/09/2014 |
+----------+---------------------------------+
17 rows in set (0.65 sec)
MySQL [lograd8]>
16. 16
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
Step 4: turn raw data into usefull data
Need to get BPM and O2 from string.
And fix the date!
update data set spo2=substring(data,38,3);
update data set bpm=substring(data,47,3);
update data set session=DATE_SUB(tijd, INTERVAL 12 HOUR);
17. 17
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
Step 4: visualize quick and dirty => PHP!
Use PHP and Jquery (for date selection)
Find easy PHP visualisation lib...
JpGraph?
No longer leading.
Google Charts javascript lib can't be wrong right?
Wrong!
DyGraph! Send it CSV formatted data. Done!
Including zoom functionality. Yay!
18. 18
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
The result
First results...
19. 19
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
Results: DyGraph to the rescue
Working with small range averages
20. 20
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
Results: graphing ALL data...
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Saturatie weergave</title>
<link rel="stylesheet" href="jquery/jquery-ui.min.css">
<link rel="stylesheet" href="get-sat.css">
<script type="text/javascript" src="dygraph-combined.js"></script>
</head>
<body>
<div class="box" id="spo2_div" style="width:95%">
<h3>SPO2</h3>
</div>
<div class="box" id="bpm_div" style="width:95%">
<h3>SPO2</h3>
</div>
<script>
<!-- console.log(startdate); -->
g = new Dygraph(
document.getElementById("spo2_div"),
"get-data3spo.php", // path to CSV file
{ // rollPeriod: 7,
legend: 'always',
animatedZooms: true,
showRoller: true
//errorBars: true,
//valueRange: [40,100]} // options
}
);
g = new Dygraph(
document.getElementById("bpm_div"),
"get-data3bpm.php", // path to CSV file
{ // rollPeriod: 7,
legend: 'always',
animatedZooms: true,
showRoller: true
//errorBars: true,
//valueRange: [40,100]} // options
}
);
</script>
</body>
</html>
<?php
ini_set("error_reporting",E_ALL);
syslog(LOG_DEBUG,"Start get-data.php");
# set db connection parameters
$dbhost="10.1.1.1";
#$dbhost="127.0.0.1";
$dblogin="lograd8";
$dbpwd="secret";
$dbname="lograd8";
$db = mysql_connect($dbhost,$dblogin,$dbpwd);
mysql_select_db($dbname);
$rows = "DatumTijd,gem_SPO2,spreiding_SPO2,max_SPO2,min_SPO2n";
#$startdate = $_POST['startdate'];
$former=0;
$query = "select date_format(tijd,'%Y/%m/%d %H:00') as datum, avg(spo2)
as gem_spo2, std(spo2) as spreiding_spo2, max(spo2) as max_spo2,
min(spo2) as min_spo2 from data group by date_format(session,'%d/%m/%Y
%H');";
# +---------------+----------+----------------+----------+----------+
# | datum_uur | gem_spo2 | spreiding_spo2 | max_spo2 | min_spo2 |
# +---------------+----------+----------+----------------+----------+
syslog(LOG_DEBUG,"$query");
$result = mysql_query($query);
while($r = mysql_fetch_array($result)){
#syslog(LOG_DEBUG,print_r($r,TRUE));
$rij="";
# vervangen min=0 door min=avg bij spo2 en bpm
if ($r[4]==0) $r[4]=$r[1];
for ($i=0;$i<=4;$i++) {
$rij = $rij.$r[$i].",";
}
$rij=substr($rij,0,strlen($rij)-1);
$rows = $rows.$rij."n";
}
#syslog(LOG_DEBUG,print_r($rows,TRUE));
#syslog(LOG_DEBUG,print_r($rows,TRUE));
#echo $cols . '"rows":[',$google_JSON_row ."]}";
# output off json string to caller.
echo $rows;
# saving of cvs string for debugging purposes
#$fh=fopen("/tmp/get-data.cvs","w");
#fwrite($fh,$rows);
#fclose($fh);
mysql_close($db);
syslog(LOG_DEBUG,"Einde get-data.phpnn");
?>
<?php
ini_set("error_reporting",E_ALL);
syslog(LOG_DEBUG,"Start get-data.php");
# set db connection parameters
$dbhost="10.1.1.1";
#$dbhost="127.0.0.1";
$dblogin="lograd8";
$dbpwd="secret";
$dbname="lograd8";
$db = mysql_connect($dbhost,$dblogin,$dbpwd);
mysql_select_db($dbname);
$rows = "DatumTijd,gem_BPM,spreiding_BPM,max_BPM,min_BPMn";
$former=0;
$query = "select date_format(tijd,'%Y/%m/%d %H:00') as datum, avg(bpm)
as gem_bpm, std(bpm) as spreiding_bpm, max(bpm) as max_bpm, min(bpm)
as min_bpm from data group by date_format(session,'%d/%m/%Y %H');";
# +---------------+----------+---------------+---------+---------+
# | datum_uur | gem_bpm | spreiding_bpm | max_bpm | min_bpm |
# +---------------+----------+---------------+---------+---------+
syslog(LOG_DEBUG,"$query");
$result = mysql_query($query);
while($r = mysql_fetch_array($result)){
#syslog(LOG_DEBUG,print_r($r,TRUE));
#syslog(LOG_DEBUG,print_r($tijd,TRUE));
$rij="";
# replace min=0 by min=avg for spo2 and bpm
if ($r[4]==0) $r[4]=$r[1];
for ($i=0;$i<=4;$i++) {
$rij = $rij.$r[$i].",";
}
$rij=substr($rij,0,strlen($rij)-1);
$rows = $rows.$rij."n";
}
#syslog(LOG_DEBUG,print_r($rows,TRUE));
#syslog(LOG_DEBUG,print_r($rows,TRUE));
#echo $cols . '"rows":[',$google_JSON_row ."]}";
# output off json string to caller.
echo $rows;
# saving of cvs string for debugging purposes
#$fh=fopen("/tmp/get-data2.cvs","w");
#fwrite($fh,$rows);
#fclose($fh);
mysql_close($db);
syslog(LOG_DEBUG,"Einde get-data.phpnn");
?>
Index.php
oxygen.php bpm.php
21. 21
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
New result
Can you see the problem?
22. 22
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
New result
Let me show you...
23. 23
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
Findings
Medical:
When not connected to O2 during the night the minimum
rates will continue to drop during several days.
Ergo: O2 always needed.
Techical:
Next time make a stored procedure and a trigger to update
records upon creation.
24. 24
Using Python, PHP, JQuery and Linux to visualize oxygen saturation levels
Anouschka thanks you …
Thanks for your attention.
Any questions?