Skip to content

Instantly share code, notes, and snippets.

View OverLordGoldDragon's full-sized avatar

John Muradeli OverLordGoldDragon

View GitHub Profile
@MichaelCurrie
MichaelCurrie / autopep8 Travis-CI.md
Last active April 26, 2021 17:18
Automatically fix PEP-8 issues using Travis-CI

PEP-8 is a set of Python style recommendations. pep8 is a module that checks your .py file for violations. To make your Travis-CI build fail if you have any violations, you could add these lines to your .travis.yml:

before_install:
    - pip install pep8
    
script:
    # Run pep8 on all .py files in all subfolders
    # (I ignore "E402: module level import not at top of file"
    # because of use case sys.path.append('..'); import <module>)
@lukas-h
lukas-h / license-badges.md
Last active July 27, 2024 13:38
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@udibr
udibr / keras_part_load.py
Last active May 9, 2020 23:12
Load weights to Keras model from file allowing for differences between file and model
import numpy as np
import h5py
import keras.backend as K
def str_shape(x):
return 'x'.join(map(str, x.shape))
def load_weights(model, filepath, lookup={}, ignore=[], transform=None, verbose=True):
"""Modified version of keras load_weights that loads as much as it can.
Useful for transfer learning.
@OverLordGoldDragon
OverLordGoldDragon / steamlog.py
Last active August 27, 2020 01:12
Track Steam server statistics
# -*- coding: utf-8 -*-
"""README
**Requirements**
Python 3, `steam` package (!pip install steam). Steam itself is *not* required.
**Usage**
In Python terminal:
python path/steamlog.py --servers="name1 name2" --stats="players map" --savepath="path/logs.csv" --appid=224260 --interval=600