Skip to content

Instantly share code, notes, and snippets.

View artemlos's full-sized avatar

Artem Los artemlos

View GitHub Profile
@artemlos
artemlos / get_all_keys.py
Created February 25, 2019 12:40
Get all keys in a product and write the to key.txt
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 25 13:34:54 2019
@author: Artem Los
"""
import urllib.request
import json
### Keybase proof
I hereby claim:
* I am artemlos on github.
* I am arteml (https://keybase.io/arteml) on keybase.
* I have a public key ASD9FsWUIrnxSagBVjC7UeKte_qUeW62v_jEJSGDG8NACgo
To claim this, I am signing this object:
@artemlos
artemlos / sample.vb
Last active April 25, 2016 17:52
Sending Request to an External Website
''' <summary>
''' This method will send a request to the provided url (including ?variable=value) and return an answer.
''' </summary>
''' <param name="url">The desired url.</param>
''' <returns>The content that is returned by the website. Null if it was unsuccessful.</returns>
Public Function SendRequestExternal(url As String) As String
Try
Using client As New WebClient()
client.Proxy = WebRequest.DefaultWebProxy
client.Credentials = System.Net.CredentialCache.DefaultCredentials
@artemlos
artemlos / TODO until next week
Last active February 6, 2016 09:15
SQL Lab
1. select distinct on (Country.capital) Country.capital from Country, geo_sea where geo_sea.sea ='Baltic Sea' and geo_sea.country = Country.code;
2. select name,area, coordinates from Desert x where x.coordinates is not NULL order by ((coordinates).latitude) DESC limit 1;
(for 2, remove the coordinates during exam).
3.
select *
from
(
select distinct mountains, count(name) as no_mountains