"options": {
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css"
],
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js"
]
}
# example.py
@profile
def my_func():
a = [1] * (10 ** 6)
b = [2] * (2 * 10 ** 7)
del b
return a
if __name__ == '__main__':
my_func()
$ python -m memory_profiler example.py
# output:
Line # Mem usage Increment Line Contents
==============================================
3 @profile
4 5.97 MB 0.00 MB def my_func():
5 13.61 MB 7.64 MB a = [1] * (10 ** 6)
6 166.20 MB 152.59 MB b = [2] * (2 * 10 ** 7)
7 13.61 MB -152.59 MB del b
8 13.61 MB 0.00 MB return a
$('form').bind('submit', function(e){
e.preventDefault();
form = $(this);
$.ajax({
url: handler.php,
data: form.serialize(),
type: "post",
success: function (data) {
},
error: function () {}
});
});
if($name == 'value'){
header("location:page.php");
} else {
echo "Your text";
}
$(window).keydown(function(event) {
if (event.keyCode == 75) {
alert("K pressed");
}
});