Skip to content

Instantly share code, notes, and snippets.

View Stevoisiak's full-sized avatar

Stevoisiak Stevoisiak

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Stevoisiak
Stevoisiak / stack-exchange-community-links.md
Last active May 19, 2024 16:46
An unofficial list of Stack Exchange alternatives, offshoot chats, and community projects
java.lang.NoClassDefFoundError: org/dom4j/ElementHandler
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at com.taleo.integration.client.step.CustomStepWrapper.init(CustomStepWrapper.java:108)
at com.taleo.integration.client.workflow.WorkflowManager.addSteps(WorkflowManager.java:1006)
at com.taleo.integration.client.workflow.WorkflowManager.addPostProcessSteps(WorkflowManager.java:977)
at com.taleo.integration.client.workflow.WorkflowManager.createWorkflow(WorkflowManager.java:172)
at com.taleo.integration.client.workflow.WorkflowManager.execute(WorkflowManager.java:328)
@Stevoisiak
Stevoisiak / csv-to-pipe-delimited.py
Last active January 21, 2022 10:32
Python script to convert a comma-delimited CSV to a tab-delimited file. (Drag & Drop)
import csv
import sys
import os
# Convert comma-delimited CSV files to pipe-delimited files
# Usage: Drag-and-drop CSV file over script to convert it.
inputPath = sys.argv[1]
outputPath = os.path.dirname(inputPath) + "/output.csv"
# Base Classes
class BaseAdapter(object):
def __init__(self):
super(BaseAdapter, self).__init__()
class BaseAdapter2(object):
pass
class Second:
def __init__(self):
@Stevoisiak
Stevoisiak / gamelist.xml
Last active January 24, 2022 10:54
Default RetroPie gamelist.xml file for EmulationStation
<?xml version="1.0"?>
<gameList>
<game>
<path>./audiosettings.rp</path>
<name>Audio</name>
<desc>Configure audio settings. Choose default of auto, 3.5mm jack, or HDMI. Mixer controls, and apply default settings.</desc>
<image>/home/pi/RetroPie/retropiemenu/icons/audiosettings.png</image>
</game>
<game>
<path>./bluetooth.rp</path>

Converting ElementTree to string raises "TypeError: argument of type 'int' is not iterable"

I have a simple XML element created with [xml.etree.ElementTree][1] in Python 3. This element contains a person's name and age.

import xml.etree.ElementTree as ElementTree
person = ElementTree.Element("Person", Name="John", Age=18)

I can use [Element.get()][2] to access individual attributes from my element without any issues.

import xml.etree.ElementTree as ElementTree
@Stevoisiak
Stevoisiak / se-ok-golf-pumkin-locations.md
Last active December 4, 2017 17:23
Green pumpkin locations in OK Golf.
@Stevoisiak
Stevoisiak / kronos-wfc-logon.py
Last active November 22, 2021 21:28
Python script to log on to Kronos WFC using the XML API
# Logs on to Kronos WFC using an XML request
# Written as an example for https://stackoverflow.com/a/46776518/3357935
import requests
url = "http://localhost/wfc/XmlService"
headers = {'Content-Type': 'text/xml'}
data = """<Kronos_WFC version = "1.0">
<Request Object="System" Action="Logon" Username="SomeUsername" Password="SomePassword" />
</Kronos_WFC>"""