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
# https://github.com/jiaaro/pydub/blob/master/pydub/audio_segment.py | |
if filename: | |
conversion_command += ["-i", filename] | |
stdin_parameter = None # <------------------------------------------- Look at this line !! | |
stdin_data = None | |
else: | |
if cls.converter == 'ffmpeg': | |
conversion_command += ["-read_ahead_limit", str(read_ahead_limit), | |
"-i", "cache:pipe:0"] |
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
# https://github.com/jiaaro/pydub/blob/master/pydub/audio_segment.py | |
with open(os.devnull, 'rb') as devnull: | |
p = subprocess.Popen(conversion_command, stdin=devnull, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
p_out, p_err = p.communicate() |
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
# On Windows, running this from the binary produced by Pyinstaller | |
# with the ``--noconsole`` option requires redirecting everything | |
# (stdin, stdout, stderr) to avoid an OSError exception | |
# "[Error 6] the handle is invalid." | |
ret.update({'stdin': subprocess.PIPE, | |
'stderr': subprocess.PIPE, | |
'startupinfo': si, | |
'env': env }) | |
return ret |
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
import re | |
def validate_thai_filename(filename): | |
return re.sub('[^ก-๙a-zA-Z0-9.,_-]', '_', filename) |
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
/* https://stackoverflow.com/a/11544685/466693 */ | |
// focus on first element | |
$('.my-text').eq(0).focus(); | |
// onblur event | |
$('.my-text').blur(function (event) { | |
// do onblur stuff | |
// ... |
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
{ | |
"globals" : | |
{ | |
"alwaysShowTabs" : true, | |
"defaultProfile" : "{09dc5eef-6840-4050-ae69-21e55e6a2e62}", | |
"initialCols" : 120, | |
"initialRows" : 30, | |
"keybindings" : | |
[ | |
{ |
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
... | |
br = branch | |
co = checkout | |
[core] | |
autocrlf = input | |
editor = gvim <---- change editor command | |
[color] | |
diff = auto | |
status = auto | |
branch = auto |
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
import random | |
rows = [ 1, 2, 3, ... ] # your list | |
print([ random.choice(rows) for i in range(5) ]) |
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
Gmail Account | Google Drive Space | |
---|---|---|
Main | Small | |
Secondary | Very Large |
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
/* | |
https://github.com/adriancretu/beacons-android | |
*/ | |
package com.diewland.fake_beacons; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import com.uriio.beacons.Beacons; | |
import com.uriio.beacons.model.EddystoneURL; | |
public class MainActivity extends Activity { |