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
import os | |
import shutil | |
def is_venv_directory(path): | |
""" | |
Check if the given path is a virtual environment directory. | |
""" | |
return ( | |
os.path.isdir(path) and | |
(os.path.isfile(os.path.join(path, 'bin', 'activate')) or |
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
import os | |
import shutil | |
def is_venv_directory(path): | |
""" | |
Check if the given path is a virtual environment directory. | |
""" | |
return ( | |
os.path.isdir(path) and | |
(os.path.isfile(os.path.join(path, 'bin', 'activate')) or |
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
#!/bin/bash | |
# https://dev.to/ope/securing-your-azure-web-app-with-let-s-encrypt-4g99 | |
echo please indicate the domaine name i.e. alt-f1.be | |
read domain_name | |
# domain_name=betterop.alt-f1.be | |
sudo certbot certonly -d $domain_name --manual --preferred-challenges dns |
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
# Author Abdelkrim Boujraf, ALT-F1 SPRL | |
import os | |
dir_to_delete = '/kaggle/working/' | |
with os.scandir(dir_to_delete) as entries: | |
for entry in entries: | |
file_to_delete = f"{dir_to_delete}{entry.name}" | |
if os.path.isfile(file_to_delete): | |
print(file_to_delete) | |
os.remove(file_to_delete) |
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
// see https://www.youtube.com/watch?v=Zbm3hjPjQMk | |
import 'package:flutter/material.dart'; | |
class InheritedSettings extends InheritedWidget{ | |
final SettingsSwitchesStatefulWidget settingsSwitchesStatefulWidget; | |
final TechnicalInfoSection technicalInfoSection; | |
InheritedSettings({this.SettingsSwitchesStatefulWidget, Widget child}): super(child: child); |
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
# copy a repository and its tags into a second, third repositoty | |
# (c) Abdelkrim Boujraf, http://www.alt-f1.be | |
# Imagine that your original repository is on bitbucket.org | |
[email protected]:alt-f1.be/data_visualization.git | |
# ADD REMOTE PUSH URL's for gitlab and github | |
# It will change the remote.origin.pushurl config entry. | |
# Now pushes will send to both of these destinations, rather than the fetch URL. | |
# https://gist.github.com/rvl/c3f156e117e22a25f242 |
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
# store the file in the root of your sphinx repository | |
unidecode | |
Sphinx | |
sphinx-rtd-theme | |
sphinxcontrib-plantuml | |
# Docs | |
sphinxcontrib-httpdomain==1.4.0 | |
# git lfs |
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
# correct the issue : pdf generation fails after a 'libpng error: Not a PNG file' | |
# See https://github.com/readthedocs/readthedocs.org/issues/6770 | |
# gist source: https://gist.github.com/Abdelkrim/c1d7005feccbcfa66b198151dc1c4abd | |
# -- manage git-lfs ---------------------------------------------------------- | |
import os | |
if not os.path.exists('./git-lfs'): | |
os.system('wget https://github.com/git-lfs/git-lfs/releases/download/v2.7.1/git-lfs-linux-amd64-v2.7.1.tar.gz') |
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
Copyright (c) 2010-2020 Abdelkrim Boujraf ([email protected]), ALT-F1 SPRL | |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
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
{ | |
"name": "altf1bemanagesemver", | |
"description": "ALT-F1 SPRL: Empty package.json including the management of the semver", | |
"authors": "Abdelkrim Boujraf, ALT-F1 SPRL", | |
"version": "1.0.1", | |
"main": "build/html/index.html", | |
"scripts": { | |
"release": "standard-version", | |
"patch": "npm run release -- --release-as patch", | |
"minor": "npm run release -- --release-as minor", |
NewerOlder