View strlen-truncation.joern-output.gremlin
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
List( | |
Identifier( | |
id = 8832L, | |
argumentIndex = 1, | |
argumentName = None, | |
code = "used", | |
columnNumber = Some(value = 3), | |
dynamicTypeHintFullName = ArraySeq(), | |
lineNumber = Some(value = 633), | |
name = "used", |
View half_violin_with_raw_data.R
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
## GOAL: | |
## re-create a figure similar to Fig. 2 in Wilson et al. (2018), | |
## Nature 554: 183-188. Available from: | |
## https://www.nature.com/articles/nature25479#s1 | |
## | |
## combines a boxplot (or violin) with the raw data, by splitting each | |
## category location in two (box on left, raw data on right) | |
# initial set-up ---------------------------------------------------------- |
View solve.rb
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
# umgekehrter filter, die die raus müssen (45) | |
(0..9999).map { |i| sprintf("%04d", i) }.select { |s| s.chars.all? { |c| Integer(c) >= 7 } }.select { |s| s.chars.reduce({"7" => 0, "8" => 0, "9" => 0}) { |a, e| a[e] = a[e] + 1; a }.any? { |(k,v)| v >= 3 || v == 0 }} | |
=> ["7777", "7778", "7779", "7787", "7788", "7797", "7799", "7877", "7878", "7887", "7888", "7977", "7979", | |
"7997", "7999", "8777", "8778", "8787", "8788", "8877", "8878", "8887", "8888", "8889", "8898", | |
"8899", "8988", "8989", "8998", "8999", "9777", "9779", "9797", "9799", "9888", "9889", "9898", | |
"9899", "9977", "9979", "9988", "9989", "9997", "9998", "9999"] | |
# richitg gefiltert (36) | |
(0..9999).map { |i| sprintf("%04d", i) }.select { |s| s.chars.all? { |c| Integer(c) >= 7 } }.reject { |s| s.chars.reduce({"7" => 0, "8" => 0, "9" => 0}) { |a, e| a[e] = a[e] + 1; a }.any? { |(k,v)| v >= 3 || v == 0 }} | |
=> ["7789", "7798", "7879", "7889", "7897", "7898", "7899", "7978", "7987", "7988", "7989", |
View test.html
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
<html> | |
<head> | |
</head> | |
<body> | |
<h1>asdf</h1> | |
<script>alert(1);</script> | |
</body> | |
</html> |
View r2.sh
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
# get only import names | |
afl~sym.imp[3] | |
# get only import addrs | |
afl~sym.imp[0] | |
# set breakpoint at 0x0 and 0x1 | |
db $$ @@= `!echo -e "0x0\n0x1"` | |
# set breakpoint at every imported function |
View easy_ipc.rb
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
require 'set' | |
module SpecialMessages | |
module Stop; end | |
module Ack; end | |
end | |
class WorkerFactory | |
def initialize | |
@set = Set.new |
View json_crystal_union_types.cr
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://crystal-lang.org/api/0.22.0/JSON.html | |
# online repl: https://play.crystal-lang.org/#/r/995s | |
require "json" | |
value = JSON.parse("[1, 2, 3]").raw # : JSON::Any | |
# (Array(JSON::Any) | Bool | Float64 | Hash(String, JSON::Any) | Int64 | String | Nil) | |
typeof(value) | |
if value.is_a?(Array) |
View martini.sh
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
# gleiche zuweisung | |
var1=abc | |
var2="abc" | |
echo "$var1" | |
echo "$var2" | |
# string mit spaces | |
var3="abc def" | |
var4=abc\ def |
View fibbonacci.rb
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://en.wikipedia.org/wiki/Fibonacci_number#Closed-form_expression | |
N = (1 + Math::sqrt(5)) / 2 | |
M = (1 - Math::sqrt(5)) / 2 | |
def fibb(n) | |
(N**n - M**n) / (N - M) | |
end | |
# https://en.wikipedia.org/wiki/Fibonacci_number#Matrix_form |
View hacks.rb
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
# create random groups of people | |
%w(james bob alice eve tux).shuffle.each_slice(2).to_a | |
# => [["bob", "eve"], ["alice", "tux"], ["james"]] | |
# assign random tools to people (tools can be empty) | |
people = %w(james bob alice eve tux) | |
tools = %w(hammer chainsaw screwdriver) | |
people.shuffle.zip(tools) | |
# => [["alice", "hammer"], ["james", "screwdriver"], ["tux", "chainsaw"], ["bob", nil], ["eve", nil]] |
NewerOlder