Languages
10,444 gist results
10,444 gist results
This file contains 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
diff --git a/astropy/tests/pytest_plugins.py b/astropy/tests/pytest_plugins.py | |
index 34aa6bd..e4841f9 100644 | |
--- a/astropy/tests/pytest_plugins.py | |
+++ b/astropy/tests/pytest_plugins.py | |
@@ -401,33 +401,18 @@ SUPPORTS_OPEN_FILE_DETECTION = ( | |
def _get_open_file_list(): | |
- fsencoding = sys.getfilesystemencoding() | |
- |
This file contains 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
cykooz@cykooz-nb:~/Work/backend$ ./bin/python | |
Python 3.6.2 (default, Jul 20 2017, 08:43:29) | |
[GCC 5.4.1 20170519] on linux | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> | |
>>> from raven.base import DummyClient | |
>>> import psutil | |
>>> | |
>>> client = DummyClient() | |
>>> client.is_enabled = lambda: True |
This file contains 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 psutil | |
p1 = psutil.Process(1) | |
p1_dict = p1.as_dict() | |
print p1_dict["name"] | |
print p1_dict["exe"] | |
print p1_dict["cmdline"] |
This file contains 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
func monitor() { | |
for { | |
dockstat, err := docker.GetDockerStat() | |
if err != nil { | |
log.Println("err:", err) | |
} else { | |
log.Printf("=> docker: %+v\n", dockstat) | |
} |
This file contains 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
# Memory Tracker | |
import psutil | |
import pandas as pd | |
import pendulum | |
import sqlite3 | |
import time | |
conn = sqlite3.connect('mem_usage.db') | |
while 1==1: |
This file contains 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
#-*- coding: utf-8 -*- | |
#python2.7x | |
#author: orangleliu@gmail.com 2014-12-12 | |
#psutiltest.py | |
''' | |
照着教程简单学习下psutil的使用,windows下试试 | |
''' | |
import psutil | |
import datetime |
This file contains 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
root@host-vaix01 (AIX 7.1) > psutil git:(aix) * python setup.py test | |
running test | |
Searching for ipaddress | |
Best match: ipaddress 1.0.18 | |
Processing ipaddress-1.0.18-py2.7.egg | |
Using /root/psutil/.eggs/ipaddress-1.0.18-py2.7.egg | |
running egg_info | |
writing requirements to psutil.egg-info/requires.txt | |
writing psutil.egg-info/PKG-INFO |
This file contains 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
sssss............s....sssssss..ss.........ssssssssss........................................F...s.........s..sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss..........sRun #1: extra-mem=8.0K, per-call=41.0B, calls=200 | |
Run #2: extra-mem=8.0K, per-call=20.5B, calls=400 | |
........s....ss.............ss........s...s.ss....s.............ss........s...s.ss....s.................E......ssssssssssssssssssssssss.............ssssssssssssss..s....................s.........................ss.............s....ss...............................E..ss...s.................s...................s........Run #1: extra-mem=340.0K, per-call=6.8K, calls=50 | |
Run #2: extra-mem=2.8M, per-call=29.0K, calls=100 | |
Run #3: extra-mem=4.2M, per-call=28.9K, calls=150 | |
Run #4: extra-mem=5.6M, per-call=28.9K, calls=200 | |
Run #5: extra-mem=7.1M, per-call=28.9K, calls=250 | |
.......s...EE.................................ssssssssssssssssssssssssssssssssssssssssssssssssssssssssss | |
========================= |
This file contains 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
test_cpu_count_logical (test_bsd.BSDSpecificTestCase) ... skipped 'not a BSD system' | |
test_disks (test_bsd.BSDSpecificTestCase) ... skipped 'not a BSD system' | |
test_process_create_time (test_bsd.BSDSpecificTestCase) ... skipped 'not a BSD system' | |
test_virtual_memory_total (test_bsd.BSDSpecificTestCase) ... skipped 'not a BSD system' | |
test_boot_time (test_bsd.FreeBSDSpecificTestCase) ... skipped 'not a FreeBSD system' | |
test_cmdline (test_bsd.FreeBSDSpecificTestCase) ... skipped 'not a FreeBSD system' | |
test_cpu_stats_ctx_switches (test_bsd.FreeBSDSpecificTestCase) ... skipped 'not a FreeBSD system' | |
test_cpu_stats_interrupts (test_bsd.FreeBSDSpecificTestCase) ... skipped 'not a FreeBSD system' | |
test_cpu_stats_soft_interrupts (test_bsd.FreeBSDSpecificTestCase) ... skipped 'not a FreeBSD system' | |
test_cpu_stats_syscalls (test_bsd.FreeBSDSpecificTestCase) ... skipped 'not a FreeBSD system' |
This file contains 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
psutil_monitor_trove | |
todo |