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
| /* Write a program that opens a file (with the open() system call) and then | |
| * calls fork() to create a new process. Can both the child and parent access | |
| * the file descriptor returned by open()? What happens when they are writing to | |
| * the file concurrently, i.e., at the same time? */ | |
| #include <fcntl.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> |
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
| pico-8 cartridge // http://www.pico-8.com | |
| version 16 | |
| __lua__ | |
| -- move an ball on-screen | |
| -- by erik hollembeak | |
| SCREEN_WIDTH = 128 | |
| SCREEN_HEIGHT = 128 | |
| -- Ball definition |
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
| py4j.protocol.Py4JJavaError: An error occurred while calling o90.save. | |
| : java.io.IOException: Failed to open native connection to Cassandra at {<Redacted>}:<Redacted port> | |
| at com.datastax.spark.connector.cql.CassandraConnector$.com$datastax$spark$connector$cql$CassandraConnector$$createSession(CassandraConnector.scala:168) | |
| at com.datastax.spark.connector.cql.CassandraConnector$$anonfun$8.apply(CassandraConnector.scala:154) | |
| at com.datastax.spark.connector.cql.CassandraConnector$$anonfun$8.apply(CassandraConnector.scala:154) | |
| at com.datastax.spark.connector.cql.RefCountedCache.createNewValueAndKeys(RefCountedCache.scala:32) | |
| at com.datastax.spark.connector.cql.RefCountedCache.syncAcquire(RefCountedCache.scala:69) | |
| at com.datastax.spark.connector.cql.RefCountedCache.acquire(RefCountedCache.scala:57) | |
| at com.datastax.spark.connector.cql.CassandraConnector.openSession(CassandraConnector.scala:79) | |
| at com.datastax.spark.connector.cql.CassandraConnector.withSessionDo(CassandraConnector.scala:111) |
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 asyncio | |
| import bisect | |
| import logging | |
| logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') | |
| logger = logging.getLogger(__name__) | |
| async def sleep_and_sort(n, lock, result_list): | |
| try: | |
| logger.info(f"Sleeping for {n} seconds before doing work") |
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
| """ | |
| Collect host CPU, memory, and disk utilization metrics minutely | |
| and report them via an HTTP endpoint | |
| """ | |
| import time | |
| import os | |
| from textwrap import dedent | |
| import threading |
OlderNewer