seed
stringlengths
1
14k
source
stringclasses
2 values
} for(size_t i = 0; i < pos; ++i){ for (size_t j = 0; j < ySize; ++j){ toReturn[i][j] = (table[i][j] || table[xSize - i - 1][j]); } free(table[i]); free(table[xSize - i - 1]);
ise-uiuc/Magicoder-OSS-Instruct-75K
GL_DUAL_INTENSITY16_SGIS = constant.Constant( 'GL_DUAL_INTENSITY16_SGIS', 0x811B ) GL_DUAL_LUMINANCE_ALPHA4_SGIS = constant.Constant( 'GL_DUAL_LUMINANCE_ALPHA4_SGIS', 0x811C ) GL_DUAL_LUMINANCE_ALPHA8_SGIS = constant.Constant( 'GL_DUAL_LUMINANCE_ALPHA8_SGIS', 0x811D ) GL_QUAD_ALPHA4_SGIS = constant.Constant( 'GL_QUAD_A...
ise-uiuc/Magicoder-OSS-Instruct-75K
"result": 12000, "id": 1 } """.data(using: .utf8)! } static func poolConnectionState() -> Data { return """ { "jsonrpc": "2.0", "result": 2, "id": 1 } """.data(usi...
ise-uiuc/Magicoder-OSS-Instruct-75K
int WindowSystem::checkHeightBounds (int height) const { if (height < mMinScreenHeight) { return mMinScreenHeight; } if (height > mMaxScreenHeight) { return mMaxScreenHeight; } return height; }
ise-uiuc/Magicoder-OSS-Instruct-75K
''' def convert2depthlastest(image): image = np.array(image) shape = np.shape(image) new_image = np.zeros([shape[1], shape[2], shape[0]]) for i in range(shape[0]):
ise-uiuc/Magicoder-OSS-Instruct-75K
version="0.1", description="Sandboxed environments with bwarp and nix-shell", scripts=["nix-cage"], )
ise-uiuc/Magicoder-OSS-Instruct-75K
impl<'src> Into<Expression<'src>> for Address<'src> { fn into(self) -> Expression<'src> { Expression::Copy(self) } }
ise-uiuc/Magicoder-OSS-Instruct-75K
void load();
ise-uiuc/Magicoder-OSS-Instruct-75K
// VideoFrameSource & CameraFrameSource #ifndef HAVE_OPENCV_VIDEOIO Ptr<FrameSource> cv::superres::createFrameSource_Video(const String& fileName) { (void) fileName; CV_Error(cv::Error::StsNotImplemented, "The called functionality is disabled for current build or platform"); return Ptr<FrameSource>(); } ...
ise-uiuc/Magicoder-OSS-Instruct-75K
html = response.text soup = BeautifulSoup(html) ######################### items = soup.find_all('td', {'class': 'titleColumn'}) d = {}
ise-uiuc/Magicoder-OSS-Instruct-75K
"""docstring for Comunicacion Este Objeto crea el un puerto de comunicacion en el que podemos estar acceder no solo a envio y recepcion de turnos si no tambien a que turnos a manejado para poderce devolver. """ def __init__(self, NombrePuerto, NumeroMesa): try: se...
ise-uiuc/Magicoder-OSS-Instruct-75K
) sns.relplot( data=monthly_victim_counts_melt, x="datetime", y="count", hue="victim_type", kind="line", palette="colorblind", height=3, aspect=4, )
ise-uiuc/Magicoder-OSS-Instruct-75K
def work(identifier): print(f'Hey, I am the process ' f'{identifier}, pid: {os.getpid()}') def main(): processes = [Process(target=work, args=(number,)) for number in range(5)] for process in processes:
ise-uiuc/Magicoder-OSS-Instruct-75K
find . -type f -empty -delete find . -type d -empty | xargs rm -rf echo "log old file list and count" find . -type f | sort > ./old_file_list.txt find . -type f | sed 's/^.*\.//' | sort | uniq -c | sort -n > ./old_file_ext_statistic.txt echo "create new directories for classification" mkdir ../Pictures_without_exif m...
ise-uiuc/Magicoder-OSS-Instruct-75K
IF_TAG = "INSIGHTFINDER" LICENSE_KEY_CONFIG = "license_key" PROJECT_NAME_CONFIG = "project_name" USER_NAME_CONFIG = "user_name" SERVER_URL_CONFIG = "server_url" SAMPLING_INTERVAL = "sampling_interval" # Constant CONFIG_FILE = "config.ini" GMT = "GMT" RAW_DATA_KEY = "data"
ise-uiuc/Magicoder-OSS-Instruct-75K
while let Some(_) = ticker.next().await { let timestamp = Some(chrono::Utc::now()); let metrics = recorder.capture_metrics(); let events = metrics.map(|mut m| { m.timestamp = timestamp; Event::from(m) }); if let Err(err) = output.send_all(&mut stream...
ise-uiuc/Magicoder-OSS-Instruct-75K
// Call the handler with the currently supported complication descriptors handler(descriptors) } func handleSharedComplicationDescriptors(_ complicationDescriptors: [CLKComplicationDescriptor]) { // Do any necessary work to support these newly shared complication descriptors } // MARK: - Timeline ...
ise-uiuc/Magicoder-OSS-Instruct-75K
git clone https://github.com/BeamOfLight/silhouettes-database.git
ise-uiuc/Magicoder-OSS-Instruct-75K
} render() { console.log('render b', this.todoList)
ise-uiuc/Magicoder-OSS-Instruct-75K
// import UIKit class SQLabelCollectionReusableView: UICollectionReusableView { @IBOutlet weak var label: UILabel! }
ise-uiuc/Magicoder-OSS-Instruct-75K
class MakwaTest(unittest.TestCase): def test_spec_vector(self): pi = unhexlify( '4765676F206265736877616A692761616B656E20617765206D616B77613B206F6' 'E7A61616D206E616E69697A61616E697A692E' ) sigma = unhexlify('C72703C22A96D9992F3DEA876497E392') makwa = Makwa(w...
ise-uiuc/Magicoder-OSS-Instruct-75K
*/ public static ArrayList<Season> multiSeasonsParser(String seasonsString, int ID){ ArrayList<Season> seasons = new ArrayList<>(); try{ JSONArray object = new JSONArray(seasonsString);
ise-uiuc/Magicoder-OSS-Instruct-75K
""" View(WebAPI)のテストコード群パッケージです。
ise-uiuc/Magicoder-OSS-Instruct-75K
'/healthz': view.healthz_view, '/static.*': view.static_view, '/status': view.status_view, '/statusz': view.statusz_view, '/touchz': view.touchz_view, '/trigger.*': view.trigger_view, } # ---------- main def parse_args(argv): ap = argparse.ArgumentParser(description='home automat...
ise-uiuc/Magicoder-OSS-Instruct-75K
if (div[offset + ix] <= 0 || n == 0) { div[offset + ix] = 1.0; } else { div[offset + ix] = sqrt(div[offset + ix] / n); } if (VERB > 2) { cerr << "\t" << div[offset + ix]; } } if (VERB > 2) { cerr << endl; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
if($ministry_update) { $this->setMessage('Ministry details updated successfully!|alert-success'); } else { $this->setMessage('Some error occurred whilst submitting your request|alert-danger'); } } else { $this->setMe...
ise-uiuc/Magicoder-OSS-Instruct-75K
light_up(light_1, light_2, light_3) Sets the brightness of the individual lights on the Color Sensor. This causes the Color Sensor to change modes, which can affect your program in unexpected ways. For example, the Color Sensor can't read colors when it's in light up mode. Parameters light_1
ise-uiuc/Magicoder-OSS-Instruct-75K
}) afterEach(async () => { await tst.closeDb(db) }) describe('ReallocationTask', () => { it('should mark the previous attempt as NoResponse', async () => {
ise-uiuc/Magicoder-OSS-Instruct-75K
use crate::characteristic::{Characteristic, Format, HapType, Inner, Perm}; /// Is Configured Characteristic. pub type IsConfigured = Characteristic<u8>; /// Creates a new Is Configured Characteristic. pub fn new() -> IsConfigured { Characteristic::new(Inner::<u8> { hap_type: HapType::IsConfigured, ...
ise-uiuc/Magicoder-OSS-Instruct-75K
// Consequently it *should* be the case that we always drop futures from
ise-uiuc/Magicoder-OSS-Instruct-75K
reader: The reader class, a subclass of BaseReader such as TextLineReader or TFRecordReader. decoder: An instance of a data_decoder. num_samples: The number of samples in the dataset. items_to_descriptions: A map from the items that the dataset provides to the descriptions of tho...
ise-uiuc/Magicoder-OSS-Instruct-75K
'data_class' => Article::class, ]); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
"""Return blueprint that this entity represents""" return TableBlueprint() @property def name(self) -> str: """""" return self.__name
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * Cast an attribute to a native PHP type. * * @param string $key * @param mixed $value *
ise-uiuc/Magicoder-OSS-Instruct-75K
) def external_custom_attributes(self, src): # type: (List[Dict[str, str]]) -> None """Set CAV in format specific to sync service This method accesses only 'external_custom_attributes' key from 'src' Format example: [{'name': 'a', value: 'val-a'},
ise-uiuc/Magicoder-OSS-Instruct-75K
double t) { int gridX = 0; int gridY = 0;
ise-uiuc/Magicoder-OSS-Instruct-75K
pub static HASH_SEED: u64 = 1145141919810;
ise-uiuc/Magicoder-OSS-Instruct-75K
k = 2 v = np.random.randint(3,100) slm1 = {}
ise-uiuc/Magicoder-OSS-Instruct-75K
#include <RCF/util/InitDeinit.hpp> namespace RCF { util::TraceChannel &getRcfTraceChannel() { static util::TraceChannel rcfTraceChannel("RCF"); return rcfTraceChannel; }
ise-uiuc/Magicoder-OSS-Instruct-75K
pym_addInt(&pms, mapVersion); // templateVersion ( from the map file? )
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace GenericSearch.Searches { public enum Direction { [Display(Name = "Asc")] Ascending,
ise-uiuc/Magicoder-OSS-Instruct-75K
//猜你喜欢 $goods->Like(); //商品规格 $goods->GoodsSpec(); $goods->append(['comment'])->hidden(['Spec','GoodsSpecValue'])->visible(['id','name','image','video','stock','remark','goods_arg','goods_arg_info','content','sales_sum','click_count','price','market_price','is...
ise-uiuc/Magicoder-OSS-Instruct-75K
# Layer graph images = lbann.Input(data_field='samples', name="samples") labels = lbann.Input(data_field='labels', name="labels") x = lbann.models.LeNet(10)(images) probs = lbann.Softmax(x) loss = lbann.CrossEntropy(probs, labels) acc = lbann.CategoricalAccuracy(probs, labels) # Object...
ise-uiuc/Magicoder-OSS-Instruct-75K
# patch FakeStack.initialize_resources def run_dependencies_deployment_loop(stack, action, initialize=False): def run_loop(*args): result = {} try: result = do_run_loop() if isinstance(result, parsing.ResourceMap): if initializ...
ise-uiuc/Magicoder-OSS-Instruct-75K
--input ${DIR}/output/bhandari2020/correlations/abs/resp-${summarizer_type}.json S3-Resp Bhandari2020-Abs \
ise-uiuc/Magicoder-OSS-Instruct-75K
cd ${ORIGINAL_PATH} echo fi done
ise-uiuc/Magicoder-OSS-Instruct-75K
$this->users->incrementReward('Username', '🏅');
ise-uiuc/Magicoder-OSS-Instruct-75K
//----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // Purpose: Callback interface for receiving responses after requesting details on // who is playing on a particular server. // // These callbacks all...
ise-uiuc/Magicoder-OSS-Instruct-75K
# for x in g:
ise-uiuc/Magicoder-OSS-Instruct-75K
match *v.first().unwrap() {
ise-uiuc/Magicoder-OSS-Instruct-75K
inverse->Inverse(); inverse->TransformPoint(position, xyzt); landmarks(i, 2) = xyzt[0]; landmarks(i, 3) = xyzt[1]; landmarks(i, 4) = xyzt[2]; } } //----------------------------------------------------------------------------- void LandmarkWidget::update_glyph_properties() {
ise-uiuc/Magicoder-OSS-Instruct-75K
value = next(item['value'] for item in self._secret_keys if item['name'] == name) prefix, key = value.split(':', maxsplit=1) if prefix == 'encrypted': password = getpass(f'Please, enter passphrase for `{name}`:\n') key = Key(key, passphrase=password) else: ...
ise-uiuc/Magicoder-OSS-Instruct-75K
[ $# -eq 1 ] && { usage; } || [[ "$@" = *--help ]] && { usage; } || [[ "$@" = *-h ]] && { usage; } pkill -9 pdb-worker pkill -9 pdb-manager
ise-uiuc/Magicoder-OSS-Instruct-75K
from_api = ConfigMap.get_or_create(metadata=configmap.metadata, data=configmap.data) assert not from_api._new assert from_api.data == {"foo": "bar"} from_api.data = {"baz": "quux"} call_params = from_api.as_dict() put.return_value.json.return_value = call_params ...
ise-uiuc/Magicoder-OSS-Instruct-75K
GCC=$(command ls $ANDROID_TOOLCHAIN/*-gcc | head -n1) if [ -z "$GCC" ]; then echo "ERROR: Could not find Android cross-compiler in: $ANDROID_TOOLCHAIN" return 1 fi # Remove the '-gcc' at the end to get the full toolchain prefix ANDROID_TOOLCHAIN_PREFIX=${GCC%%-gcc} CCACHE=${ANDROID_MAKE_CCACHE-$(which ccache || ...
ise-uiuc/Magicoder-OSS-Instruct-75K
function start { if [[ -d $1 ]] && [[ -e "$1/app.py" ]] 2> $1.log; then python $1/app.py &>> $1.log & printf "\e[32mStarting $1\e[0m\n" else \ printf "\e[31m$1 does not seem to exist. Check $1.log for more information.\e[0m\n" for i in "${@:2}"; do pgrep -f "$i/app.p...
ise-uiuc/Magicoder-OSS-Instruct-75K
"""Test behavior of ``--output`` option.""" import os from pathlib import Path
ise-uiuc/Magicoder-OSS-Instruct-75K
body = models.TextField() tags = models.ManyToManyField("kite_runner.Tag", related_name="articles") created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) author = models.ForeignKey( "kite_runner.Profile", on_delete=models.CASCADE, related_name=...
ise-uiuc/Magicoder-OSS-Instruct-75K
elif n < 0: memo[n] = power(1/x,-n) return memo[n] elif n%2==0: memo[n] = power(x*x,n//2) return memo[n]
ise-uiuc/Magicoder-OSS-Instruct-75K
num = input('Insira 5 números inteiros, separados por vírgula: ').split(',') inteiros = [] inteiro(num) inteiro_inverso(num)
ise-uiuc/Magicoder-OSS-Instruct-75K
let a = new_protocol_with_defaults(proto_a, true); let task_a = task::spawn(async move { a.handshake().await.unwrap() }); let task_b = task::spawn(async move { b.handshake().await.unwrap() }); task_a.await; task_b.await; Ok(()) }
ise-uiuc/Magicoder-OSS-Instruct-75K
using namespace std; #define ll long long #define llu unsigned long long int main() { ll avg = 0, n; cin >> n; ll arr[n]; for (int i = 0; i < n; i++) { cin >> arr[i];
ise-uiuc/Magicoder-OSS-Instruct-75K
pub mod config; /// Errors that can occur when calling the service. pub mod error; mod error_meta; /// Input structures for operations. pub mod input; mod json_deser; mod json_errors; mod json_ser; pub mod middleware; /// Data structures used by operation inputs/outputs. pub mod model; mod no_credentials;
ise-uiuc/Magicoder-OSS-Instruct-75K
if userInfo[userName] != pwd { completionHandler?(false, .WrongPassword) return } completionHandler?(true, nil) } } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
createpkg ${_pkgname} ${_pkgvers} installpkg ${_pkgname} ${_pkgvers}
ise-uiuc/Magicoder-OSS-Instruct-75K
np4 = np.arange(start=-5.0, stop=5.5, step=0.5) np.random.shuffle(np1) np.random.shuffle(np2) np.random.shuffle(np3) np.random.shuffle(np4) x = 0 command ='mv ' + args.input + ' temp.wav' os.system(command)
ise-uiuc/Magicoder-OSS-Instruct-75K
def long_description(): if os.path.exists('README.txt'): return open('README.txt').read() else: return 'Python implementation of Redux' def get_version(): with open(INIT_FILE) as fd: for line in fd: if line.startswith('__version__'): version = line.split...
ise-uiuc/Magicoder-OSS-Instruct-75K
for fusg in usg_files: d, f = os.path.split(fusg) load_model(f, d)
ise-uiuc/Magicoder-OSS-Instruct-75K
# # Parameters # 1. WildFly version >= 10 VERSION=$1 RELEASE=$VERSION.0.0.Final DATA_DIRECTORY=/tmp/mgt/data/$VERSION DUMP_DIRECTORY=/tmp/mgt/dump/$VERSION
ise-uiuc/Magicoder-OSS-Instruct-75K
print("Нет такой характеристики, проверьте введенные данные: ") harak = str(input("\nВедите характеристику:")) harak = harak.title() else: print("\nВведите количество пунктов для характеристики. Доступно", hero[harak], "пунктов:") points = int(input...
ise-uiuc/Magicoder-OSS-Instruct-75K
return filter_to_parameter_map #find whether user query is of type describe or list def find_query_type(query_text): if query_text.split()[0] == "describe": return "describe" else: return "list"
ise-uiuc/Magicoder-OSS-Instruct-75K
2, 2, ] output = runner.run_oximachine( os.path.join(THIS_DIR, "..", "examples/IDIWOH_clean.cif") ) assert output["prediction"] == [4, 4, 4, 4] output = runner.run_oximachine(
ise-uiuc/Magicoder-OSS-Instruct-75K
############################################################################### def graph(self, widget): try: self.gui.createGraph(self.experimenter.seqFreqCount, self.dataProcessor.epcSequence) except AttributeError: print Messages.ERR_GRAPH def showAdvance...
ise-uiuc/Magicoder-OSS-Instruct-75K
restore = 'restore', config = 'config', }
ise-uiuc/Magicoder-OSS-Instruct-75K
$response = new Response( 201, $headers, $body
ise-uiuc/Magicoder-OSS-Instruct-75K
static const MethodInfo* get() {
ise-uiuc/Magicoder-OSS-Instruct-75K
expect(value).not_to(be(value))
ise-uiuc/Magicoder-OSS-Instruct-75K
pub use url;
ise-uiuc/Magicoder-OSS-Instruct-75K
private Double mPrecipInch; private Integer mPressure; private Integer mTempC; private Integer mTempF; private String mWeatherDescription;
ise-uiuc/Magicoder-OSS-Instruct-75K
./git-download.sh https://github.com/ohmyzsh/ohmyzsh.git --depth 1 ./ohmyzsh/tools/install.sh rm -rf ohmyzsh # tmux 支持256色 或者 tmux -2 强制开启256色 echo "export TERM=\"xterm-256color\"" >> ~/.zshrc echo echo "运行以下命令完成vim安装及配置:" echo " git clone https://github.com/mrtujiawei/vimrc.git --depth 1 ~/.vim" echo " ~/.vim/...
ise-uiuc/Magicoder-OSS-Instruct-75K
import utilities.custom_logger as cl import unittest from utilities.checkpoint import CheckPoint from utilities.util import Util
ise-uiuc/Magicoder-OSS-Instruct-75K
assert await hass.config_entries.async_unload(entry.entry_id) await hass.async_block_till_done() assert entry.state is ConfigEntryState.NOT_LOADED assert not hass.data.get(DOMAIN) async def test_async_setup_entry_not_ready(hass: HomeAssistant):
ise-uiuc/Magicoder-OSS-Instruct-75K
} TEST(TestWorld, World) { // open the library void* handle = dlopen("../src/libotel-cpp-lib-test_world.so", RTLD_LAZY); ASSERT_TRUE(handle) << "Cannot open library: " << dlerror(); DlCloseGuard guard { handle }; dlerror(); // reset errors // load the symbol typedef void (*world_t)();
ise-uiuc/Magicoder-OSS-Instruct-75K
prvlon = curlon; status = 1; Log.d("INSIDE SECOND IF::::", "INSIDE SECOND IF:::" + status + "INSIDE SECOND IF:::" +status);
ise-uiuc/Magicoder-OSS-Instruct-75K
* * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { // Actualizamos eliminado a 1 (Borrado lógico) Habilidad::where('idHabilidad',$id)->update(['eliminado'=>1,'updated_at'=>now()]);
ise-uiuc/Magicoder-OSS-Instruct-75K
root.addFile(
ise-uiuc/Magicoder-OSS-Instruct-75K
help="Model type", choices=['dense', 'conv'], default='conv') args = parser.parse_args()
ise-uiuc/Magicoder-OSS-Instruct-75K
main(args.weights_folder, args.training_h5, args.validation_h5, args.epochs, args.cut)
ise-uiuc/Magicoder-OSS-Instruct-75K
for filename in os.listdir(clean_file_path): file_path = clean_file_path + filename if self.is_valid_filename(file_path): file_paths.append(file_path) else: if self.is_valid_filename(file_path): file_paths.append(file_pa...
ise-uiuc/Magicoder-OSS-Instruct-75K
@pytest.fixture(autouse=True) def _autouse_resp_mocker(resp_mocker, version_api): pass
ise-uiuc/Magicoder-OSS-Instruct-75K
public struct AsyncPrefixWhileSequence<Base: AsyncSequence> { @usableFromInline let base: Base @usableFromInline let predicate: (Base.Element) async -> Bool @usableFromInline init(
ise-uiuc/Magicoder-OSS-Instruct-75K
from django.shortcuts import render, HttpResponse, redirect from .forms import Profileform, Drag from .models import Profile import random # Create your views here. def Drag_up (request): if request.method == 'POST': form = Profileform(request.POST) if form.is_valid():
ise-uiuc/Magicoder-OSS-Instruct-75K
} } public static final class InputStreamAsBitmapCallable extends BaseBitmapCompressCallable { private InputStream mInputStream; public InputStreamAsBitmapCallable(Tiny.BitmapCompressOptions options, InputStream is) {
ise-uiuc/Magicoder-OSS-Instruct-75K
class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='books', fields=[
ise-uiuc/Magicoder-OSS-Instruct-75K
public void testInsertObject() { int idA = batchHandler.insertObject( categoryA, true ); int idB = batchHandler.insertObject( categoryB, true ); int idC = batchHandler.insertObject( categoryC, true ); assertNotNull( categoryService.getDataElementCategory( idA ) ); ...
ise-uiuc/Magicoder-OSS-Instruct-75K
'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Topic :: Education', 'Topic :: Utilities'], packages=['src'], entry_points=""" [console_scripts] lsankidb = src.lsankidb:main
ise-uiuc/Magicoder-OSS-Instruct-75K
USER_MODEL = settings.AUTH_USER_MODEL class CommonCms(AbstractPermalink):
ise-uiuc/Magicoder-OSS-Instruct-75K
FILES_BASE_PATH = env.get_abspath('FILES_BASE_PATH') FILES_BASE_URL = env.get('FILES_BASE_URL')
ise-uiuc/Magicoder-OSS-Instruct-75K
* the type of the handled field */ public interface FinalFieldHandler<T> extends StructureFieldHandler<T> { /** * Fills a final field from a structure. * * @param currentValue * the value to fill * @param element * the element to read * @param locale
ise-uiuc/Magicoder-OSS-Instruct-75K
import os sys.path.append( os.path.dirname(__file__) ) import numpy as np import typing as tp import angles from model import Node, Link, Label from spec import ArrowDraw, NodeSpec class FormationManager: def __init__(self):
ise-uiuc/Magicoder-OSS-Instruct-75K