Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats
SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.
apt-get install sshpass
""" | |
Convert SARIF to Generic SonarQube issues import format. | |
Links: | |
* https://community.sonarsource.com/t/import-sarif-results-as-security-hotspots/83223 | |
* docs.sonarqube.org/9.8/analyzing-source-code/importing-external-issues/generic-issue-import-format | |
* https://gist.github.com/davidfischer-ch/cdfede27ac053a8332b2127becc07608 | |
Author: David Fischer <david@fisch3r.net> |
--- | |
- hosts: all | |
sudo: yes | |
tasks: | |
- name: Update packages list | |
apt: update_cache=yes | |
when: ansible_os_family == 'Debian' | |
- name: List packages to upgrade (1/2) |
# -*- coding: utf-8 -*- | |
from django.conf import settings | |
from django.core.files.storage import FileSystemStorage | |
from django.db import models | |
class OverwriteStorage(FileSystemStorage): | |
''' | |
Muda o comportamento padrão do Django e o faz sobrescrever arquivos de | |
mesmo nome que foram carregados pelo usuário ao invés de renomeá-los. | |
''' |
from rest_framework import serializers | |
class HyperlinkedIdentityField(serializers.HyperlinkedIdentityField): | |
""" | |
This is a performance wrapper for HyperlinkedIdentityField. | |
We save a ton of time by not calling reverse potentially | |
thousands of times per request. | |
""" | |
def __init__(self, *args, **kwargs): |
This works in a python 3.6 environment with bokeh and flask installed. To use this you need the following directory structure:
app/
- templates/
- hello.html
- bokeh-slider.py
- hello.py
After that you need to open two terminals at app/, in the first one you need to run the bokeh server with the command: