- 更新
2023-10-04
- 作者
@voluntas
- バージョン
2023.2
- URL
Discover gists
import Combine | |
import UIKit | |
public protocol CombineCompatible {} | |
// MARK: - UIControl | |
public extension UIControl { | |
final class Subscription<SubscriberType: Subscriber, Control: UIControl>: Combine.Subscription where SubscriberType.Input == Control { | |
private var subscriber: SubscriberType? | |
private let input: Control |
import tiktoken | |
import langdetect | |
T = tiktoken.get_encoding("o200k_base") | |
length_dict = {} | |
for i in range(T.n_vocab): | |
try: | |
length_dict[i] = len(T.decode([i])) | |
except: |
A simple daemon implementing freedesktop.org's file manager interface. This interface is used by Firefox download manager to select a downloaded file in the file manager (since Firefox 28).
The vifm.service
file should be put in the ~/.local/share/dbus-1/services
directory.
The vifm-service.py file can be put anywhere as long as the same path is used in
vifm.service`.
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&family=Work+Sans:wght@100;200;300;400;500;600;700;800;900&display=swap"); | |
@tailwind base; | |
@tailwind components; | |
@tailwind utilities; | |
:root { | |
--blue-rgb: 237 245 255; | |
--green-rgb: 125 161 35; | |
} |
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'
instead ofconst foo = require('foo')
to import the package. You also need to put"type": "module"
in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)
from CommonJS instead ofrequire(…)
. - Stay on the existing version of the package until you can move to ESM.
So you want to commit changes generated by a GitHub Actions workflow back to your repo, and have that commit signed automatically?
Here's one way this is possible, using the REST API, the auto-generated GITHUB_TOKEN
, and the GitHub CLI, gh
, which is pre-installed on GitHub's hosted Actions runners.
You don't have to configure the git
client, just add a step like the one below... Be sure to edit FILE_TO_COMMIT
and DESTINATION_BRANCH
to suit your needs.
AddOn:
- Go to about:support in your address bar
- Look for your profiles directory and open it:
- Create a file named
chrome/userChrome.css
in your profile directory:
Describe the network protection controls used by your organization to restrict public access to databases, file servers, and desktop/developer endpoints.
- Access to the Amazon Aurora database through the network is disabled and standard ports are closed. The database is only accessible through a socket on the server itself.
- The reverse proxy only serves whitelisted directories that are only from sources controlled by Teecom used (AWS Amplify).
- API endpoints are password protected (PBKDF2 & SHA512 encryption, salted, and stretched for thousands of rounds).
- Login credentials are always transmitted securely over SSL.
Describe how your organization individually identifies employees who have access to Amazon Information, and restricts employee access to Amazon information on a need- to-know basis.
- If all your employees are properly assigned separate users and given only relevant access rights: Access rights are provided to employees based on their role within the company and are progressive, base
#!/usr/bin/python3 | |
import sys | |
import asyncio | |
import greenlet | |
class AsyncIoGreenlet(greenlet.greenlet): | |
def __init__(self, driver, fn): | |
greenlet.greenlet.__init__(self, fn, driver) | |
self.driver = driver |