Skip to content

Instantly share code, notes, and snippets.

View ssorgatem's full-sized avatar

Adrià Cereto Massagué ssorgatem

  • Centre de Ciències Òmiques (COS) Unitat Mixta URV-Eurecat
  • Reus
View GitHub Profile
@ssorgatem
ssorgatem / Instructions.txt
Last active January 13, 2023 10:19
SuperSlicer Ender 5 MicroSwiss DD config with BLTouch + bed mesh only in print area
Import the config.ini file with SuperSlicer
You will need to setup the appropiate Klipper macros for:
- the Moonraker timelapse plugin: https://github.com/mainsail-crew/moonraker-timelapse/blob/main/docs/configuration.md
- Print area only bed mesh: https://gist.github.com/ChipCE/95fdbd3c2f3a064397f9610f915f7d02 (adjust macro names and parameters if needed)
Here's also my printer.cfg as a guide.
@ssorgatem
ssorgatem / printer.cfg
Created March 24, 2021 18:29
Modded Ender 5 klipper printer.cfg
##### AUTOCREATED BY KIAUH #####
[include kiauh.cfg]
################################
# This file contains common pin mappings for the 2019 Creality
# Ender 5. To use this config, the firmware should be compiled for the
# AVR atmega1284p.
# Note, a number of Melzi boards are shipped with a bootloader that
# requires the following command to flash the board:
# avrdude -p atmega1284p -c arduino -b 57600 -P /dev/ttyUSB0 -U out/klipper.elf.hex
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index 8b8d2297d486..3733cbed9201 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -150,7 +150,7 @@ config MPENTIUM4
config MK6
- bool "K6/K6-II/K6-III"
+ bool "AMD K6/K6-II/K6-III"
@ssorgatem
ssorgatem / random_vowels.py
Created August 22, 2017 12:43
random_vowels.py
import random
from unidecode import unidecode
vowels = "aeiouyw"
sentence = unidecode(input())
new_sentence = ""
for i, c in enumerate(sentence.lower()):
if c in vowels:
@ssorgatem
ssorgatem / species.csv
Created October 8, 2015 15:08
Sample hierarchical data
kingdom philum class order family genus species A
No blast hit 2496.0
k__Archaea p__Euryarchaeota c__Thermoplasmata o__E2 f__[Methanomassiliicoccaceae] g__vadinCA11 s__ 6.0
k__Bacteria p__ c__ o__ f__ g__ s__ 5.0
k__Bacteria p__Actinobacteria c__Acidimicrobiia o__Acidimicrobiales f__ g__ s__ 0.0
k__Bacteria p__Actinobacteria c__Actinobacteria o__Actinomycetales f__Corynebacteriaceae g__Corynebacterium s__stationis 2.0
k__Bacteria p__Actinobacteria c__Actinobacteria o__Actinomycetales f__Micrococcaceae g__Arthrobacter s__ 8.0
k__Bacteria p__Actinobacteria c__Actinobacteria o__Bifidobacteriales f__Bifidobacteriaceae g__Bifidobacterium s__ 506.0
k__Bacteria p__Actinobacteria c__Actinobacteria o__Bifidobacteriales f__Bifidobacteriaceae g__Bifidobacterium s__animalis 48.0
k__Bacteria p__Actinobacteria c__Coriobacteriia o__Coriobacteriales f__Coriobacteriaceae g__ s__ 734.0
with open(pathway_out, "w") as file_write:
with open(pathway_in, "r") as file_read:
cnt = 0
for line in file_read:
if cnt == 2:
file_write.write(line)
elif line.startswith('paraula'):
cnt += 1
if cnt == 2:
break
#-*-coding: utf-8 -*-
import pybel
llistat_actius = "nom_del_fitxer_amb_els_actius.txt"
#el fitxer amb els actius n'ha de tenir els títols separats per canvi de línia, espai o tabulador
with open(llistat_actius) as fitxer_llista: #Obre el fitxer amb la llista
llista_actius_interessants = fitxer_llista.read().split() # En fa una llista de python
sdf_actius_interessants = pybel.Outputfile("sdf","actius_interessants.sdf") # Crea el fitxer on escriurem els actius interessants
@ssorgatem
ssorgatem / apiexample.py
Created August 26, 2013 08:49
Use of find_decoys.py
import find_decoys
query_files = ["CID_389710.sdf"] #this is a list with a single file name
db_files = ["ligand.sdf"] #Here, the same.
results = find_decoys.find_decoys(query_files = query_files, db_files = db_files)
# This last change is not mandatory, but since it is a function with
# so many arguments, it's very easy to misplace them when not using
# keyword arguments. This way the order of the arguments doesn't
# matter, as we are specifying what is each argument explicitly.
#Also note that find_decoys.find_decoys() is a generator function, which means that by calling it it returns
@ssorgatem
ssorgatem / ck2111converter.py
Created August 14, 2013 08:27
CK2 save converter for patch 1.11
## This increments all traits numbered 112 or more.
import Tkinter,tkFileDialog
import io
def bump(x):
if x=='\t\t\t}\n':
return x
y=int(x)
if y<112:
return x
@ssorgatem
ssorgatem / weirdcrash.py
Created July 4, 2012 14:53
test script showing a bug in OpenBabel
#/usr/bin/env python
import pybel
#this loads a known problematic molecule from the ZINC (ZINC39141032)
mol = pybel.readstring('smi','C1CCC[NH+](CC1)C[C@@H]2CCC[NH2+]2')
#The bug is only triggered if the 'MACCS' fingerprint is calculated before HBA2
#If the HBA2 are calculated before the fingerprint, it works.
print mol.calcfp('MACCS')