Skip to content

Instantly share code, notes, and snippets.

# test/html/test_element.rb
module Nokogiri
module HTML
class TestElement < Nokogiri::TestCase
def test_line
html = Nokogiri::HTML(<<-eohtml)
<html>
<head>
<title>title</title>
</head>
# test/html/test_element.rb
module Nokogiri
module HTML
class TestElement < Nokogiri::TestCase
def test_line
html = Nokogiri::HTML(<<-eohtml)
<html>
<head>
<title>title</title>
</head>
#451851396
Author: тала
At: 18.08.2009, 20:08
почему то обрывается закачка очень часто, чтобы скачать файл иной раз требуется несколько попыток
--------------------------------------------------------------------------------
#451851395
Author: Ринат
At: 18.08.2009, 17:05
# -*- coding: utf-8 -*-
import feedparser
import re
import urllib, urllib2
import datetime, time
import os
FEED_URL = "http://kino.motor.kg/Rss.aspx"
import os
import re
# gumblar fix
walk = os.walk("./")
for root, dirs, files in walk:
for file in files:
filename = os.path.join(root, file)
replace_str = None
if re.search(r"\.php$", file):
# oldest twitter users in KG
screen_name; id; created_at
seyitbek; 828801; 2007.03.09 10:11:40
dyakhnov; 1420281; 2007.03.18 15:10:09
bektour; 9125162; 2007.09.27 13:59:51
rosomaxa; 10383632; 2007.11.19 14:41:50
temonix; 11525542; 2007.12.26 07:57:56
arstan; 12016232; 2008.01.09 06:55:12
2bj; 14065272; 2008.03.01 16:00:04
vahidov; 14233235; 2008.03.27 06:14:39
def password_strength(value)
strength = 0
case value.size
when 5..7
strength += 6
when 8..9
strength += 12
else
strength += 18 if value.size > 10
module LineNumber
class Tag < Struct.new(:name, :close, :line, :in_script)
end
class LineNumber
attr_reader :tags
def self.parse(str)
parser = self.new(str)
return parser.parse
end
# -*- coding: utf-8 -*-
import feedparser
import re
import urllib, urllib2
import datetime, time
import os
import sqlite3
DEBUG = True
# export diff
export_dir="../export"
mkdir -p $export_dir
for file in $(svn diff --summarize -r$1:$2)
do
if [ -f $file ]
then
dirname=${file%/*}