This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SFTP_HOST="" | |
SFTP_PORT="22" | |
SFTP_USER="" | |
PRIVATE_KEY="" | |
# Function to recursively list files in SFTP | |
count_files_recursive() { | |
local DIR="$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<stdlib.h> | |
#include<string.h> | |
int main(){char t[100];scanf("%s",t);int l=strlen(t),x=l*3-3,y=l-1;for(int i=-y;i<=y;i++,printf("\n"))for(int j=x;j>=-x;j--){int m=abs(i+j),n=abs(i-j);printf("%c",(!m||m==(l-1)*3||!n||n==(l-1)*3||abs(i)==y&&(abs(j)>=l&&abs(j)<=(l-1)*2))?(abs(j)>=l*2-1?t[abs(m-n)/2]:t[abs(l-1-abs(j))]):' ');}return 0;} | |
/* | |
Input | |
programming | |
Output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#define print_diamonds for(int j=0; j<n+x; j++) printf(j<n-x-1?" ":"%d", j<n-1?x-(n-j)+2:n-j+x); printf("\n") | |
int main() { | |
int n; scanf("%d", &n); | |
for(int i=0, x=0; i<n; i++, x++){print_diamonds;} | |
for(int i=1, x=n-2; i<n; i++, x--){print_diamonds;} | |
return 0; | |
} | |
/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"files.autoSave": "onFocusChange", | |
"editor.fontSize": 18, | |
"editor.wordWrap": "on", | |
"editor.lineHeight": 23, | |
"eslint.autoFixOnSave": true, | |
"workbench.colorTheme": "One Dark Pro", | |
"window.zoomLevel": 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
import requests | |
import os | |
import shutil | |
# Taken from http://stackoverflow.com/questions/23793987/python-write-file-to-directory-doesnt-exist | |
# Taken from http://stackoverflow.com/a/600612/119527 | |
def mkdir_p(path): | |
try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See the raw format | |
# Copy the square | |
# Paste it before your text in-game | |
OLIVE | |
PINK | |
RED | |
ORANGE | |
DARK YELLOW | |
LIGH GREEN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct node{ | |
int data; | |
struct node *left; | |
struct node *right; | |
int height; | |
}node_avl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
typedef struct node { | |
int data; | |
struct node *left, | |
*right, | |
*parent; | |
}node_t; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEAUTIFUL_VIEW = 1; | |
PC_1 = [ 57, 49, 41, 33, 25, 17, 9, | |
1, 58, 50, 42, 34, 26, 18, | |
10, 2, 59, 51, 43, 35, 27, | |
19, 11, 3, 60, 52, 44, 36, | |
63, 55, 47, 39, 31, 23, 15, | |
7, 62, 54, 46, 38, 30, 22, | |
14, 6, 61, 53, 45, 37, 29, | |
21, 13, 5, 28, 20, 12, 4 ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
// Cara 1 (Slow) (TLE) | |
void hitung1(int hari, int berat, int maks_hari, unsigned int *total){ | |
//printf("%d %d %d\n", hari, maks_hari, *total); | |
if(hari>maks_hari) | |
return; | |
if(berat==1) | |
*total = *total + 1; |
NewerOlder