Skip to content

Instantly share code, notes, and snippets.

@OMantere
OMantere / sklearn.cluster.k_means_.py
Created November 28, 2019 13:06
Balancing k-means
"""K-means clustering"""
# Authors: Gael Varoquaux <gael.varoquaux@normalesup.org>
# Thomas Rueckstiess <ruecksti@in.tum.de>
# James Bergstra <james.bergstra@umontreal.ca>
# Jan Schlueter <scikit-learn@jan-schlueter.de>
# Nelle Varoquaux
# Peter Prettenhofer <peter.prettenhofer@gmail.com>
# Olivier Grisel <olivier.grisel@ensta.org>
# Mathieu Blondel <mathieu@mblondel.org>
" Vim color scheme
" Name: vividchalk.vim
" Author: Tim Pope <vimNOSPAM@tpope.info>
" Version: 2.0
" GetLatestVimScripts: 1891 1 :AutoInstall: vividchalk.vim
" Based on the Vibrank Ink theme for TextMate
" Distributable under the same terms as Vim itself (see :help license)
if has("gui_running")

How to use the generator fragment and run Fast Simulation on the sample

The generator fragment takes in the LHE file generated by the matrix element generator(eg. MadGraph), and performs processes like hadronization on the sample.

This hadronized sample can then be processed by the CMSSW to do things like Fast Simulation.

At the end I'm giving the cmsDriver command to perform the complete Fast Simulation in the way we have done, if you already have experience with CMSSW you should be able to modify this to suit your needs.

set nocompatible " be iMproved, required
filetype off " required
" Testing
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
set rtp+=~/.vim/bundle/ctrlp.vim
set rtp+=~/.fzf
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
Top 10 slowest examples (217.73 seconds, 47.0% of total time):
Plates API requests api v1 GET /plates/:plate_id/runs/:run_id/protocol in json format returns successfully
54.92 seconds ./spec/requests/api/v1/plates/plates_spec.rb:176
Plates API requests api v1 GET /plates/:plate_id/runs/:run_id/protocol in Echo format returns successfully
49.58 seconds ./spec/requests/api/v1/plates/plates_spec.rb:184
Plates API requests api v1 POST /plates/:plate_id/missed-transfers adds missed transfer information successfully
45.32 seconds ./spec/requests/api/v1/plates/plates_spec.rb:300
Screen#generate_screen_results correctly generates screen results
16.02 seconds ./spec/models/screen_spec.rb:656
Screen#generate_compound_addition_runs a standard setup with wells deactivated places 3 replicates of a non-control combination
find . -name '*.wsp' -exec sed -i -e "s|file:/Users/Shared/|file:/C:/|g" {} \;
@OMantere
OMantere / dka
Last active April 7, 2017 04:54
Kill all running docker containers
#!/usr/bin/python
import os
import subprocess
result = subprocess.check_output('docker ps', shell=True)
for line in result.split('\n')[1:-1]:
docker_ps_id = (line.split(' ')[0])
os.system('docker kill %s' % docker_ps_id)
alias ..='cd ..'
alias ...='cd ../../'
alias ....='cd ../../../'
alias .....='cd ../../../../'
alias ......='cd ../../../../../'
[core]
fileMode = false
[user]
email = osku.mantere@gmail.com
name = Oskari Mantere
[push]
default = current
[github]
user = OMantere
[alias]