Skip to content

Instantly share code, notes, and snippets.

@mitar
mitar / model.py
Last active Jun 29, 2020
sklearn base
View model.py
try:
from typing import Annotated
except ImportError:
# Backported Annotated, available through https://pypi.org/project/typing-extensions/.
from typing_extensions import Annotated
class Model(Base):
# This docstring is automatically extended with types and defaults.
# Maybe one of the following existing projects could be reused for this:
# https://github.com/agronholm/sphinx-autodoc-typehints
@mitar
mitar / script.js
Created Jul 11, 2019
Google Script to move e-mails to Trash
View script.js
// You can install it at https://script.google.com/
// You can configure it to run every hour to move (eventually) all e-mails under "My Triggers". There are limits
// which prevents it to run for more than 6 minutes. So it is normal that it timeouts. But then there are also
// limits on how many times per day you can run it. So just make a trigger and let it run.
function myFunction() {
while(true){
Logger.log("Searching.");
var threads = GmailApp.search('your search query', 0, 100);
if (!threads.length) {
@mitar
mitar / pyqt5_scraper.py
Last active Dec 23, 2019 — forked from brbsix/pyqt5_scraper.py
PyQt5 Scraper (Basic Example)
View pyqt5_scraper.py
#!/usr/bin/env python3
# standard imports
import sys
# third-party imports
from pyvirtualdisplay import Display
from PyQt5.QtWidgets import QApplication
from PyQt5.QtCore import QUrl
from PyQt5.QtWebEngineWidgets import QWebEngineView
View efetch-pubmed.xsd
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema.xsd http://www.w3.org/2001/XMLSchema.xsd" xmlns:eutils="http://www.ncbi.nlm.nih.gov/eutils" targetNamespace="http://www.ncbi.nlm.nih.gov/eutils" elementFormDefault="qualified">
<!-- http://www.ncbi.nlm.nih.gov/entrez/query/DTD/pubmed_100101.dtd -->
<complexType name="AbstractType">
<sequence>
<element ref="eutils:AbstractText"/>
<element ref="eutils:CopyrightInformation" minOccurs="0"/>
</sequence>
View keybase.md

Keybase proof

I hereby claim:

  • I am mitar on github.
  • I am mitar (https://keybase.io/mitar) on keybase.
  • I have a public key whose fingerprint is 3775 D442 1C8C 6874 6FCB 6051 86CB B63B 98C7 53FC

To claim this, I am signing this object:

View software_for_scientists.md

Software for scientists

Some things takes much less time and stress once you know the right tool. Below, there is a community edited list of software for scientists.

Text editors

General purpose text/code editors. It may be better to have a good editor for everything, than different ones for different languages, scripts, notes.

View log
This file has been truncated, but you can view the full file.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by GNU Octave configure 3.6.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/octave/3.6.4 --with-blas=-Wl,-framework,Accelerate --with-umfpack=-lumfpack -lsuitesparseconfig --without-framework-carbon
## --------- ##
You can’t perform that action at this time.