Skip to content

Instantly share code, notes, and snippets.

Working from home

Yura Partysun

Working from home
View GitHub Profile
Partysun /
Created Aug 31, 2021
It's a sample which is demonstrating how to call many assets and many metrics in a single API call.
import san
from san.graphql import execute_gql
import pandas as pd
san.ApiConfig.api_key = "Your API key"
res = execute_gql("""{ prices: getMetric(metric: "price_usd") {
from: "utc_now-1d"
Partysun / how-to-download-csv-data-from-sanbase.ipynb
Created Nov 2, 2020
How to download csv data from Sanbase.ipynb
View how-to-download-csv-data-from-sanbase.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:4cb046a4b302d5278c67e0b0dd6a162c
curl | sudo tee /etc/apt/gpg_keys.txt
Partysun /
Created Feb 4, 2017 — forked from erichrobinson/
SwitchResX Configuration

#SwitchResX Settings for LG 21:9 UltraWide

SwitchResX is a utility that allows users to override the default resolution settings in OSX. For more information, including download links, vist .

##Disabling System Integrity Protection (SIP)

If you are running OSX 10.11 or higher, SIP must be disabled. To disable SIP do the following:

  • Boot into the recovery partition by pressing CMD + R when starting up your Mac.
  • Once in recovery mode, open a terminal window.
  • Type the command csrutil disable
View Vox incoming simple scenario
VoxEngine.addEventListener(CallEvents.Connected, handleCallConnected);
function handleCallConnected(e) {
// first call connected successfully, play message
Logger.write(call);"Hi, this call is test, please wait", Language.US_ENGLISH_FEMALE);, function(e) { VoxEngine.terminate(); });
Partysun / keyboard_event_openfl
Last active Dec 26, 2015
Detect the button on android, windows, linux, neco. OpenFL
View keyboard_event_openfl
import flash.ui.Keyboard;
import flash.Lib;
public function new()
#if (cpp || neko)
Lib.current.stage.addEventListener (KeyboardEvent.KEY_UP, stage_onKeyUp);
Partysun / Accelerometer Sample
Last active Dec 23, 2015
How to work with Gyroscope or Accelerometer in OpenFL
View Accelerometer Sample
// Imports part...
#if mobile
import openfl.ui.Accelerometer;
// Class var part...
public static var accelX:Float;
public static var accelY:Float;
public static var accelZ:Float;
Partysun /
Created May 28, 2013
Delete fail contacts from google contact service Fail contact = doesn't have email or phone.
# -*- coding: utf-8 -*-
# Delete fail contacts from google contact service
# Fail contact = doesn't have email or phone.
import gdata.contacts.service
import gdata.contacts
import getpass
client = gdata.contacts.service.ContactsService() = raw_input('Please enter your email address')
client.password = getpass.getpass()
Partysun / iptables.firewall.rules
Last active Dec 15, 2015
The following firewall rules will allow HTTP (80), HTTPS (443), SSH (44444), ping, and some other ports for testing. All other ports will be blocked.
View iptables.firewall.rules
# Allow all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0
-A INPUT -i lo -j ACCEPT
-A INPUT ! -i lo -d -j REJECT
# Accept all established inbound connections
# Allow all outbound traffic - you can modify this to only allow certain traffic
Partysun / game.yml
Created Dec 20, 2012
Config file for Teamocil (tmux)
View game.yml
name: "MyGame"
- name: "web server"
root: "~/Developer/MyGame/Export/flash/bin/"
- "python -m SimpleHTTPServer 8000"
[splits list]