Skip to content

Instantly share code, notes, and snippets.

_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
conv2d_1 (Conv2D) (None, 198, 198, 32) 896
_________________________________________________________________
max_pooling2d_1 (MaxPooling2 (None, 99, 99, 32) 0
_________________________________________________________________
conv2d_2 (Conv2D) (None, 97, 97, 64) 18496
_________________________________________________________________
max_pooling2d_2 (MaxPooling2 (None, 48, 48, 64) 0
├── train<br />
│ ├── J => 396 JPG files<br />
│ └── L => 396 JPG files<br />
├── validation<br />
│ ├── J => 150 JPG files<br />
│ └── L => 150 JPG files<br />
└── test<br />
│ ├── J => 100 JPG files<br />
│ └── L => 100 JPG files<br />
sudo python3 -m http.server 80
wget --spider 234.56.45.89:80
{
"name": "Attach (Remote Debug)",
"type": "python",
"request": "attach",
"localRoot": "${workspaceRoot}",
"remoteRoot": "/home/benoitpatra",
"port": 80,
"secret": "my_secret",
"host":"234.56.45.89"
}
import os
import ptvsd
import socket
ptvsd.enable_attach("my_secret", address = ('0.0.0.0', 80))
# Enable the line of source code below only if you want the application to wait until the debugger has attached to it
#ptvsd.wait_for_attach()
ptvsd.break_into_debugger()
if os.environ.has_key("REMOTE"):
ptvsd.break_into_debugger()
end
dependencies
| where timestamp > ago(10h)
| where type == "DOCDB"
| extend requestCharge = todouble(customMeasurements["request-charge"])
| extend docdbkind = customDimensions["kind"]
| extend infolog = customDimensions["infolog"]
| order by timestamp desc
| project timestamp, target, data, resultCode , duration, customDimensions, requestCharge, infolog, docdbkind , operation_Id
| summarize sum(requestCharge) by bin(timestamp, 1s)
| render timechart
public static async Task<FeedResponse<T>> LoggedFeedResponseAsync<T>(this IQueryable<T> queryable, string infoLog, string operationId)
{
var docQuery = queryable.AsDocumentQuery();
var now = DateTimeOffset.UtcNow;
var watch = Stopwatch.StartNew();
var feedResponse = await docQuery.ExecuteNextAsync<T>();
watch.Stop();
TrackQuery(now, watch.Elapsed, feedResponse.RequestCharge, "read", new TelemetryClient(), infoLog, operationId, feedResponse.ContentLocation);
return feedResponse;
}
Param ( [Parameter(Mandatory=$True)] [ValidateNotNull()] $imageSource, [Parameter(Mandatory=$true)][ValidateNotNull()] $quality )
if (!(Test-Path $imageSource)){throw( "Cannot find the source image")}
if ($quality -lt 0 -or $quality -gt 100){throw( "quality must be between 0 and 100.")}
[void][System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
$resolvedPath = Join-Path $PWD -ChildPath $imageSource
$bmp = [System.Drawing.Image]::FromFile($resolvedPath)
#hardcoded canvas size...