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.
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 |
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | |
' 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" |
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
packed_extension_path = '/path/to/packed/extension.crx' | |
options = Options() | |
options.add_extension(packed_extension_path) | |
driver = webdriver.Chrome(options=options) |
:: This batch file converts HTML files in a folder to docx. | |
:: It requires Pandoc, and a list of files to convert | |
:: named file-list, in which each file is on a separate line, | |
:: and contains no spaces in the filename. | |
:: | |
:: Don't show these commands to the user | |
@ECHO off | |
:: Set the title of the window | |
TITLE Convert html to docx | |
:: This thing that's necessary. |
"""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]) |
from tkinter import * | |
from tkinter.colorchooser import askcolor | |
class Paint(object): | |
DEFAULT_PEN_SIZE = 5.0 | |
DEFAULT_COLOR = 'black' | |
def __init__(self): |
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 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') |