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
Total time: 16.4064 s | |
File: neufeld_plots.py | |
Function: main at line 1 | |
Line # Hits Time Per Hit % Time Line Contents | |
============================================================== | |
1 @profile | |
2 def main(): | |
3 1 168872.0 168872.0 1.0 import numpy as np | |
4 1 108349.0 108349.0 0.7 import matplotlib |
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
error[E0599]: no method named `for_each` found for type `std::boxed::Box<websocket::<unnamed>::Future<Error=websocket::WebSocketError, Item=(websocket::client::async::Framed<websocket::client::async::TlsStream<tokio_core::net::TcpStream>, websocket::async::MessageCodec<websocket::OwnedMessage>>, websocket::header::Headers)> + 'static>` in the current scope | |
--> src/main.rs:31:10 | |
| | |
31 | .for_each(|_| println!("test")); | |
| ^^^^^^^^ | |
| | |
= note: the method `for_each` exists but the following trait bounds were not satisfied: | |
`std::boxed::Box<websocket::<unnamed>::Future<Error=websocket::WebSocketError, Item=(websocket::client::async::Framed<websocket::client::async::TlsStream<tokio_core::net::TcpStream>, websocket::async::MessageCodec<websocket::OwnedMessage>>, websocket::header::Headers)>> : websocket::<unnamed>::Stream` | |
`std::boxed::Box<websocket::<unnamed>::Future<Error=websocket::WebSocketError, Item=(websocket::client::async::Framed<websocket::client::async::Tl |
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
//! ```cargo | |
//! [dependencies] | |
//! termbox_simple = "0.2.0" | |
//! ``` | |
extern crate termbox_simple; | |
use termbox_simple::Termbox; | |
use std::sync::{Arc, Mutex}; | |
use std::thread; |
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 numpy as np | |
from scipy.misc import imsave | |
max_y = 0 | |
max_x = 0 | |
with open('Stego_3.txt') as f: | |
contents = f.readlines() | |
coordinates = [] |
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
╰ ➤ find | grep Cargo.toml | xargs wc -l | sort -n | |
4 ./src/tools/tidy/Cargo.toml | |
6 ./src/tools/remote-test-client/Cargo.toml | |
6 ./src/tools/remote-test-server/Cargo.toml | |
8 ./src/tools/cargotest/Cargo.toml | |
8 ./src/tools/linkchecker/Cargo.toml | |
9 ./src/libarena/Cargo.toml | |
9 ./src/libfmt_macros/Cargo.toml | |
9 ./src/libgraphviz/Cargo.toml | |
9 ./src/librustc_platform_intrinsics/Cargo.toml |
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
use std::fmt::Debug; | |
use widget::Widget; | |
use xcb; | |
pub struct Window { | |
connection: xcb::Connection, | |
id: u32, | |
widgets: Vec<Box<Widget>>, | |
} |
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
#[macro_use] | |
extern crate derive_more; | |
use std::ops::{Add, Sub, Div, Mul}; | |
#[derive(Debug, Clone, Copy, Add, Mul)] | |
pub struct Vec3 { | |
pub x: f64, | |
pub y: f64, | |
pub z: f64, | |
} |
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
pub struct Solution {} | |
impl Solution { | |
pub fn is_valid(s: &str) -> bool { | |
let mut num_open_seen = 0; | |
for (i, c) in s.chars().enumerate() { | |
let maybe_last_open = s.split_at(i) | |
.0 | |
.chars() | |
.rev() |
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
enum ExprNode { | |
Number(f64), | |
Variable(CString), | |
BinaryOperation(char, Box<ExprNode>, Box<ExprNode>), | |
FunctionCall(CString, Vec<Box<ExprNode>>), | |
IfElse(Box<ExprNode>, Box<ExprNode>, Box<ExprNode>), | |
ForLoop(Box<ExprNode>, Box<ExprNode>, Option<Box<ExprNode>>, Box<ExprNode>), | |
} | |
if let (ExprNode::Number(l), ExprNode::Number(r)) = (*lhs, *rhs) { |
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
[package] | |
name = "typedemo" | |
version = "0.1.0" | |
authors = ["saethlin <[email protected]>"] | |
[dependencies.cpython] | |
version = "0.1" | |
features = ["extension-module"] | |
[lib] |