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 'dart:io'; | |
var port = 3456; | |
main() async { | |
print('HTTP_PROXY: ${Platform.environment['HTTP_PROXY']}'); | |
print('NO_PROXY: ${Platform.environment['NO_PROXY']}'); | |
print(''); | |
await test('ws://echo.websocket.org'); |
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
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
import numpy as np | |
import cPickle as pickle | |
import gym | |
# hyperparameters | |
H = 200 # number of hidden layer neurons | |
batch_size = 10 # every how many episodes to do a param update? | |
learning_rate = 1e-4 | |
gamma = 0.99 # discount factor for reward |
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
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### |
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
Windows Registry Editor Version 5.00 | |
; Creates "PowerShell Here" shortcuts on context menu for | |
; | |
; a) right-clicking on a folder | |
; b) right-clicking in the blank space when inside a folder (eg. already inside the folder) | |
; c) right-clicking in the blank space when inside a folder that's inside a library | |
; | |
; Uses cmd start to launch normal Powershell shortcut so that the normal PowerShell shortcut | |
; colours/settings are preserved (blue, not black/white) |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/> | |
</head> | |
<frameset rows="70,*"> | |
<frame src="about:blank"> | |
<frameset cols="165,*"> | |
<frame src="about:blank"> | |
<frame src="settings.htm"> |
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
# Launch Kiln for current repo | |
Function Kiln | |
{ | |
if (Test-Path ".\.hg\hgrc") | |
{ | |
$repoUrl = (Select-String "default = (.*)" -Path ".\.hg\hgrc" -AllMatches).Matches.Groups[1].Value | |
Start $repoUrl | |
} | |
else | |
{ Write-Warning "Not in a repo!" } |
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
function Get-ProjectReferences | |
{ | |
param( | |
[Parameter(Mandatory)] | |
[string]$rootFolder, | |
[string[]]$excludeProjectsContaining | |
) | |
dir $rootFolder -Filter *.csproj -Recurse | |