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
#!/usr/bin/python3 | |
import sys | |
import re | |
try: | |
import pandas as pd | |
except: | |
print("Please install pandas using 'pip3 install --user pandas'") |
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
0 0x0000000008fc153f in runtime.asyncPreempt2 | |
at /opt/tiger/tango1_19_stretch/src/runtime/preempt.go:310 | |
1 0x0000000008ff92db in runtime.asyncPreempt | |
at /opt/tiger/tango1_19_stretch/src/runtime/preempt_amd64.s:50 | |
2 0x000000000a423309 in github.com/chenzhuoyu/iasm/x86_64.(*Label).offset | |
at /opt/tiger/compile_path/pkg/mod/github.com/chenzhuoyu/[email protected]/x86_64/operands.go:99 | |
3 0x000000000a423309 in github.com/chenzhuoyu/iasm/x86_64.(*Program).Assemble | |
at /opt/tiger/compile_path/pkg/mod/github.com/chenzhuoyu/[email protected]/x86_64/program.go:509 | |
4 0x000000000a45bbe5 in github.com/cloudwego/frugal/internal/atm/pgen.(*CodeGen).Generate | |
at /opt/tiger/compile_path/pkg/mod/github.com/cloudwego/[email protected]/internal/atm/pgen/pgen_amd64.go:399 |
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
#!/bin/bash | |
# USAGE: register in crontab with "*/10 0 0 0 0" | |
YourSSID="YOUR WIFI SSID" | |
YourDevice="MacBook Pro Speakers" | |
source /etc/profile | |
which AdjustVolume &>/dev/null |
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
package main | |
import ( | |
"crypto/md5" | |
"crypto/rand" | |
"errors" | |
"flag" | |
"fmt" | |
"io" | |
"log" |
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
package main | |
import ( | |
"crypto/md5" | |
"crypto/rand" | |
"errors" | |
"flag" | |
"fmt" | |
"io" | |
"net" |
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
#!/usr/bin/env python | |
# Copyright (c) 2013 clowwindy | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
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
package main | |
import ( | |
"encoding/binary" | |
"errors" | |
"fmt" | |
"io" | |
"net" | |
) |
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
MINUTES_OF_DAY = 1440 | |
# [begin, end) | |
class TimeRange(object): | |
def __init__(self, begin, end): | |
self.begin = begin | |
self.end = end | |
def getMinutes(schedule): | |
minutes = [0] * MINUTES_OF_DAY |
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
#coding:utf-8 | |
import random | |
class Node(object): | |
def __init__(self, height, key=None): | |
self.key = key | |
self.next = [None] * height | |
def height(self): |
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
def IdNumChecksum(id_num): | |
return '10X98765432'[sum([int(num) * (2 ** (17 - idx) % 11) for idx, num in enumerate(id_num[:17])]) % 11] |
NewerOlder