Skip to content

Instantly share code, notes, and snippets.

View mwojcikowski's full-sized avatar

Maciej Wójcikowski mwojcikowski

View GitHub Profile
@jkjuopperi
jkjuopperi / gist:e2fefa48c79bafb59b23ffefa8384bb3
Last active June 24, 2024 11:53
MikroTik wireless channels
/interface wireless channels
add band=2ghz-b/g/n width=20 list=2GHz/20MHz frequency=2412 name=ch1
add band=2ghz-b/g/n width=20 list=2GHz/20MHz frequency=2437 name=ch6
add band=2ghz-b/g/n width=20 list=2GHz/20MHz frequency=2462 name=ch11
add band=5ghz-onlyac width=20 list=5GHz/80MHz extension-channel=Ceee frequency=5180 name=ch36/38/42
add band=5ghz-onlyac width=20 list=5GHz/80MHz extension-channel=eCee frequency=5200 name=ch40/38/42
add band=5ghz-onlyac width=20 list=5GHz/80MHz extension-channel=eeCe frequency=5220 name=ch44/46/42
add band=5ghz-onlyac width=20 list=5GHz/80MHz extension-channel=eeeC frequency=5240 name=ch48/46/42
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ptosco
ptosco / SmartsSelfAndNbrs.ipynb
Created September 11, 2016 22:42
SmartsSelfAndNbrs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@craffel
craffel / popcount_array.pyx
Last active October 11, 2022 20:48 — forked from aldro61/popcount_array.pyx
Popcount of a numpy array of integers of any dtype
"""
Functions for computing the population count (aka Hamming weight) of an array
in-place using the built-in popcount routine.
Works with any integer datatype 64 bit-width or smaller.
Compile with gcc flag -mpopcnt
Adapted from
https://gist.github.com/aldro61/f604a3fa79b3dec5436a by Alexandre Drouin
"""
import numpy as np
cimport numpy as np
@yoavram
yoavram / .travis.yml
Last active June 7, 2019 11:30
Build and deploy conda packages to Anaconda.org from Travis-CI
language: python
python:
- 2.7
- 3.4
# Setup anaconda
before_install:
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b
@sgsfak
sgsfak / Drugbank parse to DB
Last active December 23, 2018 08:11
Parse DrugBank XML file with xmlstarlet
We couldn’t find that file to show.
// Slightly modified Adalight protocol implementation that uses FastLED
// library (http://fastled.io) for driving WS2811/WS2812 led stripe
// Was tested only with Prismatik software from Lightpack project
#include "FastLED.h"
#define NUM_LEDS 114 // Max LED count
#define LED_PIN 6 // arduino output pin
#define GROUND_PIN 10
#define BRIGHTNESS 255 // maximum brightness
@bougui505
bougui505 / dockprep.py
Last active November 27, 2017 11:37
run dock prep from command line with: chimera --nogui file.pdb dockprep.py outfilename.mol2
import chimera
from DockPrep import prep
models = chimera.openModels.list(modelTypes=[chimera.Molecule])
prep(models)
from WriteMol2 import writeMol2
writeMol2(models, "dp.mol2")
@mcs07
mcs07 / tautomer.py
Created April 3, 2014 15:20
Rough first go at tautomer enumeration and canonicalization using RDKit in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import copy
from itertools import tee, izip
import logging
from rdkit import Chem
from rdkit.Chem.rdchem import BondType, BondStereo, BondDir
__author__ = 'Matt Swain'
@hest
hest / gist:8798884
Created February 4, 2014 06:08
Fast SQLAlchemy counting (avoid query.count() subquery)
def get_count(q):
count_q = q.statement.with_only_columns([func.count()]).order_by(None)
count = q.session.execute(count_q).scalar()
return count
q = session.query(TestModel).filter(...).order_by(...)
# Slow: SELECT COUNT(*) FROM (SELECT ... FROM TestModel WHERE ...) ...
print q.count()