The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
- Image from https://www.archlinux.org/
F | |
====================================================================== | |
FAIL: test_foo (__main__.FooTest) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/l/.IntelliJIdea2017.3/config/scratches/scratch.py", line 11, in test_foo | |
self.assertEqual(expected, actual) | |
AssertionError: 'foobar' != <MagicMock name='mock.foo()' id='140619506578448'> | |
---------------------------------------------------------------------- |
def foo(bar): | |
baz = bar.func() | |
if baz.name.lower()[-3:] == 'txt': | |
return baz.boo() |
The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
def main(): | |
with open(sys.argv[1]) as file: | |
plaintexts = map(lambda line : cryptopals.break_xor(bytes.fromhex(line.strip())), file) | |
for plain in plaintexts: | |
print(plain) | |
best = min(plaintexts, key=cryptopals.distance_from_english) | |
print(best) |
import unittest | |
class MyTests(unittest.TestCase): | |
def __init__(self, x, y): | |
super(MyTests, self).__init__("testMyMethod") | |
self.x = x | |
self. y = y | |
def testMyMethod(self): | |
self.assertEqual(self.y, my_method(self.x)) |
myrdraal% python main-file.py | |
How many qubits would you like to use? (Currently, only supports 1): 2 | |
Would you like your initial qubits to be in the |0> state or |1> state? 0 or 1: 0 | |
['Hadamard', 'X', 'Z', 'Y', 'sqrtX', 'phase shift', 'measurement', 'custom'] | |
['cNOT', 'swap'] | |
['Toffoli'] | |
what gate would you like to use for 1st qubit? Use the list of single qubits at the top, plus control or targettarget | |
Which gate is this target qubit for? See list of two qubit gates at the top.X | |
Done with your 1st qubit? y or n |
$ git status | |
On branch ganujan/377/main | |
Your branch is up-to-date with 'ganujan/377'. | |
Changes not staged for commit: | |
(use "git add <file>..." to update what will be committed) | |
(use "git checkout -- <file>..." to discard changes in working directory) | |
modified: android/build/intermediates/transforms/dex/lite/debug/folders/1000/1f/main/classes.dex | |
no changes added to commit (use "git add" and/or "git commit -a") |
public class CustomAdapter extends ArrayAdapter<Pipeline> { | |
private List<Pipeline> data; | |
public CustomAdapter(Context context, List<Pipeline> data) { | |
super(context, -1); | |
this.data = data; | |
} | |
} |
@Override | |
public View onCreateView(LayoutInflater inflater, ViewGroup parent, | |
Bundle savedInstanceState) { | |
Log.d(TAG, "onCreateView()"); | |
View fragmentView = inflater.inflate(R.layout.image, parent, false); | |
ImageView imageView = (ImageView) fragmentView.findViewById(R.id.image); | |
imageView.setImageResource(imageId); | |
return fragmentView; |