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
print("Just testin'") |
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
print("Just testin'") |
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
print("Surprise") |
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
print("Surprise") |
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
>>> dis.dis('''\ | |
... a = 10 | |
... while a: | |
... a -= 1 | |
... if a < 2: | |
... break | |
... print(a) | |
... ''') | |
1 0 LOAD_CONST 0 (10) | |
2 STORE_NAME 0 (a) |
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
. |
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
`199.72.81.55 - - [01/Jul/1995:00:00:01 -0400] "GET /history/apollo/ HTTP/1.0" 200 6245 | |
unicomp6.unicomp.net - - [01/Jul/1995:00:00:06 -0400] "GET /shuttle/countdown/ HTTP/1.0" 200 3985 | |
199.120.110.21 - - [01/Jul/1995:00:00:09 -0400] "GET /shuttle/missions/sts-73/mission-sts-73.html HTTP/1.0" 200 4085 | |
burger.letters.com - - [01/Jul/1995:00:00:11 -0400] "GET /shuttle/countdown/liftoff.html HTTP/1.0" 304 0 | |
199.120.110.21 - - [01/Jul/1995:00:00:11 -0400] "GET /shuttle/missions/sts-73/sts-73-patch-small.gif HTTP/1.0" 200 4179 | |
burger.letters.com - - [01/Jul/1995:00:00:12 -0400] "GET /images/NASA-logosmall.gif HTTP/1.0" 304 0 | |
burger.letters.com - - [01/Jul/1995:00:00:12 -0400] "GET /shuttle/countdown/video/livevideo.gif HTTP/1.0" 200 0 | |
205.212.115.106 - - [01/Jul/1995:00:00:12 -0400] "GET /shuttle/countdown/countdown.html HTTP/1.0" 200 3985 | |
d104.aa.net - - [01/Jul/1995:00:00:13 -0400] "GET /shuttle/countdown/ HTTP/1.0" 200 3985` |
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
Имею такой Json. Необходимо вытащить в одну строку через - (тире) [dates] -> [games] -> [teams] -> [away] -> [name] и [dates] -> [games] -> [teams] -> [home] -> [name] вот такой код сейчас - https://pastebin.com/QNQ6W0P2. все пробовал, максимум что вытащил списком это gamePk |
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
def f(x): | |
return x**5-x-0.2 | |
def root(f,a,b,e): | |
x=(a+b)/2 | |
while abs(b-a)>e: | |
if f(b)*f(x)==0: | |
return x | |
break | |
elif f(b)*f(x)<0: | |
a=x |
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
class DBExecutor(): def init(self, connection_params): self._connection_params = connection_params self._connection = None def _connect(self): self._connection = pymysql.connect(self._connection_params) def execute(self, sql, *args, kwargs): if not (self._connection and self._connection.ping(True)): self._connect(): with self._connection.cursor() as cursor: cursor.execute(sql, *args, kwargs) self._connection.commit() # использование db_executor = DBExecutor(host='127.0.0.1', user='root', password='', db='python', charset='utf8mb4', cursorclass=pymysql.cursors.DictCursor, autocommit=True) db_executor.execute("INSERT INTO scaner (number) VALUES (%s)", ('text',)) |