Skip to content

Instantly share code, notes, and snippets.

Avatar
👀
69 people are currently looking at this profile

Lulzx Lulzx

👀
69 people are currently looking at this profile
View GitHub Profile
@Lulzx
Lulzx / file.py
Created May 2, 2021
Longest Non Repeating Substring
View file.py
s = "abcabcbb"
t = []
c = 0
n = 0
for i in s:
if i in t:
if c > n:
n = c
c = 0
t = [i]
View tell.c
#include <stdio.h>
int findMin(int arr[], int n)
{
int min = arr[0];
for (int i = 1; i < n; ++i) {
if (arr[i] < min) {
min = arr[i];
}
}
View index.svelte
<script lang="ts">
import { metatags } from "@roxi/routify";
import Theme from "./components/Theme.svelte";
import {
Content,
ContentSwitcher,
DataTable,
Form,
FormGroup,
Header,
View vanilla-search.svelte
<script lang="ts">
import { onMount } from "svelte";
let ref: HTMLInputElement;
let page: any = 0;
let pages: number = 1;
let rows: any[] = [];
let total: number;
let type: string = "title";
let state: string = "onload";
View book.svelte
<script lang="ts">
import { onMount } from "svelte";
let loading = true;
let title: string,
subtitle: string,
description: string,
author: string,
year: string,
@Lulzx
Lulzx / data.js
Created Oct 31, 2020
library genesis api data
View data.js
[
{
id: '2397931',
title: 'The Rust Programming Language (Covers Rust 2018)',
volumeinfo: '',
series: '',
periodical: '',
author: 'Steve Klabnik; Carol Nichols',
year: '2019',
edition: '',
@Lulzx
Lulzx / tg_rust.md
Last active Oct 23, 2020
links for rust resources
View tg_rust.md

Do you want to learn Rust (and oxidise the world 😂)?

Start by reading The Rust Book.
If you are ever in doubt, think about, Why Rust?

Tutorials

Rust 101 - Just a basic, hands-on course
Rustlings - Programming exercises in Rust
Rust Cookbook - Learn Rust good practices with practical code samples \

View main.py
from math import factorial as fac
def f(n: int) -> int:
y = 0
for x in map(int, str(n)):
y += fac(x)
return y
@Lulzx
Lulzx / bot.py
Created Jul 19, 2020
discord lyrics
View bot.py
import requests
from discord.ext import commands
prefix = "?"
bot = commands.Bot(command_prefix=prefix)
@bot.event
async def on_ready():
View output.txt
WebPage( id=5441171425018901268, url='https://www.tagesschau.de/ausland/trump-usa-einreisestopp-corona-101.html', display_url='tagesschau.de/ausland/trump-usa-einreisestopp-corona-101.html', hash=1127929505, type='photo', site_name='tagesschau.de', title='Trump will Einreisestopp verlängern', description='US-Präsident Trump hat angekündigt, den Ein