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/env python3 | |
import argparse | |
from multiprocessing import freeze_support | |
from transcriber.converter.dbfworker import utils | |
from transcriber.converter.dbfworker.worker import DBFWorker | |
from transcriber.dbf.parser import Parser | |
TAG_LABEL = "Tagname" |
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 argparse | |
from matplotlib import pyplot, ticker | |
from scipy import integrate | |
def f(time, concs, k1, k2, chain_length): | |
dPY = dPYdt(concs, k1, k2) | |
return [dPY] + [ | |
x(dPY, chain_length) for x in [dAMPSdt, dSDBSdt, dPPYdt, dAMSdt, dSAdt] |
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
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
#include <string> | |
#include <cmath> | |
int calculate_fuel(int mass) { | |
return std::floor((float)mass/3-2); | |
} |
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
package orderengine | |
import ( | |
"sort" | |
) | |
// Book represents an order book | |
type Book []*Order | |
// Order is a single order to be placed |
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
package bellmanford | |
import ( | |
"math" | |
) | |
// Graph represents a graph consisting of edges and vertices | |
type Graph struct { | |
edges []*Edge | |
vertices []uint |
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
from math import log, exp | |
tolerance = 1e-5 | |
coefficients = { | |
"methane": (-292860.0, 8.24450, -0.89510, 59.8465, 0), | |
"ethene": (-600076.875, 7.90595, -0.84677, 42.94594), | |
"ethane": (-687248.25, 7.90699, -0.88600, 49.02654), | |
"propene": (-923484.6875, 7.71725, -0.87871, 47.67624), | |
"propane": (-970688.5625, 7.15059, -0.76984, 0, 6.90224), |
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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
"github.com/ewancook/fixr" | |
"github.com/howeyc/gopass" | |
) |
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
package main | |
import ( | |
"flag" | |
"fmt" | |
"math" | |
"github.com/cpmech/gosl/la" | |
"github.com/cpmech/gosl/ode" | |
"github.com/cpmech/gosl/plt" |
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 f(e, D, Re) | |
' Returns: Darcy friction factor | |
' Parameters: | |
' e: absolute roughness | |
' D: duct diameter | |
' Re: Reynold's number | |
A = -2 * Log10(e / D / 3.7 + 12 / Re) | |
B = -2 * Log10(e / D / 3.7 + 2.51 * A / Re) | |
C = -2 * Log10(e / D / 3.7 + 2.51 * B / Re) | |
f = (A - (B - A) ^ 2 / (C - 2 * B + A)) ^ -2 |
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
@echo off | |
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit) | |
move %~dp0msflxgrd.ocx %windir%\SysWOW64\msflxgrd.ocx >nul | |
%windir%\SysWOW64\regsvr32.exe %windir%\SysWOW64\msflxgrd.ocx | |
echo Should be fixed! Press any key to exit. | |
pause >nul |
NewerOlder