Skip to content

Instantly share code, notes, and snippets.

View ahmad88me's full-sized avatar
:octocat:

Ahmad Alobaid ahmad88me

:octocat:
View GitHub Profile
@ahmad88me
ahmad88me / Steps
Created July 20, 2022 14:16
Python3.8 with mod_wsgi and Apache on ubuntu (for a flask application).
# Install python 3.8
```
./configure --enable-shared --enable-optimizations
make
sudo make install
```
#install mod_wsgi 4.8
```
./configure --with-python=/usr/local/bin/python3.8
@ahmad88me
ahmad88me / inkscape.py
Created October 10, 2021 06:42 — forked from KelSolaar/inkscape.py
Inkscape - macOs - Absolute Path Wrapper
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Inkscape - macOs - Absolute Path Wrapper
========================================
On *macOs*, *Inkscape* requires absolute paths to work::
https://answers.launchpad.net/inkscape/+question/280575
@ahmad88me
ahmad88me / app.py
Last active August 20, 2020 08:12
graphQL mongodb graphene embedded document
from flask import Flask, jsonify, request
import random
from flask_graphql import GraphQLView
from database import init_db
from schema import schema
app = Flask(__name__)
default_query = """
{
allColumns {
@ahmad88me
ahmad88me / main.cpp
Last active November 30, 2018 15:26
HDT estimatedNumResults
int main(){
string property_uri = "x:x";
string HDT_FNAME = "sample.hdt";
HDT *hdt = HDTManager::mapHDT(HDT_FNAME.c_str());
cout << "\nnumber of entities for property <"<< property_uri << ">: "<< hdt->search("", property_uri.c_str(), "")->estimatedNumResults();
auto itt = hdt->search("", property_uri.c_str(), "");
long i;
while(itt->hasNext()){
i++;
itt->next();
@ahmad88me
ahmad88me / Docker-cheatsheet.md
Last active October 13, 2018 15:48
Docker simple cheatsheet

Images

  • list images docker image ls
  • create image from a docker file docker image build -t imgname:imgtag .

Containers

  • run a container docker container run --interactive --tty --name containername imgname:imgtag
import QtQuick 2.0
Column{
property string username
property string img
width: parent.width
Rectangle{
color: "white"
height: 60
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>Myapp</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
@ahmad88me
ahmad88me / sample.py
Created July 21, 2016 12:53
a sample to use rdflib
import rdflib
def get_ontology_data(ontology_file):
g = rdflib.Graph()
g.parse(ontology_file)
for sub, pred, obj in g:
add_as_tuple(sub, pred, obj)
print_col_tables()
return ""