Skip to content

Instantly share code, notes, and snippets.

View emptymalei's full-sized avatar
📡
sending EM waves to Mars

LM emptymalei

📡
sending EM waves to Mars
View GitHub Profile
@emptymalei
emptymalei / ecdc covid 19 data
Created December 24, 2020 14:29
audiorepr package demo data
datetime,AT,BE,BG,CY,CZ,DE,DK,EE,ES,FI,FR,GB,GR,HR,HU,IE,IS,IT,LI,LT,LU,LV,MT,NL,NO,PL,PT,RO,SE,SI,SK,Total
2020-03-20,550.0,309.0,13.0,0.0,172.0,5940.0,36.0,9.0,3431.0,31.0,1861.0,647.0,46.0,23.0,12.0,191.0,80.0,5322.0,0.0,15.0,135.0,15.0,5.0,409.0,129.0,68.0,143.0,17.0,122.0,33.0,16.0,19780.0
2020-03-21,453.0,462.0,22.0,9.0,210.0,4185.0,104.0,16.0,2833.0,50.0,1617.0,706.0,31.0,22.0,0.0,126.0,79.0,5986.0,9.0,21.0,139.0,25.0,11.0,534.0,190.0,70.0,235.0,31.0,200.0,22.0,14.0,18412.0
2020-03-22,375.0,558.0,36.0,17.0,91.0,3140.0,71.0,23.0,4946.0,71.0,1847.0,1035.0,35.0,80.0,46.0,102.0,64.0,6557.0,2.0,36.0,186.0,13.0,9.0,637.0,184.0,111.0,260.0,59.0,123.0,42.0,41.0,20797.0
2020-03-23,607.0,586.0,22.0,11.0,170.0,3311.0,69.0,20.0,3646.0,105.0,1559.0,665.0,94.0,29.0,36.0,121.0,95.0,5560.0,10.0,38.0,128.0,15.0,17.0,573.0,206.0,98.0,320.0,66.0,160.0,31.0,7.0,18375.0
2020-03-24,855.0,342.0,16.0,21.0,71.0,4438.0,65.0,26.0,4517.0,74.0,3838.0,967.0,71.0,71.0,20.0,219.0,20.0,4789.0,0.0,36.0,77.0,41.0,17.0,545.0,239.0,115.0,
@emptymalei
emptymalei / some ids
Created June 9, 2020 18:35
some unknow ids
l = """[{type:c,generated:b,id:"Apps:5ced8eb5-a5e3-4150-9ef6-0caf285caed6",typename:a},{type:c,generated:b,id:"Apps:c8ef7e1c-0c91-4030-a71d-8cdc86c367ed",typename:a},{type:c,generated:b,id:"Apps:91339570-731c-45b1-a6f3-4aa93a7e8af0",typename:a},{type:c,generated:b,id:"Apps:266a1a88-b462-4db2-8782-2e9f0980afda",typename:a},{type:c,generated:b,id:"Apps:68324672-4f6a-46d4-9866-4a29e4780d4f",typename:a},{type:c,generated:b,id:"Apps:3eee0834-b7d9-4c9d-b3c0-9eb06aad9efd",typename:a},{type:c,generated:b,id:"Apps:687f039a-8f7a-4ec3-8b21-ea9f7518bc71",typename:a},{type:c,generated:b,id:"Apps:015ceb04-f38c-4746-bb6b-4b149b7b022a",typename:a},{type:c,generated:b,id:"Apps:13a8c28b-dc85-4211-be0d-c02d5ab29933",typename:a},{type:c,generated:b,id:"Apps:9d5bcd49-9621-456b-9ab0-20c519ebc4c6",typename:a},{type:c,generated:b,id:"Apps:f6a5ebd6-7712-41ba-b8fd-d4d8efa840a0",typename:a},{type:c,generated:b,id:"Apps:bc9c079b-daf6-489c-b1c6-0ccb93e0bf80",typename:a},{type:c,generated:b,id:"Apps:941605ec-ef02-4b52-b8d6-3cb792be2b9d",t
in der tat!
@emptymalei
emptymalei / machine.js
Last active March 4, 2020 12:53
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
lat lon state population
48.53798784334733 9.049518423658956 Baden-Württemberg 10075500
48.94917269695629 11.418027577497131 Bayern 12542000
52.95 13.2 Brandenburg 2500000
52.502299698009296 13.402948501480669 Berlin 3469000
52.765431393186596 9.161108235507873 Niedersachsen 7914000
53.54610462404504 10.024470557873288 Hamburg 1788000
50.60321670836851 9.028805533680368 Hessen 6066000
53.7535394556047 12.549970296944396 Mecklenburg-Vorpommern 1639000
53.19920119721645 8.74885429375113 Bremen 661000
@emptymalei
emptymalei / postal-codes.json
Created February 27, 2020 12:42 — forked from matthewbednarski/postal-codes.json
Global postal codes regex formats
[{ "Note": "The first two digits (ranging from 10–43) correspond to the province, while the last two digits correspond either to the city/delivery zone (range 01–50) or to the district/delivery zone (range 51–99). Afghanistan Postal code lookup", "Country": "Afghanistan", "ISO": "AF", "Format": "NNNN", "Regex": "^\\d{4}$" }, { "Note": "With Finland, first two numbers are 22.", "Country": "Åland Islands", "ISO": "AX", "Format": "NNNNN", "Regex": "^\\d{5}$" }, { "Note": "Introduced in 2006, gradually implemented throughout 2007.", "Country": "Albania", "ISO": "AL", "Format": "NNNN", "Regex": "^\\d{4}$" }, { "Note": "First two as in ISO 3166-2:DZ", "Country": "Algeria", "ISO": "DZ", "Format": "NNNNN", "Regex": "^\\d{5}$" }, { "Note": "U.S. ZIP codes (range 96799)", "Country": "American Samoa", "ISO": "AS", "Format": "NNNNN (optionally NNNNN-NNNN or NNNNN-NNNNNN)", "Regex": "^\\d{5}(-{1}\\d{4,6})$" }, { "Note":
@emptymalei
emptymalei / How to install redash in mac.
Last active November 20, 2019 09:26 — forked from deepak365/How to install redash in mac.
How to install redash in mac.
What is redash?
Redash is database viewer included BI tool inside. Redash has support for querying multiple databases, including: Redshift, Google BigQuery, PostgreSQL, MySQL, Graphite, Presto, Google Spreadsheets, Cloudera Impala, Hive and custom scripts.
Prerequisite :
1. Install docker
2. Install git
git clone https://github.com/getredash/redash.git
docker-compose -f docker-compose.production.yml run --rm server create_db
docker-compose -f docker-compose.production.yml up
@emptymalei
emptymalei / property_inheritance.md
Created September 6, 2019 09:21 — forked from Susensio/property_inheritance.md
Inherit property setter in python 3.7

Python @property inheritance the right way

Given a Parent class with value property, Child can inherit and overload the property while accessing Parent property getter and setter.

Although we could just reimplement the Child.value property logic completely without using Parent.value whatsover, this would violate the DRY principle and, more important, it wouldn't allow for proper multiple inheritance (as show in the example property_inheritance.py bellow).

Two options:

  • Child redefines value property completely, both getter and setter.
@emptymalei
emptymalei / execute myself
Created August 13, 2019 14:10
weird python
python
import os
__cwd__ = os.getcwd()
__location__ = os.path.realpath(
os.path.join(__cwd__, os.path.dirname(__file__))
)
print(f'location: {__location__}')
print(f'filename: {__file__}')
Solving environment: done
## Package Plan ##
environment location: /Users/leima/anaconda3
removed specs:
- numpy