Skip to content

Instantly share code, notes, and snippets.

View Mr-Saxobeat's full-sized avatar
👾

Weiglas Mr-Saxobeat

👾
View GitHub Profile
@Mr-Saxobeat
Mr-Saxobeat / fix_mic_lenovo320.md
Created April 30, 2021 12:46 — forked from Therises/fix_mic_lenovo320.md
Fix microphone on Lenovo IdeaPad 320 on Ubuntu 18.04

In /usr/share/pulseaudio/alsa-mixer/paths/analog-input-internal-mic.conf and /usr/share/pulseaudio/alsa-mixer/paths/analog-input-mic.conf:

  • Under [Element Internal Mic Boost] set volume to zero.
  • Under [Element Int Mic Boost] set volume to zero.
  • Under [Element Mic Boost] set volume to zero

Find your source name from the following command; mine is alsa_input.pci-0000_00_1f.3.analog-stereo

  $ pacmd list-sources | grep 'name:.*input'

Edit /etc/pulse/default.pa and add the following lines, where INPUT_NAME is name of the input source from above step:

def startsWithDateAndTime(s):
# regex pattern for date.(Works only for android. IOS Whatsapp export format is different. Will update the code soon
pattern = '^([0-9]+)(\/)([0-9]+)(\/)([0-9][0-9]), ([0-9]+):([0-9][0-9]) (AM|PM) -'
result = re.match(pattern, s)
if result:
return True
return False
# Finds username of any given format.
def FindAuthor(s):
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 60 columns, instead of 18. in line 2.
date,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59
1/1/2010,NaN,15.1191544029918,22.5667523865697,NaN,26.5983283511287,25.6453350965071,NaN,NaN,23.9660790403683,18.4147282812367,28.0268588483744,17.2407340744395,18.9442518992,24.4194587465297,25.5231991988943,25.582839475866,21.1215647545877,27.4894095707315,14.5946207722367,14.460190191582,22.2628484699162,NaN,28.753937,30.534679,26.892001,22.849474,23421,27.897666,29.050085,29.365845,30.028251,30.336863,25.837306,NaN,14.267749,NaN,NaN,28.973123,21.707711,20036,18.884604,25.749708,18871,21366,27.094165,22.014182,22052,19.025835,26.328054,20.948337,20.721837,20142,28.182637,20.263398,23.817136,NaN,NaN,29.17658,30.652677
2/1/2010,NaN,27.7116426135556,14.6037948215673,NaN,28.0347261380517,NaN,NaN,NaN,19.976701666366,26.3971644799378,27.8674156785257,28.9048248400254,27.2500454017693,30.8104259894987,27.919291293875,31.1752121380885,28.791123
//from http://www.saltycrane.com/blog/2015/12/switching-emacs-vim-actually-spacemacs/
Useful Spacemacs commands
SPC q q - quit
SPC w / - split window vertically
SPC w - - split window horizontally
SPC 1 - switch to window 1
SPC 2 - switch to window 2
SPC w c - delete current window
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 60 columns, instead of 53. in line 3.
“StationID/Date”,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59
1/1/2010,NaN,20.4,21.4,21.7,23.7,19.7,19.5,18.5,24.3,16.8,24.2,18.4,19.5,18.10948,23,18.6,19.8,24.8,17.3,18.1,23.2,23.8,24.5,25.9,21.8,21.3,16.7,23.7,22.9,24.1,22.2,23.1,21.8,NaN,17.4,20.2,NaN,22.5,18.9,20.3,18.2,21.9,18.3,18.9,21.7,20.4,20.6,18.7,20.8,16.5,20.1,17.7,22,20.4,19.5,NaN,NaN,21.9,23.2
2/1/2010,NaN,18.7,18.4,21.3,21.7,17.5,17.7,18,21.2,18,23.5,20.1,20.2,18.10949,23,18,18.5,25.2,17.6,19,21.7,23.2,22.8,25.7,20.7,20,16.9,23.3,23.4,23.4,19.7,22,21.1,NaN,18.4,18.3,NaN,22.7,17.8,20.2,18.5,20.4,19.6,20,21.1,19.8,19.2,17.9,21.5,17.4,20.3,16.3,22.2,17.5,19.3,NaN,NaN,21.1,21.7
3/1/2010,NaN,19.2,17.8,20.9,21.3,20.8,15.5,18.3,23.7,16.7,23.2,19.7,17.6,18.10950,23,15.8,17.5,24.5,14.2,17,21.9,23.5,23.9,26,21.2,20.3,16.8,23.7,20.8,23.2,20.3,22.1,22.4,NaN,16.6,20,NaN,21,16.3,22,17.4,20.1,18.2,19.6,22.7,21.9,21.6,17.1,22,15.8,22.1,16
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Mr-Saxobeat
Mr-Saxobeat / tMax-inmet.csv
Last active May 11, 2020 19:47
Estacoes-coluna
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 60 columns, instead of 52. in line 5.
StationID/Date,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59
1/1/1980,27.8,26.6,26.9,27.6,28.3,0,0,25.4,30,21,30.7,0,28.8,26.3,30.2,0,26.7,31.8,24.4,0,0,28.2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
2/1/1980,24.3,24.4,23.9,0,31.8,0,0,22.8,30.6,23.8,29.7,0,28.7,0,0,0,0,21.9,0,19.5,0,24.9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
3/1/1980,29.4,28.4,31.1,31.6,28.9,0,0,26.2,24.1,24.4,0,0,29.3,28.8,29.2,0,26.9,25.4,0,23.8,28.8,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
4/1/1980,29.6,30,28.1,28.4,24.8,0,0,25.2,27,24.3,28.1,0,30.4,28.4,32,27,28.3,27.1,26.2,25.8,28.8,29.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
5/1/1980,28.5,26.2,28.1,27.6,23.3,0,0,23.6,25.6,22.6,29.5,0,28.9,28.1,31,0,27.1,27,26.2,24.5,29,30.4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0