First, in an administrator command prompt, enable unrestricted Powershell script execution (see About Execution Policies):
set-executionpolicy unrestricted
Then makes sure that the conda Script directory in is your Path.
@ECHO OFF | |
SETLOCAL EnableDelayedExpansion | |
REM Insert your conda env here | |
SET CONDA_ENV=MY_DESIRED_CONDA_ENV | |
CALL :activate_conda_env | |
REM Insert your python script here |
import numpy as np | |
screen_size = 40 | |
theta_spacing = 0.07 | |
phi_spacing = 0.02 | |
illumination = np.fromiter(".,-~:;=!*#$@", dtype="<U1") | |
A = 1 | |
B = 1 | |
R1 = 1 |
program what3word; | |
{$APPTYPE CONSOLE} | |
{$R *.res} | |
uses IdHashMessageDigest, | |
System.SysUtils; | |
const | |
x: integer = 15; |
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | |
' Hit Ctrl+F and find the second instance of "here" | |
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | |
exetxt = "" | |
loc = 0 | |
eax="eax":ecx="ecx":edx="edx":ebx="ebx":esp="esp":ebp="ebp":esi="esi":edi="edi" | |
cs="cs":ds="ds" | |
al="al":cl="cl":dl="dl":bl="bl" | |
ah="ah":ch="ch":dh="dh":bh="bh" | |
ax="ax":cx="cx":dx="dx":bx="bx":sp="sp":bp="bp":si="si":di="di" |
import logging | |
from logging.handlers import RotatingFileHandler | |
def setup_logger(): | |
MAX_BYTES = 10000000 # Maximum size for a log file | |
BACKUP_COUNT = 9 # Maximum number of old log files | |
# The name should be unique, so you can get in in other places | |
# by calling `logger = logging.getLogger('com.dvnguyen.logger.example') | |
logger = logging.getLogger('com.dvnguyen.logger.example') |
First, in an administrator command prompt, enable unrestricted Powershell script execution (see About Execution Policies):
set-executionpolicy unrestricted
Then makes sure that the conda Script directory in is your Path.
from tkinter import * | |
from tkinter.colorchooser import askcolor | |
class Paint(object): | |
DEFAULT_PEN_SIZE = 5.0 | |
DEFAULT_COLOR = 'black' | |
def __init__(self): |
"""making a dataframe""" | |
df = pd.DataFrame([[1, 2], [3, 4]], columns=list('AB')) | |
"""quick way to create an interesting data frame to try things out""" | |
df = pd.DataFrame(np.random.randn(5, 4), columns=['a', 'b', 'c', 'd']) | |
"""convert a dictionary into a DataFrame""" | |
"""make the keys into columns""" | |
df = pd.DataFrame(dic, index=[0]) |