Skip to content

Instantly share code, notes, and snippets.

View vasily-v-ryabov's full-sized avatar

Vasily Ryabov vasily-v-ryabov

View GitHub Profile
@mcvarer
mcvarer / cuda-11.2_installation_on_Ubuntu-18.04
Last active March 12, 2024 02:29
CUDA 11.2 Installation on Ubuntu 18.04
#!/bin/bash
## This gist contains instructions about cuda v11.2 and cudnn 8.1 installation in Ubuntu 18.04 for PyTorch
#############################################################################################
##### forked by : https://gist.github.com/Mahedi-61/2a2f1579d4271717d421065168ce6a73 ########
#############################################################################################
### steps ####
# verify the system has a cuda-capable gpu
@RemcoTukker
RemcoTukker / pywinauto_firstchild.py
Created June 18, 2017 19:36
Monkey patch for pywinauto that adds a first_only parameter to the window function for the UIA backend, in order to work around slow FindAll calls (win10 bug?)
# Monkey patch for pywinauto that adds a first_only parameter to the window function
# for the UIA backend, in order to work around slow FindAll calls (win10 bug?)
# First copy paste this code on your REPL, then do:
# d1 = pywinauto.Desktop("uia")
# d1.window(first_only=True, title="Calculator").window_text()
# Currently only title is supported, but its easy to implement all the others as well,
# most importantly title_re
def first_child(self):
print("Getting first child")
@markddavidoff
markddavidoff / com_extentsion.py
Last active August 8, 2016 19:11
Comtypes wrapper to create an instance of a COM object with IClassFactory2 for objects that require licensing
# based on https://gist.github.com/EBNull/4219140
from uuid import UUID
from comtypes import GUID, IUnknown, CLSCTX_SERVER
from ctypes import OleDLL, WinDLL, c_ulong, byref, WINFUNCTYPE, \
POINTER, c_char_p, c_void_p
from ctypes.wintypes import HRESULT
IID_IClassFactory2 = "{B196B28F-BAB4-101A-B69C-00AA00341D07}"
@gbishop
gbishop / Args.ipynb
Last active July 18, 2022 11:43
Allow arguments to be passed to notebooks via URL or command line.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@diyan
diyan / gui_automation_python.md
Last active December 4, 2023 14:48
Desktop GUI automation in Python

Desktop

UI Automation. Desktop. Python

GUI toolkit agnostic

autopy - simple, cross-platform GUI automation toolkit. MIT - https://github.com/msanders/autopy/

  • 432 stars, 102 forks, 2950 monthly downloads at 2015-05-13
  • GUI toolkit agnostic
@Preston-Landers
Preston-Landers / pyuac.py
Last active June 16, 2023 04:09
pyuac - elevate a Python process with UAC on Windows
#!/usr/bin/env python
# -*- coding: utf-8; mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vim: fileencoding=utf-8 tabstop=4 expandtab shiftwidth=4
"""
THIS CODE IS OUTDATED! Please use this instead:
https://pypi.org/project/pyuac/
https://github.com/Preston-Landers/pyuac
@leftclickben
leftclickben / gist:322b7a3042cbe97ed2af
Last active June 7, 2023 10:58
Steps to migrate from SVN to GitLab

Steps to migrate from SVN to GitLab

This process worked for me. I take no responsibility for any damage or loss incurred as a result of following or not following these steps or, for that matter, anything else you might do or not do.

Setup

  • SVN is hosted at svn.domain.com.au.
  • SVN is accessible via http (other protocols should work).
  • GitLab is hosted at git.domain.com.au and:
@EBNull
EBNull / getobject.py
Created December 5, 2012 20:19
"Missing" win32com utilities for getting object instances from DLLs or from run-time licenced servers
__all__ = (
####### Class Objects
#CoGetClassObject - Normal, not wrapped
'CoDllGetClassObject', #Get ClassObject from a DLL file
####### ClassFactory::CreateInstance Wrappers
'CoCreateInstanceFromFactory', #Create an object via IClassFactory::CreateInstance
'CoCreateInstanceFromFactoryLicenced', #Create a licenced object via IClassFactory2::CreateInstanceLic
import ctypes
import re
def ValidHandle(value, func, arguments):
if value == 0:
raise ctypes.WinError()
return value
import serial
from serial.win32 import ULONG_PTR, is_64bit
@baoilleach
baoilleach / chemsketchauto.py
Created September 14, 2012 09:57
Automation of conversion from ChemSketch files to Mol files
import pywinauto
import os
import doctest
from pywinauto import application
from time import sleep
from pywinauto.timings import Timings
Timings.Slow()
Timings.after_sendkeys_key_wait =0.015
Timings.after_menu_wait =0.1