seq_id
stringlengths
4
11
text
stringlengths
113
2.92M
repo_name
stringlengths
4
125
โŒ€
sub_path
stringlengths
3
214
file_name
stringlengths
3
160
file_ext
stringclasses
18 values
file_size_in_byte
int64
113
2.92M
program_lang
stringclasses
1 value
lang
stringclasses
93 values
doc_type
stringclasses
1 value
stars
int64
0
179k
โŒ€
dataset
stringclasses
3 values
pt
stringclasses
78 values
25777861293
import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.Utils import COMMASPACE, formatdate # me == my email address # you == recipient's email address #assert type(to)==list def send_mail(to,fro,sub,html,html_text=None): #to = ['Chacha <sakhawat.sobhan@gmail....
tanvirraj/hirenow
doc/generic_mail.py
generic_mail.py
py
2,470
python
en
code
1
github-code
1
15616079630
import multiprocessing as processing from multiprocessing import pool,Process import math import numpy as np import gzip import pickle import sys from scipy import integrate import time,random import h5py import threading import os.path import _pickle as cpickle from scipy import spatial from multiprocessing import Pro...
peraktong/Multi_thread_examples
0327_calculate_density_Kd_tree_multi_process_doable_v1.py
0327_calculate_density_Kd_tree_multi_process_doable_v1.py
py
6,624
python
en
code
0
github-code
1
41407794252
# 551. Student Attendance Record I # https://leetcode.com/problems/student-attendance-record-i/description/ class Solution(object): def checkRecord(self, s): """ :type s: str :rtype: bool """ # use regex import re x = re.search('LLL|.*A.*A.*', s) r...
aszx4510/LeetCode
python/0551-student_attendance_record_i.py
0551-student_attendance_record_i.py
py
839
python
en
code
0
github-code
1
26358115895
from __future__ import print_function, division #################################################################### ###### Copyright (c) 2022-2023 PGEDGE ########## #################################################################### import argparse, sys, os, tempfile, json, subprocess, getpass...
pgEdge/nodectl
src/pgXX/config-pgXX.py
config-pgXX.py
py
4,102
python
en
code
7
github-code
1
34108584074
menu = { 'anhui':{ 'luan':{ 'shouxian':{ 'zhongxing', 'yankou', 'anfeng', 'baoyi' }, 'jinanqu':{ 'zhangdian', 'maotanchang', 'muchan' } }, 'hefei':{ 'gaoxin':{ 'iflytek', 'autoserver', 'xiaomi' }, 'jingkai':{ 'lenovo', 'jd', 'huawei' ...
virualv/studytmp
function&decorator&set/menu3.py
menu3.py
py
1,161
python
ur
code
0
github-code
1
24680066910
""" # Definition for a Node. class Node: def __init__(self, val=None, children=None): self.val = val self.children = children """ class Solution: def maxDepth(self, root: 'Node') -> int: ans = 0 if not root: return 0 def dfs(node,parent,depth): ...
YosefAyele/Leetcode-and-Codeforces-Problems
0559-maximum-depth-of-n-ary-tree/0559-maximum-depth-of-n-ary-tree.py
0559-maximum-depth-of-n-ary-tree.py
py
614
python
en
code
2
github-code
1
70026443555
import os import datetime import argparse import sys import shutil def run(): parser = argparse.ArgumentParser(description="Delete files each period of time") parser.add_argument("--dir_path", type=str, help="Path to the folder") parser.add_argument("--period", type=int, help="Period of time in days") a...
JassielMG/AutoCleanFolder
main.py
main.py
py
1,778
python
en
code
0
github-code
1
687144439
from game import game_runner from game import basic_players import numpy as np # What am I going to train on? # Run basic players against each other and create finalized board vectors. # With probability 1/2 roll back a move, otherwise take the final board # target is the winner (if there is one) # For now don't rol...
btbasham/connect4rl
predict_winner.py
predict_winner.py
py
754
python
en
code
0
github-code
1
72696725153
# Competative Programming Question 157 = Counting Sort 2 (From HackerRank) """ Counting Sort 2 | Get the Problem Statement on HackerRank : https://www.hackerrank.com/challenges/countingsort2/problem And get the solution here, solved in python by me :} """ # Author = Abhinav # Date = 19 January 2022 # Pourpose = Ju...
Brodevil/Competative-Programming
Python/Solved Questions/practise_set_157.py
practise_set_157.py
py
730
python
en
code
3
github-code
1
22184099208
""" Simple `GIL` released demo. """ import threading import requests from ch01.tools import time_it def simple_request() -> None: """Make a simple request""" response = requests.get("https://www.google.com") print(f"Response status code: {response.status_code}") @time_it def requests_no_threading() ->...
iplitharas/myasyncio
ch01/gil_released_demo.py
gil_released_demo.py
py
700
python
en
code
0
github-code
1
43535013974
import argparse import sys import os, os.path import redis import argparse import logging, logging.config from hashlib import md5 argparser = argparse.ArgumentParser() argparser.add_argument("--data", type=str, required=True) argparser.add_argument("--db-host", type=str, required=True) argparser.add_argument("--db-por...
HappyNationHack/team_Help_Desk
scripts/load_data.py
load_data.py
py
1,742
python
en
code
0
github-code
1
72632864993
import json from flask import Flask, render_template, request, jsonify from sklearn.svm import SVC from sklearn.feature_extraction.text import CountVectorizer app = Flask(__name__) # Load the business guidelines from a JSON file with open("business_guidelines.json", "r") as f: guidelines_data = json.load...
Balakumarmd/Ideavalidator
app.py
app.py
py
1,730
python
en
code
0
github-code
1
17959591498
# ์•ฝ์ˆ˜์˜ ๊ตฌ๊ฐ„ ๊ธธ์ด(small)(the length of the interval of a factor) # ๋ฏผ์•„๋Š” ์ด๋ฒˆ์—๋„ ๋ฏผ์„œ๋ฅผ ์œ„ํ•ด ์ƒˆ๋กœ์šด ๊ฒŒ์ž„์„ ์ค€๋น„ํ–ˆ๋‹ค. ๊ทœ์น™์€ ๊ฐ„๋‹จํ•˜๋‹ค. # ์ž…๋ ฅ์œผ๋กœ ์ž์—ฐ์ˆ˜ N์ด ์ฃผ์–ด์ง„๋‹ค. 1๋ถ€ํ„ฐ N๊นŒ์ง€์˜ ์ž์—ฐ์ˆ˜ ์ค‘์—์„œ ์•ฝ์ˆ˜์˜ # ๊ฐœ์ˆ˜๊ฐ€ ๊ฐ€์žฅ ๋งŽ์€ ์ž์—ฐ์ˆ˜์˜ ์ตœ์†Ÿ๊ฐ’๋ถ€ํ„ฐ ์ž…๋ ฅ N๊นŒ์ง€์˜ ๊ธธ์ด๋ฅผ ๊ตฌํ•˜์—ฌ # ๋งํ•˜๋Š” ๊ฒƒ์ด๋‹ค. ์ด๋ฒˆ์—๋„ ๋ฏผ์„œ๋ฅผ ๋„์™€์ฃผ์ž # ์ž…๋ ฅ: 2<=N<=100,000 | ๊ตฌ๊ฐ„์˜ ๊ธธ์ด๋ฅผ ์ถœ๋ ฅํ•œ๋‹ค. # method 1 n = int(input()) d = {} max = 0 if n == 1: print(1) else: ...
junes7/python_algorithm
CodeUp/deep_problem/5129.py
5129.py
py
965
python
ko
code
1
github-code
1
19902495107
import numpy as np def distance(*args): return np.sqrt(sum(arg**2 for arg in args)) def pol_to_cart(r, incl, azim): x = r * np.sin(np.radians(incl)) * np.cos(np.radians(azim)) y = r * np.sin(np.radians(incl)) * np.sin(np.radians(azim)) z = r * np.cos(np.radians(incl)) return x, y, z def cart_t...
kourosh-zarei/GeomKit
packages/utils.py
utils.py
py
702
python
en
code
3
github-code
1
41149137205
num = 5 for i in range(1, 11): print(num, " * ",i, " = ",num * i) items = ["Apple", "Orange", "Mango", "Banana"] for item in items: print(item) numbers = [21, 43, 56, 3, 54] for i in numbers: if i == 3: print("3 is found!!") break else: print("3 not found")
naveedeveloper/python
06_loop.py
06_loop.py
py
304
python
en
code
0
github-code
1
4832434614
# Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name=...
csail-csg/pyverilator
setup.py
setup.py
py
1,497
python
en
code
64
github-code
1
19142088501
from . import constants def get_response(url: str, headers: dict = constants.DEFAULT_HEADERS): try: import requests as r except ImportError: raise "Not search a requests module." response = r.get(url=url, headers=headers) if response.status_code != 200: raise "Not response co...
PavelKrivorotov/Test_Task_python_04_02_2023
main/main/utils.py
utils.py
py
773
python
en
code
0
github-code
1
25623285903
""" Google Forms Interaction Module This module provides functionalities to interact with Google Forms, specifically to fetch responses from a designated form. The primary purpose is to retrieve sign-up responses, which are then used in the main application for sending out notifications. Key Features: - Authentic...
StevenWangler/snow_day_bot
google_functions/google_forms.py
google_forms.py
py
4,128
python
en
code
0
github-code
1
32425569605
from irc.client import Event, ServerConnection from timmy.db_access import settings class AuthHandler: def __init__(self): self.auth_on_welcome = False self.auth_type = "" self.auth_data = "" self.post_identify = "" self.post_auth_sent = False def init(self) -> None: ...
utoxin/TimTheWordWarBot
timmy/event_handlers/auth_handler.py
auth_handler.py
py
1,205
python
en
code
14
github-code
1
26576207559
# -*- coding: utf-8 -*- """ Created on Fri Nov 20 22:47:22 2020 @author: rrajkumar1990 """ # sorting # often we get big lists or and we get questions what the port of sorting something #sorting is a way of arranging things ascending or decending #very useful for searching and finding anything when we have lists...
rrajkumar1990/Python_DS
Sorting_Bubble_Sort.py
Sorting_Bubble_Sort.py
py
1,445
python
en
code
1
github-code
1
43645610632
import pyspark import pyspark.sql from pyspark.sql import * from pyspark.sql.functions import * import json import urllib import argparse conf = pyspark.SparkConf().setMaster("local[*]").setAll([ ('spark.jars.packages', 'com.databricks:spark-xml_2.11:0.8.0'), ...
epfl-dlab/WikiPDA
PaperAndCode/TopicsExtractionPipeline/GetBeta.py
GetBeta.py
py
1,797
python
en
code
10
github-code
1
11785008616
# NN ใƒฉใ‚คใƒ–ใƒฉใƒชใ‚’ไฝฟใ„ใ‚„ใ™ใ„ใ‚ˆใ†ใซๅค‰ๆ›ด # 7763c160b4ec1caa99718cd3c865339227a1908e import numpy as np import matplotlib.pyplot as plt def main(): # ใƒ•ใ‚กใ‚คใƒซใ‹ใ‚‰ใƒ—ใƒญใƒƒใƒˆใ™ใ‚‹ๅ€คใ‚’่ชญใฟ่พผใ‚€ true_x = [] predict_x = [] with open("data/tmp_result.csv") as fileobj: while True: line = fileobj.readline() if line: ...
eipuuuuk825/Puniki4
python/src/plot_scatter.py
plot_scatter.py
py
1,885
python
en
code
0
github-code
1
27836865388
import regex as re from bs4 import BeautifulSoup import requests import requests_futures import aiohttp import asyncio from requests_futures.sessions import FuturesSession import tree import json trees = [] valid_regex = r"^https?\:\/\/([\w\.]+)wikipedia.org\/wiki\/([\w]+\_?)+" links = dict() loop = asyncio.get_even...
LyudmilaTretyakova/testtask
script.py
script.py
py
4,831
python
en
code
0
github-code
1
17446433552
"""Tests for the config API.""" import unittest from pygame_assets.exceptions import NoSuchConfigurationParameterError from pygame_assets.configure import Config, ConfigMeta from pygame_assets.configure import get_config, config_exists, remove_config from pygame_assets.configure import get_environ_config, set_environ...
florimondmanca/pygame-assets
pygame_assets/tests/test_configure.py
test_configure.py
py
6,870
python
en
code
2
github-code
1
38177168817
import argparse from dis import dis import gym import numpy as np from itertools import count import pyximport; pyximport.install() import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.distributions import MultivariateNormal import matplotlib.pyplot as plt import ...
sashankmodali/CS593-Robotics
Assignment 4/Continuous/modified-gym-env/train_model.py
train_model.py
py
6,564
python
en
code
0
github-code
1
23162812764
""" ่‹ฑๅˆถๅ•ไฝไธŽๅ…ฌๅˆถๅ•ไฝไบ’ๆข 1่‹ฑๅฏธ=2.54ๅŽ˜็ฑณ """ a = float(input('่ฏท่พ“ๅ…ฅ้•ฟๅบฆ๏ผš')) unit = input('่ฏท่พ“ๅ…ฅๅ•ไฝ๏ผš') if unit == '่‹ฑๅฏธ': print('%d่‹ฑๅฏธ็ญ‰ไบŽ%dๅŽ˜็ฑณ' % (a, a * 2.54)) elif unit == 'ๅŽ˜็ฑณ': print('%dๅŽ˜็ฑณ็ญ‰ไบŽ%d่‹ฑๅฏธ' % (a, a / 2.54)) else: print('่ฏท่พ“ๅ…ฅๆญฃ็กฎ็š„ๅ•ไฝ')
liuyanchen1994/learn-Pyhon-100Days
Day3/่‹ฑๅˆถๅ•ไฝไธŽๅ…ฌๅˆถๅ•ไฝไบ’ๆข.py
่‹ฑๅˆถๅ•ไฝไธŽๅ…ฌๅˆถๅ•ไฝไบ’ๆข.py
py
327
python
zh
code
1
github-code
1
6048712734
from app.visual_detector.workers import ( FrameReaderThread, TowerDetectorThread, ComponentDetectorThread, DefectDetectorThread, DefectTrackingThread, ResultsProcessorThread, TiltDetectorThread, DumperClassifierThread, WoodCracksDetectorThread ) from app.visual_detector.defect_detectors import ( TowerDe...
EvgeniiTitov/defect_detection
app/visual_detector/model.py
model.py
py
11,192
python
en
code
0
github-code
1
37639058519
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import re import sys import argparse __author__ = 'menghao' __mail__ = 'haomeng@genome.cn' bindir = os.path.abspath(os.path.dirname(__file__)) pat1 = re.compile('^\s*$') sys.path.append(bindir + '/../lib') from common import parser_fasta complement = {'A':'T','...
whenfree/Rosalind
Locating_Restriction_Sites/Locating_Restriction_Sites.py
Locating_Restriction_Sites.py
py
1,287
python
en
code
0
github-code
1
34007168475
# ไปŠใพใงไฝฟใฃใŸๆ–‡ๅญ—ใฎไธญใง**ๆœ€ๅคง**ใฎๆ–‡ๅญ—+1ใพใงไฝฟใˆใ‚‹ from itertools import zip_longest N = int(input()) # def convert_to_normal(s): # is_visited = [0]*26 # converted = ["_"]*26 # x = 0 # for s_i in s: # num = ord(s_i) - ord('a') # if is_visited[num]: # continue # is_visited[num] = 1 # ...
yojiyama7/python_competitive_programming
atcoder/else/panasonic_2020/d_string_equivalence.py
d_string_equivalence.py
py
1,547
python
en
code
0
github-code
1
16547812246
import requests import sys import json def post_predict(host:str): ''' Sends an HTTP POST request to the /predict endpoint. ''' proto = '' if not host.startswith('http'): proto = 'http://' with open('manualtests/manual_predict_data.json', 'r') as f: data = json.loads(f.read...
pugad/ml-golf-demo-app
manualtests/predict_manual.py
predict_manual.py
py
667
python
en
code
0
github-code
1
5065049591
""" spiel.segmentation.features Handles featurization of strings for segmenters """ import re from spiel import levenshtein from spiel.levenshtein import INSERT_SYMBOL from spiel.util import pad class FeaturizationException(Exception): """Raises for an error in segmentation""" class Featurizer: """ Use...
adoxography/SPieL
spiel/segmentation/features.py
features.py
py
7,559
python
en
code
1
github-code
1
18161161348
import pandas from recordlinkage.preprocessing import clean d = {'col1': ['marry - a', 'kudo::'], 'col2': ['nam vinh', 'okee-']} df = pandas.DataFrame(data=d) s = pandas.Series(df['col1']) df['col1'] = clean(s) print(df) df['col1'][0] = "b" print(df)
aduyphm/data-integration-20212
DataHandle/test.py
test.py
py
252
python
en
code
0
github-code
1
26730099774
import sys def suffix_array(seq): dict = {} i = 0 while len(seq) > 0: dict[seq] = i i += 1 seq = seq[1:] seqs = list(dict.keys()) indexes = list(dict.values()) zipped = sorted(zip(seqs, indexes)) tuples = zip(*zipped) list1, list2 = [list(tuple) for ...
wolffj97/code_check
codeChallenges/multiple_pattern_matching.py
multiple_pattern_matching.py
py
4,603
python
en
code
0
github-code
1
22357222228
#coding=utf-8 ''' #import urllib #import urllib.request #import urllib.parse import requests URL_IP = 'http://httpbin.org/ip' URL_GET = 'http://httpbin.org/get' def use_simple_requests(): response = requests.get(URL_IP) print('>>>Response Headers:') print(response.headers) print('>>>Response Body:') ...
Handsome2Hu/py
ไธชไบบๅญฆไน /RequestsTest.py
RequestsTest.py
py
4,842
python
en
code
0
github-code
1
73004553633
from .backend import backend as bd import numpy as np import os import time import fdtd_1d as f import matplotlib.pyplot as plt from .constants import c0, BLUE, CYAN, TEAL, ORANGE, RED, MAGENTA, GREY from werkzeug.utils import cached_property from multiprocessing import Pool color_spec = [BLUE, CYAN, TEAL, ORANGE...
HaneWall/FDTD
fdtd_1d/benchmarks.py
benchmarks.py
py
43,827
python
en
code
2
github-code
1
15091010369
import json import os import time from models import Downloader, User SETTINGS_FILE = "settings.json" # Create history file if it does not exist if not os.path.exists("history.txt"): with open("history.txt", "w") as f: f.write("") # Check if the JSON file exists if os.path.exists(SETTINGS_FILE): # If...
ahmethakanbesel/alms-video-indirme-araci
app.py
app.py
py
3,731
python
en
code
2
github-code
1
11357000023
import pygame class Heart(pygame.sprite.Sprite): def __init__(self, imgfile, hp, pos=[]): super().__init__() self.heart_img = pygame.image.load(imgfile) self.rect = self.heart_img.get_rect() self.pos = pos self.HP = hp self.speed = 7 self.Invincible = 0 #ๅ—ๅˆฐๆ”ป...
boaoqian/undertale_fight_system
Heart.py
Heart.py
py
662
python
en
code
1
github-code
1
42758230743
import keras from keras.models import Sequential from keras.layers import Dense import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from sklearn.model_selection import StratifiedKFold #่ฎพ็ฝฎ้šๆœบๆ•ฐ็งๅญ np.random.seed(7) #ๆ•ฐๆฎ่ทฏๅพ„ data_file="pima-indians-diabetes.csv" #ๅฏผๅ…ฅๆ•ฐๆฎ dataset=np.loadt...
renxingkai/KerasDLDemo
chapter05_Evaluate/KFold.py
KFold.py
py
1,367
python
en
code
1
github-code
1
1704636938
import sys input = sys.stdin.readline def dfs(x,y): #์ƒ ํ•˜ ์ขŒ ์šฐ ์šฐ์ƒ ์šฐํ•˜ ์ขŒ์ƒ ์ขŒํ•˜ dy = [1,-1,0,0,1,-1,1,-1] dx = [0,0,-1,1,1,1,-1,-1] graph[x][y] = 0 for i in range(8): nx = x + dx[i] ny = y + dy[i] if(0 <= nx < h and 0 <= ny < w and graph[nx][ny] == 1): dfs(nx,ny) while True: w, h = map(int,...
SunghunKim98/Algorithm_Study
sprint09/KMS/FW/BOJ_4963.py
BOJ_4963.py
py
584
python
en
code
0
github-code
1
29437692374
d = dict() for _ in range(int(input())): mot = ''.join(sorted(input())) if mot not in d: d[mot] = 1 else: d[mot] += 1 d = sorted(d.items(), key = lambda x : x[1], reverse = True) print(d[0][1])
MaximeGloesener/CompetitiveProgramming
csacad/anagram.py
anagram.py
py
226
python
en
code
0
github-code
1
8059135342
import pyttsx3 import speech_recognition as sr import datetime import wikipedia import webbrowser print("READ THIS") print("WHAT YOUR JARVIS CAN DO") print("Your Jarvis can search in chrome\n can summarize wikipedia\n can open google and youtube\n can show you IPL score\n can open National Geographic\n can recommend...
sarthak-dhonde/jarvis
Jarvis.py
Jarvis.py
py
9,194
python
en
code
1
github-code
1
26355670681
import random import json import numpy as np import torch from torch.utils.data import Dataset, DataLoader, random_split, ConcatDataset import pandas as pd import os import torchaudio from dataset import snoring_preprocess from dataset import dataset_utils # TODO: some inspections for arguments # TODO: ABC? (to a ...
wdwlinda/Snoring_Detection_full
dataset/dataset_builder.py
dataset_builder.py
py
5,871
python
en
code
0
github-code
1
3975828154
import numpy as np import torch from torch._C import dtype import torch.nn as nn import random from filters import BP_filter import matplotlib.pyplot as plt class Random_shift(nn.Module): # Randomly shifts the track def __init__(self, shift_max): super().__init__() self.shift_max = shif...
GianMarcoZampa/Progetto-DACLS
augmentation.py
augmentation.py
py
2,144
python
en
code
0
github-code
1
15952571818
import socket from time import sleep # Keyence Scanner ASCII Commands ------------------------------------------------------ """ Error Format: ER,COMMAND,ERROR_CODE Error Codes: ------------ 00 Undefined command received 01 Mismatched command format (Invalid number of parameters) 02 The parameter 1 value exceeds...
brianteachman/serial_printer_controller
sr1000.py
sr1000.py
py
4,206
python
en
code
0
github-code
1
23568782093
from models.commands.command_register import command_register class command_args: def __init__(self, unique_id: str, name: str, type_var: str, optional_alias = False, required = False, help = False): self.unique_id = unique_id self.name = name self.type_var = self.getType(type_var) ...
brutalzinn/discord-bot-vps-manager
models/commands/command_args.py
command_args.py
py
538
python
en
code
0
github-code
1
24273901032
import numpy as np class SEIRC(object): """ This class represents the SEIR epdidemiological model with added clinical estimates. See https://en.wikipedia.org/wiki/Compartmental_models_in_epidemiology#The_SEIR_model for the classical SEIR model. tldr: self.par; self.simulate(); self.result Th...
kourk0am/epipy
seirc.py
seirc.py
py
10,972
python
en
code
0
github-code
1
34424513905
#!/usr/bin/python3 # -*- coding: utf-8 -*- # @Author : Nam Zeng # @Time : 2018/12/6 10:38 # @Desc : ็”จ็‰›้กฟๆ’ๅ€ผๆณ•ๆ‹Ÿๅˆ็ป่ฟ‡็ป™ๅฎš็‚น็š„ๆ›ฒ็บฟ # x0 | y0 # x1 | y1 y10 # x2 | y2 y21 y210 import matplotlib.pyplot as plt import numpy as np def newton_interpolate(x, y): """ :param x: ็‚น้›†็š„xๅๆ ‡้›†x[] :param y: ็‚น้›†็š„yๅๆ ‡้›†y...
NAMZseng/numerical-analysis
5_newton_Interpolation.py
5_newton_Interpolation.py
py
1,620
python
en
code
0
github-code
1
35871182531
#!usr/bin/env python # coding:utf-8 ############################################################################################### #THIS SCRIPT IS SPECIFICALLY CREATED FOR A DNS_EXFILTRATION CHALLENGE IN WHICH THE EXFILTRATED# #DATA WAS A PNG IN HEXA AS THE CNAME IN THE DNS RESPONSES ON THE CNAME.DOMAIN. IT SHOULD BE ...
totor7/ctf_tools-templates
TEMPLATE-dns_scapy_parser.py
TEMPLATE-dns_scapy_parser.py
py
1,751
python
en
code
0
github-code
1
38898664379
# *_*coding:utf-8 *_* """ ่ฟ™ไธช่„šๆœฌๆ˜ฏ็”จๆฅๅŽ‹็ผฉๆ•ฐๆฎ๏ผŒๅ‡ๅฐ‘ๅ†…ๅญ˜ๅ ็”จ็š„ใ€‚ๅŽ‹็ผฉๆ•ฐๆฎๆœ‰ๅ‡ ็งๆ–นๆณ•๏ผš ็ฌฌไธ€็ง๏ผš ๅฝ“ๆˆ‘ไปฌๆ˜Ž็กฎ็Ÿฅ้“่ฆๅŠ ่ฝฝๆ•ฐๆฎ็š„่Œƒๅ›ด๏ผŒไฝฟ็”จpd.read_table่ฏปๅ–ๆ•ฐๆฎๆ—ถ๏ผŒๅฏไปฅ็”จๅ…ถไธญ็š„dtypeๅ‚ๆ•ฐๆฅๆ‰‹ๅŠจๆŒ‡ๅฎš็ฑปๅž‹ใ€‚ๆฏ”ๅฆ‚ๆŸไธ€ๅˆ—็š„ๆ•ฐๆฎ่Œƒๅ›ด่‚ฏๅฎšๅœจ0~255ไน‹ไธญ๏ผŒ้‚ฃไนˆๆˆ‘ไปฌๅฏไปฅๆŒ‡ๅฎšไธบnp.uint8็ฑปๅž‹ใ€‚ ็ฌฌไบŒ็ง๏ผš ๅฆ‚ๆžœๆ•ฐๆฎๅˆ—ๆ•ฐๅคชๅคš๏ผŒๆˆ–่€…ไธๆธ…ๆฅšๆ•ฐๆฎๅ…ทไฝ“่Œƒๅ›ด็š„่ฏไธ‹้ขๆ˜ฏไธ€ไธช่„šๆœฌ๏ผŒๅฏไปฅ่‡ชๅŠจๅˆคๆ–ญ็ฑปๅž‹๏ผŒๅนถๆ นๆฎ็ฑปๅž‹ไฟฎๆ”นๆ•ฐๆฎ่Œƒๅ›ดใ€‚ ็ฌฌไธ‰็ง๏ผš ๆ‰น้‡ๅค„็†๏ผŒๅขž้‡่ฎญ็ปƒๆจกๅž‹ใ€‚ """ import numpy as np def reduce_mem_usage(props): # ่ฎก็ฎ—ๅฝ“ๅ‰ๅ†…ๅญ˜ start_mem_...
jiajiewang0326/Grocery
data_compression.py
data_compression.py
py
3,334
python
zh
code
53
github-code
1
21797734599
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' Conjunto de funciones desarrolladas para ser utilizadas en los programas principales ''' import numpy as np import torch import matplotlib.pyplot as plt from labcomdig import gray2de from network import * ''' NUMPY ''' def transmisorpamV2(Bn,Eb,M,p,L): """ [X...
osgofre/MIMO-DL
functions.py
functions.py
py
20,722
python
es
code
1
github-code
1
30490609484
import os os.system('pip3 install lightgbm==2.1.2') os.system('pip3 install hyperopt') import pandas as pd import pickle import data_converter import numpy as np import scipy from os.path import isfile import random import time from sklearn.model_selection import train_test_split, StratifiedKFold from sklearn.metrics ...
MetaLearners/NIPS-2018-AutoML-Challenge
src/model.py
model.py
py
12,004
python
en
code
17
github-code
1
28044202513
# Project) ์˜ค๋ฝ์‹ค Pang ๊ฒŒ์ž„ ๋งŒ๋“ค๊ธฐ # [๊ฒŒ์ž„ ์กฐ๊ฑด] # 1. ์บ๋ฆญํ„ฐ๋Š” ํ™”๋ฉด ์•„๋ž˜์— ์œ„์น˜, ์ขŒ์šฐ๋กœ๋งŒ ์ด๋™ ๊ฐ€๋Šฅ # 2. ์ŠคํŽ˜์ด์Šค๋ฅผ ๋ˆ„๋ฅด๋ฉด ๋ฌด๊ธฐ๋ฅผ ์˜์•„ ์˜ฌ๋ฆผ # 3. ํฐ ๊ณต 1 ๊ฐœ๊ฐ€ ๋‚˜ํƒ€๋‚˜์„œ ๋ฐ”์šด์Šค # 4. ๋ฌด๊ธฐ์— ๋‹ฟ์œผ๋ฉด ๊ณต์€ ์ž‘์€ ํฌ๊ธฐ 2 ๊ฐœ๋กœ ๋ถ„ํ• , ๊ฐ€์žฅ ์ž‘์€ ํฌ๊ธฐ์˜ ๊ณต์€ ์‚ฌ๋ผ์ง # 5. ๋ชจ๋“  ๊ณต์„ ์—†์• ๋ฉด ๊ฒŒ์ž„ ์ข…๋ฃŒ => ์„ฑ๊ณต # 6. ์บ๋ฆญํ„ฐ๋Š” ๊ณต์— ๋‹ฟ์œผ๋ฉด ๊ฒŒ์ž„ ์ข…๋ฃŒ => ์‹คํŒจ # 7. ์‹œ๊ฐ„ ์ œํ•œ 99 ์ดˆ ์ดˆ๊ณผ ์‹œ ๊ฒŒ์ž„ ์ข…๋ฃŒ => ์‹คํŒจ # 8. FPS ๋Š” 30 ์œผ๋กœ ๊ณ ์ • => ํ•„์š” ์‹œ speed ๊ฐ’์„ ์กฐ์ • # [๊ฒŒ์ž„ ์ด๋ฏธ์ง€] # 1. ๋ฐฐ๊ฒฝ : 640...
asummerz/Python
pygame_project/1_frame_background_stage_character.py
1_frame_background_stage_character.py
py
2,936
python
ko
code
0
github-code
1
37914829335
import ipywidgets as widgets def make_model_list_dropdown() -> widgets.Widget: model_list_dropdown = widgets.Dropdown( options=['Model 1', "Click to add new model..."], value='Model 1', description='Select Model', style={ 'description_width': '100px' }, ...
usnistgov/correlogram_tools
correlogram_tools/plotting_widget/model_header_box.py
model_header_box.py
py
1,820
python
en
code
0
github-code
1
1656020572
import math def factors(num): rev_lst, lst = [], [] num = int(num) for i in range(1, math.ceil(math.sqrt(num))): if num % i == 0: if num / i == i: lst.append(i) else: lst.append(i) rev_lst.append(int(num / i)) final_lst = ...
otisscott/data_structures
Homework/hw2/oms275_hw2_q3.py
oms275_hw2_q3.py
py
439
python
en
code
0
github-code
1
5493453692
import re import sys from io import StringIO from colorama import Fore, Style from diff_match_patch import diff_match_patch def highlight_differences(text1, text2): dmp = diff_match_patch() diffs = dmp.diff_main(text1, text2) dmp.diff_cleanupSemantic(diffs) highlighted_diff = "" for diff in diff...
algFame/geektrust
rider-sharing/src/utils.py
utils.py
py
1,384
python
en
code
1
github-code
1
41413125741
#!/usr/bin/env python3 import os import datetime # Complete the time_delta function below. def time_delta(t1, t2): pattern = '%a %d %b %Y %H:%M:%S %z' date1 = int(datetime.datetime.strptime(t1, pattern).timestamp()) date2 = int(datetime.datetime.strptime(t2, pattern).timestamp()) print(abs(date1 - d...
iliankostadinov/hackerrank-python
time_delta.py
time_delta.py
py
620
python
en
code
0
github-code
1
8083603585
from tqdm import tqdm import numpy as np import pandas as pd import matplotlib.pyplot as plt from group4_banker import Group4Banker from plot_config import setup, set_fig_size, set_arrowed_spines setup() def prep_data(): features = ['checking account balance', 'duration', 'credit history', ...
moeennaqvi/BankCreditProject
src/action_sensitivity.py
action_sensitivity.py
py
5,750
python
en
code
0
github-code
1
25082622727
from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index'), path('event/', views.event, name='event'), path('place/', views.place, name='place'), path('imply/', views.imply, name='imply'), path('insert_event/', views.insert_event, name='...
leehj8896/capstone-server_ec2
print_db/urls.py
urls.py
py
1,393
python
en
code
0
github-code
1
73454293153
from tkinter import * from tkinter import ttk, messagebox import statistics as stats import MySQLdb import numpy as np import matplotlib.pyplot as plt patronNomApe = '^([A-Z]\D+)$' patronCp = '\d{5}$' patronTelefono = '\d{9}$' patronCod_Historia = '\d' patronfecha = '^([0-2][0-9]|(3)[0-1])(\/)(((0)[0-9])|((1)[0-2]))(...
daguilerap/Hospital
proyectofinal/main.py
main.py
py
25,321
python
es
code
0
github-code
1
24337707923
from lxml import html import requests from time import sleep import json import argparse from collections import OrderedDict from time import sleep def parse(ticker): # Code to get the stock price url = "http://finance.yahoo.com/quote/%s?p=%s" % (ticker, ticker) response = requests.get(url, verify=False) ...
JackMcNally24/VODCA
python/Scripts/analysis.py
analysis.py
py
3,562
python
en
code
0
github-code
1
2340324466
import torch from torch import nn __all__ = [ 'DotProductAttention' , 'AdditiveAttention' ] class Attention(nn.Module): '''base model for attention''' def __init__(self, *args, **kwargs) -> None: super().__init__() self.maskValue = -1e10 def forward(self, *args, **kwargs): '...
Thyme-git/transformer
layers/attention.py
attention.py
py
8,633
python
en
code
1
github-code
1
18108561085
# mypy: disable-error-code=arg-type import asyncio import discord import validators import wavelink from discord import app_commands from wavelink.ext import spotify from .. import config from ..client import CustomClient def add_streaming_commands(client: CustomClient) -> None: @client.tree.command( na...
sasunday26/discord-music-bot
discord_music_bot/commands/streaming.py
streaming.py
py
5,621
python
en
code
4
github-code
1
73116264995
class Solution: def nextGreaterElement(self, nums1: List[int], nums2: List[int]) -> List[int]: # find index mapping dt = {k:v for k, v in enumerate(nums1)} stk = [] nums2_res = [0] * len(nums2) for i in range(len(nums2)-1, -1, -1): while len(stk) > 0 and stk[-1] <...
eliteGoblin/sky_ladder
sessions/bianchengnengli_basic/496.py
496.py
py
549
python
en
code
0
github-code
1
6835048152
''' This script contains functions which allow a user to select a ROI on a single/multiple samples These functions in a variety of ways call the roiselector function which is a GUI to allow a user to select points. The functionionality of each funcitons is as follows: ChangePoint: allows a user to CHANGE the l...
JonoSax/3DHistologicalReconstruction
HelperFunctions/SP_SampleAnnotator.py
SP_SampleAnnotator.py
py
17,188
python
en
code
3
github-code
1
27885172320
import tweepy import time #creds auth = tweepy.OAuthHandler('F65nYoxP5rSF2GCvhYmyGTgf9' , 'ur8QEgt7J2ugicpmSCLauprXMNOVOzIfAQMOAXnbhflvb2aH1W') auth.set_access_token('1309177113652662272-4rrOUk9Pxn9KccGPnATO2IUypgT8tr', '1K3NjvrLHuMYeR4xfpp2CpLENsgqrPugZ4WvTtI6ZAyO5' ) api = tweepy.API(auth) user = api.me() #print("...
prajaktaandhale/Twitter-Bot-using-Python
twitterbot1.py
twitterbot1.py
py
1,039
python
en
code
0
github-code
1
72349040674
# Definition for singly-linked list. class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next class Solution: def mergeKLists(self, lists: List[Optional[ListNode]]) -> Optional[ListNode]: heap = [] dummy = ListNode() curr = dummy count...
juny-park-95/leet_code_answers
0023-merge-k-sorted-lists/0023-merge-k-sorted-lists.py
0023-merge-k-sorted-lists.py
py
1,052
python
en
code
0
github-code
1
11295990652
""" Constraints: - the position of the container has to be in range of device capacity based on device version - on creation it checks there is a proper amount of chambers associated with this object - there cannot be any other container at the same place in the same device """ from django.db import...
AmbientELab-Group/Medbox-server
app/API/models/container.py
container.py
py
2,660
python
en
code
0
github-code
1
72455448674
# m ั‚ะพะพ ั…าฏั€ั‚ัะป ั…ัะดัะฝ ะฐะฝั…ะฝั‹ ั‚ะพะพ ะฑะฐะนะณะฐะฐะณ ะพะป n = int(input()) for i in range(2, n + 1): k = 0 for j in range (2, i // 2 + 1): if i % j == 0: k += 1 if k == 0: print(i) count = i.count("i") print(count) ''' string = input() substring = "o" count = string.count(substring) print(...
ayangacann/hicheel5
ะ”ะฐัะณะฐะปัƒัƒะด/d18.py
d18.py
py
395
python
en
code
0
github-code
1
20481194705
import warnings from pprint import pprint import pandas as pd import math warnings.filterwarnings("ignore") import numpy as np # Candidate prediction # ------------------------ candidate = "Donald Trump" party = "Republican" # ------------------------ # import from .csv files data = pd.read_csv('data/primary_results.c...
JX25/Python-USA-Elections-Predictions
App/main.py
main.py
py
4,650
python
en
code
0
github-code
1
3540804132
"""============================================================================ Cรณ 60% ngฦฐแปi mua xe thแปƒ thao lร  nam giแป›i. 1. Chแปn loแบกi phรขn phแป‘i. Tแบกo ra 10 mแบซu (ngแบซu nhiรชn) theo mรด tแบฃ trรชn vแป›i sแป‘ lแบงn lแบทp lแบกi cรกc thรญ nghiแป‡m lร  1000 2. Vแบฝ histogram quan sรกt. Nhแบญn xรฉt. 3. Trong 10 chแปง...
lualua0909/Math-4-ML-lds3
B6. Probability/Ex2 - Cau 2.py
Ex2 - Cau 2.py
py
1,885
python
vi
code
10
github-code
1
23856076875
from selenium import webdriver from lxml import etree import time,re,random,csv driver_path = r'D:\chromedriver\chromedriver.exe' class BossSpider(object): def __init__(self,writer): self.base_url = 'https://www.zhipin.com' self.url = 'https://www.zhipin.com/job_detail/?query=python&city=10...
rbp123/spiders
boss_spider.py
boss_spider.py
py
4,554
python
en
code
1
github-code
1
30419469650
import requests from bs4 import BeautifulSoup from time import sleep from lxml import html headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" " AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"} def get_url(): for count in range(0,121,20): ...
bogdan-kurbanov/parcer
main.py
main.py
py
1,468
python
en
code
0
github-code
1
43565545552
from django.conf.urls import patterns, include, url, static from django.conf import settings from django.views.generic import TemplateView from django.contrib import admin from django.views.generic import RedirectView from accounts.views import UserProfileUpdateView from django.views.defaults import permission_denied ...
colab/colab
colab/urls.py
urls.py
py
1,586
python
en
code
23
github-code
1
71311124194
import requests from xml.etree import ElementTree class CTAInterface(): def __init__(self, api_key): self.api_key = api_key self.base_url = 'http://lapi.transitchicago.com/api/1.0/ttarrivals.aspx' def get_next_arrivals(self, station_id_list): next_arrivals = list() parameters...
efaurie/cta-train-tracker
src/CTAInterface.py
CTAInterface.py
py
1,311
python
en
code
0
github-code
1
35913684451
# Beautiful Binary String # How many binary characters must you change to remove every occurrence of "010" from a binary string? # # https://www.hackerrank.com/challenges/beautiful-binary-string/problem # # deux opรฉrations suffisent ร  enlever le motif 010 # 01010 -> 01110 # 010 -> 000 # pour dรฉnombrer, il suffit...
rene-d/hackerrank
algorithms/strings/beautiful-binary-string.py
beautiful-binary-string.py
py
837
python
en
code
72
github-code
1
36338664008
#!C:\Python34 #l1 = [int(i) for i in input().split()] l1 = [6, 9 ,2, 3, 5, 8] max_area= 0 #bruit force approach for i in range(0,len(l1)): for j in range(1, len(l1)): height = min(l1[j] ,l1[i]) #print (height) width = j - i area = height * width max_area = max(area, max_area) print (max_area) #Optimal ap...
reshmaladi/Python
Question_solutions/container_with_most_water.py
container_with_most_water.py
py
558
python
en
code
0
github-code
1
18785321963
from django.urls import include, path from rest_framework import routers from . import views router = routers.DefaultRouter() router.register(r'reto', views.RetoViewSet) router.register(r'jugador', views.JugadoresViewSet) router.register(r'usuarios', views.UsuarioViewSet, basename='usuario') router.register(r'partidas...
Aram32mm/tarea1
calculadora/urls.py
urls.py
py
1,688
python
es
code
0
github-code
1
10886136870
from flask import Flask, render_template, request, Response, redirect, url_for , session , jsonify , flash from flask_bootstrap import Bootstrap from object_detection import * import object_detection from flask_sqlalchemy import SQLAlchemy # import sqlalchemy from database import db , Vehicle , DB_Manager import web...
LeandroMartinMacato/SecureV-App
app/app.py
app.py
py
4,819
python
en
code
2
github-code
1
39517310755
import tensorflow from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Conv2D, Flatten # Configuration img_width, img_height = 28, 28 input_shape = (img_width, img_height, 1) batch_size = 1000 no_epochs = 25 no_classes = 10 validation_split = 0.2 verbosity = 1 # Load ...
kadamis/machine_learning_algorithm
ml_tensor.py
ml_tensor.py
py
2,079
python
en
code
1
github-code
1
32109402966
import sys import os import imghdr from PyQt5.QtWidgets import QApplication, QMainWindow, QAction from PyQt5.QtWidgets import QWidget, QDesktopWidget, QMessageBox from PyQt5.QtWidgets import QHBoxLayout, QVBoxLayout, QGridLayout from PyQt5.QtWidgets import QGroupBox, QPushButton, QSlider from PyQt5.QtWidgets import QLa...
laggui/timelapse-processing
timelapse_gui.py
timelapse_gui.py
py
10,427
python
en
code
1
github-code
1
7252872322
# ะขะตัั‚ะธะบะธ import pytest from Project import combination, if_possible, choice_deck, step_success, install_auto_mod, best_consistent_exchange def test_choice_deck(): """ะŸั€ะพะฒะตั€ะบะฐ ะฝะฐะปะธั‡ะธั ะฒัะตั… ะบะฐั€ั‚ ะฒ ะบะพะปะปะพะดะต.""" deck = choice_deck() card1 = {'color': 'ะŸ', 'value': 'ะš'} card2 = {'color': 'ะŸ', 'value': '9'}...
IvanWN/Project-CARD
Tests.py
Tests.py
py
2,625
python
ru
code
0
github-code
1
74178425314
import random handvalues = [] handsymbols = [] valuecomparisons = [] prozent = [] realProbability = [0.000154, 0.00139, 0.0240, 0.1441, 0.1965, 0.3925, 2.1128, 4.7539, 42.2569, 50.1177] statistic = { "Royal Flush": 0, "Straight Flush": 0, "Flush": 0, "Four of a Kind": 0, "Full House": 0, "Strai...
JakobResch/SWP
Poker/Poker_Resch.py
Poker_Resch.py
py
3,340
python
en
code
0
github-code
1
23562269693
from graph_tool.all import Graph,Vertex,graph_draw,radial_tree_layout from GN0.alpha_zero.MCTS_cached import MCTS as MCTS_old,Node,Leafnode,upper_confidence_bound from GN0.alpha_zero.MCTS import MCTS from GN0.alpha_zero.NN_interface import NNetWrapper from graph_game.shannon_node_switching_game import Node_switching_ga...
yannikkellerde/GNN_Hex
GN0/alpha_zero/visualize_MCTS.py
visualize_MCTS.py
py
12,530
python
en
code
0
github-code
1
1316604535
from numpy import ndarray as array, tanh, dot import numpy as np class Layer: N: int v: float weights: array def __init__(self, N: int, v=1.0): self.N = N self.v = v # initial random weight values self.weights = np.random.uniform(size=N) # we...
armand-colin/neural-networks-g12
assignment3/src/layer.py
layer.py
py
438
python
en
code
1
github-code
1
73034000353
# -*- coding: utf-8 -*- ''' Functions used for CLI argument handling ''' from __future__ import absolute_import # Import python libs import re import inspect # Import salt libs from salt.ext.six import string_types, integer_types import salt.ext.six as six #KWARG_REGEX = re.compile(r'^([^\d\W][\w.-]*)=(?!=)(.*)$', r...
shineforever/ops
salt/salt/utils/args.py
args.py
py
5,142
python
en
code
9
github-code
1
3892892938
# # # # # # # #ะ”ะ•ะšะžะ ะะขะžะ ะซ # # # # # # # # # # # # # # from datetime import datetime # # # # # # # # # # # # # # def time(function): # # # # # # # def wrapper(): # # # # # # # start = datetime.now() # # # # # # # function() # # # # # # # end = datetime.now() - start # # # # # # # prin...
baitik07/project1
lection3.py
lection3.py
py
1,989
python
en
code
0
github-code
1
27523461379
minutos=int(input('Minutos: ')) if minutos < 200: Tminutos = 0.2 elif minutos <= 400: Tminutos= 0.18 elif minutos <= 800: Tminutos = 0.15 else: Tminutos= 0.08 print("conta a ser paga : R$ %6.2f " % (minutos * Tminutos)) ### o util do ELIF รฉ que ele nao precisa de identaรงรฃo, igual o if
gracielle-ch/atividades
elif.py
elif.py
py
317
python
pt
code
0
github-code
1
10514583312
import datetime import gym import numpy as np from gym import spaces, error from gym import utils from gym.utils import seeding from entity.time_window import time_window from tool.kuhn_munkras import kuhn_munkras class MatchEnv(gym.Env): def __init__(self, max_car_num=30, max_lp_num=300, time_district_num=12, ma...
KirsVon/DQN-Master
DQN-master/match_env.py
match_env.py
py
2,342
python
en
code
0
github-code
1
14404366448
#!/usr/bin/env python3 #python crawl.py --iocp http://www.website.com/ import asyncio import logging import re import signal import os import sys import urllib.parse import aiohttp @asyncio.coroutine def download(url,data): filename=url.replace('http://','').replace('https://','') path=filename.split('/') ...
wurui1994/record
Python/Spider/asyncio_crawl.py
asyncio_crawl.py
py
3,835
python
en
code
29
github-code
1
31895287133
import plotly.express as px import csv import numpy as np def getDataSource(dataPath): marks = [] days = [] with open(dataPath) as csvFile: reader = csv.DictReader(csvFile) for row in reader: days.append(float(row["Days"])) marks.append(float(row["Marks"])) ret...
advik-2402/P106-Correlation
marksPresent.py
marksPresent.py
py
635
python
en
code
0
github-code
1
24939797081
import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output import pandas as pd import plotly.express as px df = pd.read_csv("../datasets/Los_Angeles_International_Airport_-_Passenger_Traffic_By_Terminal.csv") df['ReportPeriod']=pd.to_datetime(df['Rep...
ucdavis/ECS272-Winter2020
Assignment3/wyin/app.py
app.py
py
2,973
python
en
code
2
github-code
1
34546042808
import re import random def get_response(user_input): split_message = re.split(r'\s|[,:;.?!-_]\s*', user_input.lower()) response = check_all_messages(split_message) return response def message_probability(user_message, recognized_words, single_response=False, required_word=[]): message_certainty = 0 ...
Roberto267/Mi-ChatBot
main.py
main.py
py
2,409
python
en
code
0
github-code
1
22724522902
# class to represent an element of P_n import turtle import math import random class Element: # global variables n = 0 # number of points to compute dist = 150 # distance between points points = [] # points that compose P_n moving = False angle_step = 1 error_margin = 0.01 # cons...
nathanstouffer/topology
P_4/graphv2.py
graphv2.py
py
4,784
python
en
code
0
github-code
1
43673538115
from flask import jsonify, make_response, Blueprint, abort, redirect, request from atexit import register from time import sleep from threading import Thread from flasgger import swag_from import utils import logging import json bp = Blueprint('db', __name__) search_q = utils.RedisQueue('searched') expand_q = utils.R...
Taylorrrr/COMP90024-2020S1-Team22
backend/db.py
db.py
py
2,910
python
en
code
1
github-code
1
70323927393
# -*- coding: utf-8 -*- """ Autoruns 2015 fightnight 2022 bittor7x0""" import xbmc,xbmcvfs,xbmcaddon,xbmcgui,xbmcplugin,urllib.request,urllib.parse,urllib.error,os,re,sys import xml.etree.ElementTree as ET SERVICE_DISABLED = 'Autoruns_service_disabled' def list_addons(): #info directory addDir('...
bittor7x0/kodi.script.autoruns
default.py
default.py
py
4,990
python
en
code
2
github-code
1
73948619555
import matplotlib.patches as patches import matplotlib.pyplot as plt path = [ [.1, .3], [.2, .9], [.8, .4], ] fig = plt.figure() ax = fig.gca() ax.add_patch(patches.Polygon(path)) fig.savefig("triangle_patch.png", dpi=150) plt.close() path = [ [.1, .3], [.2, .9], [.8, .4], ] fig = plt.figure(...
brohrer/taming_matplotlib
patch_examples.py
patch_examples.py
py
552
python
en
code
22
github-code
1
19918807345
import numpy as np import matplotlib.pyplot as plt # 1. Linear regression for classifying noisy data fig, axs = plt.subplots(3) N = 100 # data set size d = 2 # 2 classes of data # Generate random training data X = np.random.uniform(-1, 1, size=(N, d+1)) X[:, 0] = 1 # Calculate weights vector w = np.random....
kromer-creator/Machine-Learning-Projects
Linear Regression, PLA, and Pocket Algorithm/Lab3_Code.py
Lab3_Code.py
py
2,736
python
en
code
0
github-code
1
42469206289
import threading import numpy as np import cv2 import time class CameraReader(threading.Thread): def __init__(self,dev): self.dev = dev self.lock = threading.Lock() self.frame = np.empty((480,640,3), dtype=np.uint8) self.running = False self.cap = None threading.Thr...
olinrobotics/irl
irl_auxiliary_features/irl_stereo/scripts/stereo_utils/camera_reader.py
camera_reader.py
py
1,780
python
en
code
7
github-code
1
3824690503
# -*- coding: utf-8 -*- from ..enums import ScanTypesEnum from ..errors import ClosedProcess from ..process import AbstractProcess from .functions import ( get_memory_regions, read_process_memory, search_addresses_by_value, search_values_by_addresses, write_process_memory ) from typing import Gener...
JeanExtreme002/PyMemoryEditor
PyMemoryEditor/linux/process.py
process.py
py
6,073
python
en
code
20
github-code
1
39674304363
from pymongo import MongoClient import numpy as np import datetime client = MongoClient() db = client.twitter cursor = db.tweets.aggregate( [{ "$project": { "y": { "$year": "$timestamp_obj"}, "m": { "$month": "$timestamp_obj"}, "d": { "$dayOfMonth": "$timestamp_obj" }, ...
Humpheh/twied
scripts/processing/fourier.py
fourier.py
py
2,223
python
en
code
11
github-code
1