Skip to content

Instantly share code, notes, and snippets.

View ferbncode's full-sized avatar
👋

Suyash Garg ferbncode

👋
View GitHub Profile
@ferbncode
ferbncode / downloading dumps
Created June 26, 2017 14:54
docker-compose -f docker/docker-compose.dev.yml run musicbrainz_db
ok
creating template1 database in /var/lib/postgresql/data/pgdata/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
@ferbncode
ferbncode / error
Created June 4, 2017 10:45
FK constraint error
➜ musicbrainz-server git:(mb-import) ✗ docker run suyashmb:latest
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
FROM postgres:9.5.6
ARG DEBIAN_FRONTEND=noninteractive
# install_extensions.sh removes certain build dependencies that we need, so we
# can't install everything here.
# Note: curl is also a dependency of carton.
RUN apt-get update && \
apt-get install --no-install-suggests --no-install-recommends -y ca-certificates curl sudo && \
rm -rf /var/lib/apt/lists/*
Can't locate DateTime/Duration.pm in @INC (you may need to install the DateTime::Duration module) (@INC contains: /home/musicbrainz/musicbrainz-server/admin/../lib /home/musicbrainz/musicbrainz-server/local/lib/perl5/x86_64-linux-gnu-thread-multi /home/musicbrainz/musicbrainz-server/local/lib/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.3
hu Jun 1 07:11:33 2017 : Creating tables ... (caa/CreateTables.sql)
Thu Jun 1 07:11:33 2017 : Creating documentation tables ... (documentation/CreateTables.sql)
Thu Jun 1 07:11:37 2017 : Creating tables ... (report/CreateTables.sql)
Thu Jun 1 07:11:38 2017 : Creating sitemaps tables ... (sitemaps/CreateTables.sql)
Thu Jun 1 07:11:38 2017 : Creating statistics tables ... (statistics/CreateTables.sql)
Thu Jun 1 07:11:38 2017 : Creating wikidocs tables ... (wikidocs/CreateTables.sql)
Can't locate DateTime/Duration.pm in @INC (you may need to install the DateTime::Duration module) (@INC contains: /home/musicbrainz/musicbrainz-serv
m4_include(`macros.m4')m4_dnl
FROM postgres:9.5.6
ARG DEBIAN_FRONTEND=noninteractive
# install_extensions.sh removes certain build dependencies that we need, so we
# can't install everything here.
# Note: curl is also a dependency of carton.
RUN apt_install(`ca-certificates curl sudo cpanminus')
FROM postgres:9.5.6
ARG DEBIAN_FRONTEND=noninteractive
# install_extensions.sh removes certain build dependencies that we need, so we
# can't install everything here.
# Note: curl is also a dependency of carton.
RUN apt-get update && \
apt-get install --no-install-suggests --no-install-recommends -y ca-certificates curl sudo cpanminus && \
rm -rf /var/lib/apt/lists/*
FROM postgres:9.5.6
ARG DEBIAN_FRONTEND=noninteractive
# install_extensions.sh removes certain build dependencies that we need, so we
# can't install everything here.
# Note: curl is also a dependency of carton.
RUN apt-get update && \
apt-get install --no-install-suggests --no-install-recommends -y ca-certificates curl sudo && \
rm -rf /var/lib/apt/lists/*
@ferbncode
ferbncode / Error
Created May 29, 2017 05:47
Error while importing dumps in CB
Traceback (most recent call last):
File "/usr/local/lib/python3.6/tarfile.py", line 1657, in bz2open
import bz2
File "/usr/local/lib/python3.6/bz2.py", line 23, in <module>
from _bz2 import BZ2Compressor, BZ2Decompressor
ModuleNotFoundError: No module named '_bz2'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):

Presently, the musicbrainz webservice is used and the related functions reside in the critiquebrainz/frontend/external/musicbrainz.py. Both the ws and musicbrainz database are to be used for getting information regarding the release_groups, artists and other entities (To make it up to the user to decide which one to use based on the configuration). We can divide the current ws related functions and make up the directory structure as follows:

  external/
    musicbrainz/
      __init__.py
      db/
        __init__.py
        artist.py
        entity.py
        place.py

Introduction

  • In any broadcast network, the key issue is how to determine who gets to use the channel when there is competition for it.
  • Conference calls and Actual meetings (raise hands)
  • Broadcast channels also called Multiaccess Channels or Random Access Channels
  • The protocols used to determine who goes next on a multiaccess channel belong to a sublayer of the data link layer called the MAC (Medium Access Control) sublayer
  • The MAC sublayer is especially important in LANs, particularly wireless ones because wireless is naturally a broadcast channel.
  • The MAC sublayer is the bottom part of the data link layer

Shortcomings of Static Allocation Schemes for Bursty Traffic