Skip to content

Instantly share code, notes, and snippets.

import pickle
import time
import pandas as pd
import geopandas as gpd
from libpysal.weights import Kernel
from shapely.geometry import Point
from splot import esda as esdaplot
from pysal.explore import esda
from esda.moran import Moran
import os
def weight_proc(matrix, name, k, diag=0, checks=False):
if checks:
if not all(matrix[i][j] == matrix[j][i] for i, neighbors in matrix.neighbors.items() for j in neighbors):
print("Matrix is not symmetric!")
full_matrix, ids = matrix.full()
np.fill_diagonal(full_matrix, diag)
# Convert to a sparse matrix
@nilsabdi
nilsabdi / standings.json
Last active September 18, 2023 08:10
standings.json
[{"rank":1,"region":"EU","points":1078.3145346143147,"name":"G2","roster":[{"name":"NiKo","country":"Bosnia and Herzegovina","countryIso":"ba"},{"name":"huNter-","country":"Bosnia and Herzegovina","countryIso":"ba"},{"name":"jks","country":"Australia","countryIso":"au"},{"name":"HooXi","country":"Denmark","countryIso":"dk"},{"name":"m0NESY","country":"Russia","countryIso":"ru"}]},{"rank":2,"region":"EU","points":964.8764710157909,"name":"Heroic","roster":[{"name":"cadiaN","country":"Denmark","countryIso":"dk"},{"name":"stavn","country":"Denmark","countryIso":"dk"},{"name":"TeSeS","country":"Denmark","countryIso":"dk"},{"name":"sjuush","country":"Denmark","countryIso":"dk"},{"name":"jabbi","country":"Denmark","countryIso":"dk"}]},{"rank":3,"region":"EU","points":952.9201875832356,"name":"FaZe","roster":[{"name":"karrigan","country":"Denmark","countryIso":"dk"},{"name":"rain","country":"Norway","countryIso":"no"},{"name":"Twistzz","country":"Canada","countryIso":"ca"},{"name":"ropz","country":"Estonia","country
[00:00.000 --> 00:01.060] Oh no, he doesn't!
[00:01.660 --> 00:02.680] B comes through!
[00:03.240 --> 00:04.320] FaZe gets a defuse.
[00:04.480 --> 00:05.620] How close is that?
[00:05.660 --> 00:07.100] That went down to...
[00:07.100 --> 00:08.620] How close could that be?
[00:08.720 --> 00:09.580] That was the last take.
[00:10.180 --> 00:11.160] Smoke up into heaven.
[00:11.740 --> 00:14.340] That supportive Fahmiz now gonna have to be the key
[00:14.340 --> 00:17.320] to a 3v3 retake on this B site.
package main
import (
"context"
"fmt"
"io/fs"
"os"
"reflect"
"time"
package main
import (
"encoding/json"
"log"
"os"
"github.com/dotabuff/manta"
"github.com/dotabuff/manta/dota"
)
{
"match_id": 7378630668,
"game_mode": 2,
"start_time": 1697137658,
"end_time": 1697137658,
"duration": 1872,
"radiant_win": true,
"players": [
{
"account_id": 321580662,
{
"match_id": 7378630668,
"game_mode": 2,
"start_time": 1697137658,
"end_time": 1697137658,
"duration": 1872,
"radiant_win": true,
"players": [
{
"account_id": 321580662,
This file has been truncated, but you can view the full file.
{"matchId":7378630668,"leagueId":0,"gameMode":2,"startTime":1697137658,"endTime":1697137658,"duration":1872,"radiantWin":true,"players":[{"accountId":321580662,"accountIdOrig":76561198281846390,"playerName":"Yatoro雨","teamSide":"radiant","teamId":7119388,"teamName":"TSpirit","heroId":10,"heroName":"npc_dota_hero_morphling","kills":16,"deaths":1,"assists":8,"lastHits":300,"denies":19,"level":23,"playerSlot":0,"goldPerMin":923,"xpPerMin":1007,"heroDamage":34164,"heroHeal":0,"damageTaken":21677,"towerDamage":18596,"observerWardsPlaced":1,"sentryWardsPlaced":0,"earlyDenies":12,"earlyLastHits":65,"lane":"safe","items":["item_hand_of_midas","item_power_treads","item_satanic","item_skadi","item_manta","item_butterfly"],"movement":[{"x":8888,"y":2154,"time":1000000000},{"x":8009,"y":1948,"time":7000000000},{"x":8486,"y":1829,"time":13000000000},{"x":9692,"y":1907,"time":19000000000},{"x":11048,"y":2058,"time":25000000000},{"x":12687,"y":2404,"time":31000000000},{"x":13936,"y":2877,"time":37000000000},{"x":14304,"y":2
2024-06-13T12:16
2024-06-13T12:49
2024-06-13T12:53
2024-06-13T12:59
2024-06-13T13:03
2024-06-13T13:18
2024-06-13T13:22
2024-06-13T13:26
2024-06-13T13:28
2024-06-13T13:30