This document provides an overview of how to write packages for Sublime Text 2 using Python. It discusses where to place package files, how to create commands, bindings, menus and event listeners. It also covers manipulating selections, settings, quick panels and sharing packages through Sublime Package Control. The goal is to introduce developers to the plugin API and provide examples to get started writing plugins.
JQuery became more and more polular over the years. Luckily this was somehow forseen by the inventors and they introduces a set of guidelines how plugins are to be developed in terms of encapsulation, behavior to the framework, et al. These guidelines are reflected in the 'golden rules of plugin development'.
This presentation is all about them.
This is a step by step tutorial for jQuery plugin development. This tutorial will help any guys to develop jQuery plugin, with good knowledge in code jQuery.
A lot of people using PHPunit for testing their source code. While I was observing my team I recognized most of them are only using the standard assertions like 'assertEquals()' and are complaining about how hard it is to test the code even when the tests are written first. This talk is about all the stuff not used on a daily basis and it digs deep into uncommon features of PHPUnit.
JQuery became more and more polular over the years. Luckily this was somehow forseen by the inventors and they introduces a set of guidelines how plugins are to be developed in terms of encapsulation, behavior to the framework, et al. These guidelines are reflected in the 'golden rules of plugin development'.
This presentation is all about them.
This is a step by step tutorial for jQuery plugin development. This tutorial will help any guys to develop jQuery plugin, with good knowledge in code jQuery.
A lot of people using PHPunit for testing their source code. While I was observing my team I recognized most of them are only using the standard assertions like 'assertEquals()' and are complaining about how hard it is to test the code even when the tests are written first. This talk is about all the stuff not used on a daily basis and it digs deep into uncommon features of PHPUnit.
CakePHP 3 comes with a new ORM. This talk starts with a short history of how this library came to be and then walk through a series of examples from beginner to advanced for using the Querying features of the ORM.
QNlocal: Docker, Continuous Integration, WordPress e milioni di visite. Si è ...alessandro mazzoli
QNlocal: Docker, Continuous Integration, WordPress e milioni di visite. Si è possibile!
Uno stagionato stack LAMP come WordPress mixato all’avvento del Cloud Computing e di Docker ha permesso di ottenere un cocktail dalle massime prestazioni, massima facilità di manutenzione e massima scalabilità ed ottimizzazione dei costi, senza rinunciare ad un comodo ambiente di sviluppo locale. Sull’esigenza di poter avere un unica piattaforma capace di ospitare tante testate giornalistiche locali è nato QNlocal: Un sistema editoriale con un codice unico (WordPress + tema sviluppato ad Hoc) che gira in un container, orchestrato dal progetto Praxis di Convox su AWS. Parleremo del setup che permette di creare base dati, distribuzioni cloudfront e S3 buckets per gli asset statici e per il backup. Il tutto con un paio di comandi.
Un sistema di continuous integration che permette un ciclo di testing e sviluppo.
Verranno illustrati gli aspetti tecnici, quelli di automazione, di manutenzione e di setup di una testata locale. Verrà inoltre mostrata l’evoluzione della piattaforma che si sta attuando basata sull’esperienza acquisita dopo un anno dalla messa in produzione.
Improve Yield Accounting by including Density Measurements ExplicitlyAlkis Vazacopoulos
Today the growing standard in oil-refining yield accounting is to use statistical data reconciliation to assist in detecting and diagnosing malfunctioning flow and inventory meters and possible mis-specified oil movements. However, as we demonstrate in this article, potentially harmful and undetectable gross-errors can occur which may distort the yield accounting results and the overall health of the production balance. The solution is to reconcile both mass and volume simultaneously instead of reconciling mass or volume separately as is currently done. It is made possible by explicitly including density measurements into the reconciliation process and solving a bi-linear data reconciliation problem using off-the-shelf commercial software.
CakePHP 3 comes with a new ORM. This talk starts with a short history of how this library came to be and then walk through a series of examples from beginner to advanced for using the Querying features of the ORM.
QNlocal: Docker, Continuous Integration, WordPress e milioni di visite. Si è ...alessandro mazzoli
QNlocal: Docker, Continuous Integration, WordPress e milioni di visite. Si è possibile!
Uno stagionato stack LAMP come WordPress mixato all’avvento del Cloud Computing e di Docker ha permesso di ottenere un cocktail dalle massime prestazioni, massima facilità di manutenzione e massima scalabilità ed ottimizzazione dei costi, senza rinunciare ad un comodo ambiente di sviluppo locale. Sull’esigenza di poter avere un unica piattaforma capace di ospitare tante testate giornalistiche locali è nato QNlocal: Un sistema editoriale con un codice unico (WordPress + tema sviluppato ad Hoc) che gira in un container, orchestrato dal progetto Praxis di Convox su AWS. Parleremo del setup che permette di creare base dati, distribuzioni cloudfront e S3 buckets per gli asset statici e per il backup. Il tutto con un paio di comandi.
Un sistema di continuous integration che permette un ciclo di testing e sviluppo.
Verranno illustrati gli aspetti tecnici, quelli di automazione, di manutenzione e di setup di una testata locale. Verrà inoltre mostrata l’evoluzione della piattaforma che si sta attuando basata sull’esperienza acquisita dopo un anno dalla messa in produzione.
Improve Yield Accounting by including Density Measurements ExplicitlyAlkis Vazacopoulos
Today the growing standard in oil-refining yield accounting is to use statistical data reconciliation to assist in detecting and diagnosing malfunctioning flow and inventory meters and possible mis-specified oil movements. However, as we demonstrate in this article, potentially harmful and undetectable gross-errors can occur which may distort the yield accounting results and the overall health of the production balance. The solution is to reconcile both mass and volume simultaneously instead of reconciling mass or volume separately as is currently done. It is made possible by explicitly including density measurements into the reconciliation process and solving a bi-linear data reconciliation problem using off-the-shelf commercial software.
The IMPL console executable (IMPL.exe) can be called from any DOS command prompt window where its Intel Fortran source code can be found in Appendix A. The IMPL console is useful given that it allows you to model and solve problems configured in an IML (Industrial Modeling Language) file. Problems coded using IPL (Industrial Programming Language) in many computer programming languages can use the IMPL console source code as a prototype.
The IMPL console reads several input files and writes several output files which are described in this document. There are several console flags that can be specified as command line arguments and are described below.
Stock Decomposition Heuristic for Scheduling: A Priority Dispatch Rule ApproachAlkis Vazacopoulos
Highlighted in this article is a closed-shop scheduling heuristic which makes use of the traditional priority dispatch rule approach found in open-shop scheduling such as job-shop scheduling. Instead of prioritizing and scheduling one job or project (or stock-order) at a time, we schedule one stock or stock-group at a time where a stock-group is a collection of individual stocks and their one or more stock-orders. These stocks can be feed-stocks, intermediate-stocks or product-stocks of which we focus on product-stocks given that most production is demand-driven. A key feature of this heuristic is our ability to compress the production network or superstructure so that only those unit-operations necessary to produce the stocks in question are included in the model thus reducing the size of the problem considerably at each iteration of the heuristic. The stock-specific network compression technique uses what we call a unit-capacity transshipment linear program to successively determine which unit-operations are redundant when making a particular stock. This heuristic is also particularly useful for those process industries that can potentially produce many product-stocks but only a fraction of these are produced within the scheduling horizon whereby the model is significantly reduced at solve time to include only those stocks that are demanded whereby redundant unit-operations are removed. An illustrative example is provided with recycle loops (i.e., stock flow-reversals) and shared units or equipment (i.e., unit flow-reversals) that demonstrates the effectiveness and efficiency of the technique.
Von Entwicklern zu tiefst verachtet und in vielen Situationen dennoch heiß geliebt, ist eine ausführliche Dokumentation des Quellcodes. Grade, wenn es um die Anpassung und/oder Erweiterung von legacy Code geht, wird der Ruf nach Dokumentation laut.
PhpDocumentor ist eines von vielen Tools, die uns Entwicklern das dokumentatorische Leben etwas leichter machen können. Es scannt den Quellcode nach Annotationen, Vererbungen, etc. und generiert strukturierte Dokumentationen daraus.
Dieser Vortrag stellt PhpDocumentor im Detail vor und geht nicht nur auf die zahlreichen Möglichkeiten dieses Tools ein, sondern zeigt detailliert anhand von Beispielen, wie diese optimal eingesetzt werden können.
Reproducible Computational Research in RSamuel Bosch
A short presentation with pointers on getting started with reproducible computational research in R. Some of the topics include git, R package development, document generation with R markdown, saving plots, saving tables and using packrat.
Python offers several tool and public services that simplify starting and maintaining an open source project. This presentation show cases some of the most helpful one and explains the process, beginning with an empty folder and finishing with a published PyPI package.
Git the Docs: Learning Git in a safe spaceBecky Todd
Git workshop given at Write the Docs ATX. Covers the basic workflow, including clone, add, branch, commit, push, and how to manage pull requests in Bitbucket.
Similar to [PyConTW 2013] Write Sublime Text 2 Packages with Python (20)
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
2. About 梁睿珊 / Jenny /
jsliang
http://github.com/jsliang
2006~2012
Student (undergraduate & graduate) @
NCTU CS
2012~present
Software Engineer @ IBM Taiwan
Joined Python user community since PyHUG
Feb meeting, 2012
3. Why I like Sublime Text 2?
http://www.sublimetext.com/ - the home page
shows you why.
1. Fuzzy match of...
a. Goto Anything (Ctrl + P)
b. Command Palette (Ctrl + Shift + P)
2. Multiple Selections/Edits
3. Cross Platform (OSX, Windows & Linux)
4. Python-style regular expression
5. Python Plugin API
I'll use "ST2" for "Sublime Text 2" from now on.
4. Where do you place your
packages?
● Menu bar > Preferences > Browse
Packages...
● On package per folder
○ Packages/
■ MyPackage/
● *.py
○ Commands or EventListeners
● *.sublime-macro
● *.sublime-menu
● *.sublime-keymap
● *.sublime-snippet
● ...
Tip: check out files under Packages/Default/
5. Hello World - Your 1st
Command
Menu bar > Tools > New Plugin...
import sublime, sublime_plugin
class ExampleCommand(sublime_plugin.TextCommand):
def run(self, edit):
self.view.insert(edit, 0, "Hello, World!")
Save to: Packages/HelloWorld/HelloWorld.py
6. Hello World - Executing
Command
1. Restart ST2
2. Start Sublime Console by pressing Ctrl + `
3. Type in console:
○ view.run_command('example')
4. A "Hello World" string is inserted to the
beginning of the view
7. Command Naming Rules
Each command is a subclass of sublime_plugin.
*Command. When naming, use CamelCase +
"Command".
class HelloWorldCommand
(sublime_plugin.TextCommand):
...
To use the command, use underscore_notation:
view.run_command('hello_world')
8. Types of Commands
1. Class sublime_plugin.ApplicationCommand
○ run(<args>)
○ institiated when ST2 is launched
2. Class sublime_plugin.WindowCommand
○ run(<args>)
○ instantiated once per window
○ self.window
3. Class sublime_plugin.TextCommand
○ run(edit, <args>)
○ instantiated once per view
○ self.view
Hierarchy: Application > Window > Text
9. Make Your Command more
Accessible (*.sublime-commands)
[
{ "caption": "AutoJump: Open a File in a Visited Folder",
"command": "autojump_traverse_visited_folder" }
,{ "caption": "AutoJump: Open a Recent File",
"command": "autojump_open_recent_file" }
]
11. Key Binding on different
OS
Default.sublime-keymap
Default (Linux).sublime-keymap
Default (OSX).sublime-keymap
Default (Windows).sublime-keymap
12. Menu Entries
● Main.sublime-menu
○ Main program menu
● Context.sublime-menu
○ Context menu (right clicking on a file)
● Side Bar.sublime-menu
○ Side bar menu (right clicking on a file/folder in
sidebar)
Each menu is a list of dicts, and each dict
describes a command or separator.
15. Add Command to Menu
Entries
Follow the structure in Packages/Default/*.sublime-menu
and insert your entry to your desired place. Save as Main.
sublime-menu under package folder.
[{
"id": "edit", "children": [
{"id": "mark"},
{
"command": "hello_world",
"mnemonic": "h",
"caption": "Hello below Mark"
}
]
}]
16. Event Listener
Each event listener is a subclass of
sublime_plugin.EventListener.
import sublime, sublime_plugin
class ViewClose(sublime_plugin.
EventListener):
def on_close(self, view):
sublime.message_dialog("View closed.")
23. Manipulating Selections /
Regions
sel_regionset = view.sel()
# sel_regionset is a RegionSet object
visible_region = view.
visible_region()
# visible_region is a Region object
substr() / erase() / replace() / line() /
split_by_newlines() / word() / show() /
show_at_center() / ...
24. Example Plugins
● Packages/Default/delete_word.py
○ Deletes a word to the left or right of the cursor
● Packages/Default/duplicate_line.py
○ Duplicates the current line
● Packages/Default/goto_line.py
○ Prompts the user for input, then updates the
selection
● Packages/Default/font.py
○ Shows how to work with settings
● Packages/Default/mark.py
○ Uses add_regions() to add an icon to the gutter
● Packages/Default/trim_trailing_whitespace.py
○ Modifies a buffer just before its saved
25. How to share my ST2
packages?
1. Compress your package folder to a file and
let other people download it
○ do not forget to add a README telling users the
extracting destination
2. Similar to 1, put your package on
GitHub/Gitorious so that others can clone it.
3. If you think the above methods are too
geekish...
You must try Will Bond's Sublime Package
Control
27. Sublime Package Control
by wbond (2/2)
http://wbond.
net/sublime_packages/package_control
● a ST2 package that manages your installed
ST2 packages
● search for and install ST2 packages
○ http://wbond.net/sublime_packages/community
○ http://wbond.
net/sublime_packages/package_control/usage
● If you want your ST2 package to be found by
Sublime Package Control...
○ http://wbond.
net/sublime_packages/package_control/package_de