Skip to content

Instantly share code, notes, and snippets.

View juanpaexpedite's full-sized avatar
:octocat:
I may be slow to respond.

juanpaexpedite

:octocat:
I may be slow to respond.
View GitHub Profile
(byte Min, byte Value, byte Max,byte speed, bool Increasing) TextSize;
(byte Min, byte Value , byte Max, byte speed, bool Increasing) Red;
(byte Min, byte Value, byte Max, byte speed, bool Increasing) Green;
(byte Min, byte Value, byte Max, byte speed, bool Increasing) Blue;
Random dice = new Random();
SKPaint textpaint;
private void Init()
{
TextSize = (10, 128, 200,1, true);
Red = (0, (byte)dice.Next(0, 128), 200, (byte)dice.Next(0, 5), true);
@juanpaexpedite
juanpaexpedite / testdictionaries.cs
Last active August 29, 2021 07:26
Testing Dictionaries in C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TestDictionary
{
/*
Test for 100 iterations
import timeit
import matplotlib.pyplot as plt
import winreg
# Obtener la lista de fuentes disponibles en el Registro de Windows
fonts_key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts", 0, winreg.KEY_READ)
font_names = [winreg.EnumValue(fonts_key, i)[0] for i in range(winreg.QueryInfoKey(fonts_key)[1])]
#Pause here to wait for loading if not I have an error finding fonts
code = """
@juanpaexpedite
juanpaexpedite / list_Part_.FCMacro
Created July 29, 2023 19:36
List FreeCad objects wit 'Part_'
# List all objects
# -*- coding: utf-8 -*-
import FreeCAD,Draft
# List all objects of the document
doc = FreeCAD.ActiveDocument
objs = FreeCAD.ActiveDocument.Objects
#App.Console.PrintMessage(str(objs) + "\n")
#App.Console.PrintMessage(str(len(FreeCAD.ActiveDocument.Objects)) + " Objects" + "\n")
def clearConsole():
from PySide import QtGui
@juanpaexpedite
juanpaexpedite / techdraw_wb_font_dimensions.FCMacro
Created August 13, 2023 08:10
Change Font Size in FreeCAD TechDraw Workbench Dimensions
# List all objects
# -*- coding: utf-8 -*-
import FreeCAD,Draft
# List all objects of the document
doc = FreeCAD.ActiveDocument
objs = FreeCAD.ActiveDocument.Objects
def clearConsole():
from PySide import QtGui