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
def get_institutions(q): | |
page=1 | |
if q: | |
url=f'https://inspirehep.net/api/institutions?q={q}&size=250&page={page}' | |
else: | |
url=f'https://inspirehep.net/api/institutions?size=250&page={page}' | |
r=requests.get(url) | |
time.sleep(sleep) | |
i=r.json()['hits']['hits'] | |
total=r.json().get('hits').get('total') |
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
@article{Alloul:2013bka, | |
author = "Alloul, Adam and Christensen, Neil D. and Degrande, | |
Céline and Duhr, Claude and Fuks, Benjamin", | |
title = "{FeynRules 2.0 - A complete toolbox for tree-level | |
phenomenology}", | |
journal = "Comput. Phys. Commun.", | |
volume = "185", | |
year = "2014", | |
pages = "2250-2300", | |
doi = "10.1016/j.cpc.2014.04.012", |
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 re | |
def split_names(s,exceptions=['Gil', 'Lew', 'Liz', 'Paz', 'Rey', 'Rio', 'Roa', 'Rua', 'Sus', 'Zea'], | |
nacionality='Colombiana'): | |
""" | |
Extract the parts of the full name `s` in the format ([] → optional): | |
[SMALL_CONECTORS] FIRST_LAST_NAME [SMALL_CONECTORS] [SECOND_LAST_NAME] NAMES | |
If len(s) == 3 → Not Ibero-America name is asked | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 requests | |
import pandas as pd | |
r=requests.get('https://infogram.com/covid-2019-ins-colombia-1hnq41zg9ord63z') | |
head='"data":[[["ID de caso",' | |
tail=']]]' | |
js='{}{}{}'.format( head.split(':')[-1], | |
r.text.split(head)[-1].split(tail)[0], | |
tail |
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
def hIndex(citations): | |
""" | |
https://github.com/kamyu104/LeetCode/blob/master/Python/h-index.py | |
:type citations: List[int] | |
:rtype: int | |
# Given an array of citations (each citation is a non-negative integer) | |
# of a researcher, write a function to compute the researcher's h-index. | |
# | |
# According to the definition of h-index on Wikipedia: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/env bash | |
SARAH_VERSION=4.13.0 | |
wget http://www.hepforge.org/archive/sarah/SARAH-${SARAH_VERSION}.tar.gz | |
tar zxf SARAH-${SARAH_VERSION}.tar.gz | |
ln -s SARAH-${SARAH_VERSION} SARAH | |
wget http://www.hepforge.org/archive/spheno/SPheno-4.0.3.tar.gz | |
tar zxf SPheno-4.0.3.tar.gz | |
ln -s SPheno-4.0.3 SPHENO | |
sed -ri 's/(^F90\s*=\s*)ifort/\1gfortran/' SPHENO/Makefile |
NewerOlder