Skip to content

Instantly share code, notes, and snippets.

View Partysun's full-sized avatar
🏠
Working from home

Yura Partysun

🏠
Working from home
View GitHub Profile
@Partysun
Partysun / san_multiple_assets_metrics.py
Created August 31, 2021 12:16
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") {
timeseriesDataPerSlug(
from: "utc_now-1d"
to:"utc_now"
@Partysun
Partysun / how-to-download-csv-data-from-sanbase.ipynb
Created November 2, 2020 13:57
How to download csv data from Sanbase.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
curl https://repogen.simplylinux.ch/txt/xenial/gpg_c7e58df0da866b7f3ed1724fe8aa9f707d97bbaa.txt | sudo tee /etc/apt/gpg_keys.txt
@Partysun
Partysun / README.md
Created February 4, 2017 18:58 — forked from erichrobinson/README.md
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 http://www.madrau.com/ .

##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
VoxEngine.addEventListener(CallEvents.Connected, handleCallConnected);
function handleCallConnected(e) {
// first call connected successfully, play message
Logger.write(call);
e.call.say("Hi, this call is test, please wait", Language.US_ENGLISH_FEMALE);
e.call.addEventListener(CallEvents.PlaybackFinished, function(e) { VoxEngine.terminate(); });
}
@Partysun
Partysun / keyboard_event_openfl
Last active December 26, 2015 22:59
Detect the button on android, windows, linux, neco. OpenFL
import flash.ui.Keyboard;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.Lib;
public function new()
{
super();
#if (cpp || neko)
Lib.current.stage.addEventListener (KeyboardEvent.KEY_UP, stage_onKeyUp);
@Partysun
Partysun / Accelerometer Sample
Last active December 23, 2015 03:29
How to work with Gyroscope or Accelerometer in OpenFL
// Imports part...
#if mobile
import openfl.ui.Accelerometer;
#end
// Class var part...
public static var accelX:Float;
public static var accelY:Float;
public static var accelZ:Float;
@Partysun
Partysun / google-contact-clear.py
Created May 28, 2013 08:17
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()
client.email = raw_input('Please enter your email address')
client.password = getpass.getpass()
@Partysun
Partysun / iptables.firewall.rules
Last active December 15, 2015 01:39
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.
*filter
# 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 127.0.0.0/8 -j REJECT
# Accept all established inbound connections
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Allow all outbound traffic - you can modify this to only allow certain traffic
@Partysun
Partysun / game.yml
Created December 20, 2012 10:01
Config file for Teamocil (tmux)
session:
name: "MyGame"
windows:
- name: "web server"
root: "~/Developer/MyGame/Export/flash/bin/"
filters:
before:
- "python -m SimpleHTTPServer 8000"
splits:
[splits list]