If you have the latest sublime text (version 4), you can just do:
subl --safe-mode
# -*- encoding: utf-8 -*- | |
import sublime | |
import sublime_plugin | |
class MinimapSetting(sublime_plugin.EventListener): | |
def on_activated(self, view): | |
show_minimap = view.settings().get('show_minimap') | |
if show_minimap: |
with(LinearAlgebra) | |
a := <vector A> | |
b := <vector B> | |
solve(Equate(a, b)) |
I hereby claim:
To claim this, I am signing this object:
# We are going to use an analogy of building houses to understand OOP. | |
# A class is like the plan/design of the house. It's the theory, nothing concrete. | |
# Our house has different properties (such as the colour, the number of doors, etc), these are called attributes. | |
# Our house has different behaviours (such as starting the alarm, locking every doors, etc), these are called methods. | |
# An instance, however, is the real thing. From one plan, one design, one *class*, we can make as many actual houses as we like | |
# And we can change them. For example, one house (an instance), might have 2 doors, where as an other one might have 4 doors. | |
# But they still have the same plan |
This gist simply lists some of the PEP8 conventions.
What is that? Simply some "rules" that you're not obliged to respect, but improves the visual quality of your python code. Because:
Readability counts.
So, let's get started.
#! /usr/bin/sh | |
trap 'exit' SIGINT | |
for i in `seq 254`; do | |
(ping 192.168.1.$i -c 1 -w 1 > /dev/null && echo 192.168.1.$i)& | |
done | |
wait |
You can build a client in Python if you feel like it, but you might as well just use telnet
:
$ telnet localhost 9877