Skip to content

Instantly share code, notes, and snippets.

🌴
Looking for a change

Akshay Arora akshayaurora

🌴
Looking for a change
Block or report user

Report or block akshayaurora

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View kivy_arabic_display.py
# -*- coding: utf-8 -*-
import kivy
from kivy.app import App
from kivy.uix.floatlayout import FloatLayout
from kivy.lang import Builder
from bidi.algorithm import get_display
import arabic_reshaper
Builder.load_string(
'''
View Sys_Info_osx_ios.py
from kivy.app import App
from kivy.factory import Factory
from pyobjus import autoclass
from pyobjus.dylib_manager import load_framework
from plyer.facades import UniqueID
#load_framework('/System/Library/Frameworks/UIKit.framework')
UIDevice = autoclass('UIDevice')
NSProcessInfo = autoclass('NSProcessInfo')
processInfo = NSProcessInfo.processInfo()
class RavenApp(App):
View improving-pycon.md

Checklist for PyCon India 2017

A list of suggestions to improve PyCon India. To be used as a checklist for next year.

Disclaimer: All things mentioned is this post, are the opinions/suggestions/views of the author, and in no way depict/endorse the views of any group/community.

Tshirts

  • Make 'Tshirt size' a mandatory field in the explara form. Also mention that tshirt sizes won't be changed later, for any reason whatsoever.
  • Request all speakers/sponsors for their respective tshirt sizes beforehand on mail.
  • Make 3 to 4 queues for Tshirt distribution. DONOT make queues based on names; that approach doesn't work with Tshirts. Each queue should be entirely independent, and volunteers will have a complete list of names.
View pillow_compile
This file has been truncated, but you can view the full file.
./toolchain.py build openssl kivy pil
Want to build ['openssl', 'kivy', 'pil']
Loaded recipe openssl (depends of [], optional are [])
Loaded recipe kivy (depends of ['python', 'sdl2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'ios'], optional are [])
Loaded recipe pil (depends of ['hostpython', 'host_setuptools', 'pkgresources', 'freetype', 'libjpeg', 'python', 'ios'], optional are [])
Loaded recipe python (depends of ['hostpython', 'libffi'], optional are ['openssl'])
Loaded recipe sdl2 (depends of [], optional are [])
Loaded recipe sdl2_image (depends of ['sdl2'], optional are [])
Loaded recipe sdl2_mixer (depends of ['sdl2'], optional are [])
View osx screen resolution using PyObjus
>>> from pyobjus import autoclass
>>> from pyobjus.dylib_manager import load_framework, INCLUDE
>>> load_framework(INCLUDE.AppKit)
>>> nscreen = autoclass('NSScreen')
>>> screen_count = int(nscreen.screens().count())
>>> for scr in range(screen_count):
... screen = nscreen.screens().objectAtIndex_(0)
... print screen.frame.size.width, screen.frame.size.height
...
1680.0 1050.0
View keybase.md

Keybase proof

I hereby claim:

  • I am akshayaurora on github.
  • I am quanon (https://keybase.io/quanon) on keybase.
  • I have a public key ASB3Lj1UxkUQbOgapVjug4a8O0hMyOSZzfZh6ohF7VTVogo

To claim this, I am signing this object:

View gist:f2377bafe37efc8a8d86daed7d5ca383
previewHash(hash){
var preview = document.querySelector('img');
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
// Typical action to be performed when the document is ready:
preview.src = xhttp.responseText;
}
};
xhttp.open("GET", "http://swarm-gateways.net/bzz:/" + hash, true);
View NFC on android with python
''' Code Inspired by http://github.com/tito 's NFC gist
This is a complete implementation allowing for NFC tag or p2p detection
Allows you to create any type of NdefRecord using functions like
`create_RTDURI(uri)`
This is the Android implementatoin of NFC Scanning using the
built in NFC adapter of some android phones.
'''
from kivy.app import App
from kivy.clock import Clock
View openssl p4a error
/home/electrum/Downloads/android-ndk-r18b-linux-x86_64/android-ndk-r18b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv7-none-linux-androideabi -gcc-toolchain /home/electrum/Downloads/android-ndk-r18b-linux-x86_64/android-ndk-r18b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 -mfloat-abi=softfp -mfpu=vfpv3-d16 -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall --sysroot=/home/electrum/Downloads/android-ndk-r18b-linux-x86_64/android-ndk-r18b/sysroot -D__ANDROID_API__=21 -isystem /home/electrum/Downloads/android-ndk-r18b-linux-x86_64/android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi --sysroot=/home/electrum/Downloads/android-ndk-r18b-linux-x86_64/android-ndk-r18b/sysroot -D__ANDROID_API__=21 -isystem /home/electrum/Downloads/android-ndk-r18b-linux-x86_64/android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-functi
View kivy_suggestion_text_example.py
'''This is a simple example of how to use suggestion text.
In this example you setup a word_list at the begining. In this case
'the the quick brown fox jumps over the lazy old dog'. This list along
with any new word written word in the textinput is available as a
suggestion when you are typing. You can press tab to auto complete the text.
'''
import sys
from kivy.clock import Clock
from kivy.app import App
from kivy.uix.textinput import TextInput
You can’t perform that action at this time.