http://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html https://www.youtube.com/watch?v=_wiGpBQGCjU
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
function messageServer() { | |
const xhr = new XMLHttpRequest(); | |
const url = 'https://api.nytimes.com/svc/search/v2/articlesearch.json?api-key=eaf6455bd8eb4f11a1f08923b811081e&q=this&begin_date=won%27t&end_date=work' | |
xhr.onreadystatechange = () => { | |
console.log("Ready state: " + xhr.readyState + ", response: " + xhr.response); | |
if(xhr.readyState === XMLHttpRequest.DONE) { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>CommandUUID</key> | |
<string>0414ddf8-e49a-4cc9-ac4f-d2f9c012c364</string> | |
<key>ProfileList</key> | |
<array> | |
<dict> | |
<key>HasRemovalPasscode</key> |
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
if ENV['ENABLE_REMOTE_DEBUGGER_UNDER_POW'] && Debugger | |
Debugger.settings[:autoeval] = true | |
Debugger.settings[:autolist] = 1 | |
Debugger.settings[:reload_source_on_change] = true | |
Debugger.start_remote | |
end | |
# in .powenv - export ENABLE_REMOTE_DEBUGGER_UNDER_POW=true |
- Plain Strings :
foot*
- Self explanatory - Anchors :
k$
- Ends with letter 'k' - Ranges :
^[a-f]*$
- All alphabets are in range a-f - Backrefs :
(...).*\1
- 4 alphabets are repeated somewhere later in string - abba :
^(?!.*(.)(.)\2\1)
- 2 alphabets followed by reverse, capture backreference and play them in reverse. Answer is those strings which do not match this pattern, we do that by negative lookahead assertion - A man, a plan :
^(.)(.).*\2\1$
- Similar to above - Prime : `` - TODO
- Four :
(.).\1.\1.\1
- a letter is repeated 4 times in string somewhere; capture backreference and play it over - Order :
^[^o].....?$
or^[^o].{4,5}$
- string has 5-6 letters; one string which starts with 'o' protests, so add negation for that and subtract one from range. Simple - Triples : `` - TODO
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
autoheader: warning: missing template: CTYPE_NON_ASCII | |
autoheader: Use AC_DEFINE([CTYPE_NON_ASCII], [], [Description]) | |
autoheader: warning: missing template: FIONREAD_IN_SYS_IOCTL | |
autoheader: warning: missing template: HAVE_BSD_SIGNALS | |
autoheader: warning: missing template: HAVE_GETPW_DECLS | |
autoheader: warning: missing template: HAVE_LANGINFO_CODESET | |
autoheader: warning: missing template: HAVE_MBRLEN | |
autoheader: warning: missing template: HAVE_MBSRTOWCS | |
autoheader: warning: missing template: HAVE_MBSTATE_T | |
autoheader: warning: missing template: HAVE_POSIX_SIGNALS |
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
set -g prefix C-x | |
unbind % | |
bind | split-window -h | |
bind - split-window -v |
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
all_files = Dir['*'] | |
order = all_files.group_by{ |x| File.size(x) }.values | |
similar_files = order.select { |x| x.size > 1 } | |
pick_files = similar_files.map{ |x| x[0] } | |
similar_files.each do |x| | |
x.each do |file| | |
#to use FileUtils.compare_file here | |
File.delete(file) unless pick_files.include?(file) | |
end | |
end |
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
class Production | |
attr_reader :left, :right, :raw | |
def initialize(input_string) | |
@raw = input_string.chomp.to_s | |
raise ArgumentError, | |
"Should be valid production (eg: E -> E + id)" unless @raw.match(/-\>/) | |
@left, @right = @raw.split('->').map(&:strip) | |
end | |
def non_terminals |
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
[7] pry(main)> require 'bio-statsample-timeseries' | |
=> true | |
[8] pry(main)> ts = (1..100).to_a.to_ts | |
=> Time Series(type:scale, n:100)[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,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100] | |
[9] pry(main)> include Statsample::TimeSeries::Arima | |
=> Object | |
[10] pry(main)> KalmanFilter.ks(ts, 3, 1) | |
[ 0.000e+00 0.000e+00 0.000e+00 0.000e+00 ] | |
ll = 457.3719102223828 | |
[ 1.000e-01 0.000e+00 0.000e+00 0.000e+00 ] |
NewerOlder