Skip to content

Instantly share code, notes, and snippets.

View vascoferreira25's full-sized avatar
🎯
Focusing

Vasco Ferreira vascoferreira25

🎯
Focusing
  • Portugal
View GitHub Profile
fev 18 21:20:13.967801 crow-pc kernel: traps: cmTC_f5b2c[8039] trap invalid opcode ip:5626472ea80a sp:7ffd8cfa86f0 error:0 in cmTC_f5b2c[5626472ea000+1
fev 18 21:20:14.477800 crow-pc kernel: traps: cmTC_7471f[8072] trap invalid opcode ip:55765c3f680a sp:7ffd7bd800b0 error:0 in cmTC_7471f[55765c3f6000+1
fev 18 21:20:15.383330 crow-pc kernel: traps: cmTC_5f36d[8116] trap invalid opcode ip:55ca0f12b80d sp:7fff8342d2e0 error:0 in cmTC_5f36d[55ca0f12b000+1
fev 18 21:20:15.657755 crow-pc kernel: traps: cmTC_9e697[8135] trap invalid opcode ip:55e3f73bf80d sp:7ffc15472230 error:0 in cmTC_9e697[55e3f73bf000+1
fev 18 21:20:17.944461 crow-pc kernel: traps: cmTC_e73de[8177] trap invalid opcode ip:555e640f47ed sp:7ffd558cc8a8 error:0 in cmTC_e73de[555e640f4000+1
fev 18 21:20:19.307781 crow-pc kernel: traps: cmTC_83652[8219] trap invalid opcode ip:55a70d50d7ed sp:7ffcce344d48 error:0 in cmTC_83652[55a70d50d000+1
fev 18 21:20:20.954445 crow-pc kernel: traps: cmTC_ac5be[8318] trap invalid opcode ip:5578ef7be80a sp:7ffe6f59b3
fev 18 21:20:13 crow-pc kernel: traps: cmTC_f5b2c[8039] trap invalid opcode ip:5626472ea80a sp:7ffd8cfa86f0 error:0 in cmTC_f5b2c[5626472ea000+1000]
fev 18 21:20:14 crow-pc systemd[1]: Created slice system-systemd\x2dcoredump.slice.
fev 18 21:20:14 crow-pc systemd[1]: Started Process Core Dump (PID 8040/UID 0).
fev 18 21:20:14 crow-pc systemd-coredump[8041]: Process 8039 (cmTC_f5b2c) of user 1000 dumped core.
Stack trace of thread 8039:
#0 0x00005626472ea80a n/a (/home/crow/pytorch/torch/lib/build/aten/CMakeFiles/CMakeTmp/cmTC_f5b2c)
#1 0x00007f5f1ca39f4a __libc_start_main (libc.so.6)
#2 0x00005626472ea6fa n/a (/home/crow/pytorch/torch/lib/build/aten/CMakeFiles/CMakeTmp/cmTC_f5b2c)
fev 18 21:20:14 crow-pc kernel: traps: cmTC_7471f[8072] trap invalid opcode ip:55765c3f68
@vascoferreira25
vascoferreira25 / clojure-portuguese-nif-validator
Created April 7, 2018 03:51
Portuguese NIF Validator made with Clojure
(defn in?
"Evaluate true if collection contains element."
[coll elem]
(some #(= elem %) coll))
(defn str->int
"Transform string with number into vector of ints."
[nif-vector]
(mapv #(Integer/parseInt %) (map str nif-vector)))
Sample project for the "Getting started with JavaFX in Clojure" ( https://coderwall.com/p/4yjy1a ) ProTip.
; A REPL-based, annotated Seesaw tutorial
; Please visit https://github.com/daveray/seesaw for more info
;
; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers
; Seesaw's basic features and philosophy, but only scratches the surface
; of what's available. It only assumes knowledge of Clojure. No Swing or
; Java experience is needed.
;
; This material was first presented in a talk at @CraftsmanGuild in
; Ann Arbor, MI.
@vascoferreira25
vascoferreira25 / bouncing-balls.cljs
Last active August 5, 2018 19:15
Bouncing ball with clojurescript
;;; Interact with canvas
(def canvas (.getElementById js/document "my-canvas"))
(def c (.getContext canvas "2d"))
;;; Set width and Height
(set! (.-width canvas) (.-innerWidth js/window))
(set! (.-height canvas) (.-innerHeight js/window))
(defrecord Ball [pos-x pos-y radius vel-x vel-y])
'******************************************************************************
' Author: TODO
' Description: TODO
' Version: 0.1
' Instructions: TODO
' Revisions: TODO
' - Date: yyyy/mm/dd
' - Author:
' - Description:
' @Folder("Folder.Subfolder")
'******************************************************************************
' Author: TODO
' Description: TODO
' Version: 0.1
' Instructions: TODO
' Revisions: TODO
' - Date: yyyy/mm/dd
' - Author:
' - Description:
'@Folder("Utilities.Sort")
'******************************************************************************
' Author: VascoFerreira
' Description: Sort arrays with collections
' Version: 0.1
' Instructions: TODO
' Revisions: TODO
' - Date: 2019/03/07
' - Author: Vasco Ferreira
' - Description: Init
'@Folder("Utilities.Sort")
@vascoferreira25
vascoferreira25 / policy_probability.py
Created March 13, 2019 20:58
Calculate the probability of all possible cenarios.
# This problem lies in calculating the probability
# that a certain cenario has to occur. It is
# similar to a Monte Carlo method in that
# it creates several cenarios. However, MC method
# creates cenarios based on the distribution of
# already seen cases while this method brute forces
# all possible cenarios.
# Original post on reddit: https://www.reddit.com/r/vba/comments/b0d07g/brand_new_to_vba_struggling_with_probability/