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/python | |
# Copyright 2007 by Tobia Conforto <[email protected]> | |
# | |
# This program is free software; you can redistribute it and/or modify it under the terms of the GNU General | |
# Public License as published by the Free Software Foundation; either version 2 of the License, or (at your | |
# option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | |
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
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
#[macro_export] | |
macro_rules! bec { | |
// `()` indicates that the macro takes no argument. | |
() => { | |
" | |
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk | |
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk | |
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk | |
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkxxxkkkkkkkkkkkkkkxkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk | |
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkxxkkkkkooddkkkkkkkkkkxxlcdkkkkkxkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk |
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
def print_precision_4(x: float): | |
print(f'{x:.4f}') | |
print_precision_4(123.12345678) |
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
use regex::Regex; | |
use std::{env, fs}; | |
use std::collections::HashMap; | |
fn main() { | |
let args: Vec<String> = env::args().collect(); | |
let filename = &args[1]; | |
let contents = fs::read_to_string(filename) | |
.expect("Something went wrong reading the file"); | |
let re = Regex::new(r"\b[a-zA-z]*").unwrap(); |
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
pub mod matrix { | |
use num_traits::Num; | |
pub struct Matrix<T> { | |
pub rows: usize, | |
pub cols: usize, | |
data: Vec<T>, | |
} | |
impl<T> Matrix<T> | |
where |
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 dataRows = data.$('tr', '#ctl00_PageContent_usageGridView').filter(function() { | |
return this.hasClass('gridRow') || this.hasClass('gridRowAlternating'); | |
}); | |
dataRows.each(function(i, elem) { | |
console.log(elem.html()); | |
}); |
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
✓ font-awesome | |
tag: https://github.com/nate-strauser/meteor-font-awesome.git#v0.1.6 | |
/usr/local/share/npm/lib/node_modules/meteorite/lib/sources/git.js:151 | |
hrow "There was a problem checking out " + self.checkoutType + ": " + (self.co | |
^ | |
There was a problem checking out tag: v0.1.6 |
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
takePicture: function() { | |
var options = { | |
quality: 50, | |
destinationType: Camera.DestinationType.FILE_URI, | |
sourceType: 1, | |
encodingType: 1 | |
}; | |
navigator.camera.getPicture( | |
function(imageData) { | |
navigator.notification.alert(imageData, null, "great news!", '\'Aight'); |
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
/* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance | |
* with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
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
/* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance | |
* with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
NewerOlder