Skip to content

Instantly share code, notes, and snippets.

@aaronsb
aaronsb / readme.md
Last active April 5, 2024 12:04
Rhino3D 7 on Linux

Install Rhino 7 on Ubuntu based OS (KDE on Jammy in this case)

This assumes a non existant wine prefix or even a wine installation. If you have an existing wine prefix there may be things that interfere with this guide.

  • Start by installing wine and some required adjacent libraries.

sudo apt install wine wine32 winetricks mono-complete winbind

  • Initialize your default Wine environment (which will be located under ~/.wine
@mario52a
mario52a / Delta_XYZ
Last active December 18, 2021 19:19
Gives the Delta values and distance between 2 points. If the SHIFT key is pressed, the Delta value begin on coordinate 0,0,0 to point clicked (the coordinate 0,0,0 is displayed in red).
# -*- coding: utf-8 -*-
#Delta x y z Click Q to quit
#
#OS: Windows 10 (10.0)
#Word size of OS: 64-bit
#Word size of FreeCAD: 64-bit
#Version: 0.19.22808 (Git)
#Build type: Release
#Branch: master
#Hash: 72eb41b24f12b572d55081042160954b93f4614c
@snelweg
snelweg / Macro_FCSpring_Helix_Variable.FCMacro
Created October 19, 2020 19:57 — forked from mario52a/Macro_FCSpring_Helix_Variable.FCMacro
This macro creates a spring with customizable, any turn may change the spring configuration can be saved in a file with the extension .FCSpring
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import division
"""
***************************************************************************
* Copyright (c) 2014-2015-2016-2017 2018 2019 2020 <mario52> *
* *
* This file is a supplement to the FreeCAD CAx development system. *
* *
* This program is free software; you can redistribute it and/or modify *
bl_info = {
"name": "FreeCAD Importer",
"category": "Import-Export",
"author": "Yorik van Havre",
"version": (5, 0, 0),
"blender": (2, 80, 0),
"location": "File > Import > FreeCAD",
"description": "Imports a .FCStd file from FreeCAD",
"warning": "This addon needs FreeCAD installed on your system. Only Part- and Mesh-based objects supported at the moment.",
}
@mario52a
mario52a / Macro CirclePlus.FCMacro
Last active December 18, 2021 19:19
This small macro create a circle or arc giving radius, diameter, circumference, area, startangle, endangle, arc, anglecenter, cord, arrow, center (point), placemObject on choice. And ccreate sector.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
#
"""
***************************************************************************
* Copyright (c) 2018 2019 <mario52> *
* *
* This file is a supplement to the FreeCAD CAx development system. *
* *
* This program is free software; you can redistribute it and/or modify *
@glasslion
glasslion / vtt2text.py
Last active May 31, 2024 18:51
This script convert youtube subtitle file(vtt) to plain text.
"""
Convert YouTube subtitles(vtt) to human readable text.
Download only subtitles from YouTube with youtube-dl:
youtube-dl --skip-download --convert-subs vtt <video_url>
Note that default subtitle format provided by YouTube is ass, which is hard
to process with simple regex. Luckily youtube-dl can convert ass to vtt, which
is easier to process.
@mario52a
mario52a / Macro_FCSpreadSheet_Extract.FCMacro
Last active December 18, 2021 19:20
This macro save the spreadsheet data in a csv file with the formula or in a xml file.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
***************************************************************************
* Copyright (c) 2018 2019 2020 <mario52> *
* *
* This file is a supplement to the FreeCAD CAx development system. *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License (LGPL) *
@ditzel
ditzel / MathParabola.cs
Last active February 19, 2024 02:07
A simple Math class to calculate a point in 2D or 3D space lying on a parabola. And a more complex parabola controller that you can put on an object.
using UnityEngine;
using System;
public class MathParabola
{
public static Vector3 Parabola(Vector3 start, Vector3 end, float height, float t)
{
Func<float, float> f = x => -4 * height * x * x + 4 * height * x;
@mario52a
mario52a / Macro Select Hovering.FCMacro
Last active January 11, 2024 22:01
This macro select a choice Face, Edge, Vertex hovering by the mouse.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
#
"""
***************************************************************************
* Copyright (c) 2017 2018 2019 2020 2023 2024 <mario52> *
* *
* This file is a supplement to the FreeCAD CAx development system. *
* *
* This program is free software; you can redistribute it and/or modify *
@kashaziz
kashaziz / scrapingexample.py
Last active May 28, 2024 04:36
Example of web scraping using Python and BeautifulSoup.
'''
Example of web scraping using Python and BeautifulSoup.
Sraping ESPN College Football data
http://www.espn.com/college-sports/football/recruiting/databaseresults/_/sportid/24/class/2006/sort/school/starsfilter/GT/ratingfilter/GT/statuscommit/Commitments/statusuncommit/Uncommited
The script will loop through a defined number of pages to extract footballer data.
'''
from bs4 import BeautifulSoup