Видео ролики бесплатно онлайн

Смотреть 3d видео

Официальный сайт panajotov 24/7/365

Смотреть видео бесплатно

Похожие на uscrКогда у вас начинаются выходные?
Zapolyarnyi 31.12.2009 21:28

ОпросыКто-нибудь будет встречать Новый Год ON-line? Да пребудет с вами TIGER!

БУДУ 30
НЕ БУДУ 42
+ 5 -
36
nvbn 17.12.2010 02:47

How-to`sПревращаем ноутбук в гирлянду!

Скрипт:
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#!/usr/bin/python
# -*- coding: utf-8 -*-
#       This program is free software; you can redistribute it and/or modify
#       it under the terms of the GNU General Public License as published by
#       the Free Software Foundation; either version 2 of the License, or
#       (at your option) any later version.
#       
#       This program is distributed in the hope that it will be useful,
#       but WITHOUT ANY WARRANTY; without even the implied warranty of
#       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#       GNU General Public License for more details.
#       
#       You should have received a copy of the GNU General Public License
#       along with this program; if not, write to the Free Software
#       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
#       MA 02110-1301, USA.


import time
import os

class Led:
  """Led class"""
 
  def __init__(self, type = 'file', **kwargs):
    """Init led and get status
 
    Keyword Arguments:
    type -- String
    adress -- String
    on -- String
    off -- String
 
    Returns: None
 
    """
    self.type = type
    if type == 'file':
      self.adress = kwargs<'adress'>
      file = open(self.adress, 'r')
      self.status = int(file.read())
      file.close()
    elif type == 'command':
      for arg in kwargs:
  setattr(self, arg, kwargs<arg>)
  self.status = 0
 
  def push(self, data):
    """Change led file value
 
    Keyword Arguments:
    data -- Int
 
    Returns: None
 
    """
    file = open(self.adress, 'w')
    file.write(str(data))
    file.close()
 
  def action(self, type):
    """Run on/off command
 
    Keyword Arguments:
    type -- Int
 
    Returns: None
 
    """
    os.system(getattr(self, type and 'on' or 'off'))
 
  def change_status(self, value = -1):
    """Change led status"
 
    Keyword Arguments:
    value -- Int
 
    Returns: None
 
    """
    if value == -1:
      value = 1 - self.status
    if self.type == 'file':
      self.push(value)
    elif self.type == 'command':
      self.action(value)
    self.status = value

class Leds:
  """Flashing leds class"""
  leds = 

 
  def __init__(self, *args, **kwargs):
    """Init leds
 
    Keyword Arguments:
    *args -- Led init data
 
    Returns: None
 
    """
    try:
      self.interval = kwargs<'interval'>
    except NameError:
      pass
    for led in args:
      self.append(led)
 
  def append(self, adress):
    """Add led to leds array
 
    Keyword Arguments:
    adress -- String or Tuple
 
    Returns: None
 
    """
    if type(adress) == str:
      self.leds.append(Led(type='file', adress=adress))
    elif type(adress) == tuple:
      self.leds.append(Led(type='command', on=adress<0>, off=adress<1>))
 
  def run(self):
    """Start led flashing"""
    while True:
      for led in self.leds:
 led.change_status()
 time.sleep(self.interval)
 
 
if __name__ == '__main__':
  leds = Leds(
       '/sys/devices/platform/asus_laptop/wlan',
       '/sys/devices/platform/asus_laptop/bluetooth',
       ('streamer -c /dev/video0 -b 16 -o /dev/null&', 'killall streamer'),
       interval=0.5,
       )
  leds.run()</arg>

Для работы на вашем ноутбуке нудно отредактировать 133-135 строки.
Можно указывать файл(пример - '/sys/devices/platform/asus_laptop/bluetooth') отвечающий за лампочку, либо команды для включения и выключения лампы:
1
('streamer -c /dev/video0 -b 16 -o /dev/null&', 'killall streamer'),

В файле настройки для ноутбуков asus, для web-камер команда универсальная (135 строчка).
Запускать через sudo, либо от рута.
Полностью.
+ 7 -
1
uscr 31.12.2011 11:24

Talks!С наступающим же!

Сердечно поздравляю вас с наступающим 2012 годом! Традиционно желаю коротких пингов и длинных аптаймов, быстрых патчей и мгновенной компиляции.
Людям не связанным с IT или связанным косвенно, и всем остальным торжественно желаю исполнения одного, абсолютно любого, желания. Не ошибитесь.
Если встречаете НГ в интернетах, отпишитесь в топике в тот момент, когда в вашем городе наступит полночь.

УРА!
+ 11 -
0

Смотреть онлайн бесплатно

Онлайн видео бесплатно


Смотреть русское с разговорами видео

Online video HD

Видео скачать на телефон

Русские фильмы бесплатно

Full HD video online

Смотреть видео онлайн

Смотреть HD видео бесплатно

School смотреть онлайн