Skip to content

Instantly share code, notes, and snippets.

View marjinal1st's full-sized avatar
🥃
Master of Ballmer Peak

Ahmet Sezgin DURAN marjinal1st

🥃
Master of Ballmer Peak
View GitHub Profile
@marjinal1st
marjinal1st / gist:03f9e6daeaeb3f2aafc7
Created December 14, 2014 17:30
python-sfml build error
(venv)marjinal1st@thinkpad-edge:~/Python/python-sfml$ python setup.py install
running install
running build
running build_py
running build_ext
cythoning src/sfml/system.pyx to src/sfml/system.cpp
Error compiling Cython file:
------------------------------------------------------------
...
@marjinal1st
marjinal1st / gist:8c4c700c84ae33185b96
Created December 14, 2014 17:52
python-sfml build error 2
marjinal1st@thinkpad-edge:~/Python/python-sfml$ python setup.py install
running install
running build
running build_py
copying src/sfml/__init__.py -> build/lib.linux-x86_64-2.7/sfml
copying src/sfml/sf.py -> build/lib.linux-x86_64-2.7/sfml
running build_ext
cythoning src/sfml/system.pyx to src/sfml/system.cpp
building 'sfml.system' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Iinclude -I/usr/include/python2.7 -c src/sfml/system.cpp -o build/temp.linux-x86_64-2.7/src/sfml/system.o -fpermissive
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import pygame
from pygame.locals import *
import sys
from sprite_anim import *
pygame.init()
Domain Name: BMRF.US
Domain ID: D37352589-US
Sponsoring Registrar: ENOM, INC.
Sponsoring Registrar IANA ID: 48
Registrar URL (registration services): whois.enom.com
Domain Status: clientTransferProhibited
Variant: BMRF.US
Registrant ID: 659C99C8A93B9E50
Registrant Name: Josh Hubi
Registrant Organization: PixelBlast Media
@marjinal1st
marjinal1st / chip8-emu.rb
Created January 3, 2015 14:51
CHIP-8 Ruby Emülatörü
class CHIP8
attr_accessor :memory, :gpio, :display_buffer, :stack,
:key_inputs, :fonts, :opcode, :index, :pc,
:delay_timer, :sound_timer, :should_draw,
:instructions, :vx, :vy
def initialize
@memory = [0] * 4096 # 4096 Baytlık belleğimiz
@gpio = [0] * 16 # 16 tane genel amaçlı register'ı tutan bir dizi
@display_buffer = [0] * 2048 # 64 * 32 = 2048 piksellik ekranımız
import cv2
camera = cv2.VideoCapture(0)
camera.set(3, 1280)
camera.set(4, 720)
while True:
ret, image = camera.read()
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import rospy
from geometry_msgs.msg import Twist
def main():
rospy.init_node("move_test", anonymous=False)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import rospy
import cv2
from sensor_msgs.msg import Image
from cv_bridge import *
def callback(msg):
@marjinal1st
marjinal1st / move_test
Last active August 29, 2015 14:19
Robot
<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- | This document was autogenerated by xacro from robot1_base_02.xacro | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<robot name="robot1_xacro" xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller" xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface" xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor" xmlns:xacro="http://www.ros.org/wiki/xacro">
<link name="base_footprint">
<visual>
<geometry>
<box size="0.001 0.001 0.001"/>
@marjinal1st
marjinal1st / gist:0f0f4188e096cce371d6
Created January 4, 2016 14:27 — forked from karpathy/gist:587454dc0146a6ae21fc
An efficient, batched LSTM.
"""
This is a batched LSTM forward and backward pass
"""
import numpy as np
import code
class LSTM:
@staticmethod
def init(input_size, hidden_size, fancy_forget_bias_init = 3):