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 requests | |
import struct | |
import json | |
import re | |
import ast | |
import os | |
def get_subdomain_from_gallery_id(gallery_id): |
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
pub struct FuncGen<'ctx> { | |
pub function: FunctionValue<'ctx>, | |
pub prototype: FuncPrototype<'ctx>, | |
pub statement_stack: Vec<StatementGen<'ctx>>, | |
pub scope_stack: Vec<ScopeGen<'ctx>>, | |
} | |
pub struct StatementGen<'ctx> { | |
pub name: String, | |
pub entry_block_gen: BlockGen<'ctx>, |
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
const itemArray = [ | |
['banana-1000', 0.65], | |
['choco-960', 0.65], | |
['back-0', 13.7 / 16], | |
['back-1', 13.7 / 16], | |
['back-2', 13.7 / 16], | |
['char-0', 13.7 / 16], | |
['char-1', 13.7 / 16], | |
['char-2', 13.7 / 16], | |
['char-3', 13.7 / 16], |
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 math | |
import random | |
import torch | |
from torch.distributions.dirichlet import Dirichlet | |
from game import Game |
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 math | |
import random | |
import torch | |
from game import Game | |
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
use std::cmp::max; | |
use std::collections::VecDeque; | |
macro_rules! loop_perm { | |
($src_queue:ident, $src_queue_len:literal, $target_stack:ident => $code:block) => { | |
for _ in 0..$src_queue_len { | |
$target_stack.push($src_queue.pop_back().unwrap()); | |
$code | |
$src_queue.push_front($target_stack.pop().unwrap()); | |
} |
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 * as fs from 'fs'; | |
import * as path from 'path'; | |
import { spawnSync } from 'child_process'; | |
const intPath = path.join('dist', 'intermediates', 'exp-deps'); | |
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8')); | |
const deps = []; | |
if (pkg.dependencies) for (const dep in pkg.dependencies) deps.push(`${dep}@${pkg.dependencies[dep]}`); |
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
use rand::seq::SliceRandom; | |
use rand::{thread_rng, Rng}; | |
fn main() { | |
let mut rng = thread_rng(); | |
for _ in 0..1000 { | |
let total = 1347; | |
let mut count_who_never_received = 1347; | |
let mut users = (0..total).collect::<Vec<_>>(); |
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
use crate::component::*; | |
use crate::render::*; | |
use crate::system::System; | |
use crate::EngineContextWithoutSystemManager; | |
use legion::*; | |
use std::cmp::{max, min, Ordering}; | |
use std::mem::size_of; | |
use std::sync::Arc; | |
enum RendererRef<'r> { |
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
use crate::{ | |
NativeHandle, Object, ShaderAttribute, ShaderAttributeType, ShaderUniform, ShaderUniformBlock, | |
ShaderUniformType, | |
}; | |
use gl33::types::*; | |
use std::any::type_name; | |
use std::collections::HashMap; | |
use std::ffi::CString; | |
use std::mem::forget; | |
use std::ptr::{null, null_mut}; |
OlderNewer