- Start Date: 2022-04-20
- SEP Status: Draft
- SEP PR: (leave this empty)
- Salt Issue: (leave this empty)
The core team would like to move to an LTS release strategy
#!python | |
from __future__ import print_function | |
import os, io | |
import ctypes, logging | |
import win32file, win32con | |
import sys | |
logging.basicConfig() | |
log = logging.getLogger() | |
print("Max files before set {}".format(ctypes.windll.msvcrt._getmaxstdio())) | |
if sys.version_info.major == 2: |
#!python | |
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals, print_function | |
import win32console | |
import os | |
import sys | |
import codecs | |
import sys |
function Build-M2 { | |
Param( | |
[parameter(Mandatory=$true)] | |
[String] | |
$PythonExe | |
) | |
if ( -not (Get-Command choco -errorAction SilentlyContinue )) { | |
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) |
class TzMapper(object): | |
def __init__(self, u_to_w): | |
self.u_to_w = {(k.lower(),v) for k,v in u_to_w} | |
self.w_to_u = {(v.lower(), k) for k,v in u_to_w} | |
def add(self, k, v): | |
self.u_to_w[k.lower()] = v | |
self.w_to_u[v.lower()] = k | |
def remove(self, k): |
#!/usr/bin/env python3 | |
# simple_tcp_client.py | |
import socket | |
TCP_IP = '127.0.0.1' | |
TCP_PORT = 5005 | |
BUFFER_SIZE = 1024 |
#!/usr/bin/python3 | |
# simple_udp_client.py | |
import socket | |
UDP_IP = "127.0.0.1" | |
UDP_PORT = 5005 | |
MESSAGE = "Hello, World!" |
''' | |
Configure profiler via Apache's SetEvn directive | |
''' | |
class Profiler(object): | |
''' | |
Simple wrapper around werkzeug's ProfilerMiddleware. This allow enabling | |
the profile via apache's SetEnv directive: |
<powershellArguments>-ExecutionPolicy unrestricted</powershellArguments> | |
<powershell> | |
$command = @" | |
winrm quickconfig -quiet; | |
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="1024"}'; | |
winrm set winrm/config '@{MaxTimeoutms="1800000"}'; | |
winrm set winrm/config/service/auth '@{Basic="true"}'; | |
winrm set winrm/config/service '@{AllowUnencrypted="true"}'; | |
net stop winrm; | |
sc config winrm start= auto; |