Skip to content

Instantly share code, notes, and snippets.

@gingerjoos
gingerjoos / test_weighted_dijkstra.py
Last active December 13, 2018 12:00
Test Networkx single_source_dijkstra_path with weighted edges
from pprint import pprint
import networkx as nx
g = nx.DiGraph()
"""
1-2-3-4-9
|_5_6_8
|_7
"""

Keybase proof

I hereby claim:

  • I am gingerjoos on github.
  • I am anirudh (https://keybase.io/anirudh) on keybase.
  • I have a public key whose fingerprint is F288 A4C7 EF63 53AC BBCE E516 BE68 115C 82FE 41B3

To claim this, I am signing this object:

@gingerjoos
gingerjoos / install_rds_certs_on_windows.md
Last active December 17, 2020 03:55
How to import Amazon RDS CA certificates into Windows 10

The official instructions will ask you to download a pem file. Windows will not read this PEM file properly; instead download the corresponding p7b file - http://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.p7b .

Once you download the file, invoke the Certificate Manager program, certmgr.exe, from the command box that opens when you click the Start button. Instructions here. Make sure you import it into the "Trusted Root Certification Authorities" logical store.

@gingerjoos
gingerjoos / django_queryset_example2
Created August 26, 2014 12:03
An example of the Django queryset - 2
big_cities_count = big_cities.count()
big_canadian_cities_count = big_canadian_cities.count()
@gingerjoos
gingerjoos / django_queryset_example
Created August 26, 2014 11:59
An example of the Django queryset - 1
big_cities = Cities.objects.filter(population__gte=100).filter(size__gte=10)
big_canadian_cities = big_cities.filter(country='CA')
@gingerjoos
gingerjoos / kernel_log_lenovo_g580
Created August 6, 2013 17:14
Wifi module (Broadcom's BCM 4313) issue on Lenovo Essential G580. Ubuntu Raring (Linux compile-g580 3.8.0-27-generic #40-Ubuntu SMP Tue Jul 9 00:17:05 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux)
Aug 4 09:48:19 compile-g580 kernel: [ 892.940781] general protection fault: 0000 [#1] SMP
Aug 4 09:48:19 compile-g580 kernel: [ 892.940837] Modules linked in: snd_hda_codec_hdmi snd_hda_codec_conexant coretemp parport_pc(F) ppdev(F) kvm ghash_clmulni_intel(F) aesni_intel(F) aes_x86_64(F) xts(F) lrw(F) gf128mul(F) ablk_helper(F) cryptd(F) uvcvideo joydev(F) videobuf2_vmalloc videobuf2_memops videobuf2_core videodev hid_logitech_dj rts5139(C) rfcomm snd_hda_intel snd_hda_codec snd_hwdep(F) bnep bluetooth snd_pcm(F) lib80211_crypt_tkip microcode(F) usbhid hid nls_iso8859_1(F) snd_page_alloc(F) i915 snd_seq_midi(F) snd_seq_midi_event(F) snd_rawmidi(F) alx snd_seq(F) wl(POF) drm_kms_helper lpc_ich mdio snd_seq_device(F) psmouse(F) snd_timer(F) lib80211 serio_raw(F) drm i2c_algo_bit cfg80211 snd(F) mei soundcore(F) ideapad_laptop sparse_keymap video(F) mac_hid lp(F) parport(F) ahci(F) libahci(F)
Aug 4 09:48:19 compile-g580 kernel: [ 892.941580] CPU 0
Aug 4 09:48:19 compile-g580 kernel: [ 892.941600] Pid:
$ python
Python 2.7.4 (default, Apr 19 2013, 18:28:01)
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> bar = str("abcd")
>>> bar
'abcd'
>>> foo = unicode("abcd")
>>> foo
@gingerjoos
gingerjoos / yahoo_voice_passwords.md
Created July 12, 2012 08:47
Analysis of passwords of Yahoo Voice users leaked by D33D