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
| import time | |
| def light_on_and_off(pin_to_on, pin_to_off): | |
| print str(pin_to_on) + " is ON" | |
| print str(pin_to_off) + " is OFF" | |
| time.sleep (0.5) | |
| pins = ["PIN1", "PIN2", "PIN3", "PIN4", "PIN5", "PIN6"] | |
| for i in range(6): |
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
| import random | |
| def inOut(x, y): | |
| if x + y <= 1: | |
| return True | |
| else: | |
| return False | |
| def calc_pi(n): | |
| return 4/n |
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
| def displayMenu(): | |
| print('\n\n Main menu of calculator:') | |
| print('1) add to numbers') | |
| print('2) substract to numbers') | |
| print('3) multiply to numbers') | |
| print('4) divide to numbers') | |
| print('5) potentize to numbers') | |
| print('6) exit program') | |
| print('7) factorial') | |
| print('8) binomial coefficient') |
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
| $ brew tap homebrew/versions | |
| $ brew install imagemagick@6 | |
| $ PKG_CONFIG_PATH=/usr/local/opt/imagemagick@6/lib/pkgconfig gem install rmagick |
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
| $ /opt/sdb/programs/bin/x_start AFDB | |
| # если говорит, что x server down, то | |
| $ /opt/sdb/programs/bin/x_server start |
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
| fibonacci = -> (i, x = 0, y = x + 1) do | |
| if i > 0 | |
| puts x | |
| fibonacci.call(i-1, y, x + y) | |
| end | |
| end | |
| # calculate 10 times | |
| fibonacci.call(10) |