Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Yura Partysun

🏠
Working from home
View GitHub Profile
@Partysun
Partysun / san_multiple_assets_metrics.py
Created Aug 31, 2021
It's a sample which is demonstrating how to call many assets and many metrics in a single API call.
View san_multiple_assets_metrics.py
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 Nov 2, 2020
How to download csv data from Sanbase.ipynb
View 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.
View gist:4cb046a4b302d5278c67e0b0dd6a162c
curl https://repogen.simplylinux.ch/txt/xenial/gpg_c7e58df0da866b7f3ed1724fe8aa9f707d97bbaa.txt | sudo tee /etc/apt/gpg_keys.txt
@Partysun
Partysun / README.md
Created Feb 4, 2017 — forked from erichrobinson/README.md
SwitchResX Configuration
View README.md

#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
View Vox incoming simple scenario
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 Dec 26, 2015
Detect the button on android, windows, linux, neco. OpenFL
View keyboard_event_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 Dec 23, 2015
How to work with Gyroscope or Accelerometer in OpenFL
View Accelerometer Sample
// 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
Delete fail contacts from google contact service Fail contact = doesn't have email or phone.
View google-contact-clear.py
# -*- 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 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
*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 Dec 20, 2012
Config file for Teamocil (tmux)
View game.yml
session:
name: "MyGame"
windows:
- name: "web server"
root: "~/Developer/MyGame/Export/flash/bin/"
filters:
before:
- "python -m SimpleHTTPServer 8000"
splits:
[splits list]