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 subprocess | |
import time | |
import mysql.connector | |
from mysql.connector import Error | |
from cassandra.cluster import Cluster | |
from cassandra.auth import PlainTextAuthProvider | |
contact_points = ['localhost'] | |
username = 'testrail' | |
password = 'secret' |
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
var fs = require('fs'); | |
var path = require('path'); | |
const https = require('https'); | |
const cliProgress = require('cli-progress'); | |
const decompress = require("decompress"); | |
async function download() | |
{ | |
if (!fs.existsSync(path.join(__dirname, "downloads"))) | |
fs.mkdirSync(path.join(__dirname, "downloads")); |
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
public static int MaxTileGroup(Layer layer) | |
{ | |
int x = layer.tiles_across-1; | |
int y = layer.tiles_down-1; | |
int n = 0; | |
Layer below = layer.below; | |
while(below != null) | |
{ | |
n += below.tiles_across * below.tiles_down; |
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
function countLatex{ | |
param([string] $file) | |
$c = texcount .\$file.tex -char | select-string "Letters in text"; | |
$c = [int]$c.Line.substring(17); | |
$w = texcount .\$file.tex | select-string "Words in text"; | |
$w = [int]$w.Line.substring(15) | |
$total = $c + $w; | |
return $total; | |
} |
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
[ | |
{ | |
"Number": 1, | |
"Type": "Nonmetal", | |
"Mass": 1.008, | |
"Name": "Hydrogen", | |
"Acronym": "H", | |
"Electrons": [ | |
1 | |
], |
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
<?php | |
/** | |
* @param $query The string you wish to search for | |
* @param array database columns to include in search | |
* @return string SQL where clause | |
*/ | |
public function createWhereClause($query, array $fields) | |
{ | |
$words = explode(' ', $query); | |
foreach ($fields as $field) |