Using perf:
$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg
NOTE: See @GabrielMajeri's comments below about the
-g
option.
from __future__ import division | |
from random import random | |
import numpy as np | |
import pandas as pd | |
''' | |
Use regret-matching algorithm to play Scissors-Rock-Paper. | |
''' | |
class RPS: |
let | |
BaseUrl = "https://fake-odata-api.com/v1/Entities?", | |
Token = "F4K3-T0K3N-D0NT-U5E-L0L", | |
EntitiesPerPage = 1000, | |
GetJson = (Url) => | |
let Options = [Headers=[ #"Authorization" = "Bearer " & Token ]], | |
RawData = Web.Contents(Url, Options), | |
Json = Json.Document(RawData) | |
in Json, |
Using perf:
$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg
NOTE: See @GabrielMajeri's comments below about the
-g
option.
/** | |
* Base contract that all upgradeable contracts should use. | |
* | |
* Contracts implementing this interface are all called using delegatecall from | |
* a dispatcher. As a result, the _sizes and _dest variables are shared with the | |
* dispatcher contract, which allows the called contract to update these at will. | |
* | |
* _sizes is a map of function signatures to return value sizes. Due to EVM | |
* limitations, these need to be populated by the target contract, so the | |
* dispatcher knows how many bytes of data to return from called functions. |
""" | |
Azure Table Storage - Python Batching Example | |
(C) 2016 MediaRealm.com.au | |
Needs v0.30.0 of the Azure Storage Python SDK | |
https://github.com/Azure/azure-storage-python/releases/tag/v0.30.0 | |
""" | |
from azure.storage.table import TableService, Entity, TableBatch |
CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control
and E-Tag
headers, etc.), minification, etc.
<?php | |
/** | |
* Converts an integer number to a word in Lithuanian language. | |
* | |
* @param int $number Integer number to be converted into words | |
* @param array|bool $units Units array like array(0 => šimtas, 1 => šimtai, 2 => šimtų); | |
* @param bool $one If false, word "vienas" is omitted | |
* @return string | |
*/ |
"""A stripped-down MLP example, using Theano. | |
Based on the tutorial here: http://deeplearning.net/tutorial/mlp.html | |
This example trims away some complexities, and makes it easier to see how Theano works. | |
Design changes: | |
* Model compiled in a distinct function, so that symbolic variables are not in run-time scope. | |
* No classes. Network shown by chained function calls. |
import java.util.*; | |
import java.util.concurrent.atomic.AtomicLong; | |
import rx.*; | |
import rx.Observable.OnSubscribe; | |
import rx.Observable; | |
import rx.exceptions.*; | |
import rx.internal.operators.*; | |
import rx.internal.util.RxRingBuffer; | |
import rx.internal.util.unsafe.MpscLinkedQueue; |