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 sys | |
import subprocess | |
# Helper script for 336 | |
# | |
# Usage: python run.py [queryfile] [outputfile] | |
# | |
# Parameters: | |
# queryfile: A text file with a list of queries, one per line, to run on the server. Default is queries.txt | |
# outputfile: The output of the queries. Default is output.txt |
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
struct Thing { | |
pub num: i32, | |
} | |
impl Thing { | |
pub fn new(n: i32) -> Thing { | |
Thing { num: n } | |
} | |
pub fn add_total(&mut self, things: &ThingContainer) { |
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
extern crate nalgebra; | |
#[macro_use] extern crate glium; | |
use glium::{DisplayBuild, Surface}; | |
use nalgebra::{PerspectiveMatrix3, Vector3, Matrix4, Point3, Isometry3, ToHomogeneous}; | |
#[derive(Clone, Copy, Debug)] | |
struct Vert { | |
position: [f32;3], | |
} |
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 infinite_generator(): | |
x = 0 | |
while True: | |
x += 1 | |
yield x # when we hit this we basically are returning a generator object | |
def main(): | |
my_generator = infinite_generator() | |
print(next(my_generator)) # 1 | |
print(next(my_generator)) # 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
>>> import dis | |
>>> def f(x): | |
... print(x+2) | |
... | |
>>> dis.dis(f) | |
2 0 LOAD_GLOBAL 0 (print) | |
2 LOAD_FAST 0 (x) | |
4 LOAD_CONST 1 (2) | |
6 BINARY_ADD | |
8 CALL_FUNCTION 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
Compiling clippy_lints v0.0.131 | |
error[E0107]: wrong number of lifetime parameters: expected 0, found 1 | |
--> .cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.131/src/loops.rs:878:35 | |
| | |
878 | indexed: HashMap<Name, Option<CodeExtent<'tcx>>>, // indexed variables, the extent is None for global | |
| ^^^^^^^^^^^^^^^^ unexpected lifetime parameter | |
error: aborting due to previous error | |
error: Could not compile `clippy_lints`. |
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
Computer Information: | |
Manufacturer: Unknown | |
Model: Unknown | |
Form Factor: Desktop | |
No Touch Input Detected | |
Processor Information: | |
CPU Vendor: GenuineIntel | |
CPU Brand: Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz | |
CPU Family: 0x6 |
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
I/flutter (23776): ══╡ EXCEPTION CAUGHT BY GESTURE ╞═══════════════════════════════════════════════════════════════════ | |
I/flutter (23776): The following assertion was thrown while handling a gesture: | |
I/flutter (23776): 'package:flutter/src/widgets/scrollable.dart': Failed assertion: line 425: '_hold != null': is not | |
I/flutter (23776): true. | |
I/flutter (23776): | |
I/flutter (23776): Either the assertion indicates an error in the framework itself, or we should provide substantially | |
I/flutter (23776): more information in this error message to help you determine and fix the underlying cause. | |
I/flutter (23776): In either case, please report this assertion by filing a bug on GitHub: | |
I/flutter (23776): https://github.com/flutter/flutter/issues/new | |
I/flutter (23776): |
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
Analyzing 1157 files... | |
[warning] The method 'encodePng' isn't defined for the class 'Upload'. (/home/hcs/code/flutter/dev/devicelab/lib/tasks/save_catalog_screenshots.dart, line 83, col 20) | |
[warning] The method 'decodePng' isn't defined for the class 'Upload'. (/home/hcs/code/flutter/dev/devicelab/lib/tasks/save_catalog_screenshots.dart, line 83, col 41) | |
[warning] The method 'copyResize' isn't defined for the class 'Upload'. (/home/hcs/code/flutter/dev/devicelab/lib/tasks/save_catalog_screenshots.dart, line 83, col 30) | |
[error] Target of URI doesn't exist: 'package:image/image.dart'. (/home/hcs/code/flutter/dev/devicelab/lib/tasks/save_catalog_screenshots.dart, line 10, col 8) | |
[lint] 1 public member lacks documentation (ran in 29.5s) |
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 <variant> | |
#include <string> | |
#include <cassert> | |
using std::string; | |
int main() { | |
std::variant<bool, string> v = "hello"; | |
try { |