Skip to content

Instantly share code, notes, and snippets.

Avatar

sacha schutz dridk

View GitHub Profile
@dridk
dridk / RangeSlider.py
Last active Jun 30, 2020
The following code creates a range slider as a Qt widget with a native looks and feel
View RangeSlider.py
from PySide2.QtWidgets import *
from PySide2.QtCore import *
from PySide2.QtGui import *
import sys
class RangeSlider(QWidget):
def __init__(self, parent=None):
super().__init__(parent)
@dridk
dridk / main.cpp
Last active May 7, 2019
SQL parser with spirit X3 in C++
View main.cpp
#include <boost/spirit.hpp>
#include <string>
#include <typeinfo>
namespace VQL
{
template <typename Iterator>
auto parse(Iterator begin, Iterator end, bool& success)
@dridk
dridk / dispatcher.py
Last active Apr 22, 2019
dispatcher cutevariant
View dispatcher.py
class QueryPluginWidget(PluginWidget):
""" Base class for all query plugin """
query_changed = Signal() # Signal to emit if UI change the query
@property
def query(self):
return self._query
@query.setter
@dridk
dridk / test.cpp
Last active Sep 3, 2018
std::bind and std::function
View test.cpp
#include <iostream>
#include <typeinfo>
#include <functional>
#include <vector>
using namespace std;
class Test
{
@dridk
dridk / cpp
Created Sep 3, 2018
std::bind and std::function
View cpp
#include <iostream>
#include <typeinfo>
#include <functional>
#include <vector>
using namespace std;
class Test
{
public :
@dridk
dridk / orm.cpp
Created Sep 1, 2018
CRTP inheritance with static fields
View orm.cpp
#include <iostream>
#include <map>
#include <string>
#include <list>
using namespace std;
// =========== Classe de base: caché a l'utilisateur ==================================
template <typename T>
class Base
{
@dridk
dridk / gist:291da3be27ecfa409fb4af6f0cce822b
Created Mar 22, 2017
Denovo & recessif mutation selection with variant_tools
View gist:291da3be27ecfa409fb4af6f0cce822b
#!/bin/bash
pwd
MAMAN="maman.vcf.gz"
PAPA="pere.vcf.gz"
ENFANT="enfant.vcf.gz"
DP_MAX=50
EXAC_AF=0.001
# initialize vtools prj
View gist:6241263
#ifndef MATABLEVIEW_H
#define MATABLEVIEW_H
#include <QTableView>
class MaTableView : public QTableView
{
Q_OBJECT
public:
explicit MaTableView(QWidget *parent = 0);
View customWebView.js
ScrollView {
scrollViewProperties.pinchToZoomEnabled: true
scrollViewProperties.initialScalingMethod: ScalingMethod.AspectFit
scrollViewProperties.minContentScale: 1
scrollViewProperties.maxContentScale: 10
scrollViewProperties.scrollMode: ScrollMode.Both
Container {
WebView {
View custom WebView
ScrollView {
scrollViewProperties.pinchToZoomEnabled: true
scrollViewProperties.initialScalingMethod: ScalingMethod.AspectFit
scrollViewProperties.minContentScale: 1
scrollViewProperties.maxContentScale: 10
scrollViewProperties.scrollMode: ScrollMode.Both
Container {
WebView {
You can’t perform that action at this time.