Skip to content

Instantly share code, notes, and snippets.

@zooid
zooid / html_basic_page.html
Created December 30, 2012 22:10
HTML basic page
<html>
<head>
<title></title>
</head>
<body>
@zooid
zooid / mkhelix.py
Last active August 29, 2015 14:22 — forked from jl2/mkhelix.py
#!/usr/bin/env python3
import sys
import array
import math
import random
import os.path
import win32com.client
def get_catia():
[
"Automotive",
"Budgeting",
"HVAC",
"Heaters",
"Hydraulics",
"Logistics Management",
"Management",
"Negotiation",
"Project Planning",
import Rhino
import scriptcontext as sc
import rhinoscriptsyntax as rs
def zPolyline():
# For this example we will use a GetPoint class, but all of the custom
# "Get" classes support command line options.
gp = Rhino.Input.Custom.GetPoint()
gp.SetCommandPrompt("GetPoint with options")
numPoints = 2
@zooid
zooid / excel_reader.py
Created June 11, 2018 12:26 — forked from chirdeeptomar/excel_reader.py
Finds duplicate rows in excel 2007
from openpyxl import load_workbook
import os
dir_name = os.path.relpath(os.path.dirname(__file__))
file_name = os.path.join(dir_name, 'Data.xlsx')
unique_items = []
all_items = []
@zooid
zooid / ziptest.py
Created August 13, 2018 01:51 — forked from JGVerdugo/ziptest.py
Learning to use Python zipfile module with docx files
#!/usr/bin/python
import os
import os.path
import zipfile
from datetime import datetime
from re import sub
sourceFile = zipfile.ZipFile('text.docx')
@zooid
zooid / paint.py
Created September 3, 2018 15:53 — forked from nikhilkumarsingh/paint.py
A simple paint application using tkinter in Python 3
from tkinter import *
from tkinter.colorchooser import askcolor
class Paint(object):
DEFAULT_PEN_SIZE = 5.0
DEFAULT_COLOR = 'black'
def __init__(self):
@zooid
zooid / Library.cs
Created September 25, 2018 10:15 — forked from NaxAlpha/Library.cs
Managed Dll Injection with C#
using System.Diagnostics;
using System.Windows.Forms;
namespace Loader {
public static class Library
{
[DllExport]
static void ShowMessage() {
using(var p = Process.GetCurrentProcess()) {
// Add System.Windows.Forms reference
@zooid
zooid / gist:0d8ca56d84438c7425a0ab97739c146f
Created September 30, 2018 15:12 — forked from econchick/gist:4666413
Python implementation of Dijkstra's Algorithm
class Graph:
def __init__(self):
self.nodes = set()
self.edges = defaultdict(list)
self.distances = {}
def add_node(self, value):
self.nodes.add(value)
def add_edge(self, from_node, to_node, distance):
#!/usr/bin/env python
"""
- read subprocess output without threads using Tkinter
- show the output in the GUI
- stop subprocess on a button press
"""
import logging
import os
import sys
from subprocess import Popen, PIPE, STDOUT