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:
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.4; | |
import "@openzeppelin/[email protected]/token/ERC721/ERC721.sol"; | |
import "@openzeppelin/[email protected]/access/Ownable.sol"; | |
contract MyNFT is ERC721, Ownable { | |
uint256 public totalSupply; | |
constructor() ERC721("MyNFT", "MNFT") {} |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) | |
pragma solidity ^0.8.0; | |
import "../utils/Context.sol"; | |
/** | |
* @dev Contract module which provides a basic access control mechanism, where | |
* there is an account (an owner) that can be granted exclusive access to |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) | |
pragma solidity ^0.8.0; | |
import "../utils/Context.sol"; | |
/** | |
* @dev Contract module which provides a basic access control mechanism, where | |
* there is an account (an owner) that can be granted exclusive access to |
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:
import asyncio | |
loop = asyncio.new_event_loop() | |
asyncio.set_event_loop(loop) | |
def send_email_with_asyncio(user, email): | |
# email sending logic | |
# ......................... | |
# ................................. |
# 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): |
-- 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; |
class Movie(models.Model): | |
title = models.CharField() | |
rate = models.FloatField() | |
...... | |
.... | |
... | |
....... | |
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() |
import datetime | |
KST = datetime.timezone(datetime.timedelta(hours=9)) | |
kst_now = datetime.datetime.now(KST) |