Skip to content

Instantly share code, notes, and snippets.

View svmihar's full-sized avatar
🙏

sumihar christian svmihar

🙏
View GitHub Profile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
VM_BOX="generic/centos7"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "dev1" do |dev1|
dev1.vm.box = VM_BOX
@svmihar
svmihar / sekut.py
Last active January 21, 2022 16:18
#! /usr/bin/env python3
# install latest stable v1.23.2
import platform
if platform.system().lower() !='linux':
raise OSError('use wsl')
import os
if __name__ == "__main__":
@svmihar
svmihar / gist:e89e1f2011c95594c8b30b83ecc23849
Created December 7, 2021 05:23
Firefox no url bar, nor title ba

steps

  1. install simplefox
  2. add new line in the userChrome.css
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

#navigator-toolbox {
    height: 0px !important;
    min-height: 0px !important;
 overflow: hidden !important;
@svmihar
svmihar / hkt_in_python.py
Created October 29, 2020 02:53 — forked from sobolevn/hkt_in_python.py
Higher Kinded Types in Python
import abc
import dataclasses
from typing import Callable, Generic, TypeVar
# TODO: pip install returns
# TODO: add `returns.contrib.mypy.returns_plugin` to mypy plugins
# TODO: read the docs at https://github.com/dry-python/returns
from returns.primitives.hkt import Kind1, SupportsKind1, kinded
_ValueType = TypeVar('_ValueType')
@svmihar
svmihar / Sphinx_Setup_for_autodoc.md
Created October 20, 2020 04:16 — forked from GLMeece/Sphinx_Setup_for_autodoc.md
Setting up Sphinx for generating documentation from DocStrings, leveraging the Napoleon extension.

Sphinx Setup for autodoc

Sphinx is a documentation generator that is the de facto standard for Python projects. The official documentation can be a bit daunting as it includes so many options, it's hard to know where to start.

Note: This Gist was updated on 04/04/2019 to accomodate a newer version of Sphinx, as well as Python 3.7. YMMV!

This document is written with the following presuppositions:

@svmihar
svmihar / airflow_install.sh
Last active February 11, 2021 09:48
hentikan penderitaan ini
#!/bin/bash
USUARIO_SO="$(whoami)"
ANACONDA_URL="https://repo.anaconda.com/archive/Anaconda3-5.2.0-Linux-x86_64.sh"
_DB_PASSWORD="la contraseña"
_IP=$(hostname -I | cut -d' ' -f1)
while getopts "a:p:h" opt; do
case $opt in
a) ANACONDA_URL="$OPTARG";;
p) _DB_PASSWORD="$OPTARG";;
h) cat <<EOF
import requests
import random
import time
r = ['yesterday', 'day1']
if __name__ == '__main__':
c=0
while True:
response = ''
# for Loops
import turtle
import time
def main():
michelangelo= turtle.Turtle()
michelangelo.color("orange")
side = 75
angle = 90
@svmihar
svmihar / client.py
Created April 21, 2020 09:29 — forked from kylehounslow/client.py
Send and receive images using Flask, Numpy and OpenCV
from __future__ import print_function
import requests
import json
import cv2
addr = 'http://localhost:5000'
test_url = addr + '/api/test'
# prepare headers for http request
content_type = 'image/jpeg'
import cv2
import os
def extractFrames(pathIn, pathOut):
os.mkdir(pathOut)
cap = cv2.VideoCapture(pathIn)
count = 0
while (cap.isOpened()):