use blanks on both sides of comparison operators not only one, remove blanks next to parenthesis
This commit is contained in:
22
purge-workflows.py
Normal file
22
purge-workflows.py
Normal file
@ -0,0 +1,22 @@
|
||||
from yaml import load
|
||||
import subprocess
|
||||
try:
|
||||
from yaml import CLoader as Loader
|
||||
except ImportError:
|
||||
from yaml import Loader
|
||||
|
||||
runs = subprocess.check_output('gh api repos/lammps/lammps/actions/runs',shell=True)
|
||||
data = load(runs,Loader=Loader)
|
||||
while data['total_count'] > 3:
|
||||
print('remaining: ', data['total_count'])
|
||||
num=1
|
||||
for d in data['workflow_runs']:
|
||||
print(num, d['id'],d['name'],d['run_number'])
|
||||
num += 1
|
||||
if num > 4:
|
||||
subprocess.call('gh api -X DELETE repos/lammps/lammps/actions/runs/' + str(d['id']), shell=True)
|
||||
#print('gh api -X DELETE repos/lammps/lammps/actions/runs/' + str(d['id']))
|
||||
else:
|
||||
print('skip')
|
||||
runs = subprocess.check_output('gh api repos/lammps/lammps/actions/runs',shell=True)
|
||||
data = load(runs,Loader=Loader)
|
||||
@ -198,8 +198,7 @@ PairKIM::~PairKIM()
|
||||
void PairKIM::set_contributing()
|
||||
{
|
||||
int const nall = atom->nlocal + atom->nghost;
|
||||
for (int i = 0; i < nall; ++i)
|
||||
kim_particleContributing[i] = ( (i < atom->nlocal) ? 1 : 0 );
|
||||
for (int i = 0; i < nall; ++i) kim_particleContributing[i] = (i < atom->nlocal) ? 1 : 0;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user