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
{ | |
TGeoManager::Import("geometry.gdml"); | |
TFile *_file0 = TFile::Open("geometry.root", "RECREATE"); | |
gGeoManager->Write(); | |
_file0->Close(); | |
TEveManager::Create(); | |
gGeoManager = gEve->GetGeometry("geometry.root"); | |
TGeoNode* world = gGeoManager->GetTopNode(); |
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
G4String getBoundProcStatStr(G4OpBoundaryProcessStatus stat) { | |
static G4String statStrs[] = { | |
"Undefined", "Transmission", "FresnelRefraction", "FresnelReflection", | |
"TotalInternalReflection", "LambertianReflection", "LobeReflection", | |
"SpikeReflection", "BackScattering", "Absorption", "Detection", | |
"NotAtBoundary", "SameMaterial", "StepTooSmall", "NoRINDEX", | |
"PolishedLumirrorAirReflection", "PolishedLumirrorGlueReflection", | |
"PolishedAirReflection", "PolishedTeflonAirReflection", | |
"PolishedTiOAirReflection", "PolishedTyvekAirReflection", | |
"PolishedVM2000AirReflection", "PolishedVM2000GlueReflection", |
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
" graphics | |
set guifont=Monospace\ 9 | |
set background=dark | |
colo solarized | |
set lines=36 columns=83 |
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
" graphics | |
syntax enable | |
" indentation | |
filetype plugin indent on | |
set expandtab | |
set shiftwidth=4 | |
set softtabstop=4 | |
" misc |
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
#!/usr/bin/python3 | |
# Copyright (C) 2017 Torin Cooper-Bennun | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
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 matplotlib.pyplot as plt | |
import numpy as np | |
x = np.linspace(-10, 10, 10000) | |
ys = [] | |
for S in np.arange(0.5, 1000): | |
ys.append((np.log(np.sinh(x * (S + 0.5)) / np.sinh(x / 2)), S)) | |
fig = plt.figure() |
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
/* | |
DWTFYWWI LICENSE | |
Version 1, January 2006 | |
Copyright (C) 2006 Ævar Arnfjörð Bjarmason | |
Preamble | |
The licenses for most software are designed to take away your | |
freedom to share and change it. By contrast, the DWTFYWWI or Do |
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
# A horrible and hastily-written solution to Problem 54 on Project Euler. | |
import time | |
HIGH_CARD = 0 | |
ONE_PAIR = 1 | |
TWO_PAIRS = 2 | |
THREE_OF_A_KIND = 3 | |
STRAIGHT = 4 | |
FLUSH = 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
// This code is licensed under the | |
// DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE, version 2: | |
// http://www.wtfpl.net/txt/copying/ | |
// Everybody thinks that the Program Manager died with Windows 3.1. | |
// They may not be entirely correct. | |
// The program below searches the titles of all open windows for the string | |
// "program manager". You may well discover that something is found... | |
// | |
// This code is fully C++03 compliant and may be compiled with MinGW GCC |