Skip to content

Instantly share code, notes, and snippets.

View cmaureir's full-sized avatar
🇨🇱
¯\_(ツ)_/¯

Cristián Maureira-Fredes cmaureir

🇨🇱
¯\_(ツ)_/¯
View GitHub Profile
modules = [
"QtCore",
"QtGui",
"QtWidgets",
"QtHelp",
"QtNetwork",
"QtXml",
"QtOpenGL",
"QtOpenGLWidgets",
"QtPrintSupport",
% pip install -e . -v
Using pip 21.1.2 from /home/cmaureir/dev/env/lib/python3.9/site-packages/pip (python 3.9)
Non-user install because user site-packages disabled
Created temporary directory: /tmp/pip-ephem-wheel-cache-dyu0_64p
Created temporary directory: /tmp/pip-req-tracker-78lgrlkt
Initialized build tracking at /tmp/pip-req-tracker-78lgrlkt
Created build tracker: /tmp/pip-req-tracker-78lgrlkt
Entered build tracker: /tmp/pip-req-tracker-78lgrlkt
Created temporary directory: /tmp/pip-install-f1eqak8n

Examples for PySide

This has two lists of examples:

  • The ones that are already ported to PySide,
  • The ones that are missing

Note that the idea is to port examples that provide new insights for PySide users, which it might be the case that two examples have the same basic idea.

@cmaureir
cmaureir / pd_merge_conditional.py
Last active October 13, 2019 19:52
Comparing two columns in dataframes to get the different ones
import pandas as pd
import numpy as np
df1 = pd.DataFrame(columns=["product_id", "PMID"])
df2 = pd.DataFrame(columns=["product_id", "PMID"])
# El generado de ahora
df1.loc[0] = [1, 111]
df1.loc[1] = [2, 222]
df1.loc[2] = [3, 333]
@cmaureir
cmaureir / compare.py
Created March 7, 2019 12:14
Compare two data frames by column values
import numpy as np
import pandas as pd
# content from '1.csv'
#
# a,b,c,d
# 1,0.1,"a-10","hello"
# 2,0.2,"a-11","hola"
# 3,0.3,"a-12","hallo"
# 4,0.5,"a-13","hello"
@cmaureir
cmaureir / ffmpeg_magic.sh
Created June 26, 2018 09:17
Cut and speed-up videos
#!/bin/bash
# This script take a video as a command line argument
# dividing it in three parts, then speeds up the middle part,
# and finally joins the parts into a final `output.mp4` video.
# First section of the video to cut
T1="00:00:10"
T1HALF="00:00:05"
# Second section duration
app = QGuiApplication(sys.argv)
view = QQuickView()
view.setResizeMode(QQuickView.SizeRootObjectToView)
Installed Arch Linux on my desktop machine.
* I had some issues with the bootloader installation, since I was used to boot without UEFI mode, so I needed to just install a simple bootloader after
the installation finished, instead of GRUB.
* The additional steps for this were:
* Instead of the usual ext2 partition of 100M I created a 200M partition
* formatted it with fat32 and also selecting with cfdisk EFI System, for the system to recognise it.
* Later to install the bootloader, I just did an bootctl install and later added the following to /boot/loader/entries/arch.conf
#!/usr/bin/env python
import os
import re
import sys
import logging
def get_emails(fname):
print("Reading {}".format(fname))

Keybase proof

I hereby claim:

  • I am cmaureir on github.
  • I am cmaureir (https://keybase.io/cmaureir) on keybase.
  • I have a public key ASDBTbvbzGusHaylgGUXnGTQ0X2aBH1wcXh7WUInOcNLUAo

To claim this, I am signing this object: