Here's a step-by-step to get started scripting Minecraft with Python on Mac OSX
This file contains hidden or 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
I have a Lenovo P50 ThinkPad that I am issued at work. I run the latest Fedora on my primary laptop for years but | |
have avoided running the NVIDA graphics drivers because installation was manual and could break with kernel updates. | |
I updated my personal Dell XPS 15 to use the new NVIDIA drivers that are now supported in Fedora 28 I think these were suppose to come from rpm-fusion but it looks like they are in Fedora 28 tree, I could be wrong. The install was as easy as just installing the nvidia-driver package and reboot. This worked without any issues. I could launch nvidia-settings and glxgears without any issues. | |
The purpose of this Gist post is to document how I got the NVIDIA drivers from Fedora 28 on the P50. It was not as easy as installing nvidia-driver and rebooting. | |
For starters, here are the specs for the P50: | |
[root@kwr50p kurtis] # inxi -SG |
This file contains hidden or 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
/* Usage: | |
* First, fill in any absenses and business trips | |
* After that open DevTools (normally F12), and then REPL (Esc), and copy-paste this there + hit Enter | |
* Script will only fill in empty lines, ignoring what you filled in already, so it won't be corrupted | |
*/ | |
function fill_in_day(tbl_row) { | |
$(tbl_row.querySelector('td>input[id$="_inTime"]')).val('09:00') | |
$(tbl_row.querySelector('td>input[id$="_outTime"]')).val('18:00') | |
$(tbl_row.querySelector('td>input[id$="_breakDuration"]')).val('01:00') | |
$(tbl_row.querySelector('td>label[id$="_totalWork"]')).val('08:00') |
The PATH
is an important concept when working on the command line. It's a list
of directories that tell your operating system where to look for programs, so
that you can just write script
instead of /home/me/bin/script
or
C:\Users\Me\bin\script
. But different operating systems have different ways to
add a new directory to it:
- The first step depends which version of Windows you're using:
- If you're using Windows 8 or 10, press the Windows key, then search for and
This file contains hidden or 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 cherrypy | |
html_header = \ | |
""" | |
<html> | |
<head> | |
<title>Example of GET and POST</title> | |
</head> | |
<body> | |
""" |
This file contains hidden or 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
# -*- encoding: utf-8 -*- | |
# requires a recent enough python with idna support in socket | |
# pyopenssl, cryptography and idna | |
from OpenSSL import SSL | |
from cryptography import x509 | |
from cryptography.x509.oid import NameOID | |
import idna | |
from socket import socket |
This file contains hidden or 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 asyncio | |
import pathlib | |
import socket | |
import ssl | |
import pytest | |
import aiohttp | |
from aiohttp import web | |
from aiohttp.resolver import DefaultResolver |
This file contains hidden or 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
""" | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2004 Sam Hocevar <[email protected]> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. |
This file contains hidden or 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
# ------------------------------------------------------------------------ | |
# Image-Builder Procedure for OpenWRT - LEDE (In this case using Debian x64 NetInstall virtual machine) | |
# ------------------------------------------------------------------------ | |
su | |
apt-get update # Optional, make and upgrade too in case it has too many old pakackes. | |
apt-get install make aria2 screen ncftp -y | |
screen - | |
cd ~ |