Skip to content
#

pythonic

Here are 80 public repositories matching this topic...

pytube
2014111963
2014111963 commented Aug 9, 2019

Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/pytube/streams.py", line 206, in download
filename = filename or self.default_filename
File "/usr/local/lib/python2.7/dist-packages/pytube/streams.py", line 176, in default_filename
title = self.player_config_args['title']
KeyError: 'title'

jnguyen32
jnguyen32 commented Jul 24, 2019

The documentation seems fairly limited. Looking for a way to execute a "WHERE EXISTS" or "WHERE NOT EXISTS" type query.

Is the recommendation to extend pypika to include it or is there a way to custom write part of the query?

Not seeing much documentation on extending the module.

koaning
koaning commented Mar 18, 2018

Suppose that we are working with this bit of code.

from evol import Population, Evolution
from evol.logger import BaseLogger, SummaryLogger
from evol.helpers.pickers import pick_random

def change(gene, size=8):
  return min(BOARD_SIZE, max(1, gene + randint(-1, 1)))

def mutate_coords(chrmsm, p=0.1):
  return [(change(x), change(y)) if random() < p else (x,y) for x,y in chrmsm]
orsinium
orsinium commented Nov 26, 2019

Write and test a function that takes file content and returns it with @deal.raises added to all functions.

def attach_raises(content: str) -> str:
  ...

Example

Before:

import deal

def f1():
 ...

@deal.raises(ValueError)
def f2():
 ...

@something
def f1():
 ...

After:

import deal

@deal.raises()   # here it is adde

Improve this page

Add a description, image, and links to the pythonic topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the pythonic topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.