Skip to content

Instantly share code, notes, and snippets.

View mmajewsk's full-sized avatar
🏠
Working from home

mwmajewsk mmajewsk

🏠
Working from home
View GitHub Profile
@mmajewsk
mmajewsk / LICENSE
Last active August 29, 2015 14:23
Python 2d ray tracing
The MIT License
Copyright (c) 2015 Hawker
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@mmajewsk
mmajewsk / SensorDHT11.py
Created September 9, 2015 12:06
Part of the DHT11 python driver based on http://www.uugear.com/portfolio/dht11-humidity-temperature-sensor-module/# It has problem with proper response time, and few others, better use adafruit driver
import RPi.GPIO as GPIO
import time
from datetime import datetime
def bin2dec(string_num): # define a function to convert a binary number to a decimal.
return str(int(string_num, 2)) # return the string representing the integer value of the string passed to this function in base 2 (binary)
class Sensor(object):
def __init__(self):
trafficpermonth <- read.csv("C:/Users/hawker/Desktop/studia/szeregi/lab4/trafficpermonth.txt", sep="")
traffic <- ts(trafficpermonth["x"],start=c(1993,1),freq=12)
#1a
dec_traffic <- decompose(traffic)
plot(dec_traffic)
#1b
subset_traffic <- window(traffic, c(1996,1), c(2001,8))
@mmajewsk
mmajewsk / README.md
Last active December 8, 2015 15:54
cuda mini-project

opis pliku

#include "logger.hpp"
Logger::Logger(double *x,
double *y,
double *total_distance,
int n,
std::string datapath_hist,
std::string datapath_time)
:x(x),
y(y),
@mmajewsk
mmajewsk / proj1.asm
Last active December 15, 2015 00:44
proj1.asm
MEM "plik.mem"
dac_config DSIO $40
dac_data DSIN $41
data_swap equ S0
opoznij_1u_const EQU 11
reg_1m equ S1
reg_1u equ S2
const_reg_swap equ S3
data_var equ S4
dac_data_var equ S5
@mmajewsk
mmajewsk / opis.md
Last active January 11, 2016 23:16
Jak odpalać rzeczy na zeusie

##Jak odpalić pycuda/theano na zeusie

  1. Tworzymy konto na plgrid z dostpem do tzw/ gpgpu (taka rzecz na zeusie co pozwala nam odpalać rzeczy na gpu).
  2. Logujemy sie przez ssh na ui.cyfronet.pl z loginem takim jak do konta naplgrid i haslo podajemy takie jak mamy do plgrid
  3. Musimy najpierw wejsc w kolejke do gpu poprzez qsub -I -q gpgpu -l nodes=1:ppn=1:gpus=1 (dziki temu zyskujemy dostep do takich programow jak kompilator cudy czy pycuda)
  4. To w zasadzie tyle, thano i pycuda sa juz domyslnie zainstalowane razem z pythonem 2.7.6, o ile sie nie myle. Jesli potrzebujecie jakiejs innej aplikacji/albo wersji python to poszukajcie tutaj https://aplikacje.plgrid.pl/ i wpiszcie module add sciezka/do/modulu
  5. uzywamy qdel zeby usunac sie z kolejki po zakonczeniu roboty (ważne)

##Jak odpalić nvcc na zeusie

  1. Tworzymy konto na plgrid z dostpem do tzw/ gpgpu (taka rzecz na zeusie co pozwala nam odpalać rzeczy na gpu).
  2. Logujemy sie przez ssh na ui.cyfronet.pl z loginem takim jak do konta naplgrid i haslo
@mmajewsk
mmajewsk / pypupet.py
Created June 12, 2016 22:48
PYthons Poor Users Parameter Toolbox
## created by Hawker (https://github.com/hawkerpl)
## inspired by https://github.com/SmokinCaterpillar/pypet
##
import itertools
def cartesian_generator(somedict):
values = somedict.values()
keys = somedict.keys()
for line in itertools.product(*values):
yield dict(zip(keys,line))
@mmajewsk
mmajewsk / readme.md
Last active July 22, 2016 23:28 — forked from baraldilorenzo/readme.md
VGG-16 pre-trained model for Keras with Skimage

##VGG16 model for Keras (with skimage/scikit-image instead of opencv)

This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman

@mmajewsk
mmajewsk / README.md
Created April 11, 2017 12:09
Keras - Sequential model to Functional example