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
""" | |
This examples show how to train a Bi-Encoder for the MS Marco dataset (https://github.com/microsoft/MSMARCO-Passage-Ranking). | |
The queries and passages are passed independently to the transformer network to produce fixed sized embeddings. | |
These embeddings can then be compared using cosine-similarity to find matching passages for a given query. | |
For training, we use MultipleNegativesRankingLoss. There, we pass triplets in the format: | |
(query, positive_passage, negative_passage) | |
Negative passage are hard negative examples, that were mined using different dense embedding methods and lexical search methods. |
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
{ | |
// AutoCrop.jsx | |
// | |
// This script scales the active comp to the size of the contents. | |
function AutoCrop(thisObj) { | |
var scriptName = "AutoCrop"; | |
function onCropClick() { | |
var activeItem = app.project.activeItem; |
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 <bits/stdc++.h> | |
//#define INF 0x3f3f3f3f | |
using namespace std; | |
typedef long long ll; | |
typedef unsigned long long ull; | |
typedef pair<int, int> pii; | |
const int INF = 0x3f3f3f3f; | |
int a[5005]; |
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 <bits/stdc++.h> | |
//#define INF 0x3f3f3f3f | |
using namespace std; | |
typedef long long ll; | |
typedef unsigned long long ull; | |
typedef pair<int, int> pii; | |
const int INF = 0x3f3f3f3f; | |
//int a[1000001]; |
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 <bits/stdc++.h> | |
//#define INF 0x3f3f3f3f | |
using namespace std; | |
typedef long long ll; | |
typedef unsigned long long ull; | |
typedef pair<int, int> pii; | |
const int INF = 0x3f3f3f3f; | |
// |
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
int index = (int)pixelScreenCoordinates.y % 3; | |
if(y == 0) | |
{ | |
muls *= float4(_ScanColour, _ScanColour, _ScanColour, 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
_Contrast("Contrast", Float) = 0 | |
_Brightness("Brightness", Float) = 0 | |
... | |
uniform float _Contrast; | |
uniform float _Brightness; | |
... |
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
int pixelPosition = (int)pixelScreenCoordinates.x % 3; | |
float4 output = float4(0, 0, 0, 1); | |
if (pixelPosition == 1) | |
{ | |
output.r = color.r; | |
} | |
else if (pixelPosition == 2) | |
{ | |
output.g = color.g; | |
} |
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
using System; | |
using UnityEditor; | |
using UnityEditor.IMGUI.Controls; | |
using UnityEditorInternal; | |
using UnityEngine; | |
/// <summary> | |
/// Custom editor for a <see cref="SokobanPuzzleInstance"/>. | |
/// </summary> | |
[CustomEditor(typeof(SokobanPuzzleInstance))] |
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
using UnityEditor; | |
using UnityEditor.IMGUI.Controls; | |
using UnityEditorInternal; | |
using UnityEngine; | |
/// <inheritdoc /> | |
/// <summary> | |
/// Room component inspector. | |
/// </summary> | |
[CustomEditor(typeof(Room), true)] |
NewerOlder