This file contains hidden or 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 'digest/sha1' | |
require 'faker' | |
require './generator/generator' | |
require 'date' | |
END_DATE = DateTime.now + 14 # days | |
START_DATE = END_DATE - 365 * 3 | |
CONFERENCE_NUMBER = 8 | |
PLAIN_USER_PER_CONFERENCE = 20 |
This file contains hidden or 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 Conference < Generator | |
set_function_name :create_conference | |
set_number CONFERENCE_NUMBER | |
attribute :name, :string do | |
Faker::Company.catch_phrase | |
end | |
attribute :daterange, :daterange do |
This file contains hidden or 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
/* description: Parses end executes mathematical expressions. */ | |
/* lexical grammar */ | |
%lex | |
%% | |
\n return 'NL' | |
\s+ /* skip whitespace */ | |
\/\/\s(.+)?\b /* skip comments */ | |
("2"\')([0-9]+)\b return 'BINARY' |
This file contains hidden or 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 'digest/sha1' | |
require 'faker' | |
class Generator | |
class << self | |
attr_accessor :attributes | |
def number(n) | |
@number = n |
This file contains hidden or 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
-module(rAddressBookSup). | |
-export([start/0, startWithMonitoring/0, monitor/0]). | |
-beha | |
start() -> | |
spawn(?MODULE, startWithMonitoring, []). | |
startWithMonitoring() -> | |
process_flag(trap_exit, true), | |
rAddressBook:startLink([]), |
This file contains hidden or 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
definicja: | |
F = fun(X, Func) -> | |
tu kod piszesz | |
jak chcesz rekurencyjnie do siebie to robisz | |
Func() | |
end. | |
wywolanie factorial dla 100 | |
F(100, F) |
This file contains hidden or 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
{ | |
"color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme", | |
"font_face": "Monaco", | |
"font_size": 14.0, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], |
This file contains hidden or 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
-module(m). | |
-export([power/2, contains/2, duplicateElements/1, sumFloats/1, sumFloatsTail/2, sumFloatsTail/1, sumFloatsNotTail/1, dupElem/1, calc/1]). | |
% power | |
power(_, 0) -> 1; | |
power(N, E) -> power(N, E - 1) * N. | |
% contains/2, która jako parametry weźmie listę i wartość, i zwróci true jeśli lista zawiera wartość. | |
contains( [], _ ) -> | |
false; |
This file contains hidden or 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
mogrify -resize '1280x720' -strip -quality 80 *.jpg | |
ls *.jpg | awk 'NR % 2 == 1 { print }' | xargs rm -f | |
ffmpeg -pattern_type glob -i '*.jpg' -c:v libx264 out.mp4 |
This file contains hidden or 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
irb(main):016:0> ModelInfo.all.map(&:"model_images").flatten.map(&:get_dims) | |
ModelInfo Load (0.5ms) SELECT `model_infos`.* FROM `model_infos` | |
ModelImage Load (0.9ms) SELECT `model_images`.* FROM `model_images` WHERE `model_images`.`model_info_id` = 279 | |
ModelImage Load (1.0ms) SELECT `model_images`.* FROM `model_images` WHERE `model_images`.`model_info_id` = 280 | |
ModelImage Load (0.9ms) SELECT `model_images`.* FROM `model_images` WHERE `model_images`.`model_info_id` = 281 | |
ModelImage Load (0.9ms) SELECT `model_images`.* FROM `model_images` WHERE `model_images`.`model_info_id` = 282 | |
ModelImage Load (1.0ms) SELECT `model_images`.* FROM `model_images` WHERE `model_images`.`model_info_id` = 283 | |
ModelImage Load (1.4ms) SELECT `model_images`.* FROM `model_images` WHERE `model_images`.`model_info_id` = 284 | |
ModelImage Load (2.2ms) SELECT `model_images`.* FROM `model_images` WHERE `model_images`.`model_info_id` = 285 | |
ModelImage Load (1.0ms) SELECT `model_images`.* FROM `model_images` WHERE `mod |