Skip to content

Instantly share code, notes, and snippets.

View nillsondg's full-sized avatar

Gordeev Dmitry nillsondg

View GitHub Profile
@nillsondg
nillsondg / OSX_Dictionary_Lookup.py
Last active January 29, 2024 07:16
Simple addon to quickly lookup words in the OSX dictionary
# coding: utf-8
"""
Simple addon to quickly lookup words in the OSX dictionary
Author: Dmitry Gordeev <[email protected]>
Heavily based of work by
Eddie Blundell <[email protected]>
https://gist.github.com/eddie/ff3d820fb267ae26ca0e
Artiom Basenko <[email protected]>
@nillsondg
nillsondg / export_csv.py
Created January 21, 2019 18:31
Anki export to CSV add-on
# -*- coding: utf-8 -*-
"""Anki add-on which adds "Notes in CSV format" option of Export desc dialog.
Copyright (c) 2019 Alex Chekunkov, Dmitry Gordeev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
package ru.evendate.android.gcm;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Bundle;
@nillsondg
nillsondg / AndroidManifest.xml
Last active September 28, 2017 12:51
AndroidManifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ru.evendate.android">
...
<!-- gcm_permissions -->
<uses-permission android:name="ru.evendate.android.c2dm.permission.RECEIVE" />
@nillsondg
nillsondg / EvendateSyncAdapter.java
Last active September 28, 2017 12:50
EvendateSyncService
package ru.evendate.android.network;
import android.accounts.Account;
import android.content.AbstractThreadedSyncAdapter;
import android.content.ContentProviderClient;
import android.content.ContentResolver;
import android.content.Context;
import android.content.SyncResult;
import android.net.ConnectivityManager;
f = open("output.txt","w")
with open("input.txt", 'r') as fh:
for line in fh:
name, phone = line.split(" ")
phone = phone.strip()
numbers = {}
for num in phone:
if num in numbers:
numbers[num] += 1