-
Single-line comments are started with
//
. Multi-line comments are started with/*
and ended with*/
. -
C# uses braces (
{
and}
) instead of indentation to organize code into blocks. If a block is a single line, the braces can be omitted. For example,
import random | |
import pandas | |
names = [] | |
with open("names_list.txt") as f: | |
for line in f.readlines(): | |
line = line.strip() | |
idx, first, last = line.split(" ") | |
line = f"{first} {last}" | |
names.append(line) |
func snake2camel(string:String)->String: | |
var result = PoolStringArray() | |
var prev_is_underscore = false | |
for ch in string: | |
if ch=='_': | |
prev_is_underscore = true | |
else: | |
if prev_is_underscore: | |
result.append(ch.to_upper()) |
# Loads a scene in the background using a seperate thread and a queue. | |
# Foreach new scene there will be an instance of ResourceInteractiveLoader | |
# that will raise an on_scene_loaded event once the scene has been loaded. | |
# Hooking the on_progress event will give you the current progress of any | |
# scene that is being processed in realtime. The loader also uses caching | |
# to avoid duplicate loading of scenes and it will prevent loading the | |
# same scene multiple times concurrently. | |
# | |
# Sample usage: | |
# |
import ast | |
import discord | |
from discord.ext import commands | |
def insert_returns(body): | |
# insert return stmt if the last expression is a expression statement | |
if isinstance(body[-1], ast.Expr): | |
body[-1] = ast.Return(body[-1].value) |
#!/bin/bash | |
# Thanks goes to @pete-otaqui for the initial gist: | |
# https://gist.github.com/pete-otaqui/4188238 | |
# | |
# Original version modified by Marek Suscak | |
# | |
# works with a file called VERSION in the current directory, | |
# the contents of which should be a semantic version number | |
# such as "1.2.3" or even "1.2.3-beta+001.ab" |
I'll start off with letting you know this is a fork from someone else. However, for some bizarre reason, this is the one everyone finds, so I better get round to updating this. Credit to Cristiano#2233 for the original idea.
Also, I've had a lot of people saying the rules are to strict. If you pick all the rules here, you're right, it would be very strict. However the rules below are guidelines! They are there for you to pick the ones you desire, you can ignore ones you don't want. Hopefully they might help with rules you wouldn't have thought of otherwise.
#ifdef GL_ES | |
#define LOWP lowp | |
precision mediump float; | |
#else | |
#define LOWP | |
#endif | |
const float offset = 1.0 / 128.0; | |
varying vec2 v_texCoords; | |
uniform sampler2D u_texture; |
-
Single-line comments are started with
//
. Multi-line comments are started with/*
and ended with*/
. -
C# uses braces (
{
and}
) instead of indentation to organize code into blocks. If a block is a single line, the braces can be omitted. For example,