Skip to content

Instantly share code, notes, and snippets.

View achillesrasquinha's full-sized avatar
💭
Let's connect! Shoot at achillesrasquinha@gmail.com

Achilles Rasquinha achillesrasquinha

💭
Let's connect! Shoot at achillesrasquinha@gmail.com
  • Mars
  • 16:57 (UTC -06:00)
View GitHub Profile
/*! For license information please see becca-chat.js.LICENSE.txt */
(()=>{var e={1628:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8081),a=n.n(r),o=n(3645),i=n.n(o)()(a());i.push([e.id,'body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif}a{cursor:pointer}a,a:hover,a:active,a:focus,.btn,.btn:hover,.btn:active,.btn:focus{outline:0}img{max-width:100%}p{margin:10px 0px}.text-color{color:#36414c !important}.text-muted{color:#8d99a6 !important}.text-extra-muted{color:#d1d8dd !important}a,.badge{-webkit-transition:.2s;-o-transition:.2s;transition:.2s}.btn{-webkit-transition:background-color .2s;-o-transition:background-color .2s;transition:background-color .2s}a.disabled,a.disabled:hover{color:#888;cursor:default;text-decoration:none}a.grey,.sidebar-section a,.control-value a,.data-row a{text-decoration:none}a.grey:hover,.sidebar-section a:hover,.control-value a:hover,.data-row a:hover,a.grey:focus,.sidebar-sectio
>NC_000001.11:150508109-150513789 Homo sapiens chromosome 1, GRCh38.p13 Primary Assembly
AACCGTAACAGCCACCAGACAAGCTTCAGTGGCCGGCCCTTCACATCCAGACTTGCCTGAGAGGACCCAC
CTCTGAGTGTCCAGTGGTCAGTTGCCCCAGGATGGGGACCACAGCCAGAGCAGCCTTGGTCTTGACCTAT
TTGGCTGTTGCTTCTGCTGCCTCTGAGGGAGGTGAGTTGGGGGATCAGCACTTAGGAGGGGGTCTGGGCT
TGCATGGCAGGGGTCTGGGTCCAGGCATCCCAGACGGCTCATCACTAGCAGAGTGATTCTCCGTTTGGCT
TTCCTTTTCTGAGCAGGCCCAAAGTGGGCCTAGGCCAGTGGAGCCTTTAACCAAGGAGGCAGAGAGCAGG
GGCACAGAAGGAGAGGGGTTCCTAGAAACTGCTGCCAAGAAACACAGAATCCCAGTCAAATAGACAACTG
AGTGGGGGGTGGGTTCACAGAGTGAGGGTCTCCTGCTGATGAGGATGTAGGGAGGTGGCTGGTGGGAGAG
GCAAGGGAGGGAAAAGGGGCCCCCAGGCTGCTCAAAACCGGATTGCTGGCCCAGCAAGCCTCGACTGACT
CCCTGTCTGATTAGAGGAGTTGAGGGGTGTCCATCCACAGACCCACCCTCCATCCAGCACAAACACATTC
@achillesrasquinha
achillesrasquinha / import-python-string.md
Created June 12, 2019 21:51
Import into Python via String

Handles

  • import foobar
  • import foo.bar as baz
  • from foo import bar
  • from foo.bar import Baz
  • from foo.bar import BAZ
class HandlerRegistry(dict):
@achillesrasquinha
achillesrasquinha / make_files_directories_using_a_python_dict.md
Last active August 28, 2018 03:51
Make files/directories using a Python dict.

Make Files/Directories using a Python Dict

Script

# imports - standard imports
import os
import os.path as osp
import errno
import collections

Usage

_import('matplotlib') # Installs matplotlib and imports into global space if not available.

Snippet

import os
import os.path as osp
import importlib
@achillesrasquinha
achillesrasquinha / popen.md
Last active April 23, 2024 06:17
A Python Popen that does not suck.

A Python Popen that does not suck.

Function

import os
import subprocess

def popen(*args, **kwargs):
    output      = kwargs.get('output', False)
    directory   = kwargs.get('dir')
@achillesrasquinha
achillesrasquinha / download_mp3_using_youtube_dl.md
Created August 20, 2017 18:02
Download MP3s using youtube-dl

Add this to your .bash_profile file.

alias mp3-dl='function _(){ youtube-dl --extract-audio --audio-format mp3 --output "~/Music/%(title)s.%(ext)s" $1; };_'

On the terminal, type:

$ mp3-dl [YOUTUBE-URL]
@achillesrasquinha
achillesrasquinha / pip-update-all.md
Last active September 4, 2018 09:32
A python script to update all your pip packages
@achillesrasquinha
achillesrasquinha / db_open_helper_post.md
Last active June 27, 2020 15:48
Database Open Helper Class for Android SQLite Database.

Database Open Helper Class for Android SQLite Database

DatabaseOpenHelper.java

// Copyright 2015 Achilles Rasquinha

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
@achillesrasquinha
achillesrasquinha / android_square_layout.md
Last active December 8, 2015 06:10
Android Square Layout

Android Square Layout

java

package <your_package_name>

import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.util.AttributeSet;