Skip to content

Instantly share code, notes, and snippets.

View DarkDesire's full-sized avatar
🎯
Focusing on functional programming skills

Eldar Dragomir DarkDesire

🎯
Focusing on functional programming skills
View GitHub Profile
https://pypi.org/project/PySocks/#files
/usr/hdp/current/superset/bin/pip install sqlalchemy-clickhouse --proxy socks5://FQDN:22020
HiveServer2
hive://hive@FQDN:10000/default
Guides:
https://docs.cloudera.com/HDPDocuments/HDP3/HDP-3.1.0/adding-druid/content/druid_add_superset.html
https://docs.cloudera.com/HDPDocuments/HDP3/HDP-3.1.4/integrating-hive/content/hive_start_the_superset_service.html
ERROR:flask_appbuilder.security.sqla.manager:DB Creation and initialization failed: (pg.InternalError) FATAL: no pg_hba.conf entry for host "::1", user "superset", database "superset", SSL off
su - postgres
vi /var/lib/pgsql/data/pg_hba.conf
host all superset ::/0 md5
mypath="/hdfspath/to/data/"
myzip="name of myfile" # without the .zip extension
hadoop fs -chmod 777 "$mypath"
hadoop fs -ls "$mypath$myzip.zip".*
hadoop fs -cat "$mypath$myzip.zip".* > file.zip
ls -la
unzip file.zip -d "$myzip"
@DarkDesire
DarkDesire / download_site.txt
Last active January 18, 2019 20:47
Скачать сайт
wget -r -k -l 7 -p -E -nc -erobots=off --user-agent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/5З7.З6 (KHTML, like Gecko) Chrome/60.0.З112.11З Safari/5З7.36" www.bartek.wojtyca.pl
@DarkDesire
DarkDesire / one.scala
Created November 15, 2016 08:00
Частота символа в списке символов
val str = "abAsdhqfdkjggjsjfpg".toList
val str1 = str
.groupBy(identity) // s -> List(s,s)
.mapValues(_.size) // s -> 2
//.map( e => (e._1,e._2.length)) // s -> 2
.toList // (s,2)
// with tail recursion
def timesFirst(chars: List[Char]) : List[(Char,Int)] = {
@tailrec // comiler cheks if really tailrecursive
import StatType.StatType
object NewMain extends App{
val one = new Person("sss")
val two = new Person("sas") with IHaveStats
two.requirements = Set(new Force(40),new Wind(40))
two.requirements.foreach(obj => println(s"${obj.name} + ${obj.modifierType} + ${obj.value}"))
}
#### Unreal Engine
## Default
Intermediate/
Saved/
Binaries/
DerivedDataCache/
## Extra
Content/StarterContent/HDRI
#define OUT
// Used for saving ViewPortLocation
FVector PlayerViewPointLocation;
// Used for saving ViewPortRotation
FRotator PlayerViewPointRotation;
void GetPlayerViewPort(){
GetWorld()->GetFirstPlayerController()->GetPlayerViewPoint(
OUT PlayerViewPointLocation,
@DarkDesire
DarkDesire / BarleyBrake.cs
Last active August 28, 2016 01:44
Unity3d пятнашки (barley brake)
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
public class BarleyBrake : MonoBehaviour
{
/// <summary>
/// Событие, которое произойдёт при победе
/// </summary>