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
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package pdbws.renderer; | |
import java.io.BufferedWriter; | |
import java.io.File; | |
import java.io.FileWriter; | |
import java.io.IOException; |
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
#Parse CLI arguments | |
use Getopt::Std; | |
my %options=(); | |
getopts("f:d:t:l:o:",\%options); | |
my $pdbId = %options{f}; | |
my $contactDistance = %options{d}; | |
my $atomType = %options{t}; | |
my $localContactSequenceDist = %options{l}; | |
my $outputFile = %options{o} || "sscc.jpg"; | |
die "No pdb id\n" unless $pdbId; |
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
void* zsocket_new_bind(zctx_t* context, int type, const char* endpoint) { | |
assert(context); | |
assert(endpoint); | |
void* sock = zsocket_new(context, type); | |
if(unlikely(!sock)) { | |
return NULL; | |
} | |
if(unlikely(zsocket_bind(sock, endpoint) == -1)) { | |
zsocket_destroy(context, sock); |
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
Least common multiple exercise: https://youtube.com//watch?v=znmPfDfsir8 | |
Figuring out angles between transversal and parallel lines | Geometry | Khan Academy: https://youtube.com//watch?v=2WjGD3LZEWo | |
Thinking about whether an expression is positive or negative: https://youtube.com//watch?v=mmWbK2xmJPQ | |
Triangle area proofs | Perimeter, area, and volume | Geometry | Khan Academy: https://youtube.com//watch?v=YOYQys52sPs | |
Solving ratio problems with tables exercise 3: https://youtube.com//watch?v=dmcVzFbXMCU | |
Rotation of polygons example: https://youtube.com//watch?v=Hur3v1hrX3U | |
Adding subtracting mixed numbers 0.5 (ex 1): https://youtube.com//watch?v=EGy1W24EPEI | |
Volume of a sphere | Perimeter, area, and volume | Geometry | Khan Academy: https://youtube.com//watch?v=IelS2vg7JO8 | |
Powers of fractions: https://youtube.com//watch?v=oEgeUk_Ix2c | |
Converting decimals to percents (ex 2): https://youtube.com//watch?v=3_caioiRu5I |
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 requests | |
def hasTimedText(v, lang="de"): | |
url = "https://www.youtube.com/api/timedtext?caps=asr&key=yttt1&v=%s&lang=%s&fmt=srv2" % (v, lang) | |
response = requests.get(url) | |
return bool(response.text) # Empty if not available | |
if __name__ == "__main__": | |
print(hasTimedText("Y6JsEja15Vk")) |
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
// ==UserScript== | |
// @name KA Crowdin Translation Tools | |
// @namespace kadeutsch.org/kacrowdintools | |
// @include https://crowdin.com/translate/khanacademy/* | |
// @include https://translate.khanacademy.org/translate/* | |
// @description Various keyboard shortcuts to make KA translation on crowdin a little bit easier | |
// @version 0.5.2 | |
// @grant none | |
// @author Alain Schaefer & Uli Köhler | |
// @updateURL https://gist.githubusercontent.com/alani1/a62cd694ba35ed11744e/raw/KATranslationTools.user.js |
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
all: | |
gcc -Wall levelfs.cpp `pkg-config fuse --cflags --libs` -o levelfs |
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
diff --git a/poentry_linter.py b/poentry_linter.py | |
index e748d35..251555b 100644 | |
--- a/poentry_linter.py | |
+++ b/poentry_linter.py | |
@@ -136,6 +136,9 @@ def _assert_same(po_entry, regexp, ka_locale, munge_fn=None): | |
for s in set(english_singular_counts.keys() + | |
english_plural_counts.keys() + | |
translated_counts.keys()): | |
+ # Hotfix for '"" occurs n times [...]' bug | |
+ if not s: |
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
# On public server: | |
socat -,raw,echo=0 tcp-listen:12345 | |
# On private computer | |
socat tcp:localgrid.de:12345 'exec:"bash -i",pty,stderr,setsid,sigint,sane' |
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; | |
namespace MathNet.Numerics | |
{ | |
public struct Quaternion64 { | |
public double w, x, y, z; | |
public double NormSquared { | |
get { | |
return w * w + x * x + y * y + z * z; |
OlderNewer