If you need to open up ports 80
and 443
, on file /etc/iptables/rules.v4
just add
-A INPUT -p tcp -m state --state NEW -m multiport --dports 80,443 -j ACCEPT
directly below
Begin by enclosing all thoughts within <thinking> tags, exploring multiple angles and approaches. | |
Break down the solution into clear steps within <step> tags. Start with a 20-step budget, requesting more for complex problems if needed. | |
Use <count> tags after each step to show the remaining budget. Stop when reaching 0. | |
Continuously adjust your reasoning based on intermediate results and reflections, adapting your strategy as you progress. | |
Regularly evaluate progress using <reflection> tags. Be critical and honest about your reasoning process. | |
Assign a quality score between 0.0 and 1.0 using <reward> tags after each reflection. Use this to guide your approach: | |
0.8+: Continue current approach | |
0.5-0.7: Consider minor adjustments | |
Below 0.5: Seriously consider backtracking and trying a different approach |
def to_tree(source: list): | |
i = 0 | |
result = dict() | |
node = result | |
while i < len(source): | |
parent = source[i][0] | |
child = source[i][1] | |
if parent is None: | |
result.update({child: {}}) | |
i += 1 |
##https://github.com/apple/coremltools/blob/master/examples/APIExamples.md | |
import coremltools | |
import numpy as np | |
import PIL.Image | |
# load a model whose input type is "Image" | |
model = coremltools.models.MLModel('path/to/the/saved/model.mlmodel') | |
Height = 20 # use the correct input image height | |
Width = 60 # use the correct input image width |
package main | |
import ( | |
"bytes" | |
"context" | |
"flag" | |
"io" | |
"path/filepath" | |
"fmt" |
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"io" | |
"log" | |
"net/http" | |
"os" |
<?php | |
$infile = 'austria.csv'; | |
$outfile = 'austria.ips'; | |
$fp = fopen($outfile,'w'); | |
$handle = fopen($infile, "r"); | |
if ($handle) | |
{ | |
while (($line = fgets($handle)) !== false) { | |
$line = trim($line); |
Copyright 2018 Matthew Scholefield | |
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. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE |
#! python2 | |
# //coding: utf-8 | |
# coding=utf-8 | |
# -*- coding: utf-8 -*- | |
# vim: set fileencoding=utf-8 : | |
a = u'1a' | |
a = a.decode('utf-8').encode('cp1251') | |
print a |