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 requests | |
r = requests.get('https://github.com/timeline.json') | |
print(r.json()['message']) |
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
def file_get_contents(filename): | |
with open(filename) as f: | |
content = f.read() | |
f.close() | |
return content |
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
using System.Collections.Generic; | |
using System.Collections.Specialized; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Web; | |
public static class Extensions | |
{ | |
public static string ToPostData(this NameValueCollection @this) |
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
public class AverageValues | |
{ | |
public int intialValue { get; private set; } | |
public int currentValue = 0; | |
double oldResult = 0; | |
bool StopIncrease = false; | |
int incrementValue = 0; | |
public AverageValues(int intialValue = 100, int incrementValue = 10) | |
{ | |
this.intialValue = intialValue; |
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
[Serializable] | |
public class BigArray<T> : IEnumerable<T> | |
{ | |
private readonly T[][] _arrays; | |
public ulong Length { get; private set;} | |
public T this[ulong index] | |
{ | |
get | |
{ |
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
# change the <USR> with your cpanel username | |
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d |
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
memory_limit = 2048M | |
upload_max_filesize = 64M | |
post_max_size = 64M | |
max_execution_time = 50000 | |
max_input_vars = 3000 |
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
class MyThreadPool | |
{ | |
private volatile int _inQueue; | |
private volatile int _outQueue; | |
private volatile int _total; | |
CancellationTokenSource cts = new CancellationTokenSource(); | |
public float Percentage | |
{ | |
get |
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
public class BigHashSet<T> : IEnumerable<T> | |
{ | |
private const ulong StartSize = 1 << 19; | |
private BigArray<ulong> _hashBuckets; | |
private ulong _hashCode; | |
private BigArray<Slot> _slots; | |
public ulong Count { get; private set; } | |
public ulong Length {get{ |
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
public class BkGround | |
{ | |
public class ResultCls | |
{ | |
public Exception ex { get; set; } | |
public object output { get; set; } | |
public ResultCls() | |
{ | |
} |