- Download the media creation tool
- Use it to downgrade Windows 11 to Windows 10
Note: You do not need an USB drive for this.
- Run
Check for Updates
and install all updates.
import sys, marshal, functools, subprocess | |
child_script = """ | |
import marshal, sys, types; | |
fn, args, kwargs = marshal.load(sys.stdin) | |
marshal.dump( | |
types.FunctionType(fn, globals())(*args, **kwargs), | |
sys.stdout) | |
""" |
$ python xor.py | |
Training: | |
Epoch 0 MSE: 1.765 | |
Epoch 100 MSE: 0.015 | |
Epoch 200 MSE: 0.005 | |
* Target MSE reached * | |
Evaluating: | |
1 XOR 0 = 1 ( 0.904) Error: 0.096 | |
0 XOR 1 = 1 ( 0.908) Error: 0.092 | |
1 XOR 1 = 0 (-0.008) Error: 0.008 |
from __future__ import division | |
import collections | |
import numpy as np | |
import matplotlib | |
import matplotlib.pyplot as plt | |
from scipy.spatial import Delaunay, KDTree | |
# an adaptation of https://stackoverflow.com/a/15783581/60982 | |
# using ideas from https://stackoverflow.com/a/9471601/60982 |
# encoding: utf-8 | |
# Copyright 2013 Diego Navarro Mellén. All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without modification, are | |
# permitted provided that the following conditions are met: | |
# | |
# 1. Redistributions of source code must retain the above copyright notice, this list of | |
# conditions and the following disclaimer. | |
# |
class APIWrapper: | |
#snippet... | |
def poll_api(self, tries, initial_delay, delay, backoff, success_list, apifunction, *args): | |
time.sleep(initial_delay) | |
for n in range(tries): | |
try: | |
status = self.get_status() | |
if status not in success_list: |
The MCP23017 is an I/O expander chip. It has 16 GPIO pins which you can control using an I2C interface using two pins from a Raspberry Pi, plus a power source and sink (which can also come from the Pi). It's not quite as simple as directly controlling the Pi's GPIO pins, but it's not complicated, either.
You need to install i2c-tools
, which is probably in your distribution's package manager. You also need a kernel with I2C support; you might need to modprobe i2c-dev
. It would presumably be possible to do without either of these things, and bitbang the I2C protocol over GPIO, but I don't understand the protocol well enough to try.
On pin numbering: if you like, you can refer to the datasheet for the MCP23017. There's a small dot in one corner of the chip, with a semi-circular cut-out at that end. The pin near
This installation guide documents my standard procedure of a system setup with Fedora. Naturally, everyone will not agree at some point on my way of doing this. Please take this with a grain of salt and use it as a guide to avoid forgetting things, as I do myself.
I use my computer all day everyday. After a while I used every application I will ever use and configured upon first usage. The configuration disrupts but the workflow leading to using the application first. To avoid configuration induced disruptions, the configuration could be done upfront. This is a collection of configurations and other steps involved in setting up a new system with Fedora.
mkdir heroku | |
cd heroku/ | |
virtualenv --no-site-packages env | |
source env/bin/activate | |
pip install bottle gevent | |
pip freeze > requirements.txt | |
cat >app.py <<EOF | |
import bottle | |
import os |
#!/bin/bash | |
# | |
BASE=/tmp | |
PID=$BASE/app.pid | |
LOG=$BASE/app.log | |
ERROR=$BASE/app-error.log | |
PORT=11211 | |
LISTEN_IP='0.0.0.0' | |
MEM_SIZE=4 |