根据APNIC的最新IP地址列表及whois信息,生成的各主要运营商IP地址段
Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import with_statement | |
from kombu import BrokerConnection | |
from collections import defaultdict | |
import gevent | |
from gevent import monkey | |
monkey.patch_all() | |
class WorkerHub(): | |
""" | |
WorkerHub controls the local mailboxes that the @worker decorator assigns. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Code provided "as-is". Use at your own risk | |
# | |
# Requires graphviz python package: | |
# pip install graphviz | |
# | |
# Unless you run with the -s option, you must also install the graphviz software from | |
# https://www.graphviz.org/download/ | |
# | |
# Basic use: python CreateDiagram.py <path to folder with .SemanticModel> | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
/// Supplies an observable object to a view’s hierarchy. | |
/// | |
/// The purpose of `WithBindable` is to make it possible to instantiate | |
/// observable objects from environment values, while keeping the object | |
/// alive as long as the view is rendered. | |
/// | |
/// For example: | |
/// |
Run all of these commands at the command line (not in a Jupyter Notebook). The command line will have more informative error messages and if we need complete additional steps, we'll get the messages.
Spark is a framework within the Scala programming language. Scala uses the JVM (Java Virtual Machine) so you'll need install Java.
If you use homebrew:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// equivalent of cascade delete in MongoDB | |
/** | |
* Let's assume you have 2 related collections with next data structure. | |
* | |
* - `archive` | |
* { | |
* "_id" : ObjectId("5ce5138efe985e8424a79304"), | |
* "type" : "text", | |
* "headline" : "Curabitur non nulla sit amet nisl tempus convallis quis ac lectus." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sensor: | |
# These should be used in the energy dashboard. | |
- platform: integration | |
source: sensor.shp_circuit_1_power | |
name: SHP Circuit 1 Consumed Energy | |
unit_prefix: k | |
round: 3 | |
- platform: integration | |
source: sensor.shp_circuit_2_power | |
name: SHP Circuit 2 Consumed Energy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<!DOCTYPE html> | |
<html b:responsive='true' b:version='2' class='v2' expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'> | |
<head> | |
<meta content='width=device-width, initial-scale=1.0' name='viewport'/> | |
<!-- Meta Title --> | |
<meta content='WikiFeed-Blogger' property='og:title'/> | |
<meta content='WikiFeed-Blogger' property='og:image:alt'/> | |
<meta content='WikiFeed-Blogger' name='twitter:title'/> | |
<meta content='WikiFeed-Blogger' name='twitter:image:alt'/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p ~/.fonts | |
curl -L https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf --output ~/.fonts/'MesloLGS NF Regular.ttf' | |
curl -L https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf --output ~/.fonts/'MesloLGS NF Bold.ttf' | |
curl -L https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf --output ~/.fonts/'MesloLGS NF Italic.ttf' | |
curl -L https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf --output ~/.fonts/'MesloLGS NF Bold Italic.ttf' |
This guide shows how to enable dev mode for the Discord desktop application running on Windows (as of February 2022).
This can be used to view beta experiments to try features currently in development that are included but hidden by default in Discord release builds.
NewerOlder