This file contains 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
rs:PRIMARY> use hydra-site-gipernn | |
switched to db hydra-site-gipernn | |
rs:PRIMARY> db.page.count({downloaded:{$gte:ISODate("2015-10-09")}}) | |
14869 | |
rs:PRIMARY> use hydra-site-ch-gipernn | |
switched to db hydra-site-ch-gipernn | |
rs:PRIMARY> db.page.count({downloaded:{$gte:ISODate("2015-10-09")}}) | |
6607 | |
rs:PRIMARY> use hydra-site-nb-gipernn | |
switched to db hydra-site-nb-gipernn |
This file contains 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
<script> | |
ListingMapController.Init( {"listings":[{"listingId":123637117,"latitude":55.6572,"longitude":37.7635956,"type":0,"prefixedListingId":"l123637117"},{"listingId":123445023,"latitude":55.6517639,"longitude":37.7699356,"type":0,"prefixedListingId":"l123445023"},{"listingId":122832120,"latitude":55.66699,"longitude":37.7635956,"type":0,"prefixedListingId":"l122832120"},{"listingId":123495280,"latitude":55.6677628,"longitude":37.7619247,"type":0,"prefixedListingId":"l123495280"},{"listingId":123675415,"latitude":55.6548958,"longitude":37.7745171,"type":0,"prefixedListingId":"l123675415"},{"listingId":121984459,"latitude":55.65171,"longitude":37.7485657,"type":0,"prefixedListingId":"l121984459"},{"listingId":123260355,"latitude":55.65863,"longitude":37.77213,"type":0,"prefixedListingId":"l123260355"},{"listingId":122040490,"latitude":55.66843,"longitude":37.760334,"type":0,"prefixedListingId":"l122040490"},{"listingId":122351301,"latitude":55.65768,"longitude":37.7676468,"type":0,"prefixedListingId":"l |
This file contains 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/perl | |
use Redis; | |
my $r = Redis->new(server => 'redis.srg-it.ru:6379'); | |
my $cnt = 0; | |
foreach my $key (@{$r->keys('http:\/\/www\.tomsk\.ru09\.ru\/realty\?subaction=detail&id=\d+')}) { | |
# $r->del($key); | |
$cnt++; |
This file contains 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
array = [random.randrange(-100, 200) for x in range(10)] | |
print(array) | |
for a in array.copy(): | |
if a < 0: | |
array.remove(a) | |
print(array) |
This file contains 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
select users.country, sum(orders.order_sum) as total_sum | |
from `DZ1.users` users | |
left join `DZ1.orders` orders | |
on orders.user_id = users.id | |
where users.country = 'Russia' or users.country = 'Brazil' | |
group by users.country | |
order by total_sum desc |
This file contains 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
1) | |
select users.first_name, users.last_name, users.email, count(orders.orders_id) as order_number | |
from [DZ1.users] users | |
left join [DZ1.orders] orders | |
on orders.user_id = users.id | |
group by orders.user_id, users.first_name, users.last_name, users.email | |
order by order_number desc | |
limit 5 | |
2) |
This file contains 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
1) Пользователь задаёт два произвольных символа и число. На основе этих данных построить последовательность. | |
Например, при входных данных a = '*', b = '.', c = 7 должно получиться: *.*.*.* | |
2) Пользователь задаёт предложение. Посчитать в нём количество гласных букв. | |
3) В предложении из предыдущей задачи заменить все буквы на чётных позициях на знак '?' |
This file contains 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
# Датчик принимает сигнал, состоящий из 0 и 1. | |
# Известно, что сигнал имеет периодичность, не превышающей натурального числа n. | |
# Напишите код, который вычисляет периодичность сигнала. | |
# Считайте, что 3 < n < 1000, а общая длина сигнала значительно превышает n. | |
# Пример сигнала с периодичностью 4 (повторяющийся элемент 1011): 1011101110111011101110111011101110111011 | |
def sequence_finder(s): | |
pattern_sequence = '' | |
step = 3 | |
while step <= len(s) // 2: |
This file contains 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
i = (int(input("Введите количество опрашиваемых людей: "))) | |
for x in range(i): | |
k = (int(input("Введите ответ: "))) | |
number = "5" + str(k) | |
print(number) |
OlderNewer