Skip to content

Instantly share code, notes, and snippets.

import random
def try_again():
print("Try again >> ", end="")
def main():
RAND_NUM = random.randint(1,31)
while True:
try:
def summer_69(arr):
total = 0
add = True
for i in arr:
flip_case = (add and i==6) or (not add and i==9)
if flip_case:
add = not add
continue
{
"model": "auth.user",
"pk": 1,
"fields": {
"password": "pbkdf2_sha256$180000$7QqVPmvUuaSu$tTLdtnhQzY5QjbAfA1UwFw1pCCbm25DWQhYe8XGlaUY=",
"last_login": "2020-05-24T20:12:16.433Z",
"is_superuser": true,
"username": "sarthok",
"first_name": "",
"last_name": "",
[Fri May 08 13:22:50.632230 2020] [mpm_event:notice] [pid 8965:tid 140438940683200] AH00491: caught SIGTERM, shutting down
[Fri May 08 13:22:50.714196 2020] [mpm_event:notice] [pid 9369:tid 140510647974848] AH00489: Apache/2.4.29 (Ubuntu) mod_wsgi/4.5.17 Python/3.6 configured -- resuming normal operations
[Fri May 08 13:22:50.714289 2020] [core:notice] [pid 9369:tid 140510647974848] AH00094: Command line: '/usr/sbin/apache2' [Fri May 08 13:22:53.764146 2020] [authz_core:error] [pid 9374:tid 140510425495296] [client 103.117.151.235:28193] AH01630: client denied by server configuration: /home/sarik/django_project/django-project
<VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly.
import sqlite3
from sys import exit as sysexit
class user(object):
"""User class having first name,
last name, id, and password"""
def __init__(self, u_id, u_pass):
def egg():
a = 5
egg.plant += 1
egg.plant = 0
for _ in range(20):
egg()
print(egg.__dict__)
python -m venv sss venv
venv\Scripts\Activate.ps1
pip install pyautogui
#! python3
# draws spiral in ms paint
# have to set cursor in 5s
import subprocess
import pyautogui
import time
def draw_spiral():
@sarthoksarik
sarthoksarik / document.rtf
Created December 3, 2019 04:27
Steady Free Surface Flow Pattern
C ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C Purpose --There are 7 programs under this folder
c
c 1. ggfile.f (reads input data and generates output
c for the following programs...)
c 2. mggren.f (calculates the Green function (G,Gn) for
c the body surface)