Skip to content

Instantly share code, notes, and snippets.

View y56's full-sized avatar
🌏
(* ̄▽ ̄)/‧☆*"`'*-.,_,.-*'`"*-.,_☆

Eugene y56

🌏
(* ̄▽ ̄)/‧☆*"`'*-.,_,.-*'`"*-.,_☆
View GitHub Profile
@y56
y56 / List of all unique characters in a string
Created February 2, 2020 22:54
List of all unique characters in a string?
https://stackoverflow.com/questions/13902805/list-of-all-unique-characters-in-a-string
```
In [10]: ''.join(set('aaabcabccd'))
Out[10]: 'acbd'
```
```
In [1]: list(set('aaabcabccd'))
Out[1]: ['a', 'c', 'b', 'd']
@y56
y56 / 'aaaaaa'.count('a') Out[1]: 6
Created February 2, 2020 23:01
'aaaaaa'.count('a')
'aaaaaa'.count('a')
6
@y56
y56 / How to Install Wine 5.0 Stable in Ubuntu 18.04, 19.10
Created February 5, 2020 21:30
How to Install Wine 5.0 Stable in Ubuntu 18.04, 19.10
http://ubuntuhandbook.org/index.php/2020/01/install-wine-5-0-stable-ubuntu-18-04-19-10/
==========
How to Install Wine 5.0 Stable in Ubuntu 18.04, 19.10How to Install Wine 5.0 Stable in Ubuntu 18.04, 19.10
5.0 Stable in Ubuntu 18.04, 19.10
How to Install Wine 5.0 Stable in Ubuntu 18.04, 19.10
January 23, 2020 — 19 Comments
@y56
y56 / longestValidParentheses
Created February 14, 2020 01:13
longestValidParentheses
substring is countinuous.
class Solution:
def longestValidParentheses(self, s: str) -> int:
numof_unpaired_left = 0
numof_illegal_right = 0
for ele in s:
if ele == '(':
numof_unpaired_left += 1
else: # ele == ')'
@y56
y56 / Python: Add list to set
Created February 14, 2020 01:24
Python: Add list to set
https://stackoverflow.com/questions/1306631/python-add-list-to-set
Python: Add list to set?
Ask Question
Asked 10 years, 5 months ago
Active 1 year ago
Viewed 276k times
220
@y56
y56 / Python | remove() and discard() in Sets
Created February 18, 2020 07:52
Python | remove() and discard() in Sets
https://www.geeksforgeeks.org/python-remove-discard-sets/
Method 1: Use of discard() method
The built-in method, discard() in Python, removes the element from the set only if the element is present in the set. If the element is not present in the set, then no error or exception is raised and the original set is printed.
If the element is present in the set:
@y56
y56 / Disable "Mouse battery low" spam notification on Ubuntu
Created March 4, 2020 04:05
Disable "Mouse battery low" spam notification on Ubuntu
Disable "Mouse battery low" spam notification on Ubuntu
====
https://wrgms.com/disable-mouse-battery-low-spam-notification/
====
Disable "Mouse battery low" spam notification on Ubuntu
Blog Logo
Gui Ambros on 02 Jun 2019
@y56
y56 / AppleWirelessKeyboard is a small utility program for Windows that talks to the Apple Wireless Keyboard and responds to the Fn and Eject keys. Then it simulates native mac functionality. It adds the beautiful semitransparent overlays adds functions to
Created March 4, 2020 22:44
AppleWirelessKeyboard is a small utility program for Windows that talks to the Apple Wireless Keyboard and responds to the Fn and Eject keys. Then it simulates native mac functionality. It adds the beautiful semitransparent overlays adds functions to otherwise dead keys. If you love the Apple Wireless Keyboard as much as I do, give this project …
AppleWirelessKeyboard
Windows companion application for the Apple Wireless Keyboard which makes Fn and Eject keys work
Project Page
Please submit pull requests so we can keep this project moving!
AppleWirelessKeyboard is a small utility program for Windows that talks to the Apple Wireless Keyboard and responds to the Fn and Eject keys. Then it simulates native mac functionality. It adds the beautiful semitransparent overlays adds functions to otherwise dead keys. If you love the Apple Wireless Keyboard as much as I do, give this project a try.
@y56
y56 / chewing chinese input on ubuntu
Last active April 9, 2020 19:16
chewing chinese input on ubuntu
https://gist.github.com/tanyuan/c0d4ee15cf0c9c93da28cc1cf0ff87b3
====
https://wenxintaichi.blogspot.com/2018/06/blog-post_29.html
====
Ubuntu 18.04
1.進入系統設定值/語言支援, 依照系統的建議的更新下載
2.terminal 之下
$sudo apt install fcitx
$sudo apt install fcitx-chewing
@y56
y56 / how to enable Playing Videos in Firefox
Last active March 28, 2020 04:19
how to enable Playing Videos in Firefox
https://askubuntu.com/questions/1035661/playing-videos-in-firefox
=======================
Log in Sign up
By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this community