This file contains 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 pynba | |
import pynba.util | |
import flask | |
import logging | |
import datetime | |
# see https://gist.github.com/Slach/00c86b1341f738bc9dd5 | |
from monitor import CoffeePynbaMonitor | |
logger = logging.getLogger('pynba') |
This file contains 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/local/bin/python | |
""" | |
Q-learning - off policy TD(0) learning. | |
Q(S, A) <- Q(S, A) + alpha * ((R + gamma * max(Q(S', A'))) - Q(S, A)) | |
A ~ e-greedy from pi(A|S) | |
""" | |
import argparse | |
import numpy as np |
This file contains 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
#! coding: utf8 | |
import os | |
import gym | |
import numpy as np | |
from gym import wrappers | |
env = gym.make('FrozenLake-v0') | |
os.system('rm -rf /tmp/frozenlake_v0_q_table') | |
env = wrappers.Monitor(env, '/tmp/frozenlake_v0_q_table') |
This file contains 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
listen l1 | |
bind 0.0.0.0:80 | |
mode tcp | |
timeout connect 4000 | |
timeout client 180000 | |
timeout server 180000 | |
server srv1 192.168.1.1:80 | |
global | |
user "nobody" |
This file contains 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 | |
# | |
# trinkup - TRivial INcremental bacKUP script | |
# | |
# Уж 200 раз твердили Сене: | |
# Хардлинк спасет от удаленья! | |
# А кто создать его поможет? | |
# Crontab и man, тупая рожа! | |
# | |
# (c) linux.org.ru, no-dashi |
This file contains 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
# -*- coding: utf-8 -*- | |
import re | |
def transliterate(string): | |
capital_letters = {u'А': u'A', | |
u'Б': u'B', | |
u'В': u'V', | |
u'Г': u'G', |
This file contains 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
########################################################## | |
# How to NEVER use Lambdas. An inneficient and yet educa-# | |
# tonal guide to the proper misuse of the lambda constru-# | |
# ct in Python 2.x. [DO NOT USE ANY OF THIS EVER] # | |
# by: e000 (13/6/11) # | |
########################################################## | |
## Part 1. Basic LAMBDA Introduction ## | |
# Well, it's worth diving straight into what lambdas are. | |
# Lambdas are pretty much anonymous "one line" functions |
This file contains 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/python3 | |
# Monitor transmission and enable sequential downloads | |
# by manipulating file download priorities | |
# | |
# Author: Joseph Botosh <rumly111@gmail.com> | |
# License: GPL | |
from time import sleep | |
from argparse import ArgumentParser |
This file contains 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
using System.Text.RegularExpressions; | |
using GeoTimeZone; // Import from Nuget package "GeoTimeZone" (https://github.com/mattjohnsonpint/GeoTimeZone) | |
using TimeZoneConverter; // Import from Nuget package "TimeZoneConverter" (https://github.com/mattjohnsonpint/TimeZoneConverter) | |
namespace AirportTimeZones; | |
internal static class Program | |
{ | |
private static void Main() | |
{ |
This file contains 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
""" | |
A perl Data.Dumper clone for Python | |
Author: simon@log4think.com | |
2011-07-08 | |
Copyright 2011 Jinyu LIU | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
OlderNewer