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
[3.315706968307495, 3.330582857131958, 3.3374509811401367] | |
Timer unit: 1e-06 s | |
File: [..]/flask_restless/helpers.py | |
Function: to_dict at line 237 | |
Total time: 6.60634 s | |
Line # Hits Time Per Hit % Time Line Contents | |
============================================================== | |
237 def to_dict(instance, deep=None, exclude=None, include=None, |
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
[6.848185062408447, 6.854957103729248, 6.840436935424805] | |
Timer unit: 1e-06 s | |
File: [..]/flask_restless/helpers.py | |
Function: to_dict at line 237 | |
Total time: 11.6519 s | |
Line # Hits Time Per Hit % Time Line Contents | |
============================================================== | |
237 def to_dict(instance, deep=None, exclude=None, include=None, |
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
from flask import Flask | |
from flask.ext.sqlalchemy import SQLAlchemy | |
from flask.ext.restless.helpers import to_dict | |
from sqlalchemy.ext.hybrid import hybrid_property | |
import line_profiler | |
profile = line_profiler.LineProfiler() | |
profile.add_function(to_dict) | |
app = Flask(__name__) |
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
# python | |
Python 2.7.5 (default, Feb 19 2014, 13:47:28) | |
[GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> f = open('nvidia_drv.so', 'r+b') # version 330.4Xsomething... | |
>>> f.seek(0xb3e87) | |
>>> f.read(1) | |
'\x85' | |
>>> f.seek(0xb3e87) | |
>>> f.write('\x84') |
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
#!/bin/dash | |
### | |
# ABOUT : collectd monitoring script for smartmontools (using smartctl) | |
# AUTHOR : Samuel B. <samuel_._behan_(at)_dob_._sk> (c) 2012 | |
# LICENSE: GNU GPL v3 | |
# SOURCE: http://devel.dob.sk/collectd-scripts/ | |
# | |
# This script monitors SMART pre-fail attributes of disk drives using smartmon tools. | |
# Generates output suitable for Exec plugin of collectd. | |
### |
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
# | |
# Copyright (c) 2011-2013 by w8rabbit (w8rabbit[at]mail[dot]i2p) | |
# or from outside i2p: w8rabbit[at]i2pmail[dot]org | |
# | |
# Script is under GPL3. | |
# | |
# Script is inspired by NullPointerException's xchat script | |
# | |
# thanks to darrob for hard beta-testing | |
# |
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
[Service] | |
ExecStartPre=-/usr/bin/docker rm psql-tmpfs | |
ExecStart=/usr/bin/docker run --rm --shm-size=2g --name psql-tmpfs -p 127.0.0.1:5434:5432 -t andir/postgresql-tmpfs | |
ExecStartPost=/bin/sleep 15 | |
ExecStop=/usr/bin/docker stop psql-tmpfs |
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 os.path | |
from ics import Calendar, Event | |
import subprocess | |
import json | |
def read_tasks(): | |
output = subprocess.check_output(['task', 'export']) | |
for task in json.loads(output.decode('utf-8')): | |
if task['status'] == 'completed': |
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
[NetDev] | |
Name=vrf-customer1 | |
Kind=vrf | |
[VRF] | |
TableId=42 |
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
[Match] | |
Name=enp0s31f6 | |
[Network] | |
Address=192.168.0.1/24 | |
VRF=vrf-customer1 |
OlderNewer