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 <netinet/ip.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/socket.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
int main() { | |
int res; |
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
#!/usr/bin/env python3 | |
import argparse | |
import os | |
import random | |
import shlex | |
import subprocess | |
_DIR = os.path.expanduser('~/.wall-changer') | |
if not os.path.exists(_DIR): |
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
#!/usr/bin/env python3 | |
import sys | |
from glob import glob | |
from random import sample | |
import numpy as np | |
import tensorflow as tf |
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
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))) | |
(when (probe-file quicklisp-init) | |
(load quicklisp-init))) | |
(with-open-file (*standard-output* "/dev/null" :direction :output | |
:if-exists :supersede) | |
(ql:quickload :trivial-gray-streams)) | |
(defvar *heads* (list)) | |
(defvar *tails* (list)) |
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
#define _GNU_SOURCE | |
#include <ctype.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#define CHUNK 4096 |
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
#!/usr/bin/env python3 | |
import json | |
from io import StringIO | |
from json.decoder import JSONObject | |
from json.scanner import py_make_scanner | |
my_json='''{"ok":true,"result":[{"update_id":547677716, |
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
Config { | |
font = "xft:Droid Sans Mono:size=9:bold:antialias=true" | |
bgColor = "#000000", | |
fgColor = "#ffffff", | |
position = Top, | |
lowerOnStart = True, | |
commands = [ | |
Run CommandReader "~/Projects/pymodoro/pymodoro.py" "pomodoro" | |
,Run Kbd [("us", "US"), ("ru", "RU")] | |
,Run Date "%Y.%m.%d %H:%M:%S" "date" 10 |
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
#!/usr/bin/env python3 | |
from datetime import date | |
class tariff(): | |
def __init__(self, costs, start_date, end_date): | |
self.costs = costs | |
self.start_date = start_date | |
self.end_date = end_date |
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
import unittest | |
from water import water, local_min, solve | |
class LocalMinTest(unittest.TestCase): | |
def test_empty(self): | |
self.assertEqual(local_min([]), []) | |
def test_single(self): |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
fromWordstat = open('wordstat.txt') | |
fromCampaign = open('campaign.txt') | |
result = open('result.txt', 'w') | |
fromCampaignList = list(fromCampaign) | |
for value_list in fromWordstat: |