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
#!python3 | |
import sys | |
import re | |
def get_section_name(line): | |
return line.split()[1] | |
def is_text_section(section_name): | |
return ( |
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
module Main where | |
import Prelude | |
import System.Environment | |
fibb_slow :: Integer -> Integer | |
fibb_slow 1 = 1 | |
fibb_slow 2 = 1 | |
fibb_slow x = fibb_slow (x-1) + fibb_slow (x-2) |
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
$ sudo dtrace -ln 'HaskellEvent*:::' | |
ID PROVIDER MODULE FUNCTION NAME | |
2608 HaskellEvent66022 libHSrts_thr-ghc8.4.2.dylib initCapability cap-create | |
2609 HaskellEvent66022 libHSrts_thr-ghc8.4.2.dylib freeCapabilities cap-delete | |
2610 HaskellEvent66022 libHSrts_thr-ghc8.4.2.dylib setNumCapabilities cap-disable | |
2611 HaskellEvent66022 libHSrts_thr-ghc8.4.2.dylib setNumCapabilities cap-enable | |
2612 HaskellEvent66022 libHSrts_thr-ghc8.4.2.dylib initCapability capset-assign-cap | |
2613 HaskellEvent66022 libHSrts_thr-ghc8.4.2.dylib initCapabilities capset-create | |
2614 HaskellEvent66022 libHSrts_thr-ghc8.4.2.dylib freeCapabilities capset-delete | |
2615 HaskellEvent66022 libHSrts_thr-ghc8.4.2.dylib freeCapabilities capset-remove-cap |
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
# To display the perf.data header info, please use --header/--header-only options. | |
# | |
# | |
# Total Lost Samples: 0 | |
# | |
# Samples: 47K of event 'cpu-clock' | |
# Event count (approx.): 11836750000 | |
# | |
# Overhead Command Shared Object Symbol | |
# ........ ............... .................. .................................. |
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
# To display the perf.data header info, please use --header/--header-only options. | |
# | |
# | |
# Total Lost Samples: 0 | |
# | |
# Samples: 45K of event 'cpu-clock' | |
# Event count (approx.): 11433750000 | |
# | |
# Overhead Command Shared Object Symbol | |
# ........ .............. .................. .................................. |
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
# To display the perf.data header info, please use --header/--header-only options. | |
# | |
# | |
# Total Lost Samples: 0 | |
# | |
# Samples: 44K of event 'cpu-clock' | |
# Event count (approx.): 11122000000 | |
# | |
# Overhead Command Shared Object Symbol | |
# ........ ............... .................. ..................................................... |
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
# To display the perf.data header info, please use --header/--header-only options. | |
# | |
# | |
# Total Lost Samples: 0 | |
# | |
# Samples: 46K of event 'cpu-clock' | |
# Event count (approx.): 11516500000 | |
# | |
# Overhead Command Shared Object Symbol | |
# ........ ............... .................. ..................................................... |
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
// --std=c++11 | |
// was tested with gcc 6.2.0 & clang 3.8.1 on x86_64 GNU/Linux | |
// wasn't tested with MSVS | |
// Will fail on non-utf8 data | |
#include <iostream> | |
#include <fstream> | |
#include <iterator> | |
#include <algorithm> |
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
from __future__ import division, unicode_literals, print_function, absolute_import | |
import os | |
from pprint import pprint | |
import requests | |
# 'https://afisha.yandex.ru/api/events | |
# /actual?limit=12&offset=12&tag=concert&hasMixed=0&city=moscow' | |
# https://afisha.yandex.ru/api/events |
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
#!/usr/bin/env python3 | |
from functools import update_wrapper, partial | |
class debug_call: | |
def __init__(self, fn_or_method): | |
update_wrapper(self, fn_or_method) | |
def __call__(self, *args, **kwars): | |
print(self.__wrapped__.__qualname__) | |
return self.__wrapped__(*args, **kwars) |
NewerOlder