This file contains 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 random | |
from typing import List | |
from textual import events | |
from textual.app import App | |
from textual_inputs import TextInput | |
class CharInput(TextInput): | |
"""A text input that only takes one character""" | |
def __init__(self, **kwargs) -> None: | |
super().__init__(**kwargs) |
This file contains 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
# Description: Boxstarter Script | |
# Author: Chris Kinniburgh <[email protected]> | |
# Based heavily on https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f | |
# by Jess Frazelle | |
# Last Updated: 2017-12-31 | |
# | |
# Install boxstarter: | |
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
# |
Here's a little more help feeling it out, from someone who knows like no python but has some dev experience. Forgive me if this is too simplistic, but since you're starting out, it might be helpful.
My thought process going into a project like this is this:
What is the smallest chunk of this I can do in one logical step? Well I have an XML url I can go to to get a list of games. So I'm going to need to get that into my program. That's step one. And it is all I care about. So how do I do it?
There are really two steps here:
- Read the data from the url Kane provided.
- Parse the xml, turning it into something you can use in the rest of your code.
I hereby claim:
- I am cjkinni on github.
- I am cjkinni (https://keybase.io/cjkinni) on keybase.
- I have a public key ASBi31W5R331lG2Nu_RqRR6T8L3RjWnWgYwsWozm59NoJgo
To claim this, I am signing this object:
This file contains 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
// ==UserScript== | |
// @name Morrichris | |
// @namespace cjk_cnc | |
// @description Swap Chris Thursten's Fase with Morrichris | |
// @include http://www.pcgamer.com/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
if (document.getElementsByClassName("author-block")[0].children[0].getAttribute('href') == "http://www.pcgamer.com/author/chris-thursten/"){ |
This file contains 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
Init |
This file contains 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
# Basic PC Setup - Choco Version | |
set-executionpolicy unrestricted -s CurrentUser | |
Y | |
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) | |
choco install powershell -y | |
choco install sublimetext3 -y | |
choco install notepadplusplus.install -y |
This file contains 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
#!/usr/bin/env ruby | |
require 'json' | |
filename = './manifest.json' | |
text = File.read(filename) | |
json = JSON.parse(text) | |
oldVersion = json['version'] |
This file contains 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
#/usr/bin/ruby | |
## Name data from http://www.ssa.gov/oact/babynames/limits.html | |
## Originally used on 8 Aug to find an anagram of a name. Neural. | |
FILENAME = "/Users/ckinniburgh/Dropbox/Development/AnagramSolver/yob1991.txt" | |
puts "Input anagram: " | |
STDOUT.flush | |
anagram = gets.chomp |
NewerOlder