azepug | Unsorted

Telegram-канал azepug - AzerbaijanPUG(Official)

912

Azerbaijan Python Users Group

Subscribe to a channel

AzerbaijanPUG(Official)

Eslinde o imis

"SQLAlchemy represents database sequences using the Sequence object, which is considered to be a special case of “column default”. It only has an effect on databases which have explicit support for sequences, which among SQLAlchemy’s included dialects includes PostgreSQL, Oracle, MS SQL Server, and MariaDB. The Sequence object is otherwise ignored."

Читать полностью…

AzerbaijanPUG(Official)

Deyil. Bu sqlalchemy dən gələn Sequence type dır

Читать полностью…

AzerbaijanPUG(Official)

Salam, SQLAlchemy v2.0dan sonra gələn yeniliklər haqqında məsləhətlər almaq istəyirdim. Birinci sual list vs Sequence fərqlləridi. query həmişə Sequence göndərir və list return type mypy da fail olur. Burda hansı cür addımlar atmaq daha yaxşıdı ümumi olaraq təcrübələri eşitmək istəyərəm. Tam detallı bir fərqlərini izah edən məqalə tapa bilmədim düzü.
Digər bir məqam isə get_one() və ya normal select scalars ilə çəkməkdir. get_one() type of Sqlalchemy model qaytarır amma digər isə normal ORM model ve buda mypy da fail olur. Sqlalchemy v2 ilə işləyən və bu məqamlarla bağlı detallı məlumatı olan varsa bölüşsə sevinərəm.

Читать полностью…

AzerbaijanPUG(Official)

https://github.com/astral-sh/rye

Читать полностью…

AzerbaijanPUG(Official)

Təşəkkür edirəm amma mən yazdığımda səhv nədədir? Mənə düzgün həll lazım deyil səhvimi başa düşmək isteyirem

Читать полностью…

AzerbaijanPUG(Official)

def fibonacciModified(t1, t2, n):

for i in range(3, n + 1):
t1, t2 = t2, t1 + t2**2
return t2

def fibonacciModified(t1, t2, n):
if n == 1:
yield t1
elif n == 2:
yield t2
else:
yield from fibonacciModified(t2, t1 + t2**2, n - 1)

result = list(fibonacciModified(t1, t2, n))[-1]



iki metodnan hell elemk olar birinci adi for loop ikincisi recursive

amma ordo runtime'dan bawqa boyuk n olanda regem cox uzun olduqu ucun ValueError verecek

Читать полностью…

AzerbaijanPUG(Official)

burdan bu suala baxdim amma yene 3 case runtime error aldim

Читать полностью…

AzerbaijanPUG(Official)

teshekkurler. Paralel hackerrank-da da hell edirem amma ance python-a uygun olanlari. Problem solving-den hec ne etmemishem heleki

Читать полностью…

AzerbaijanPUG(Official)

stepik.org-da oyrenirem.cox gozel izah edirler

Читать полностью…

AzerbaijanPUG(Official)

Ətraflı məlumat üçün təşəkkür edirəm

Читать полностью…

AzerbaijanPUG(Official)

birinci double for loop menasizdi cunki (orda cox uzun list yaranir). sonra hemin listden bir nece defe ancaq 1ci herfi yoxlanilir ( ikinci for loop)

def minion_game(string):
# your code goes here
vowels = ['a', 'e', 'i', 'o', 'u']
kevin=0
stuart=0

for i in range(len(string)):
if s[i].lower() in (vowels):
kevin+=1*(len(string)-i)
else:
stuart+=1*(len(string)-i)
if kevin==stuart:
print('Draw')
elif kevin>stuart:
print('Kevin',kevin)
else:
print('Stuart',stuart)


'''

Читать полностью…

AzerbaijanPUG(Official)

tech with tim de yaxshidir, geder

Читать полностью…

AzerbaijanPUG(Official)

corey schafer muellim

Читать полностью…

AzerbaijanPUG(Official)

https://realpython.com/introduction-to-python-generators/

Читать полностью…

AzerbaijanPUG(Official)

yield istifade edin, loop icinde

Читать полностью…

AzerbaijanPUG(Official)

Sequence = _alias(collections.abc.Sequence, 1)

Читать полностью…

AzerbaijanPUG(Official)

Bu Sequence Postgre-deki sequence ile eynidir ? https://www.postgresql.org/docs/current/sql-createsequence.html

Читать полностью…

AzerbaijanPUG(Official)

Yenidən avtomatik video düzəldən bot hazırladım. Bu səfər prosses daha basic olduğu üçün open source etmək qərarına gəldim:

https://www.linkedin.com/posts/alifagha-salmanov_my-latest-open-source-project-reels-generator-activity-7216762461557784578-SH6d?utm_source=share&utm_medium=member_desktop

Читать полностью…

AzerbaijanPUG(Official)

sehv yoxdur, orda men basha dushduyume gore 3 test fail olur o da value errora goredi.

Читать полностью…

AzerbaijanPUG(Official)

value error'u hell etmek ucun

import sys
sys.set_int_max_str_digits(1000000)

Читать полностью…

AzerbaijanPUG(Official)

n=20 olanda runtime error verir

Читать полностью…

AzerbaijanPUG(Official)

#!/bin/python3

import math
import os
import random
import re
import sys

#
# Complete the 'fibonacciModified' function below.
#
# The function is expected to return an INTEGER.
# The function accepts following parameters:
# 1. INTEGER t1
# 2. INTEGER t2
# 3. INTEGER n
#

def fibonacciModified(t1, t2, n):
# Write your code here
if n>=3 and n<=20:
for i in range(2,n) :
(t2,t1)=(t1,t2)
t2=t2+t1**2
return t2
if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')

first_multiple_input = input().rstrip().split()

t1 = int(first_multiple_input[0])

t2 = int(first_multiple_input[1])

n = int(first_multiple_input[2])

result = fibonacciModified(t1, t2, n)

fptr.write(str(result) + '\n')

fptr.close()

Читать полностью…

AzerbaijanPUG(Official)

https://www.hackerrank.com/domains/algorithms?filters%5Bsubdomains%5D%5B%5D=dynamic-programming

Bu algorithm'leri Bawa duwmek ucun komek ede biler

Читать полностью…

AzerbaijanPUG(Official)

Bele teze bashlayanlar ucun praktika kimi leetcode( https://leetcode.com/problemset/all-code-essentials/ ) meslehet gorerdim.

Читать полностью…

AzerbaijanPUG(Official)

https://www.youtube.com/watch?v=JasPrZqImxo

Читать полностью…

AzerbaijanPUG(Official)

umumiyyetle, yield ile ejdaha sohbetler etmek olar. DontUseThisCode (MUELLIM) tutoriali var, amma advanced sohbetlerdir

Читать полностью…

AzerbaijanPUG(Official)

https://www.youtube.com/watch?v=u3T7hmLthUU

Читать полностью…

AzerbaijanPUG(Official)

https://www.youtube.com/watch?v=bD05uGo_sVI&amp;pp=ygURZ2VuZXJhdG9ycyBweXRob24%3D

Читать полностью…

AzerbaijanPUG(Official)

Yeni başlamışam, link ata bilərsiz oxuyum həmin linkdən?

Читать полностью…

AzerbaijanPUG(Official)

generatorlara kecmek olar, buna lazy calculation lazimdir.

Читать полностью…
Subscribe to a channel