This file contains hidden or 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 bs4 import BeautifulSoup | |
from selenium import webdriver | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.common.by import By | |
from time import sleep | |
class WebCrawler: | |
def __init__(self, default_url): | |
self.driver = webdriver.Chrome() |
This file contains hidden or 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
{ | |
// space | |
"translate_tabs_to_spaces": true, | |
"trim_trailing_white_space_on_save": "all", | |
"trim_only_modified_white_space": false, | |
// style | |
"font_size": 16, | |
} |
This file contains hidden or 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
javascipt:(function(content){let utterance = new SpeechSynthesisUtterance(content); speechSynthesis.speak(utterance);})("hello world"); |
This file contains hidden or 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
let utterance = new SpeechSynthesisUtterance("Hello world!"); | |
speechSynthesis.speak(utterance); |
This file contains hidden or 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
data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Crect width='100%25' height='100%25' fill='%23{input_your_color}' /%3E%3C/svg%3E |
This file contains hidden or 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 subprocess | |
import glob | |
import sys | |
import os | |
for i in glob.glob("./*"): | |
t = subprocess.check_output(["file", "--mime-type", "-b", i], shell=True) | |
t = t[-4:-1] | |
if t == b"mp4": |
This file contains hidden or 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
file --mime-type -b {file_path} |
This file contains hidden or 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
#include <Wire.h> | |
#include <BMI160Gen.h> | |
#include <ESP8266WiFi.h> | |
#include <ESP8266HTTPClient.h> | |
#include <NTPClient.h> | |
#include <WiFiUdp.h> | |
#include <TimeLib.h> | |
const int i2c_addr_1 = 0x68; // BMI160 I2C 地址 | |
const int i2c_addr_2 = 0x69; // BMI160 I2C 地址 |
This file contains hidden or 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 bpy | |
from math import radians | |
bpy.ops.object.mode_set(mode='POSE') | |
for bone in bpy.data.objects['body_structure'].pose.bones: | |
bone.rotation_mode = 'XYZ' | |
bone.rotation_euler = (radians(0), radians(0), radians(0)) | |
bpy.context.view_layer.update() |
This file contains hidden or 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
class Status: | |
def __init__(self, hunger, health, stamina, age): | |
self._hunger = hunger | |
self._health = health | |
self._stamina = stamina | |
self._age = age | |
class Task: | |
def __init__(self, name, status): |
NewerOlder