This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Module: ultrasound.py | |
| # This module can be used to operate an HC-SR04 ultrasonic sensor | |
| # from a raspberry pi GPIO. | |
| import time | |
| import RPi.GPIO as GPIO | |
| # setup which pins are which | |
| TRIG = 8 | |
| ECHO = 7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function resizeImage($img, $new_color, $color_range) { | |
| list($width_orig, $height_orig) = getimagesize($img); | |
| $src = imagecreatefrompng($img); | |
| $dst = imagecreatetruecolor($width_orig+50,$height_orig+50); | |
| $pink = imagecolorallocate($dst, 255, 105, 180); | |
| imagefilledrectangle($dst, 15, 50, 150, 150, $pink); | |
| $size_arr = getimagesize($img); | |
| for ($y=0; $y<$size_arr[1]; $y++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from raven import Client | |
| client = Client('https://c0615656d179475ba9fc93e60ca3af60:[email protected]:446/2') | |
| # record a simple message | |
| client.captureMessage("hello world from roma с переводом строк\nеще и по русски и очень длинный текст \nи очень длинный текст и очень длинный текст и очень длинный текст и очень длинный текст и очень длинный текст\n ыфвафывафыавфыа") |
NewerOlder