Skip to content

Instantly share code, notes, and snippets.

@mhSangar
mhSangar / install-textlive.sh
Created April 21, 2021 23:45
Latex Workshop VSCode settings for Biber and pdflatex and installation steps for textlive
#!/bin/bash
echo "Installing TextLive"
sudo apt install -y texlive-latex-extra
sudo apt install -y texlive-lang-english texlive-lang-spanish texlive-bibtex-extra
# sudo apt autoremove
"""
A bare-bones SVG SketchBook - Licensed under GPL v3.0
Alexandre B A Villares - http://abav.lugaralgum.com
in collaboration with Foad S. Farimani https://twitter.com/fsfarimani
v2020_12_19 exporting SVG now!
v2020_12_20 line mode & circle mode
"""
add_library('svg')
"""
More naive graph drawing
Using Processing Python mode
To run this you'll need:
https://abav.lugaralgum.com/como-instalar-o-processing-modo-python/index-EN.html
"""
nodes = []
edges = []
NODE_SIZE = 50 # Diâmetro dos nodes

Run OpenModelica GUI with Docker on Mac OS host

  1. First you need docker , brew , XQuartz and socat on your host.

    • docker : Install docker desktop from here
    • brew : Follow installation instruction from here
    • XQuartz : Install by : brew cask install xquartz
    • socat : Install by : brew install socat
  2. Now run this in new terminal :

socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:"$DISPLAY"

@LakshyAAAgrawal
LakshyAAAgrawal / pytranslate.md
Last active February 20, 2024 12:36
Pytranslate - Maxima to Python Translator
@Foadsf
Foadsf / CMakeLists.txt
Last active January 6, 2021 05:50
printing the platform information in OpenCL following this SO post https://stackoverflow.com/a/50667352/4999991
cmake_minimum_required(VERSION 3.1)
project(OpenCL_Example)
find_package(OpenCL REQUIRED)
include_directories(${OpenCL_INCLUDE_DIRS})
link_directories(${OpenCL_LIBRARY})
add_executable(main main.c)
target_include_directories(main PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
@ForgottenUmbrella
ForgottenUmbrella / using_conan_cpp.md
Last active April 15, 2024 07:08
How to use Conan, a C++ package manager, for beginners

Package Management in C++ with Conan for Beginners

C++ package management can be complicated.

Below are some key tools involved:

Make

Make runs commands defined in a Makefile, for example, to build and install programs with the compiler and linker. For our purposes, we won't worry about what this looks like; you only need to understand its purpose in relation to CMake.

@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 2, 2024 16:19
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@braingineer
braingineer / matprint.py
Created March 8, 2017 01:31 — forked from lbn/matprint.py
Pretty print a matrix in Python 3 with numpy
def matprint(mat, fmt="g"):
col_maxes = [max([len(("{:"+fmt+"}").format(x)) for x in col]) for col in mat.T]
for x in mat:
for i, y in enumerate(x):
print(("{:"+str(col_maxes[i])+fmt+"}").format(y), end=" ")
print("")
# Try it!
import numpy as np
@drewchapin
drewchapin / HTML Application.hta
Last active June 9, 2022 02:23
Template for an HTML Application file (.hta), add to C:\Windows\ShellNew, and add ShellNew\Filename="HTML Application.hta" to .hta HKCR key.
<html>
<head>
<!--
@tag hta:application
@attribute ApplicationName Sets the name of the HTA.
@attribute Border [Thick]|Thin|None
@attribute BorderStyle [Normal]|Raised|Sunken|Complex|Static
@attribute Caption [Yes]|No