Skip to content

Instantly share code, notes, and snippets.

@hivefans
hivefans / shell_output.go
Last active September 15, 2023 05:59
get the realtime output for a shell command in golang|-|{"files":{"shell_output.go":{"env":"plain"}},"tag":"bigdata"}
package main
import (
"bufio"
"fmt"
"io"
"os"
"os/exec"
"strings"
)
@hivefans
hivefans / LICENSE.txt
Created April 17, 2023 00:31 — forked from yckart/LICENSE.txt
getElementByXPath | Get DOM-Nodes by its XPath.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2013 Yannick Albert <http://yckart.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@hivefans
hivefans / BitAPI.py
Created April 13, 2023 02:56
python对接比特
"""
@Author: 小样
@Date: 2022-10-30
@UpdateDate: 2022-12-20
@wechat: mz-cyx
@description: 比特浏览器API接口
@version: 1.0
@AD: 专业定制外网自动化程序,Twitter、Facebook、Tiktok、Instagram、Google等等自动化工具;
所有本人定制软件均使用自改undetected_chromedriver,可过nowsecure.nl
@hivefans
hivefans / .Cloud.md
Created July 10, 2022 04:41 — forked from imba-tjd/.Cloud.md
☁️ 一些免费的云资源

IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装;PaaS提供语言环境和框架(可以自己选);SaaS只能使用开发好的软件(卖软件本身);BaaS一般类似于非关系数据库,但各家不通用,有时还有一些其它东西。

其他人的集合

@hivefans
hivefans / slideshare-dl.py
Last active April 17, 2022 13:36 — forked from julionc/slideshare-dl.py
|-|{"files":{"slideshare-dl.py":{"env":"plain"}},"tag":"bigdata"}
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
slideshare-dl.py
~~~~~~~~~~~~~~~~
slideshare-dl is a small command-line program
for downloading slides from SlideShare.net
@hivefans
hivefans / get_oauth2_token.py
Created December 21, 2021 05:44 — forked from clarketm/get_oauth2_token.py
How to get Google OAuth 2.0 access token in console using the Python API
#!/usr/bin/env python
'''
This script will attempt to open your webbrowser,
perform OAuth 2.0 authentication and print your access token.
To install dependencies from PyPI:
$ pip install oauth2client
Then run this script:
@hivefans
hivefans / pollen.md
Last active December 15, 2021 07:31

t8rz42o7ga

@hivefans
hivefans / citycode.txt
Last active December 30, 2020 08:59
城市编码列表|-|{"files":{"citycode.txt":{"env":"plain"},"citycode.xml":{"env":"plain"}},"tag":"Uncategorized"}
101010100=北京
101010200=海淀
101010300=朝阳
101010400=顺义
101010500=怀柔
101010600=通州
101010700=昌平
101010800=延庆
101010900=丰台
101011000=石景山
@hivefans
hivefans / mysql_cheat_sheet.md
Created November 12, 2020 07:05 — forked from bradtraversy/mysql_cheat_sheet.md
MySQL Cheat Sheet

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@hivefans
hivefans / Spark Dataframe Cheat Sheet.py
Last active October 22, 2020 10:27 — forked from crawles/Spark Dataframe Cheat Sheet.py
Cheat sheet for Spark Dataframes (using Python)|-|{"files":{"Spark Dataframe Cheat Sheet.py":{"env":"plain"}},"tag":"bigdata"}
# A simple cheat sheet of Spark Dataframe syntax
# Current for Spark 1.6.1
# import statements
from pyspark.sql import SQLContext
from pyspark.sql.types import *
from pyspark.sql.functions import *
#creating dataframes
df = sqlContext.createDataFrame([(1, 4), (2, 5), (3, 6)], ["A", "B"]) # from manual data