How to configure your Mac to use DNS over TLS in five easy steps:
-
Install Stubby with Homebrew (https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Daemon+-+Stubby):
brew install stubby -
Edit the configuration file:
| def myfunc_v1(func, *args): | |
| for arg in zip(*args): | |
| yield func(*arg) | |
| def myfunc_v2(func, *args): | |
| return (func(*arg) for arg in zip(*args)) | |
| print(list(myfunc_v1(abs, [1, 2, -3]))) | |
| print(list(myfunc_v2(abs, [1, 2, -3]))) |
| increaseCount = () => { | |
| const { count } = this.state; | |
| this.setState({ | |
| count: count + 1, | |
| }); | |
| }; | |
| ## models.py | |
| class Tag(PrintableModel): | |
| name = models.CharField( | |
| verbose_name=_('Name'), | |
| db_index=True, | |
| max_length=150, | |
| help_text="태그 이름", | |
| unique=True) |
| import datetime | |
| KST = datetime.timezone(datetime.timedelta(hours=9)) | |
| kst_now = datetime.datetime.now(KST) |
| class Movie(models.Model): | |
| rate = models.FloatField() | |
| q1 = Movie.objects.filter(rate=1.0).count() | |
| q2 = Movie.objects.filter(rate=2.0).count() | |
| q3 = Movie.objects.filter(rate=3.0).count() | |
| q4 = Movie.objects.filter(rate=4.0).count() | |
| q5 = Movie.objects.filter(rate=5.0).count() |
| class Movie(models.Model): | |
| title = models.CharField() | |
| rate = models.FloatField() | |
| ...... | |
| .... | |
| ... | |
| ....... | |
| -- Create a group | |
| CREATE ROLE readaccess; | |
| -- Grant access to existing tables | |
| GRANT USAGE ON SCHEMA public TO readaccess; | |
| GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; | |
| -- Grant access to future tables | |
| ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; |
| # asyncio/events.py in get_event_loop at line 602 | |
| not self._local._set_called and | |
| isinstance(threading.current_thread(), threading._MainThread)): | |
| self.set_event_loop(self.new_event_loop()) | |
| if self._local._loop is None: | |
| raise RuntimeError('There is no current event loop in thread %r.' | |
| % threading.current_thread().name) | |
| return self._local._loop | |
| def set_event_loop(self, loop): |
| import asyncio | |
| loop = asyncio.new_event_loop() | |
| asyncio.set_event_loop(loop) | |
| def send_email_with_asyncio(user, email): | |
| # email sending logic | |
| # ......................... | |
| # ................................. |
How to configure your Mac to use DNS over TLS in five easy steps:
Install Stubby with Homebrew (https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Daemon+-+Stubby):
brew install stubby
Edit the configuration file: