You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
🍫
Happy
Jonathan-David Schröder
myselfhimself
🍫
Happy
Python / C++ / JS / PHP developer.
Fan of multimedia, 3d printing & chocolate & pastry.
Breakfast in bed specialist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Timesheet help from one's Github activity using Github CLI's `gh` and the `gh-user-activity` extension's code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
About G'MIC's "fx_" and "_" prefixed filters or commands
About G'MIC's fx_ and _ prefixed filters or commands, and GUI-oriented commands in general
As I have been learning G'MIC slowly for more than one year already in order to develop the gmic-py G'MIC Python binding, here is something simple and stupid I wish I knew before.
Here is what David, the creator G'MIC told me about fx_ and _-prefixed commands. I thought it would be nice to share this knowledge on the Internet :)
TL;DR
If you intend to write solid scripts relying on the gmic console executable, the C++ libgmic library or Python gmic-py, do it with filters whose behaviour do not change, especially no the fx_ or gimp_ ones, or most of what you see in the GIMP G'MIC plug'in's verbose output. Do to so, avoid the GUI filters, focus on the commands and filters listed on the G'MIC Reference page...
Otherwise shut down the internet and prevent G'MIC from updating itself throug
Assuming that you are writing a compiled Python module (ie. that compiles into a .dll.so or .dynlib..) in C/C++,
here are tips to setup real-time debugging, both with your own C/C++ source code and within Python's C source.
Instructions here are for Linux only. You should find your way for any different OS..
Debugging your own C/C++ code
have your compiled module (with no optimization -O0 and debug symbols -g) is available in your current (virtual environment):
for this, make a wheel for your project and load it in your virtual environment
OR compile your project as a .so only and make sure you set LD_LIBRARY_PATH= to the directory where your .so is located
About the G'MIC GUI parser for filters (from G'MIC 2.9.0)
G'MIC stores in a zlib compressed format its list of filter parameters, with enough details that GUIs can be built to expose and manipulate them.
So far, each application implementing G'MIC with a user interface would either gmic-qt which has its own parser or write their own parser for those parameters.
In order to design webservices or different types of UIs on top of G'MIC (in the case of gmic-blender, compositing/texture nodes), the JSON output format for this parser can come in pretty handy!!
One little issue is that the result is long to get, so the JSON file should be generated once for all and possibly embedded in your application, with a per-release refresh.
This json file is stored online on gmic.eu at the url http://gmic.eu/update290.json (or 291 etc.. for further G'MIC releases), with possible in-the-hour update, following the contributi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Emulating your Python Google Cloud function locally (Python 3)
Emulating your own Python Google Cloud Function (Python >=3.6)
Python Google Cloud Functions have been introduced publically in Q3-Q4 2018.
Deploying them takes time (2-10 minutes with gcloud functions deploy.
Actually, a Python cloud function equates to a Flask handler.
Thus, you can test them cloud function first on your own computer.
This spares you from long deployments, difficult step-by-step debugging and bad GCP weather.
Here is how:
keep the traditional Python Cloud Function requirements.txt and main.py untouched.
Programmatically enable no_autop (automatic p removal by tinymce), within tinymce_advanced Wordpress plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Convert an online BigQuery dataset's table schema into a PostgreSQL (eg. on CloudSQL) CREATE TABLE command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters