This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.syncron.spark.idi.gateway.awsxray; | |
import com.amazonaws.xray.AWSXRay; | |
import com.amazonaws.xray.AWSXRayRecorder; | |
import com.amazonaws.xray.entities.Segment; | |
import com.amazonaws.xray.entities.TraceHeader; | |
import com.amazonaws.xray.entities.TraceID; | |
import com.amazonaws.xray.strategy.sampling.SamplingRequest; | |
import com.amazonaws.xray.strategy.sampling.SamplingResponse; | |
import com.amazonaws.xray.strategy.sampling.SamplingStrategy; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<title>Hack with JSON</title> | |
<body> | |
<p>Here is some text...</p> | |
<script type="application/json"> | |
{"value": "you are </script><script>alert('hacked!');"} | |
</script> | |
</body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alert("OK"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PropertyMeta(type): | |
def __new__(metaclass, name, bases, body): | |
if bases == (object,): | |
return super(PropertyMeta, metaclass).__new__(metaclass, name, bases, body) | |
return property(**{k.strip("__"): v for k, v in body.iteritems() if k in ("fget", "fset", "fdel", "__doc__")}) | |
class xproperty(object): | |
__metaclass__ = PropertyMeta |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To view the profile install pyprof2calltree & kcachegrind or runsnakerun, etc. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import with_statement | |
from xmlrpclib import ServerProxy | |
import sys | |
USER = "" | |
PASS = "" | |
def get_number(prompt): | |
while True: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import abc | |
import collections | |
import copy | |
class DField(metaclass=abc.ABCMeta): | |
@abc.abstractmethod | |
def contribute_to_class(self, name, klass): | |
pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gc | |
gc.set_debug(gc.DEBUG_UNCOLLECTABLE | gc.DEBUG_STATS) | |
class CallbackTest (object): | |
def __init__(self): | |
self.my_callback = lambda :None | |
def signal(self): | |
self.my_callback() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import time | |
import queue | |
import locale | |
import os.path | |
import urllib.parse | |
import netutils | |
import textprogressbar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Klasa A, ktora jest podklasa Object i nie ma zmiennych obiektowych, ma | |
metody obiektowe (notacja K>>m oznacza metode m w klasie K):" | |
A>>d | |
^ B new j: [:k | self] | |
A>>e: k | |
^ k | |
A>>e: k f: m |
NewerOlder