Created
December 11, 2018 13:12
-
-
Save isitavi/e3c293e865c5d992b8b9fcdb7197a446 to your computer and use it in GitHub Desktop.
4 Problems
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
2017-02-09T02:37:44 [ERROR] Consumer iwjef99 could not be contacted | |
2017-02-09T02:37:46 [INFO] Message received from Producer w89fj93 | |
2017-02-09T02:37:51 [ERROR] Consumer 7sjeuf returned 504 | |
2017-02-09T02:37:53 [INFO] Message received from Producer a99jef9 | |
2017-02-09T02:37:59 [INFO] Message sent to Consumer a99jef9 | |
2017-02-09T02:38:02 [INFO] Message received from Producer a99jef9 | |
2017-02-09T02:38:08 [INFO] Message received from Producer 7sjeuf | |
2017-02-09T02:38:10 [INFO] Message sent to Consumer 98w9jfi9 | |
2017-02-09T02:38:10 [INFO] Message sent to Consumer a9i5f | |
2017-02-09T02:38:12 [INFO] Message received from Producer 98w9jfi9 | |
2017-02-09T02:38:15 [INFO] Message received from Producer w89fj93 | |
2017-02-09T02:38:17 [INFO] Message sent to Consumer i9wjf99 | |
2017-02-09T02:38:21 [INFO] Message sent to Consumer 7sjeuf | |
2017-02-09T02:38:27 [INFO] Message received from Producer iwjef99 | |
2017-02-09T02:38:29 [INFO] Message received from Producer i9wjf99 | |
2017-02-09T02:38:31 [INFO] Message received from Producer i9wjf99 | |
2017-02-09T02:38:35 [INFO] Message received from Producer 98w9jfi9 | |
2017-02-09T02:38:40 [INFO] Message received from Producer 7sjeuf | |
2017-02-09T02:38:40 [INFO] Message sent to Consumer w89fj93 | |
2017-02-09T02:38:44 [INFO] Message received from Producer i9wjf99 | |
2017-02-09T02:38:49 [INFO] Message received from Producer 98w9jfi9 | |
2017-02-09T02:38:55 [ERROR] Consumer a99jef9 disconnected unexpectedly | |
2017-02-09T02:38:55 [ERROR] Consumer i9wjf99 returned 503 | |
2017-02-09T02:38:58 [INFO] Message received from Producer w89fj93 | |
2017-02-09T02:39:02 [INFO] Message received from Producer iwjef99 | |
2017-02-09T02:39:04 [INFO] Message sent to Consumer a99jef9 | |
2017-02-09T02:39:07 [INFO] Message sent to Consumer 98w9jfi9 | |
2017-02-09T02:39:11 [INFO] Message received from Producer 63di9 | |
2017-02-09T02:39:15 [INFO] Message sent to Consumer 8efkwi | |
2017-02-09T02:39:20 [INFO] Message sent to Consumer a99jef9 |
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
import re | |
textfile = open('logs.txt', 'r') | |
matches = [] | |
reg = re.compile("7sjeuf") | |
for line in textfile: | |
matches += reg.findall(line) | |
print(matches.count("7sjeuf")) | |
textfile.close() |
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
import requests | |
import json | |
from urllib.request import urlopen | |
links = ['http://ip-api.com/json/63.70.164.200', | |
'http://ip-api.com/json/168.12.13.1'] | |
for url in links: | |
response = urlopen(url) | |
data = json.load(response) | |
city = data['city'] | |
country = data['country'] | |
region = data['region'] | |
print(city, region, country) |
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 Stdt.name | |
FROM Students Stdt, | |
Friends Frnd,Packages Pkg1,Packages Pkg2 | |
Where Pkg2.Salary > Pkg1.Salary | |
and Pkg2.ID = Frnd.Friend_ID and Pkg1.ID = Stdt.ID and Stdt.ID = Frnd.ID | |
Order by Pkg2.Salary; |
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. sudo useradd -m -s /bin/bash test | |
2. sudo usermod -a -G sudo test | |
3. pwd (If the direcotry is on /home/test) | |
touch .ssh | |
4. cd .ssh/ | |
touch id_rsa | |
5. chgrp test /home/test/.ssh/id_rsa | |
chmod 640 /home/test/.ssh/id_rsa | |
6. sudo chown test -R /home |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment