seq_id
string
text
string
repo_name
string
sub_path
string
file_name
string
file_ext
string
file_size_in_byte
int64
program_lang
string
lang
string
doc_type
string
stars
int64
dataset
string
pt
string
api
list
70850036705
# coding: utf-8 # In[3]: import json # In[4]: with open('flight.json') as data_file: data = json.load(data_file) # In[5]: ff = data["items"][0]['trips']["tripOption"][0]["slice"][0]["segment"][0]["flight"] # In[6]: str(ff['carrier'])+str(ff['number']) # In[7]: ll = data["items"][0]['trips'][...
Cong-Liu/Flight-Tickets-Shopping-Website
flightparser.py
flightparser.py
py
1,366
python
en
code
0
github-code
7
[ { "api_name": "json.load", "line_number": 12, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 64, "usage_type": "call" } ]
71865396702
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('conteudo', '0003_imagem_title'), ] operations = [ migrations.AlterField( model_name='new', name='tex...
chicosilva/csms
conteudo/migrations/0004_auto_20150515_2228.py
0004_auto_20150515_2228.py
py
423
python
en
code
0
github-code
7
[ { "api_name": "django.db.migrations.Migration", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.db.migrations", "line_number": 7, "usage_type": "name" }, { "api_name": "django.db.migrations.AlterField", "line_number": 14, "usage_type": "call" }, {...
26836881063
from aiogram import Bot, Dispatcher, types from config import Config bot = Bot(Config.TOKEN) dp = Dispatcher(bot) @dp.message_handler() async def echo(message: types.Message): await message.answer(message.text)
FCTL3314/FastApiTgBotWebhook
bot.py
bot.py
py
218
python
en
code
0
github-code
7
[ { "api_name": "aiogram.Bot", "line_number": 4, "usage_type": "call" }, { "api_name": "config.Config.TOKEN", "line_number": 4, "usage_type": "attribute" }, { "api_name": "config.Config", "line_number": 4, "usage_type": "name" }, { "api_name": "aiogram.Dispatcher", ...
9622252878
import numpy as np import cv2 import matplotlib.pyplot as plt from timeit import default_timer as timer # from calibration import load_calibration from copy import copy # left_lane = Lane() # right_lane = Lane() frame_width = 1920 frame_height = 1080 input_scale = 4 output_frame_scale = 4 N = 4 # buffer previous N...
qinggangwu/date_process
lane_detect_process/Lane-warpImage.py
Lane-warpImage.py
py
2,609
python
en
code
1
github-code
7
[ { "api_name": "numpy.floor", "line_number": 27, "usage_type": "call" }, { "api_name": "numpy.float32", "line_number": 27, "usage_type": "call" }, { "api_name": "numpy.floor", "line_number": 28, "usage_type": "call" }, { "api_name": "numpy.float32", "line_numbe...
34383745920
# coding: utf8 import csv from datetime import datetime, timedelta import os class Plant: """Plant actions""" def __init__(self, db_entry, log_filename="Default"): self.log_filename = log_filename self.id = db_entry[0] self.type = db_entry[1] self.temperature = db_entry[2] ...
rambobinator/PlantWatering
plant_class.py
plant_class.py
py
1,236
python
en
code
5
github-code
7
[ { "api_name": "datetime.datetime.strptime", "line_number": 26, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 26, "usage_type": "name" }, { "api_name": "datetime.timedelta", "line_number": 27, "usage_type": "call" }, { "api_name": "datet...
39518732735
import wizwalker import asyncio from threading import Event from wizwalker import Keycode, HotkeyListener, ModifierKeys xyz_list = [] run = True async def startup(): listener = HotkeyListener() p = wizwalker.WizWalker().get_new_clients()[0] async def add_xyz(): global x...
milwrddraig/MillyWWBots
reagentReaderWriter/Writer.py
Writer.py
py
1,316
python
en
code
0
github-code
7
[ { "api_name": "wizwalker.HotkeyListener", "line_number": 9, "usage_type": "call" }, { "api_name": "wizwalker.WizWalker", "line_number": 13, "usage_type": "call" }, { "api_name": "wizwalker.Keycode.K", "line_number": 25, "usage_type": "attribute" }, { "api_name": "...
37653946578
from discord import Embed, message from SnsInfo import SnsInfo DOMAIN_TWITTER = "twitter.com" DOMAIN_X = "x.com" DOMAIN_INSTAGRAM = "instagram.com" DOMAIN_WEVERSE = "weverse.io" DOMAIN_H1KEY = "h1key-official.com" DOMAIN_YEEUN = "yeeun.bstage.in" DOMAIN_PURPLE_KISS = "purplekiss.co.kr" DOMAIN_BSTAGE = [DOMAIN_H1KEY, ...
j19930307/SNS-Bot
discord_bot.py
discord_bot.py
py
2,563
python
en
code
0
github-code
7
[ { "api_name": "SnsInfo.SnsInfo", "line_number": 24, "usage_type": "name" }, { "api_name": "discord.Embed", "line_number": 31, "usage_type": "call" }, { "api_name": "discord.Embed", "line_number": 40, "usage_type": "call" }, { "api_name": "discord.Embed", "line...
42344523934
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Jan 15 13:06:12 2022 @author: rodo """ import pickle import numpy as np import tokenizer_new as tk import argparse # ---------------------- HELPER FUNCTIONS ------------------------------------- # ---------------------- Create N-Grams ----------------...
rodosingh/Intro-NLP-IIITH
Assignments/Assignment-1/2021701010_Assignment1/language_model.py
language_model.py
py
16,151
python
en
code
7
github-code
7
[ { "api_name": "numpy.power", "line_number": 278, "usage_type": "call" }, { "api_name": "numpy.prod", "line_number": 278, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 318, "usage_type": "call" }, { "api_name": "tokenizer_new.Token...
72117996064
from jinja2 import Environment, FileSystemLoader, TemplateNotFound from jinja2.ext import Extension import re import os import pypandoc import paramiko import sys from dotenv import load_dotenv class RelativeInclude(Extension): # This Jinja2 extension Created 2014 by Janusz Skonieczny # Source https://gist.git...
MrJonesAPS/Slides
GenerateSlides.py
GenerateSlides.py
py
7,053
python
en
code
0
github-code
7
[ { "api_name": "jinja2.ext.Extension", "line_number": 10, "usage_type": "name" }, { "api_name": "re.compile", "line_number": 18, "usage_type": "call" }, { "api_name": "dotenv.load_dotenv", "line_number": 36, "usage_type": "call" }, { "api_name": "paramiko.Transport...
43527599384
#!/usr/bin/env python import os activate_this = os.path.expanduser("~/PycharmProjects/DefensicsAutomation/venv/bin/activate_this.py") execfile(activate_this, dict(__file__=activate_this)) from DefensicsScript import * from threading import Thread from datetime import datetime import GlobalVariables import GlobalFuncti...
drozenbx/DefensicsAutomation
Run.py
Run.py
py
5,584
python
en
code
0
github-code
7
[ { "api_name": "os.path.expanduser", "line_number": 3, "usage_type": "call" }, { "api_name": "os.path", "line_number": 3, "usage_type": "attribute" }, { "api_name": "GlobalFunctions.add_port", "line_number": 19, "usage_type": "call" }, { "api_name": "GlobalFunction...
8083174847
import json import sys from markov import Markov from difflib import SequenceMatcher def get_json_object(file, key): with open(file, 'r') as jfile: content = json.load(jfile) return content[key] return None def load_quotes_to_model(file, model): quotes = get_json_object(file, "Quotes") ...
aestuans/Inspirotron
io.py
io.py
py
1,281
python
en
code
1
github-code
7
[ { "api_name": "json.load", "line_number": 8, "usage_type": "call" }, { "api_name": "difflib.SequenceMatcher", "line_number": 18, "usage_type": "call" }, { "api_name": "markov.Markov", "line_number": 21, "usage_type": "call" }, { "api_name": "json.load", "line_...
32422076862
import gc import os import shutil from pathlib import Path from typing import Dict import torch from tqdm import tqdm # code taken from https://github.com/Lightning-AI/lit-llama def convert_state_dict(state_dict: Dict[str, torch.Tensor]) -> Dict[str, torch.Tensor]: converted = {} converted["transformer.wte....
Lightning-AI/Comparing_LLM_Blogpost
Llama/covert_llama_weights.py
covert_llama_weights.py
py
4,452
python
en
code
8
github-code
7
[ { "api_name": "typing.Dict", "line_number": 12, "usage_type": "name" }, { "api_name": "torch.Tensor", "line_number": 12, "usage_type": "attribute" }, { "api_name": "torch.cat", "line_number": 23, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_numb...
71039981983
# MiniLight Python : minimal global illumination renderer # # Harrison Ainsworth / HXA7241 and Juraj Sukop : 2007-2008, 2013. # http://www.hxa.name/minilight from .spatialindex import SpatialIndex from .triangle import Triangle from .vector3f import Vector3f, ZERO, ONE, MAX import re SEARCH = re.compile('(\(.+\))...
golemfactory/clay
golem/envs/docker/benchmark/cpu/minilight/src/scene.py
scene.py
py
2,094
python
en
code
2,915
github-code
7
[ { "api_name": "re.compile", "line_number": 12, "usage_type": "call" }, { "api_name": "vector3f.ZERO", "line_number": 26, "usage_type": "argument" }, { "api_name": "vector3f.MAX", "line_number": 26, "usage_type": "argument" }, { "api_name": "vector3f.Vector3f", ...
36971838049
from PIL import ImageFont, ImageDraw, Image hangulJamosRange = (0x1100, 0x11ff) hangulSyllablesRange = (0xAC00, 0xD7AF) # germanUmlauts = [0x00C4, 0x00E4, 0x00D6, 0x00F6, 0x00DX, 0x00FC, 0x1E9E, 0x00DF] print("""Amazfit Bip(米动手表 青春版) 한글 비트맵 이미지 생성기\n ©2018 Youngbin Han(sukso96100@gmail.com)\n 이 스크립트는 한글 자...
sukso96100/amazfit-bip-kr
ttf2bmp.py
ttf2bmp.py
py
1,809
python
en
code
34
github-code
7
[ { "api_name": "PIL.Image.new", "line_number": 19, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 19, "usage_type": "name" }, { "api_name": "PIL.ImageDraw.Draw", "line_number": 20, "usage_type": "call" }, { "api_name": "PIL.ImageDraw", "line_...
42566295603
from tkinter import * from tkinter import ttk from tkinter import messagebox from IPython.display import Image import ast import os import openpyxl filepath = "D:\AppForm\data.xlsx" def enter_data(): # User info title = title_combobox.get() name = en1.get() contact = en3.get() if name and co...
RimoGuin/ApplicationForm
appform_withexcel.py
appform_withexcel.py
py
6,362
python
en
code
0
github-code
7
[ { "api_name": "os.path.exists", "line_number": 35, "usage_type": "call" }, { "api_name": "os.path", "line_number": 35, "usage_type": "attribute" }, { "api_name": "openpyxl.Workbook", "line_number": 36, "usage_type": "call" }, { "api_name": "openpyxl.load_workbook"...
36755349446
import random import pandas as pd import numpy as np import argparse parser = argparse.ArgumentParser() parser.add_argument('-path_to_csv', type=str) parser.add_argument('-sample_type', type=str, choices=["balanced", "random"]) args = parser.parse_args() lo_elbos = pd.read_csv(args.path_to_csv)['test_loss'].dr...
seblee97/inference_suboptimality
utils/local_optimisation_analysis.py
local_optimisation_analysis.py
py
2,091
python
en
code
4
github-code
7
[ { "api_name": "argparse.ArgumentParser", "line_number": 7, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.mean", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.std", "li...
37025780529
from django import forms from listings.models import Listings from categories.models import SubCategories, Categories from general.util import rotate_image from general.forms import PhotoInput class ListingsForms(forms.ModelForm): categories = forms.ModelChoiceField(queryset=Categories.objects.all(), ...
DevFamily99/villages-django
listings/forms.py
forms.py
py
1,837
python
en
code
0
github-code
7
[ { "api_name": "django.forms.ModelForm", "line_number": 9, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 9, "usage_type": "name" }, { "api_name": "categories.models", "line_number": 10, "usage_type": "name" }, { "api_name": "django.forms...
20208056488
from pathlib import Path import matplotlib.pyplot as plt def set_matplotlib_dpi(dpi: int = 300): plt.rcParams['figure.dpi'] = dpi plt.rcParams['savefig.dpi'] = dpi def save_figure(fig: plt.Figure, output_filepath: Path): set_matplotlib_dpi() output_filepath.parent.mkdir(parents=True, exist_ok=True)...
Xalanot/math_blog
math_blog/plotting/io.py
io.py
py
459
python
en
code
0
github-code
7
[ { "api_name": "matplotlib.pyplot.rcParams", "line_number": 7, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 7, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.rcParams", "line_number": 8, "usage_type": "attribute" }, { "ap...
10409007940
#Results from the scans will indicate just host up if it returns negative, but will state Vulnerable if targetable. #This will create a directory in linux for the particular IP, and then create a total output file and vulnerability summary .txts #version 1.1 import argparse import os import subprocess from subp...
KennethCurtis/Python-Codes
smbvuln.py
smbvuln.py
py
2,107
python
en
code
0
github-code
7
[ { "api_name": "argparse.ArgumentParser", "line_number": 23, "usage_type": "call" }, { "api_name": "os.system", "line_number": 26, "usage_type": "call" }, { "api_name": "subprocess.Popen", "line_number": 31, "usage_type": "call" }, { "api_name": "subprocess.PIPE", ...
22415981592
""" Author: Reuben Ferrante Date: 10/05/2017 Description: NN layer helper functions, normalization. """ import tensorflow as tf import sklearn.preprocessing import numpy as np def layer(input_layer, num_next_neurons, is_output=False, activation=tf.nn.relu): num_prev_neurons = int(input_layer.shape[1]) shap...
arex18/rocket-lander
control_and_ai/DDPG/utils.py
utils.py
py
2,273
python
en
code
298
github-code
7
[ { "api_name": "tensorflow.nn", "line_number": 12, "usage_type": "attribute" }, { "api_name": "tensorflow.get_variable", "line_number": 16, "usage_type": "call" }, { "api_name": "tensorflow.contrib.layers.xavier_initializer", "line_number": 16, "usage_type": "call" }, ...
38790248305
from numpy import where from sklearn.datasets import make_classification from matplotlib import pyplot import sklearn print(sklearn.__version__) # 使用make _ classification()函数创建一个测试二分类数据集。 # 这将有助于了解,至少在测试问题上,群集的识别能力如何。该测试问题中的群集基于多变量高斯,并非所有聚类算法都能有效地识别这些类型的群集。 # 因此,本教程中的结果不应用作比较一般方法的基础。下面列出了创建和汇总合成聚类数据集的示例。 # 综合分类数据集 # 定...
fangyinjie/python_study
Python学习/QMDJ/聚类算法/2_聚类数据集.py
2_聚类数据集.py
py
1,501
python
zh
code
0
github-code
7
[ { "api_name": "sklearn.__version__", "line_number": 5, "usage_type": "attribute" }, { "api_name": "sklearn.datasets.make_classification", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.where", "line_number": 22, "usage_type": "call" }, { "api_name...
32225464763
""" https://docs.djangoproject.com/en/2.2/topics/db/models/ External API response caching """ import json import pprint import requests import time import uuid from django.conf import settings from django.db import models from ..fields import DateTimeFieldWithoutMicroseconds class ExternalResponse(models.Model):...
AmalgamProjects/flixfinder-backend
src/ff_api/models/external.py
external.py
py
1,525
python
en
code
0
github-code
7
[ { "api_name": "django.db.models.Model", "line_number": 20, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 20, "usage_type": "name" }, { "api_name": "django.db.models.UUIDField", "line_number": 21, "usage_type": "call" }, { "api_name"...
40017286488
import webbrowser import pyautogui as gui # pip install pyautogui import time import random gui.FAILSAFE = False random.seed() #Change to your gmail acct url url = 'https://mail.google.com/mail/u/2/#inbox' # MacOS # chrome_path = 'open -a /Applications/Google\ Chrome.app %s' # Windows chrome_path =...
josephfrench/holly
holly.py
holly.py
py
1,392
python
en
code
0
github-code
7
[ { "api_name": "pyautogui.FAILSAFE", "line_number": 6, "usage_type": "attribute" }, { "api_name": "random.seed", "line_number": 7, "usage_type": "call" }, { "api_name": "webbrowser.get", "line_number": 24, "usage_type": "call" }, { "api_name": "time.sleep", "li...
5497735059
from tika import parser import os import re raw = parser.from_file("report.pdf") with open(f"out.csv", "w") as fh: fh.write(raw["content"]) with open("out.csv") as fh: lines = [line.strip() for line in fh.readlines() if line.strip()] full_output = "" output = "" which = "" file_idx = 0 for idx...
zhecht/fantasy
z.py
z.py
py
1,063
python
en
code
0
github-code
7
[ { "api_name": "tika.parser.from_file", "line_number": 8, "usage_type": "call" }, { "api_name": "tika.parser", "line_number": 8, "usage_type": "name" }, { "api_name": "re.search", "line_number": 36, "usage_type": "call" } ]
29856637258
import os import rsatool.rsatool as rsatool import configparser config = configparser.ConfigParser() config.read('.env') modulus = config['rsa_data']['MODULUS'] hex_start = config['rsa_data']['START_D'] publicExponent = config['rsa_data']['PUBLIC_EXP'] start_range = config['enum_var']['START'] end_range = config['en...
Altizo/privatEXp_GEN
keygen.py
keygen.py
py
2,183
python
en
code
0
github-code
7
[ { "api_name": "configparser.ConfigParser", "line_number": 6, "usage_type": "call" }, { "api_name": "os.system", "line_number": 16, "usage_type": "call" }, { "api_name": "os.name", "line_number": 16, "usage_type": "attribute" }, { "api_name": "rsatool.rsatool.RSA",...
73838422624
#!/usr/bin/env python # download.py: download literally everything from S3: all buckets, all files # use with caution from boto.s3.connection import S3Connection from cloudfile.config import config from cloudfile.util import gen_md5 from os import makedirs, mkdir, remove from os.path import dirname, isdir, isfile, jo...
ITPNYU/cloudfile
download.py
download.py
py
1,623
python
en
code
1
github-code
7
[ { "api_name": "boto.s3.connection.S3Connection", "line_number": 13, "usage_type": "call" }, { "api_name": "cloudfile.config.config.get", "line_number": 13, "usage_type": "call" }, { "api_name": "cloudfile.config.config", "line_number": 13, "usage_type": "name" }, { ...
3057369690
import os import sys import requests import click import json from tqdm import tqdm from datetime import date from ansimarkup import ansiprint as print from app.export import export_date_medici url_root = '' @click.command() @click.option('--api', default='http://localhost:5000', help="root url api\ndefault: http:/...
Miu-Catalin/get_medic_data
app/__init__.py
__init__.py
py
5,076
python
en
code
0
github-code
7
[ { "api_name": "app.export.export_date_medici", "line_number": 29, "usage_type": "call" }, { "api_name": "click.command", "line_number": 14, "usage_type": "call" }, { "api_name": "click.option", "line_number": 15, "usage_type": "call" }, { "api_name": "click.option...
1028673967
#!/usr/bin/env micropython """ MIT license (C) Konstantin Belyalov 2017-2018 """ import esp32 import uasyncio as asyncio import neopixel import logging import machine import network import socket from machine import Pin, I2C import micropython from time import sleep import time from ntptime import settime import gc...
perdue12/JakeLights
AsyncTW/main.py
main.py
py
6,392
python
en
code
0
github-code
7
[ { "api_name": "logging.basicConfig", "line_number": 28, "usage_type": "call" }, { "api_name": "logging.ERROR", "line_number": 28, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 29, "usage_type": "call" }, { "api_name": "neopixel.Neo...
21143493376
# Class for generating counterfactuals for a set of factuals. # Heavily based on and inspired by mccepy/mcce.MCCE, # modified for our case with three different generative models, where only MCCE samples conditionally from the latent distribution. # Parts of the methods are simply copied from the file indicated above....
alexaoh/tabular-diffusion-for-counterfactuals
ModifiedMCCE.py
ModifiedMCCE.py
py
13,691
python
en
code
0
github-code
7
[ { "api_name": "re.search", "line_number": 43, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 52, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 57, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": ...
14533684467
from requests import get from bs4 import BeautifulSoup import csv from datetime import datetime import time import re # Lista todas a votações da camara dados_governismo = [['Data','votos_a_favor_gov','id']] dados_prop = [] errors = ['n','id','tipo_do_erro'] # le os dados da planilha com todas as votacoes...
marcoaurelioguerrap/projetos
DataScraping/Governismo Camara/scrap camara.py
scrap camara.py
py
5,154
python
pt
code
0
github-code
7
[ { "api_name": "csv.DictReader", "line_number": 16, "usage_type": "call" }, { "api_name": "time.time", "line_number": 21, "usage_type": "call" }, { "api_name": "time.time", "line_number": 24, "usage_type": "call" }, { "api_name": "time.time", "line_number": 33,...
3949621171
from defenders.defender_base import DefenderBase import sys import numpy as np import torch import torchvision import torchvision.transforms as transforms import torch.nn as nn import torch.nn.functional as F import torch.nn.utils.rnn as rnn_utils import torch.optim as optim import matplotlib.pyplot as plt import time...
yishen734/ensemble-adversarial-training
defenders/fgsm_AT.py
fgsm_AT.py
py
10,366
python
en
code
3
github-code
7
[ { "api_name": "torch.cuda.is_available", "line_number": 20, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 20, "usage_type": "attribute" }, { "api_name": "torch.device", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.random.see...
14198973235
# from pudb import set_trace; set_trace() from typing import List from collections import Counter class Solution: def largestWordCount(self, messages: List[str], senders: List[str]) -> str: """Use counter. Very straightforward. O(N), 610 ms, faster than 53.30% """ counter = Counte...
FanchenBao/leetcode
LeetCode_2284.py
LeetCode_2284.py
py
1,028
python
en
code
1
github-code
7
[ { "api_name": "typing.List", "line_number": 7, "usage_type": "name" }, { "api_name": "collections.Counter", "line_number": 12, "usage_type": "call" } ]
38495375884
##___________________Library_____________________## import telebot import time import json import requests import pandas as pd from datetime import datetime import random import numpy as np import os import sys from flask import Flask, request ##___________________Bot_Confirmation______________________#...
loobiish/Telegram_Job_bot
job_bot.py
job_bot.py
py
20,595
python
en
code
0
github-code
7
[ { "api_name": "telebot.TeleBot", "line_number": 19, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 20, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 48, "usage_type": "call" }, { "api_name": "json.loads", "line_numbe...
1808553478
from django.shortcuts import render from django.contrib.auth.models import User from .models import Chirp # Create your views here. from django.http import HttpResponse def index(request): all_chirps = Chirp.objects.order_by('-posted_date') context = { 'all_chirps': all_chirps[:8] } if req...
PdxCodeGuild/class_orchid
code/jordyn/django/lab03/chirp/forum/views.py
views.py
py
1,004
python
en
code
1
github-code
7
[ { "api_name": "models.Chirp.objects.order_by", "line_number": 11, "usage_type": "call" }, { "api_name": "models.Chirp.objects", "line_number": 11, "usage_type": "attribute" }, { "api_name": "models.Chirp", "line_number": 11, "usage_type": "name" }, { "api_name": "...
74728550622
#! python3 """ Puzzle link: https://adventofcode.com/2022/day/1 """ import os from collections import Counter def main(filename): """Find the total calorie amount of the top three elves carrying the highest total calories.""" script_dir = os.path.dirname(__file__) file_path = os.path.join(script_dir, fil...
kmcginn/advent-of-code
2022/day01/calories2.py
calories2.py
py
787
python
en
code
0
github-code
7
[ { "api_name": "os.path.dirname", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path", "line_number"...
13707448277
from flask import Flask, request from flask_cors import CORS import sys import StoreManager app = Flask(__name__) CORS(app) @app.route('/stores/',methods=['GET']) def GetStores(): query = '' alt = request.args.get("alt", '32.0879122') lng = request.args.get("lng", '34.7724783') chain= req...
lr185108/PayloadInStore
Python/StoreAPI.py
StoreAPI.py
py
607
python
en
code
0
github-code
7
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "flask_cors.CORS", "line_number": 7, "usage_type": "call" }, { "api_name": "flask.request.args.get", "line_number": 12, "usage_type": "call" }, { "api_name": "flask.request.args",...
7125534847
import uuid import json class Assessment: def __init__(self, email, startTime, deadlineTime, endTime): self.email = email self.assessment_key = str(uuid.uuid4()) #Create unique key self.startTime = startTime self.deadlineTime = deadlineTime self.endTime = endTime de...
elMolda/AssessmentsAPI
Code/Entities/Assessment.py
Assessment.py
py
601
python
en
code
0
github-code
7
[ { "api_name": "uuid.uuid4", "line_number": 6, "usage_type": "call" } ]
25948524710
from flask import abort, current_app, g from ...services.news import service as news_service from ...util.framework.blueprint import create_blueprint from ...util.templating import templated blueprint = create_blueprint('news', __name__) @blueprint.route('/', defaults={'page': 1}) @blueprint.route('/pages/<int:pag...
agreements/byceps
byceps/blueprints/news/views.py
views.py
py
974
python
en
code
null
github-code
7
[ { "api_name": "util.framework.blueprint.create_blueprint", "line_number": 8, "usage_type": "call" }, { "api_name": "flask.g.party", "line_number": 16, "usage_type": "attribute" }, { "api_name": "flask.g", "line_number": 16, "usage_type": "name" }, { "api_name": "s...
2455533304
import matplotlib.pyplot as plt import numpy as np import sys import os fp = open("../aux/sym-op.dat", "r") num_sym_op = np.int(fp.readline().strip()) sym_op = np.zeros((num_sym_op, 9)) for i in range(num_sym_op): sym_op[i] = np.copy(np.array(fp.readline().split()).astype(np.double)) fp.close() fp = open("../aux/...
tl578/EMC-for-SMX
cal-CC/cal-CC.py
cal-CC.py
py
5,505
python
en
code
0
github-code
7
[ { "api_name": "numpy.int", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.copy", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 10, ...
22415992405
# -*- coding: utf-8 -*- """ Created on Mon Oct 14 00:42:08 2019 @author: Martin Kamp Dalgaard """ import numpy as np import pandas as pd from scipy.interpolate import InterpolatedUnivariateSpline import scipy.special as scp_sp from scipy import stats from sklearn.linear_model import LinearRegression impo...
mkdalgaard/Masters-Thesis-Software
library.py
library.py
py
15,864
python
en
code
0
github-code
7
[ { "api_name": "numpy.shape", "line_number": 38, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 39, "usage_type": "call" }, { "api_name": "numpy.random.multivariate_normal", "line_number": 48, "usage_type": "call" }, { "api_name": "numpy.r...
18861060563
def CPVALPSO(ParticleDirectory,Iteration,Parameter, VN,FileName,MaxB,MinB): from RiverCon import RiverCon from btn import btn from dsp import dsp from Pval import Pval from rct import rct from SWAT_edit import SWAT_edit from collections import Counter from DirSM import DirSM from GWD...
Vahidr32/SWAT-MODFLOW-RT3D-calibration-code-with-MMPSO-approach-
CPVALPSO.py
CPVALPSO.py
py
4,331
python
en
code
0
github-code
7
[ { "api_name": "collections.Counter", "line_number": 11, "usage_type": "call" }, { "api_name": "DirSM.DirSM", "line_number": 12, "usage_type": "call" }, { "api_name": "GWDelay.GWDelay", "line_number": 14, "usage_type": "call" }, { "api_name": "btn.btn", "line_n...
70368775265
import requests from lxml import etree import base64 import time # 如果搜索结果多执行 def Multiple(Judge_page,coding,headers,Cookie,speed): print("搜索结果有" + Judge_page + "页") for all in range(1,int(Judge_page)): time.sleep(speed) print("现在提取是第"+str(all)+"页") html = requests.get('https://fofa.s...
Zhao-sai-sai/Infiltration_script
fofa子域名探测/fofa.py
fofa.py
py
2,373
python
en
code
17
github-code
7
[ { "api_name": "time.sleep", "line_number": 12, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 14, "usage_type": "call" }, { "api_name": "lxml.etree.HTML", "line_number": 15, "usage_type": "call" }, { "api_name": "lxml.etree", "line_number...
8049447627
""" Solver of Black-Scholes PDE using BSDE method or L2-projection of X_T to approximate the conditional expecation E(X_T | F_t) """ import torch import torch.nn as nn import numpy as np import argparse import tqdm import os import math import pandas as pd from lib.bsde_risk_neutral_measure import FBSDE_BlackScholes ...
msabvid/Deep-PDE-Solvers
pde_BlackScholes_exchange.py
pde_BlackScholes_exchange.py
py
8,723
python
en
code
9
github-code
7
[ { "api_name": "torch.randn", "line_number": 24, "usage_type": "call" }, { "api_name": "torch.exp", "line_number": 25, "usage_type": "call" }, { "api_name": "math.sqrt", "line_number": 25, "usage_type": "call" }, { "api_name": "torch.ones", "line_number": 27, ...
71199728545
# -*- coding: utf-8 -*- """ File: util.py Purpose: This file contains some useful and essential function utilities. This is the applications utilities. """ import re import os import shutil import smtplib import socket import struct import redis import json import pwd import grp import os import hashlib from date...
elysiaxx/gsm-backend
utils/util.py
util.py
py
32,125
python
en
code
0
github-code
7
[ { "api_name": "hashlib.sha224", "line_number": 52, "usage_type": "call" }, { "api_name": "hashlib.sha224", "line_number": 63, "usage_type": "call" }, { "api_name": "hashlib.md5", "line_number": 68, "usage_type": "call" }, { "api_name": "datetime.datetime.now", ...
627651461
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' 产生全部的网格 从左下开始 ''' from gridMap import varGlobal import json from gridMap import gridmap import csv # 纬度从上到下变小,经度从左往右变大 # 1存的是小值,2存的是大值 def generateGrid(): l = [] for i in range(1,varGlobal.COUNTCELL+1): r = gridmap.getBord...
DoubleLingL/Mycode
GridMap/gridMap/DrawGuiYangGrid.py
DrawGuiYangGrid.py
py
1,284
python
en
code
0
github-code
7
[ { "api_name": "gridMap.varGlobal.COUNTCELL", "line_number": 23, "usage_type": "attribute" }, { "api_name": "gridMap.varGlobal", "line_number": 23, "usage_type": "name" }, { "api_name": "gridMap.gridmap.getBorderByGridId", "line_number": 24, "usage_type": "call" }, { ...
38130426425
from floodsystem.stationdata import build_station_list, update_water_levels from floodsystem import flood import matplotlib from floodsystem.datafetcher import fetch_measure_levels import datetime from floodsystem.analysis import polyfit def get_at_risk_towns(risk_thresholds,predictionAmount,N): """Print a l...
ashJA65/FloodWarning
Task2G.py
Task2G.py
py
4,479
python
en
code
0
github-code
7
[ { "api_name": "floodsystem.stationdata.build_station_list", "line_number": 22, "usage_type": "call" }, { "api_name": "floodsystem.stationdata.update_water_levels", "line_number": 23, "usage_type": "call" }, { "api_name": "floodsystem.flood.stations_highest_rel_level", "line_n...
41710095420
# program to store the content thats loaded from various server #into a local binary file knows as pickle import pandas as pd import quandl import pickle import matplotlib.pyplot as plt from matplotlib import style style.use('fivethirtyeight') house_data_list = ['GICHSGFIN','GANESHHOUC','IBULHSGFIN'] #store the api ...
mon7792/DataAnalysisPythonPandas
resampling.py
resampling.py
py
1,635
python
en
code
0
github-code
7
[ { "api_name": "matplotlib.style.use", "line_number": 9, "usage_type": "call" }, { "api_name": "matplotlib.style", "line_number": 9, "usage_type": "name" }, { "api_name": "pandas.DataFrame", "line_number": 20, "usage_type": "call" }, { "api_name": "pandas.DataFrame...
5524457512
import numpy as np import subprocess import tempfile import sys, os from ParamFunhouse import ParamFunhouse import GA_Tuner as GT import Repository as REPO problemCard = sys.argv[1] #e.g. test1.wcard timeout = sys.argv[2] #e.g. 2 (seconds) timeoutIt = eval(timeout)/20 pf = ParamFunhouse() def main(): repo = ...
joshrosie/HyperparameterOptimiser
src/wrapper.py
wrapper.py
py
3,746
python
en
code
0
github-code
7
[ { "api_name": "sys.argv", "line_number": 10, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 11, "usage_type": "attribute" }, { "api_name": "ParamFunhouse.ParamFunhouse", "line_number": 14, "usage_type": "call" }, { "api_name": "Repository.Re...
15882420967
from django.conf.urls import url from django.urls import path from . import views urlpatterns = [ url(r"^nosotros/$", views.nosotros, name = "nosotros"), url(r"^contacto/$", views.contacto, name = "contacto"), url(r"^login/$", views.ingresar, name = "login"), url(r"^registro/$", views.registrar, name =...
raulignacio710/MusicaWeb
instrumentalstore/sistema/urls.py
urls.py
py
1,059
python
en
code
0
github-code
7
[ { "api_name": "django.conf.urls.url", "line_number": 6, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 7, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 8, "usage_type": "call" }, { "api_name": "django.co...
4393600287
import datetime import json import random from unittest import mock from unittest.mock import patch from django.contrib import messages from django.contrib.auth.models import User from django.contrib.messages import get_messages from django.core.cache import cache from django.core.files.uploadedfile import SimpleUploa...
uclouvain/osis-continuing-education
tests/views/test_admission.py
test_admission.py
py
29,611
python
en
code
1
github-code
7
[ { "api_name": "django.test.TestCase", "line_number": 47, "usage_type": "name" }, { "api_name": "base.tests.factories.academic_year.create_current_academic_year", "line_number": 50, "usage_type": "call" }, { "api_name": "base.tests.factories.education_group.EducationGroupFactory",...
71617341344
import numpy as np import tensorflow as tf from datetime import datetime import os import sys import json sys.path.append('../') import retriever cdnd_dir = os.path.dirname(os.path.realpath(__file__)) vocab_file = cdnd_dir+'/data/metadata/w2v_vocab.json' embed_path = cdnd_dir+'/data/metadata/w2v.bin' class Model()...
aSheffer/CDN
CDND.py
CDND.py
py
27,198
python
en
code
0
github-code
7
[ { "api_name": "sys.path.append", "line_number": 7, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_numbe...
28673494710
import logging from datetime import datetime from apscheduler.schedulers.blocking import BlockingScheduler from apscheduler.triggers.cron import CronTrigger from django.conf import settings from django.core.mail import mail_managers, EmailMultiAlternatives from django.core.management.base import BaseCommand from djang...
ctulhufromrlieh/SF_D_NewsPortal
NewsPortal/news/management/commands/runapscheduler.py
runapscheduler.py
py
2,478
python
en
code
0
github-code
7
[ { "api_name": "logging.getLogger", "line_number": 18, "usage_type": "call" }, { "api_name": "django_apscheduler.models.DjangoJobExecution.objects.filter", "line_number": 23, "usage_type": "call" }, { "api_name": "django_apscheduler.models.DjangoJobExecution.objects", "line_nu...
6553842598
## ## import logging import os import configparser from typing import Union, List from azure.identity import AzureCliCredential from azure.mgmt.compute import ComputeManagementClient from azure.mgmt.network import NetworkManagementClient from azure.mgmt.resource.resources import ResourceManagementClient from azure.mgm...
mminichino/couch-formation-core
couchformation/azure/driver/base.py
base.py
py
8,970
python
en
code
0
github-code
7
[ { "api_name": "logging.getLogger", "line_number": 18, "usage_type": "call" }, { "api_name": "logging.NullHandler", "line_number": 19, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 20, "usage_type": "call" }, { "api_name": "logging.ERROR...
21073367766
import math import sys import six import time import numpy as np import tensorflow as tf import tf_extended as tfe import tf_utils from tensorflow.python.framework import ops from datasets import dataset_factory from nets import nets_factory from preprocessing import preprocessing_factory from nets import np_methods ...
deeplearningfromscratch/HRSSD
eval_ssd_network_np.py
eval_ssd_network_np.py
py
9,785
python
en
code
0
github-code
7
[ { "api_name": "tensorflow.contrib", "line_number": 17, "usage_type": "attribute" }, { "api_name": "tensorflow.enable_eager_execution", "line_number": 18, "usage_type": "call" }, { "api_name": "tensorflow.app.flags.DEFINE_float", "line_number": 30, "usage_type": "call" }...
29534141231
import cv2, imutils, os import numpy as np import matplotlib.pyplot as plt wait = 1 def stitch(prev, im, result, posx,posy, ratio=0.75, reprojThresh=4.0, show=False): offsetx,offsety,H = generate_homography(prev,im) posx+=offsetx posy-=offsety print(posx,posy) if(offsetx>0): print('right') elif(offsetx<0)...
hgrov52/Hockey-Analytics
code/research code/panorama/camera_stitch.py
camera_stitch.py
py
6,374
python
en
code
0
github-code
7
[ { "api_name": "cv2.imshow", "line_number": 32, "usage_type": "call" }, { "api_name": "cv2.imshow", "line_number": 33, "usage_type": "call" }, { "api_name": "cv2.waitKey", "line_number": 34, "usage_type": "call" }, { "api_name": "cv2.destroyAllWindows", "line_n...
13801902339
import http.server import socketserver import subprocess import urllib.parse PORT = 2728 class MyHandler(http.server.BaseHTTPRequestHandler): def do_GET(self): if self.path == '/': self.send_response(200) self.send_header('Content-type', 'text/html') self.end_headers() ...
imalka9879/server
server.py
server.py
py
1,951
python
en
code
0
github-code
7
[ { "api_name": "http.server.server", "line_number": 8, "usage_type": "attribute" }, { "api_name": "http.server", "line_number": 8, "usage_type": "name" }, { "api_name": "urllib.parse.parse.parse_qs", "line_number": 25, "usage_type": "call" }, { "api_name": "urllib....
24575540546
# Python bytecode 3.8 (3413) import threading, requests, discord, random, time, os, urllib, re, json from urllib.request import Request, urlopen from colorama import Fore, init from selenium import webdriver from datetime import datetime from itertools import cycle from discord.ext import commands def version(): c...
Leaked0/presence1337
discord token raper/main.py
main.py
py
16,831
python
en
code
4
github-code
7
[ { "api_name": "urllib.request.urlopen", "line_number": 13, "usage_type": "call" }, { "api_name": "urllib.request", "line_number": 13, "usage_type": "attribute" }, { "api_name": "urllib.request.urlretrieve", "line_number": 20, "usage_type": "call" }, { "api_name": ...
36755346756
import torch import torchvision from .custom_torch_transforms import TensorFlatten import os import numpy as np def mnist_dataloader(data_path: str, batch_size: int, train:bool=True): """ Load mnist image data from specified, convert to grayscaled (then binarised) tensors, flatten, return dataloader :para...
seblee97/inference_suboptimality
utils/dataloaders.py
dataloaders.py
py
6,255
python
en
code
4
github-code
7
[ { "api_name": "torchvision.transforms.Compose", "line_number": 17, "usage_type": "call" }, { "api_name": "torchvision.transforms", "line_number": 17, "usage_type": "attribute" }, { "api_name": "torchvision.transforms.Grayscale", "line_number": 18, "usage_type": "call" }...
74148739423
# -*- coding: utf-8 -*- # CDICALC: calculator for coherent X-ray diffraction imaging experiments # authors: # Jerome Carnis, carnis_jerome@yahoo.fr """Model to handle the calculations in the secondary source tab.""" import logging from cdicalc.models.model import Model from cdicalc.resources.constants ...
carnisj/cdicalc
cdicalc/models/model_coherence.py
model_coherence.py
py
6,038
python
en
code
1
github-code
7
[ { "api_name": "logging.getLogger", "line_number": 17, "usage_type": "call" }, { "api_name": "cdicalc.models.model.Model", "line_number": 20, "usage_type": "name" }, { "api_name": "cdicalc.utils.snippets_quantities.CallbackParams", "line_number": 25, "usage_type": "name" ...
31321242785
#!/usr/bin/env python """ CONTROL DE UN ROBOT MOVIL UTILIZANDO LOCALIZACION POR QR Carmen Ballester Bernabeu Grupo Aurova Universidad de Alicante """ from sys import exit import numpy as np import math import matplotlib.pyplot as plt import cv2 # Libraries for ROS import rospy from geometry_msgs.msg import Pose f...
carmenballester/robot_location
src/qr_robot_control/src/mark_sim.py
mark_sim.py
py
8,932
python
en
code
1
github-code
7
[ { "api_name": "math.atan2", "line_number": 81, "usage_type": "call" }, { "api_name": "math.asin", "line_number": 87, "usage_type": "call" }, { "api_name": "math.atan2", "line_number": 92, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.style.context", ...
29091448078
import scrapy from scrapy.spiders.crawl import Rule, CrawlSpider from scrapy.linkextractors import LinkExtractor class ArticleSpider(scrapy.Spider): name="article" allowed_domains = ["en.wikipedia.org"] start_urls = ["http://en.wikipedia.org/wiki/Python_%28programming_language%29"] rules = [Rule(SgmlLin...
hun0905/project_file
python_c/practice/request.py
request.py
py
638
python
en
code
0
github-code
7
[ { "api_name": "scrapy.Spider", "line_number": 4, "usage_type": "attribute" }, { "api_name": "scrapy.spiders.crawl.Rule", "line_number": 8, "usage_type": "call" } ]
18268238460
import sys, os import argparse parser = argparse.ArgumentParser( description='Train a new network on a data set') # Compulsory command: python train.py data_directory parser.add_argument('data_directory', action="store",type = str,help="Set a data directory to train the model on") # Option 1 : Set directwersory ...
henribxn/udacityproject_term1
image_recognition/train.py
train.py
py
2,200
python
en
code
0
github-code
7
[ { "api_name": "argparse.ArgumentParser", "line_number": 4, "usage_type": "call" }, { "api_name": "os.system", "line_number": 34, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 34, "usage_type": "attribute" } ]
20710849768
from sqlalchemy import select from db_models import CustomerTable, PersonTable from linking_tables import CustomerPeopleLinking from person import Person as p from main import session class Customers: @staticmethod def create_customer(person_id, is_guest): customer = CustomerTable(person_id=person_id,...
swertheim1/630-Obj-Oriented-Software-Arch
Week_8/Hotel_Management_System/customer.py
customer.py
py
4,643
python
en
code
0
github-code
7
[ { "api_name": "db_models.CustomerTable", "line_number": 11, "usage_type": "call" }, { "api_name": "main.session.add_all", "line_number": 12, "usage_type": "call" }, { "api_name": "main.session", "line_number": 12, "usage_type": "name" }, { "api_name": "main.sessio...
31340877184
from discord.ext.commands import Context from discord.ext import commands import discord from bot import Waifu from inspect import Parameter from datetime import datetime import asyncio class Tag(commands.Cog): def __init__(self, bot: Waifu): self.bot = bot @commands.group(invoke_without_command=T...
Espiobest/DiscordBot
cogs/tags.py
tags.py
py
7,948
python
en
code
2
github-code
7
[ { "api_name": "discord.ext.commands.Cog", "line_number": 12, "usage_type": "attribute" }, { "api_name": "discord.ext.commands", "line_number": 12, "usage_type": "name" }, { "api_name": "bot.Waifu", "line_number": 14, "usage_type": "name" }, { "api_name": "discord....
74224055904
import pandas as pd from sklearn.base import BaseEstimator, TransformerMixin class TimeTransformer(BaseEstimator, TransformerMixin): def __init__(self, time_column, zone='America/New_York'): self.time_column = time_column self.zone = zone def transform(self, X, y=None): assert isin...
gmanchon/wagon-data-template
project/trainer/transformers/time_transformer.py
time_transformer.py
py
707
python
en
code
0
github-code
7
[ { "api_name": "sklearn.base.BaseEstimator", "line_number": 7, "usage_type": "name" }, { "api_name": "sklearn.base.TransformerMixin", "line_number": 7, "usage_type": "name" }, { "api_name": "pandas.DataFrame", "line_number": 14, "usage_type": "attribute" }, { "api_...
8875557293
from getmac import get_mac_address import serial.tools.list_ports import yaml import pandas as pd # Change Accordingly mintsDefinitions = yaml.load(open('mintsXU4/credentials/mintsDefinitions.yaml'),Loader=yaml.FullLoader) # dataFolder = mintsDefinitions['dataFolder'] # dataFolderReference ...
mi3nts/awsSupport
firmware/mintsXU4/mintsDefinitions.py
mintsDefinitions.py
py
1,826
python
en
code
0
github-code
7
[ { "api_name": "yaml.load", "line_number": 7, "usage_type": "call" }, { "api_name": "yaml.FullLoader", "line_number": 7, "usage_type": "attribute" }, { "api_name": "yaml.load", "line_number": 19, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_nu...
37529343233
from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * import sys import wikipedia as wiki from PyQt5.uic import loadUiType ui,_=loadUiType('wisdom.ui') class MainApp(QMainWindow,ui): def __init__(self): QMainWindow.__init__(self) self.title = 'Wisdom by t0xic0der' ...
t0xic0der/wisdom
index.py
index.py
py
14,684
python
en
code
1
github-code
7
[ { "api_name": "PyQt5.uic.loadUiType", "line_number": 8, "usage_type": "call" }, { "api_name": "wikipedia.search", "line_number": 33, "usage_type": "call" }, { "api_name": "wikipedia.page", "line_number": 34, "usage_type": "call" }, { "api_name": "wikipedia.search"...
30595814341
import random import timm import torch import train as t import wandb from config import Config_03_Train as config if __name__ == "__main__": random.seed(config.seed) project_name = config.project_name # Check for GPU device = "cuda" if torch.cuda.is_available() else "cpu" print("Using {} device"...
ales-git/DeepCADRADS
_03_Train/main.py
main.py
py
1,678
python
en
code
6
github-code
7
[ { "api_name": "random.seed", "line_number": 9, "usage_type": "call" }, { "api_name": "config.Config_03_Train.seed", "line_number": 9, "usage_type": "attribute" }, { "api_name": "config.Config_03_Train", "line_number": 9, "usage_type": "name" }, { "api_name": "conf...
35845010401
# Imports import os import pandas as pd import logging from bs4 import BeautifulSoup # Init logging.basicConfig(level=logging.INFO, filename=snakemake.log[0], format='%(message)s') logging.getLogger().addHandler(logging.StreamHandler()) # Load ...
biOliver/COMUNEQAID
manage-dir/code/01_make-fastqs.py
01_make-fastqs.py
py
4,831
python
en
code
3
github-code
7
[ { "api_name": "logging.basicConfig", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 8, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 12, "usage_type": "call" }, { "api_name": "logging.StreamH...
36444081416
#!/usr/bin/env python # coding: utf-8 # In[1]: # import from matplotlib import pyplot as plt import pandas as pd # In[2]: file = pd.read_excel("KB_mike3.xlsx") print(file) # In[3]: # extract from csv b_fdm = file["B FDM"] k_fdm = file["K FDM"] b_tacho = file["B tacho"] k_tacho = file["K tacho"] b_foaw = file...
monikazm/eth-mike-backend
ETH_MIKE_Characterisation/Data Analysis/KB-Plot/KB_Plot.py
KB_Plot.py
py
714
python
en
code
0
github-code
7
[ { "api_name": "pandas.read_excel", "line_number": 15, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.scatter", "line_number": 35, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 35, "usage_type": "name" }, { "api_name": "matplot...
192767166
import os from this import d from PyPDF2 import PdfFileReader, PdfFileMerger merger = PdfFileMerger() while True: menu = input("Precisa de ajuda? (S/N)") print() if(menu == "S" or menu == "s"): print("Para renomear adequadamente os arquivos, selecione todos, do último para o primeiro.") print("Cliqu...
ProfessorDanilo/2022
python3/juntarPdf.py
juntarPdf.py
py
1,457
python
pt
code
0
github-code
7
[ { "api_name": "PyPDF2.PdfFileMerger", "line_number": 5, "usage_type": "call" }, { "api_name": "PyPDF2.PdfFileReader", "line_number": 39, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 40, "usage_type": "call" }, { "api_name": "os.path", "...
3925101874
from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait import pyttsx3 import pywhatkit as whatsapp from datetime import datetime driver =webdriver.Chrome("C:/Program Files (x86)/chromedriver.exe"...
amhkhowaja/AutomationBots
WhatsappBot.py
WhatsappBot.py
py
1,310
python
en
code
0
github-code
7
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 9, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 9, "usage_type": "name" }, { "api_name": "pyttsx3.init", "line_number": 10, "usage_type": "call" }, { "api_name": "datetime.date...
2968661562
import serial from json.decoder import JSONDecodeError # configure the serial connections (the parameters differs on the device you are connecting to) ser = serial.Serial( port='/dev/ttyUSB0', baudrate=115200 ) # import time # time.sleep(3) import json import struct run = True while run: try: in...
maxpowel/sensorflow-server
serial_proxy/serial_proxy.py
serial_proxy.py
py
2,351
python
en
code
0
github-code
7
[ { "api_name": "serial.Serial", "line_number": 5, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 20, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 23, "usage_type": "call" }, { "api_name": "struct.pack", "line_number": 6...
7005711340
import numpy as np import matplotlib.pyplot as plt from math import sqrt def get_probability(delta_energy, beta): return np.exp(-delta_energy*beta) def get_energy(): return -np.sum( interaction * spins * np.roll(spins, 1, axis=0) + interaction * spins * np.roll(spins, -1, axis=0) + interaction * ...
Merciful-jm/Ising
Ising_python/programming/MonteCarlo_pre_train.py
MonteCarlo_pre_train.py
py
1,469
python
en
code
0
github-code
7
[ { "api_name": "numpy.exp", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.sum", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.roll", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.roll", "line_number": 12, ...
21448477511
"""Web Routes.""" from masonite.routes import Get, Post, Put, Delete, RouteGroup ROUTES = [ Get("/", "WelcomeController@show").name("welcome"), RouteGroup([ Get("/", "NoteController@index").name("index"), Get("/@id", "NoteController@show").name("show"), Post('/', "NoteController@create...
elikyaB/seirp-p4-backend2
routes/web.py
web.py
py
505
python
en
code
0
github-code
7
[ { "api_name": "masonite.routes.Get", "line_number": 5, "usage_type": "call" }, { "api_name": "masonite.routes.RouteGroup", "line_number": 7, "usage_type": "call" }, { "api_name": "masonite.routes.Get", "line_number": 8, "usage_type": "call" }, { "api_name": "mason...
42872234594
# -*- coding: utf-8 -*- """ Created on Thu May 23 21:58:22 2019 @author: zsl """ from sklearn import datasets ''' car ''' iris = datasets.load_iris() wine = datasets.load_wine() X, y = iris.data, iris.target dataSet = [] labels = [] fileIn = open('car.data') for line in fileIn.readlines(): lineArr ...
foolfun/Algorithm
05_SVM/datapro.py
datapro.py
py
440
python
en
code
0
github-code
7
[ { "api_name": "sklearn.datasets.load_iris", "line_number": 11, "usage_type": "call" }, { "api_name": "sklearn.datasets", "line_number": 11, "usage_type": "name" }, { "api_name": "sklearn.datasets.load_wine", "line_number": 12, "usage_type": "call" }, { "api_name":...
4618594580
from datetime import datetime, timedelta from django.contrib import messages from django.contrib.auth import views from django.core.exceptions import ValidationError from django.core.mail import EmailMultiAlternatives from django.conf import settings from django.http.response import HttpResponseRedirect from django.sh...
conlangdev/conlangdev
conlangdev/views/auth.py
auth.py
py
4,069
python
en
code
0
github-code
7
[ { "api_name": "django.views.generic.View", "line_number": 23, "usage_type": "name" }, { "api_name": "django.urls.reverse_lazy", "line_number": 24, "usage_type": "call" }, { "api_name": "conlangdev.utils.token.check_confirm_email_token", "line_number": 28, "usage_type": "c...
21704893594
from markupsafe import Markup, escape from odoo import _, api, fields, models from pprint import pprint,pformat from odoo import http from odoo.osv import expression from odoo.tools import consteq, plaintext2html from odoo.addons.helpdesk.controllers import portal from odoo.addons.portal.controllers import mail from od...
mosonyi/odoo_helpdesk_privacy
models/helpdesk_privacy.py
helpdesk_privacy.py
py
7,076
python
en
code
0
github-code
7
[ { "api_name": "logging.getLogger", "line_number": 18, "usage_type": "call" }, { "api_name": "odoo.models.Model", "line_number": 20, "usage_type": "attribute" }, { "api_name": "odoo.models", "line_number": 20, "usage_type": "name" }, { "api_name": "odoo.addons.port...
11757405402
import math import matplotlib import numpy as np from matplotlib import pyplot as plt def create_data(f, x_vals): y_vals = [] for i in x_vals: y_vals.append(f(i)) return np.array(y_vals) def fit_exp_data(x_vals, y_vals): log_vals = [] for y in y_vals: log_vals.append(math.log(y,...
zuzuqo/ossu
1 Intro CS/02.Intro to CS/20.Understanding Experimental Data/20.2.The Behavior of Projectiles/20.3.Fitting Exponentially Distributed Data/fit_exponential.py
fit_exponential.py
py
1,030
python
en
code
0
github-code
7
[ { "api_name": "numpy.array", "line_number": 12, "usage_type": "call" }, { "api_name": "math.log", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.polyfit", "line_number": 19, "usage_type": "call" }, { "api_name": "matplotlib.use", "line_number"...
43083894647
""" This code originally from ***Wav2Lip*** repository Link repo: https://github.com/Rudrabha/Wav2Lip This code has been modified to preprocess Facial Landmark dataset instead of face images """ import sys if sys.version_info[0] < 3 and sys.version_info[1] < 2: raise Exception("Must be using >= Python 3.2")...
peterwisu/lip-synthesis
preprocess_data.py
preprocess_data.py
py
4,464
python
en
code
5
github-code
7
[ { "api_name": "sys.version_info", "line_number": 12, "usage_type": "attribute" }, { "api_name": "argparse.ArgumentParser", "line_number": 31, "usage_type": "call" }, { "api_name": "face_alignment.FaceAlignment", "line_number": 40, "usage_type": "call" }, { "api_na...
36845940579
# 신호를 보낼 수 있는 객체를 생성하기. (QObject를 상속받은 pyqtSignal) # 1. 마우스클릭 # 2. mousePressEvent가 발생. # 3. closeApp 객체에 신호가 방출되었으면 한다.Emit() # 4. closeApp 과 연결된(.connect) self.close를 실행 시킨다. import sys from PyQt5.QtCore import pyqtSignal, QObject from PyQt5.QtWidgets import QApplication, QMainWindow class Communicate(QObject): ...
lyj911111/PyQT5-Tutorial
6_이벤트, 시그널/5_마우스가 클릭되었을 때 이벤트 발생, emit 함수를 이용해서 다양한 이벤트와 연결이 가능.py
5_마우스가 클릭되었을 때 이벤트 발생, emit 함수를 이용해서 다양한 이벤트와 연결이 가능.py
py
1,675
python
ko
code
0
github-code
7
[ { "api_name": "PyQt5.QtCore.QObject", "line_number": 12, "usage_type": "name" }, { "api_name": "PyQt5.QtCore.pyqtSignal", "line_number": 13, "usage_type": "call" }, { "api_name": "PyQt5.QtWidgets.QMainWindow", "line_number": 16, "usage_type": "name" }, { "api_name...
27497534219
from cmd import Cmd import Pysys_str as s import PSDK as p import json # just test start s.user = 'defult' builtin_apps = ['settings', 'info', 'dev', 'Pyox', 'Pyrandcard', 'Pyrandom'] thirdparty_apps = [] # just test end class Run(Cmd): """运行""" intro = s.wel if s.user == 'defult': prompt = s...
bobby233/Pysysbeta
cmd_test.py
cmd_test.py
py
3,303
python
en
code
0
github-code
7
[ { "api_name": "Pysys_str.user", "line_number": 7, "usage_type": "attribute" }, { "api_name": "cmd.Cmd", "line_number": 12, "usage_type": "name" }, { "api_name": "Pysys_str.wel", "line_number": 15, "usage_type": "attribute" }, { "api_name": "Pysys_str.user", "l...
2794395439
import sqlite3 connection = sqlite3.connect('example.db') connection.row_factory = sqlite3.Row # give us dictionary results! db = connection.cursor() result = db.execute('SELECT * FROM employees') # print(result.fetchall()) for r in result.fetchall(): print(dict(r)) db.execute('INSERT INTO employees(first_name,...
textchimp/pyth02
databases/sql.py
sql.py
py
442
python
en
code
0
github-code
7
[ { "api_name": "sqlite3.connect", "line_number": 3, "usage_type": "call" }, { "api_name": "sqlite3.Row", "line_number": 4, "usage_type": "attribute" } ]
32887137514
from datetime import datetime, timedelta from odoo import models, fields, api class OffersModel(models.Model): _name = "offers_model" _description = "Offers Model" _order = "price desc" validity_days = fields.Integer(default=7) partner_id = fields.Many2one('res.partner',required = False) prop...
toita86/My_module
models/offers_model.py
offers_model.py
py
1,951
python
en
code
0
github-code
7
[ { "api_name": "odoo.models.Model", "line_number": 5, "usage_type": "attribute" }, { "api_name": "odoo.models", "line_number": 5, "usage_type": "name" }, { "api_name": "odoo.fields.Integer", "line_number": 10, "usage_type": "call" }, { "api_name": "odoo.fields", ...
29032900224
"""Adaptive Categorical Discretization""" import torch from torch.distributions import Distribution, constraints import torch.nn.functional as F from functools import reduce def to_numpy(*args): return [arg.numpy() for arg in args] def product(shape): if len(shape) == 0: return 1 return reduce(lambda x,...
ColinQiyangLi/AdaCat
wavenet/wavenet_vocoder/adacat.py
adacat.py
py
5,331
python
en
code
49
github-code
7
[ { "api_name": "functools.reduce", "line_number": 14, "usage_type": "call" }, { "api_name": "torch.searchsorted", "line_number": 35, "usage_type": "call" }, { "api_name": "torch.distributions.Distribution", "line_number": 37, "usage_type": "name" }, { "api_name": "...
4450394258
from flask import Flask, redirect,render_template,request from cs50 import SQL app= Flask(__name__) TEMPLATES_AUTO_RELOAD = True # This is class of cs50 which is from sql alchemy for sqltie db=SQL('sqlite:///stroing_info.db') @app.route("/") def padf(): return render_template('index.html') @app.route("/regis...
Kd-Here/CS-50_2021
Flask/Put user name in db/app.py
app.py
py
669
python
en
code
2
github-code
7
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "cs50.SQL", "line_number": 10, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 15, "usage_type": "call" }, { "api_name": "flask.request.form.get", ...
39980748154
def daytoJulian(year,month,day): import datetime i,j,k = 0,0,0 julianDay=[] while i <= len(year)-1: while j <= len(month)-1: while k <= len(day)-1: julian = str(datetime.datetime.strptime('{0}-{1}-{2}'.format(year[i],month[j], day[k]), '%Y-%m-%d')...
palexandremello/goes-py
examples/raw_functions/julianList.py
julianList.py
py
604
python
en
code
21
github-code
7
[ { "api_name": "datetime.datetime.strptime", "line_number": 9, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 9, "usage_type": "attribute" } ]
28940165166
# -*- coding: utf-8 -*- """ @author: MARTIJ This script takes any text copied to the clipboard and creates a concordance. saves results to a text file will later take the created dictionary and pass it to a csv file """ import re import pprint import pyperclip text = pyperclip.paste() ##enters text on ...
jdm1061/Concordance
concordance.py
concordance.py
py
1,780
python
en
code
0
github-code
7
[ { "api_name": "pyperclip.paste", "line_number": 14, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 17, "usage_type": "call" }, { "api_name": "pprint.pformat", "line_number": 43, "usage_type": "call" } ]
41300561838
#coding:utf-8 '''color_output.py 实现windows cmd下的彩色输出(通过pyreadline), 并对编码转换进行了包装 注意: Windows下需要pyreadline模块 作者:Kder [ http://www.kder.info/ ] 许可:Apache License V2 ''' import sys import rlcompleter def uprint(msg): msg = str(msg) try: print(msg.decode('utf-8')) except UnicodeDecodeError as e: ...
Kder/color-output
color_output.py
color_output.py
py
842
python
en
code
1
github-code
7
[ { "api_name": "sys.platform", "line_number": 21, "usage_type": "attribute" }, { "api_name": "pyreadline.parse_and_bind", "line_number": 24, "usage_type": "call" }, { "api_name": "sys.stdout", "line_number": 25, "usage_type": "attribute" }, { "api_name": "pyreadlin...
30664110759
from collections import Counter from functools import cache class Stack: def __init__(self, height, color): self.height = height self.color = color class BabylonGame: def __init__(self): self.state = [Stack(1, color) for color in range(4) for _ in range(3)] def getStacks(self): ...
yutao-li/leetcode
google/3133.py
3133.py
py
2,123
python
en
code
0
github-code
7
[ { "api_name": "collections.Counter", "line_number": 28, "usage_type": "call" }, { "api_name": "functools.cache", "line_number": 51, "usage_type": "name" } ]
25505255652
from django.urls import include, path from rest_framework.routers import DefaultRouter from . import views router_v1 = DefaultRouter() router_v1.register('ingredients', views.IngredientViewSet) router_v1.register('tags', views.TagViewSet) router_v1.register('recipes', views.RecipeViewSet) urlpatterns = [ path('r...
dussiks/foodgram-project-react
backend/recipes_api/urls.py
urls.py
py
650
python
en
code
0
github-code
7
[ { "api_name": "rest_framework.routers.DefaultRouter", "line_number": 6, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 12, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 13, "usage_type": "call" }, { "api_name": ...
39027145996
import sys, json from crontab import CronTab import mysql.connector as my # JSON printing is extra-important, without it user interface cannot read (and present) results # this program will be called from graphical user interface / testBench / start test -button or stop test -button # System will capture system argu...
rogerkupari/Desalinator
desalinator_sw/ui/mgnCron.py
mgnCron.py
py
3,041
python
en
code
0
github-code
7
[ { "api_name": "sys.argv", "line_number": 28, "usage_type": "attribute" }, { "api_name": "mysql.connector.connect", "line_number": 41, "usage_type": "call" }, { "api_name": "mysql.connector", "line_number": 41, "usage_type": "name" }, { "api_name": "sys.stderr.writ...
13392540679
from PyQt6.QtWidgets import QWidget, QApplication, QMainWindow, QLabel, QHBoxLayout, QLineEdit, QComboBox, QPushButton, QVBoxLayout, QGridLayout, QStackedLayout class Avtoriz2(QMainWindow): def __init__(self): super().__init__() self.setWindowTitle("Авторизация") self.setFi...
Evgen792/gg
test.py
test.py
py
1,078
python
en
code
0
github-code
7
[ { "api_name": "PyQt6.QtWidgets.QMainWindow", "line_number": 3, "usage_type": "name" }, { "api_name": "PyQt6.QtWidgets.QLabel", "line_number": 10, "usage_type": "call" }, { "api_name": "PyQt6.QtWidgets.QPushButton", "line_number": 11, "usage_type": "call" }, { "api...
25324993373
import os import PyInstaller def hook(mod): # Replace mod by fake 'site' module. pyi_dir = os.path.abspath(os.path.dirname(PyInstaller.__file__)) fake_file = os.path.join(pyi_dir, 'fake', 'fake-site.py') new_code_object = PyInstaller.utils.misc.get_code_object(fake_file) mod = PyInstaller.depend....
pyqteval/evlal_win
pyinstaller-2.0/PyInstaller/hooks/hook-site.py
hook-site.py
py
388
python
en
code
193
github-code
7
[ { "api_name": "os.path.abspath", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 8, "usage_type": "call" }, { "api_name": "PyInstaller.__file__", ...
41222575895
#!/usr/bin/python2 import time import pygame from random import randrange import sys, signal print("Init") pygame.display.init() print("Size") size = (pygame.display.Info().current_w, pygame.display.Info().current_h) print(size) print("Screen") screen = pygame.display.set_mode((640, 480)) #screen = pygame.display....
seb4stien/family_box
family_box/colors.py
colors.py
py
577
python
en
code
0
github-code
7
[ { "api_name": "pygame.display.init", "line_number": 10, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 10, "usage_type": "attribute" }, { "api_name": "pygame.display.Info", "line_number": 13, "usage_type": "call" }, { "api_name": "pygame.di...
37050197743
import cv2 as cv import numpy as np img = cv.imread('images/trafficSign.jpg', cv.IMREAD_COLOR) blur = cv.GaussianBlur(img, (5,5), 0) hsv = cv.cvtColor(blur, cv.COLOR_BGR2HSV) # detect red color low_thresh = (160, 100, 100) high_thresh = (180, 255, 255) b_img = cv.inRange(hsv, low_thresh, high_thresh) contours, heir...
TraanQuang1509/ImageProcessing
ObjectDetection/trafficSign.py
trafficSign.py
py
757
python
en
code
0
github-code
7
[ { "api_name": "cv2.imread", "line_number": 4, "usage_type": "call" }, { "api_name": "cv2.IMREAD_COLOR", "line_number": 4, "usage_type": "attribute" }, { "api_name": "cv2.GaussianBlur", "line_number": 5, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "li...
32848710807
from skyfield.api import load, Topos from string import Template from pytz import timezone from datetime import datetime class Celestial: def __init__(self, name): self.name = name self.caption = name.capitalize() self.set_object() def set_object(self): planets = load('de421.bs...
jakmat/2018-personal-website
scripts/main.py
main.py
py
3,629
python
en
code
0
github-code
7
[ { "api_name": "skyfield.api.load", "line_number": 13, "usage_type": "call" }, { "api_name": "skyfield.api.load", "line_number": 51, "usage_type": "call" }, { "api_name": "skyfield.api.Topos", "line_number": 53, "usage_type": "call" }, { "api_name": "datetime.datet...
40213987297
import tweepy import os from models.tweet import TweetModel consumer_key = os.environ.get('TWITTER_CONSUMER_KEY') consumer_secret = os.environ.get('TWITTER_CONSUMER_SECRET') access_token = os.environ.get('TWITTER_ACCESS_TOKEN') access_token_secret = os.environ.get('TWITTER_ACCESS_TOK...
bcaleffi/twitter-api
api.py
api.py
py
1,369
python
en
code
0
github-code
7
[ { "api_name": "os.environ.get", "line_number": 5, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 5, "usage_type": "attribute" }, { "api_name": "os.environ.get", "line_number": 6, "usage_type": "call" }, { "api_name": "os.environ", "line_num...
14086141189
#!/usr/bin/env python # coding: utf-8 # Лабораторная работа №11 “Реализация криптографических атак с помощью машинного обучения на физически неклонируемые функции” # ==== # Лабораточная работа выполнена на языке **Python** c помощью интерактивной оболочки **Jupyter Notebook** # Исходный код работы - lab11.py. # Файл j...
4kix/machineLearning
labs/lab11/lab11.py
lab11.py
py
15,926
python
ru
code
0
github-code
7
[ { "api_name": "utils.LinArbPUF", "line_number": 44, "usage_type": "call" }, { "api_name": "sklearn.model_selection.train_test_split", "line_number": 60, "usage_type": "call" }, { "api_name": "sklearn.model_selection", "line_number": 60, "usage_type": "attribute" }, { ...
15529003383
""" Script to train model""" __author__ = 'Chien-Hsiang Hsu' __create_date__ = '2019.04.24' import os import functools import yaml from argparse import ArgumentParser import numpy as np import pandas as pd import datetime import matplotlib.pyplot as plt import cv2 import dataset_configs import ...
chienhsiang/tensorflow
segmentation/code/segmentation.py
segmentation.py
py
14,016
python
en
code
0
github-code
7
[ { "api_name": "os.path.join", "line_number": 37, "usage_type": "call" }, { "api_name": "os.path", "line_number": 37, "usage_type": "attribute" }, { "api_name": "yaml.safe_load", "line_number": 43, "usage_type": "call" }, { "api_name": "yaml.safe_load", "line_n...