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
28794327985
from enum import Enum from typing import Any, List, TypeVar from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt from PyQt5.QtGui import QImage, QPen, QColor from PyQt5.QtWidgets import QComboBox from Client.MyQt.ColorScheme import Color from DataBase2 import Lesson, _Displayable, name, Group from Domain.functools.Forma...
merdovash/VisitCount
Client/MyQt/Widgets/ComboBox/MComboBox.py
MComboBox.py
py
4,906
python
en
code
0
github-code
21
[ { "api_name": "typing.TypeVar", "line_number": 12, "usage_type": "call" }, { "api_name": "PyQt5.QtWidgets.QComboBox", "line_number": 15, "usage_type": "name" }, { "api_name": "PyQt5.QtGui.QImage", "line_number": 16, "usage_type": "call" }, { "api_name": "PyQt5.QtG...
24777060379
#!/usr/bin/env python3 import getopt import sys import utils.tag_utils as tag_utils from typing import List def show_help(): """ 显示帮助信息 """ print("显示一个或多个文件的tag") print() program = sys.argv[0] print(program + " <files>") def print_arg(name, info): print(" %-28s\t%s" % (name, info)) print...
fanhongtao/tag-files
tag_show.py
tag_show.py
py
1,234
python
zh
code
0
github-code
21
[ { "api_name": "sys.argv", "line_number": 13, "usage_type": "attribute" }, { "api_name": "typing.List", "line_number": 24, "usage_type": "name" }, { "api_name": "utils.tag_utils.get_file_tags", "line_number": 31, "usage_type": "call" }, { "api_name": "utils.tag_uti...
3897831830
import cv2 import numpy as np from matplotlib import pyplot as plt from sklearn.cluster import KMeans filename = 'dev/data01_dev/000007.jpg' filename2 = 'dev/data01_dev/000056.jpg' img = cv2.imread(filename) img2 = cv2.imread(filename2) bitand = cv2.bitwise_xor(img, img2) # clone = img.copy() # # gray = cv2.cvtColor...
danielpclin/Deep-Learning-Final
test.py
test.py
py
844
python
en
code
0
github-code
21
[ { "api_name": "cv2.imread", "line_number": 8, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 9, "usage_type": "call" }, { "api_name": "cv2.bitwise_xor", "line_number": 10, "usage_type": "call" }, { "api_name": "cv2.imshow", "line_number": 2...
37052436908
import numpy as np from torch import nn from pyepo.model.omo import optOmoModel from pyomo import environ as pe from pyepo import EPO class ShortestPathModelOMO(optOmoModel): def __init__(self, grid): self.grid = grid self.arcs = self._getArcs() super().__init__(solver="scip") def _ge...
facebookresearch/LANCER
DFL/baselines/pyepo_classes.py
pyepo_classes.py
py
4,226
python
en
code
20
github-code
21
[ { "api_name": "pyepo.model.omo.optOmoModel", "line_number": 8, "usage_type": "name" }, { "api_name": "pyepo.EPO.MINIMIZE", "line_number": 43, "usage_type": "attribute" }, { "api_name": "pyepo.EPO", "line_number": 43, "usage_type": "name" }, { "api_name": "pyomo.en...
10450534722
from collections import deque import sys input = sys.stdin.readline # 1차시도 틀림 # 2차시도에서 고친 것 : 붙여넣기 하다가 틀린것 (k-1부분) # 3차 시도에서 고친 것 : dirs1+dirs2 부분에서 대각으로 뛰지 않은 경우에는 k의 횟수가 줄어들면 안된다. # 그렇다면, k가 존재하면, 무조건 대각으로만 뛰어야 하는가? 그건 아닌 것 같다. # 따라서. k가 존재하면, 두 방식 모두 하고, 그렇지 않으면 한 방식만 하자. # 아, 그 발견하자마자 해야한다. 엥 아니네. # 흠... visit을 2차...
inkyu0103/BOJ
DFS , BFS/1600.py
1600.py
py
2,223
python
ko
code
0
github-code
21
[ { "api_name": "sys.stdin", "line_number": 3, "usage_type": "attribute" }, { "api_name": "collections.deque", "line_number": 30, "usage_type": "call" } ]
21289378625
import io import os import numpy as np import tensorflow as tf from PIL import Image from flask import Flask, request, jsonify from keras import models app = Flask(__name__) model = models.load_model('sutaba-model.h5') model.summary() graph = tf.get_default_graph() classes = [ 'sutaba', 'ramen', 'other',...
mpppk/keras-flask
app.py
app.py
py
1,874
python
en
code
0
github-code
21
[ { "api_name": "flask.Flask", "line_number": 10, "usage_type": "call" }, { "api_name": "keras.models.load_model", "line_number": 11, "usage_type": "call" }, { "api_name": "keras.models", "line_number": 11, "usage_type": "name" }, { "api_name": "tensorflow.get_defau...
7721637322
"""Astronomical and physics constants. This module complements constants defined in `astropy.constants`, with gravitational paremeters and radii. Note that `GM_jupiter` and `GM_neptune` are both referred to the whole planetary system gravitational parameter. Unless otherwise specified, gravitational and mass paramet...
poliastro/poliastro
src/poliastro/constants/general.py
general.py
py
18,038
python
en
code
806
github-code
21
[ { "api_name": "astropy.constants.iau2015.M_earth", "line_number": 108, "usage_type": "name" }, { "api_name": "astropy.constants.iau2015.M_jup", "line_number": 109, "usage_type": "name" }, { "api_name": "astropy.constants.iau2015.M_sun", "line_number": 110, "usage_type": "...
5945817689
import time, json import urllib.request as curl from urllib.parse import urljoin from tresult import TestResult def ajax(paragraph, driver): url = urljoin(driver.current_url, f'/text/data?paragraph={paragraph}') page = curl.urlopen(url) return json.loads(page.read()) def check_paragraph(driver, para, expe...
jenydu/Restify
assignments/A3/a3selftest/paragraph/all.py
all.py
py
1,703
python
en
code
0
github-code
21
[ { "api_name": "urllib.parse.urljoin", "line_number": 7, "usage_type": "call" }, { "api_name": "urllib.request.urlopen", "line_number": 8, "usage_type": "call" }, { "api_name": "urllib.request", "line_number": 8, "usage_type": "name" }, { "api_name": "json.loads", ...
72249621173
import shutil from PyQt5.QtCore import QThread, pyqtSignal from requests import get from os import path, remove from sys import platform, executable from zipfile import ZipFile from GUI.Strings import Strings from API.CurseAPI import CurseAPI from Utils.Utils import parseSemanticVersion, msg_box from GUI.DownloadDi...
OpenMineMods/OpenMineMods
Utils/Updater.py
Updater.py
py
2,779
python
en
code
28
github-code
21
[ { "api_name": "GUI.Strings.Strings", "line_number": 17, "usage_type": "call" }, { "api_name": "PyQt5.QtCore.QThread", "line_number": 27, "usage_type": "name" }, { "api_name": "PyQt5.QtCore.pyqtSignal", "line_number": 28, "usage_type": "call" }, { "api_name": "API....
26453091953
""" code references: https://github.com/ignacio-rocco/ncnet and https://github.com/gengshan-y/VCN """ import torch import torch.nn as nn class CCA(torch.nn.Module): def __init__(self, kernel_sizes=[3, 3], planes=[16, 1]): super(CCA, self).__init__() num_layers = len(kernel_sizes) nn_modul...
dahyun-kang/renet
models/cca.py
cca.py
py
2,935
python
en
code
98
github-code
21
[ { "api_name": "torch.nn", "line_number": 7, "usage_type": "attribute" }, { "api_name": "torch.nn.ReLU", "line_number": 19, "usage_type": "call" }, { "api_name": "torch.nn", "line_number": 19, "usage_type": "name" }, { "api_name": "torch.nn.Sequential", "line_n...
18570689771
import numpy as np import hickle def get_concept_encoding(i, j): file_name = './enc_concept_' + str(int(i / 10000)) + '.hkl' embedding = hickle.load(file_name) index_start = i % 10000 index_end = j % 10000 if (int(i / 10000) == int(j / 10000)): return embedding[index_start:index_end] e...
aara11/Cross-Domain-Bindings-in-Medical-Images
evaluate.py
evaluate.py
py
1,902
python
en
code
2
github-code
21
[ { "api_name": "hickle.load", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.concatenate", "line_number": 13, "usage_type": "call" }, { "api_name": "hickle.load", "line_number": 37, "usage_type": "call" }, { "api_name": "numpy.linspace", "line_n...
74465044534
import imaplib, smtplib, email, re, sqlalchemy, hashlib, time from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from lxml import etree ###### IMAP def imapConnect(login): try: mail = imaplib.IMAP4_SSL('imap.gmail.com') mail.login(login['username'],login['password']) pass exc...
f-f/mailMyPy
mmplib.py
mmplib.py
py
4,921
python
en
code
2
github-code
21
[ { "api_name": "imaplib.IMAP4_SSL", "line_number": 11, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 37, "usage_type": "call" }, { "api_name": "email.mime.multipart.MIMEMultipart", "line_number": 67, "usage_type": "call" }, { "api_name": "email...
14962248453
import json import tkinter as tk import tkinter.font as tkFont import tkinter.messagebox from tkinter import * from tkinter import Radiobutton from add_manual_allure import * data = [] class App: def __init__(self): self.root = tk.Tk() # Настройка названия окна self.root.ti...
Agitik/ManualTestsInAllure
gui_input.py
gui_input.py
py
14,432
python
en
code
2
github-code
21
[ { "api_name": "tkinter.Tk", "line_number": 14, "usage_type": "call" }, { "api_name": "tkinter.Label", "line_number": 26, "usage_type": "call" }, { "api_name": "tkinter.font.Font", "line_number": 27, "usage_type": "call" }, { "api_name": "tkinter.font", "line_n...
27688729829
import os import time from dotenv import find_dotenv, load_dotenv load_dotenv(find_dotenv()) import gradio as gr import qdrant_client import requests import xmltodict from bs4 import BeautifulSoup from langchain.chains import ConversationalRetrievalChain from langchain.chat_models import ChatOpenAI from langchain.doc...
Shubham-Hazra/Brance
brance.py
brance.py
py
6,931
python
en
code
0
github-code
21
[ { "api_name": "dotenv.load_dotenv", "line_number": 6, "usage_type": "call" }, { "api_name": "dotenv.find_dotenv", "line_number": 6, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 25, "usage_type": "call" }, { "api_name": "langchain.chat_models.C...
15277352283
import snap import random random.seed(10) SOGLIA = 0.40 PATH = "C:/Users/ilcai/Downloads/Progetto_RS/email-Eu-core.txt" Lista = [] #LoadedGraph = snap.LoadEdgeList(snap.TNEANet, "CA-GrQc.txt", 0, 1,) # LoadedGraph.Dump() for j in range(1,10): S = snap.TNEANet.New() LoadedGraph = snap.LoadEdgeL...
haxkadc/TargetSetSelection
TSS/TSS-Probabilistico.py
TSS-Probabilistico.py
py
4,192
python
en
code
0
github-code
21
[ { "api_name": "random.seed", "line_number": 4, "usage_type": "call" }, { "api_name": "snap.TNEANet.New", "line_number": 14, "usage_type": "call" }, { "api_name": "snap.TNEANet", "line_number": 14, "usage_type": "attribute" }, { "api_name": "snap.LoadEdgeList", ...
28743594672
from django.urls import path from personal.views import IndexView, ResponseList, ResponseDelete, accept, AccountDetailActivate urlpatterns = [ path('accounts/', IndexView.as_view(), name='account'), path('accounts/responses/', ResponseList.as_view(), name='responses'), path('accounts/responses/<int:pk>/de...
zNiffler/D19.7
personal/urls.py
urls.py
py
535
python
en
code
0
github-code
21
[ { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "personal.views.IndexView.as_view", "line_number": 6, "usage_type": "call" }, { "api_name": "personal.views.IndexView", "line_number": 6, "usage_type": "name" }, { "api_name"...
6046351140
import PIL from PIL import Image import numpy as np import torch import torchvision import torchvision.transforms as transforms import matplotlib.pyplot as plt from torch import nn, optim import time import copy def imshow(inp, title=None): inp = inp.numpy().transpose((1,2,0)) mean = np.array([0.485, 0.456, 0...
LiorOhana94/Pneumonia-Detection-System
old/all.py
all.py
py
1,664
python
en
code
0
github-code
21
[ { "api_name": "numpy.array", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.clip", "line_number": 18, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.imshow", "li...
14161992196
# Python XML Parsing import xml.etree.ElementTree as ET root = ET.parse('sample.xml').getroot() #print(root) tag = root.tag print(tag) # get all attributes # attributes = root.attrib # print(attributes) # print(type(attributes)) # # extract a particular attribute # year = attributes.get('year') # print(...
asdf247/Python101
lessons/myapp.py
myapp.py
py
939
python
en
code
0
github-code
21
[ { "api_name": "xml.etree.ElementTree.parse", "line_number": 3, "usage_type": "call" }, { "api_name": "xml.etree.ElementTree", "line_number": 3, "usage_type": "name" } ]
74090790771
from django.contrib.auth.mixins import LoginRequiredMixin from django.urls import reverse_lazy from django.views.generic import ListView, CreateView, UpdateView, DetailView, DeleteView from teachers.forms import CreateTeacherForm, UpdateTeacherForm from teachers.models import Teacher class ListTeacherView(ListView):...
d1squit/django_lms
teachers/views.py
views.py
py
1,064
python
en
code
0
github-code
21
[ { "api_name": "django.views.generic.ListView", "line_number": 9, "usage_type": "name" }, { "api_name": "teachers.models.Teacher", "line_number": 10, "usage_type": "name" }, { "api_name": "django.contrib.auth.mixins.LoginRequiredMixin", "line_number": 14, "usage_type": "na...
10467557132
import os from shutil import copy2 from django.conf import settings from django.test import TestCase from rest_framework.test import APIRequestFactory from rest_framework import status from django.test import TestCase, Client from django.urls import reverse from django.core.files import File from django.core.files.upl...
nikitavlaev/image-resizer
image_resizer/resizer_main/tests.py
tests.py
py
2,888
python
en
code
0
github-code
21
[ { "api_name": "os.path.join", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path", "line_number": 20, "usage_type": "attribute" }, { "api_name": "django.conf.settings.IMAGES_DIR", "line_number": 20, "usage_type": "attribute" }, { "api_name": "django...
43037896907
from collections import deque # 幅優先探索 def main(): while True: w, h = map(int, input().split()) r_end = 2*h-1 c_end = 2*w-1 if w == 0 and h == 0: return grid = [input() for _ in range(r_end)] solver(grid, h, w) def solver(grid, r_end, c_end): st_nod...
batamorphism/coding
Python/AtCoder/old/Amazing_Mazes_1129.py
Amazing_Mazes_1129.py
py
1,384
python
en
code
0
github-code
21
[ { "api_name": "collections.deque", "line_number": 35, "usage_type": "call" } ]
18117696384
# -*- coding:utf-8 -*- from django import forms from apps.bill.models import CategoryEntity from apps.common.utils import isNoneOrEmpty __author__ = 'ngnono' class CategoryForm(forms.ModelForm): class Meta: model = CategoryEntity fields = ['Name', 'Description'] def __init__(self, *args, **k...
ngnono/org.ngnono.fmnote
apps/category/forms.py
forms.py
py
708
python
en
code
0
github-code
21
[ { "api_name": "django.forms.ModelForm", "line_number": 9, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 9, "usage_type": "name" }, { "api_name": "apps.bill.models.CategoryEntity", "line_number": 11, "usage_type": "name" }, { "api_name":...
14535148995
#!/usr/bin/env python3 """AWS EC2 instance manager for Minecraft servers. Requires IAM user access key associated with an AWS account. To use a specific command, the necessary permissions must be attached to the IAM group that the IAM user is a part of. """ import sys from collections import namedtuple #import pprint ...
TakingItCasual/ec2mc
ec2mc/__main__.py
__main__.py
py
3,040
python
en
code
0
github-code
21
[ { "api_name": "sys.argv", "line_number": 33, "usage_type": "attribute" }, { "api_name": "ec2mc.commands.configure_cmd.Configure", "line_number": 37, "usage_type": "attribute" }, { "api_name": "ec2mc.commands.configure_cmd", "line_number": 37, "usage_type": "name" }, {...
35948081623
import numpy as np from sklearn.linear_model import LinearRegression X = np.array([171,151,124,134,156]) y = np.array([80,60,45,50,65]) clf = LinearRegression() clf.fit(X.reshape(-1,1),y) a=clf.predict([[133]]) print(a)
vivek6429/ml
day2/simple_linear_regression_sklearn.py
simple_linear_regression_sklearn.py
py
222
python
en
code
0
github-code
21
[ { "api_name": "numpy.array", "line_number": 4, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 5, "usage_type": "call" }, { "api_name": "sklearn.linear_model.LinearRegression", "line_number": 7, "usage_type": "call" } ]
70727025334
import pandas as pd import numpy as np from matplotlib import pyplot as plt dataset = pd.read_csv("/Users/bhuvanrj/Desktop/git upload/UberDS.csv") X = dataset.dispatching_base_number Y = dataset.active_vehicles Z = dataset.trips D = dataset.date plt.style.use("ggplot") plt.subplot(211) plt.bar(X,Y,label="BnvAv") pl...
BHUVAN-RJ/python-aiml-project
Uber_dataset_model_comparision/datavisualisation.py
datavisualisation.py
py
569
python
en
code
1
github-code
21
[ { "api_name": "pandas.read_csv", "line_number": 5, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.style.use", "line_number": 13, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.style", "line_number": 13, "usage_type": "attribute" }, { "api_name"...
26577364570
#!/usr/bin/python3 import typer from converter import print_ascii_image, write_ascii_image from cli_option_processors import ( PaletteCode, Color, get_palette_from_code_if_empty_palette, CHARACTER_COLORING_FUNCTIONS, ) app = typer.Typer() # Fontratio option def font_ratio_callback(value: float) -> fl...
monscodex/ascii_image
ascii_image.py
ascii_image.py
py
2,938
python
en
code
4
github-code
21
[ { "api_name": "typer.Typer", "line_number": 12, "usage_type": "call" }, { "api_name": "typer.BadParameter", "line_number": 17, "usage_type": "call" }, { "api_name": "typer.BadParameter", "line_number": 19, "usage_type": "call" }, { "api_name": "typer.Option", ...
18023495267
import random import numpy as np import json from src.model.loss_functions import * from src.model.utils import realEPE from torch.utils.data import DataLoader from livelossplot import PlotLosses import GPUtil import time import datetime from src.model.models import estimate, device def set_seed(seed): """ Us...
erizmr/UnLiteFlowNet-PIV
src/train/train_functions.py
train_functions.py
py
7,747
python
en
code
38
github-code
21
[ { "api_name": "random.seed", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.random.seed", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 19, "usage_type": "attribute" }, { "api_name": "torch.utils.data.manu...
4364568433
# -*- coding: UTF-8 -*- #!/usr/bin/python3 """ a much Better Cross-lingual variational autoencoder :) """ #************************************************************ # Imported Libraries #************************************************************ import numpy as np import torch import torch.nn as nn import torch....
cambridgeltl/mling_sdgms
nn_model/xlingva.py
xlingva.py
py
6,268
python
en
code
3
github-code
21
[ { "api_name": "bva.BVA", "line_number": 29, "usage_type": "name" }, { "api_name": "bva.BVA", "line_number": 31, "usage_type": "argument" }, { "api_name": "xling_embedding_layer.XlingEmbeddingLayer", "line_number": 34, "usage_type": "call" }, { "api_name": "encoder...
9666649807
from download import Downloader from parse import Parser from data import some_logic def process(url, web_page_path = None, data_path = None): downloader = Downloader(url, {}) web_page_file = downloader.get_html() downloader.save(web_page_path) parser = Parser(web_page_path) parser.parse() par...
KochyanLV/cmc-parser
__init__.py
__init__.py
py
556
python
en
code
0
github-code
21
[ { "api_name": "download.Downloader", "line_number": 6, "usage_type": "call" }, { "api_name": "parse.Parser", "line_number": 10, "usage_type": "call" }, { "api_name": "data.some_logic", "line_number": 15, "usage_type": "call" }, { "api_name": "data.some_logic", ...
1997613221
# -*- coding: utf-8 -*- import requests import logging import traceback import time import re #获取 encrymobile,用于抽奖 def get_encryptmobile(client): page = client.post('https://m.client.10010.com/dailylottery/static/textdl/userLogin') page.encoding='utf-8' match = re.search('encryptmobile=\w+',page.text,flag...
LxDebug/UnicomPlus
TaskList/DailyLuck.py
DailyLuck.py
py
1,570
python
en
code
46
github-code
21
[ { "api_name": "re.search", "line_number": 13, "usage_type": "call" }, { "api_name": "logging.info", "line_number": 32, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 34, "usage_type": "call" }, { "api_name": "traceback.format_exc", "line_nu...
10355884383
import pygame,random pygame.init() import pygame pygame.init() screen = pygame.display.set_mode([550,550]) pygame.display.set_caption("Screen Proportions") #Set up global variables def collideRectRect (x1,y1,w1,h1,x2,y2,w2,h2): return x1 <= x2+ w2 and x1 + w1 >= x2 and y1 <= y2 + h2 and y1 + h1 >= y2 ...
diligentaura/oldpypractice
obstacleoof.py
obstacleoof.py
py
4,524
python
en
code
1
github-code
21
[ { "api_name": "pygame.init", "line_number": 3, "usage_type": "call" }, { "api_name": "pygame.init", "line_number": 6, "usage_type": "call" }, { "api_name": "pygame.display.set_mode", "line_number": 7, "usage_type": "call" }, { "api_name": "pygame.display", "li...
27492680021
from django.urls import path # -2c from . import views # -2c from .views import PostCreateView, PostUpdateView, PostDeleteView # -27b, 28b, 29b urlpatterns = [ path('', views.home, name= 'home_url'), # -2c path...
MDsona/blog-django-ar
src/blog/url.py
url.py
py
854
python
en
code
1
github-code
21
[ { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "views.home", "line_number": 6, "usage_type": "attribute" }, { "api_name": "django.urls.path", "line_number": 7, "usage_type": "call" }, { "api_name": "views.about", "lin...
30855260638
import os import time import sqlite3 from datetime import datetime from urllib.parse import parse_qs from subprocess import Popen, PIPE from http.server import BaseHTTPRequestHandler MINIMUM_DAEMON_TIME_INTERVAL = 10 class MathmakerHTTPRequestHandler(BaseHTTPRequestHandler): def do_GET(self): from mathma...
nicolashainaux/mathmaker
mathmaker/lib/tools/request_handler.py
request_handler.py
py
8,581
python
en
code
4
github-code
21
[ { "api_name": "http.server.BaseHTTPRequestHandler", "line_number": 12, "usage_type": "name" }, { "api_name": "mathmaker.settings.init", "line_number": 20, "usage_type": "call" }, { "api_name": "mathmaker.settings", "line_number": 20, "usage_type": "name" }, { "api...
70638431414
from flask_mongoengine import MongoEngine from flask import Flask VERSION='v1' HOSTNAME='localhost' PORT=5000 db = MongoEngine() def create_app(*args,**kwargs): app = Flask(__name__) app.config.from_pyfile('settings.py') app.config.update(kwargs) db.init_app(app) from opnr.views import opnr_ap...
deeshank/go-server
application.py
application.py
py
376
python
en
code
0
github-code
21
[ { "api_name": "flask_mongoengine.MongoEngine", "line_number": 8, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 11, "usage_type": "call" }, { "api_name": "opnr.views.opnr_app", "line_number": 20, "usage_type": "argument" } ]
31465148280
from django.contrib import admin from django.contrib.admin.views.main import ChangeList from django.http import Http404 from django.shortcuts import get_object_or_404 from commons.urls import querystring class HierarchyModelAdmin(admin.ModelAdmin): parent_model = None parent_url_arg = None parent_model_f...
arturgoms/billogram-challenge
src/commons/admin/admin.py
admin.py
py
5,299
python
en
code
1
github-code
21
[ { "api_name": "django.contrib.admin.ModelAdmin", "line_number": 9, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 9, "usage_type": "name" }, { "api_name": "commons.urls.querystring", "line_number": 23, "usage_type": "call" }, { "...
2850130713
from typing import Union, Callable from casadi import MX, SX, integrator as casadi_integrator, horzcat, Function from .integrator import RK1, RK2, RK4, RK8, IRK, COLLOCATION, CVODES from ..misc.enums import ControlType class OdeSolverBase: """ The base class for the ODE solvers Attributes ---------...
AurelienRenou/Stage_link_home_lab
bioptim-master/bioptim-master/bioptim/dynamics/ode_solver.py
ode_solver.py
py
12,785
python
en
code
0
github-code
21
[ { "api_name": "misc.enums.ControlType.CONSTANT", "line_number": 129, "usage_type": "attribute" }, { "api_name": "misc.enums.ControlType", "line_number": 129, "usage_type": "name" }, { "api_name": "casadi.horzcat", "line_number": 130, "usage_type": "call" }, { "api...
27037244113
# BERT를 이용한 네이버 영화 감성분석 import pandas as pd import numpy as np import tensorflow as tf from transformers import BertTokenizer, TFBertModel from tensorflow.keras.layers import Dense, Input from tensorflow.keras.models import Model from tensorflow.keras.optimizers import Adam from sklearn.model_selection import train_tes...
dobbytk/NLP_study
Multicampus/NLP/day40/nsmc_bert_kor_base.py
nsmc_bert_kor_base.py
py
4,385
python
en
code
0
github-code
21
[ { "api_name": "transformers.BertTokenizer.from_pretrained", "line_number": 15, "usage_type": "call" }, { "api_name": "transformers.BertTokenizer", "line_number": 15, "usage_type": "name" }, { "api_name": "pandas.read_csv", "line_number": 17, "usage_type": "call" }, { ...
25771857437
# -*- coding: utf-8 -*- from tempfile import NamedTemporaryFile import uuid from crontab import CronTab from ..types import ScheduleContext, ScheduleInfo __all__ = ["CronScheduler"] class CronScheduler: name = "cron" description = "Cron scheduler for local repeatable executions" version = "0.1.0" s...
chaostoolkit-attic/chaoshub-archive
app/chaoshubdashboard/experiment/scheduler/cron.py
cron.py
py
1,424
python
en
code
15
github-code
21
[ { "api_name": "crontab.CronTab", "line_number": 19, "usage_type": "call" }, { "api_name": "types.ScheduleContext", "line_number": 33, "usage_type": "name" }, { "api_name": "tempfile.NamedTemporaryFile", "line_number": 38, "usage_type": "call" }, { "api_name": "uui...
31224323263
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Aug 5 22:32:00 2020 @author: hamishgibbs """ ''' Using existing info map clusters for convenience - will update when possible ''' import pandas as pd from igraph.clustering import compare_communities #%% argv = ['a', '/Users/hamishgibbs/Documents/Covi...
hamishgibbs/facebook_mobility_uk
src/analysis/cluster_comparison/nmi_comparison.py
nmi_comparison.py
py
1,331
python
en
code
1
github-code
21
[ { "api_name": "pandas.read_csv", "line_number": 17, "usage_type": "call" }, { "api_name": "pandas.merge", "line_number": 27, "usage_type": "call" }, { "api_name": "igraph.clustering.compare_communities", "line_number": 29, "usage_type": "call" }, { "api_name": "pa...
18380953231
import os import sqlite3 import pytest import requests from wazuh_testing.fim import WAZUH_PATH from wazuh_testing.tools.configuration import check_apply_test from wazuh_testing.tools.configuration import get_api_conf # Marks pytestmark = pytest.mark.server # Variables path = os.path.dirname(os.path.abspath(__file...
wazuh/wazuh-qa
tests/integration/test_api/test_config/test_rbac/test_rbac_mode.py
test_rbac_mode.py
py
4,772
python
en
code
29
github-code
21
[ { "api_name": "pytest.mark", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path", "line_number": 16, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "...
21565967028
#!/usr/bin/env python from __future__ import print_function import argparse import os import textwrap import numpy as np import tifffile def load_ge2( filename, image=0, shape=(2048,2048), dtype='uint16', byteoffset=8192, byteorder='=', bytegap=0, summed=False, **kwargs ): """reads a binary image fr...
ddale/hedm-conda-recipes
3dxrd-scripts/ge2tiff.py
ge2tiff.py
py
4,330
python
en
code
0
github-code
21
[ { "api_name": "numpy.dtype", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.prod", "line_number": 22, "usage_type": "call" }, { "api_name": "numpy.frombuffer", "line_number": 26, "usage_type": "call" }, { "api_name": "numpy.frombuffer", "line_...
24827874478
# coding: utf-8 """ Create a chemical structure-searchable database for use with Common Groups. This script creates a chemical database with ~720,000 structures from the U.S. Environmental Protection Agency's CompTox Dashboard public dataset. Set up the database so that it can be used for substructure searching via ...
akokai/commongroups
tools/construct_database.py
construct_database.py
py
10,148
python
en
code
3
github-code
21
[ { "api_name": "os.path.join", "line_number": 41, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 42, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 43, "usage_type": "call" }, { "api_name": "sqlalchemy.text", "line_nu...
32429698811
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D class lorenz: def __init__(self): self.dt = 0.01 #default step size self.T = 100 # default final time self.N = int(self.T/self.dt) # default number of time steps self.X = np.zeros((self.N,...
jeanlaunay1998/FYP
lorenz_attractor.py
lorenz_attractor.py
py
1,946
python
en
code
0
github-code
21
[ { "api_name": "numpy.zeros", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": ...
20532253831
import h5py import subprocess import argparse import train import time import os import sys import glob import re import matplotlib.pyplot as plt import numpy as np parser = argparse.ArgumentParser(description='') parser.add_argument("-folder",default='./opt/tmp/') parser.add_argument("-per",default=30,type = int) pa...
li012589/NeuralRG
plot.py
plot.py
py
4,152
python
en
code
75
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 13, "usage_type": "call" }, { "api_name": "h5py.File", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 26, "usage_type": "call" }, { "api_name": "numpy.array", "line...
4118511449
import numpy as np from matplotlib import pyplot as plt from .autocorr import * from .soiaporn_functions import * F_T_MIN = 0.0 F_T_MAX = 0.5 f_MIN = 0.0 f_MAX = 1.0 __all__ = ['MetropolisWithinGibbs', 'InputData', 'InputParameters'] class MetropolisWithinGibbs(): """ Manage Metropolis-within-Gibbs sampl...
cescalara/soiaporn_model
gibbs_implementation/metropolis_within_gibbs/metropolis_within_gibbs.py
metropolis_within_gibbs.py
py
9,363
python
en
code
0
github-code
21
[ { "api_name": "numpy.random.uniform", "line_number": 51, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 51, "usage_type": "attribute" }, { "api_name": "numpy.random.uniform", "line_number": 52, "usage_type": "call" }, { "api_name": "numpy.ran...
73043139252
import importlib # Plugins package. _PACKAGE = 'plugins' # Map of plugin name -> imported python module object for that plugin. _PLUGINS = {} def GetPlugin(name): module = _PLUGINS.get(name, None) if module is None: module = importlib.import_module('%s.%s' % (_PACKAGE, name)) if not getattr(m...
d1zzy/gogbot
lib/plugin_loader.py
plugin_loader.py
py
462
python
en
code
3
github-code
21
[ { "api_name": "importlib.import_module", "line_number": 12, "usage_type": "call" } ]
42120550322
from django.shortcuts import render,redirect from .models import Student,Article,Publication from .forms import StudentForm def students(request): students = Student.objects.all() context={'students': students} return render(request,'testapp/Scrollable-student.html',context) def articles(request): ...
Sunil-Chakraborty/testProject
testapp/views.py
views.py
py
1,739
python
en
code
0
github-code
21
[ { "api_name": "models.Student.objects.all", "line_number": 6, "usage_type": "call" }, { "api_name": "models.Student.objects", "line_number": 6, "usage_type": "attribute" }, { "api_name": "models.Student", "line_number": 6, "usage_type": "name" }, { "api_name": "dj...
3408585561
import numpy as np from msu_esd import cross_flow_unmixed from scipy.interpolate import interp1d # Hot side (air) Tin_h, Tout_h = 468, 220 # F mdot_h = 4.7 # lbm/sec cp_h = 0.244 # btu/(lbm F) q = mdot_h*cp_h*(Tin_h - Tout_h) rho_h = 0.05 # lbm/ft^3 mu_h = 1.672e-5 # lbm/(ft sec) Pr_h = 0.701 # Cold side (water)...
gabemorris12/msu_esd
Project 2/heat_exchanger.py
heat_exchanger.py
py
1,392
python
en
code
0
github-code
21
[ { "api_name": "numpy.array", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 24, "usage_type": "call" }, { "api_name": "scipy.interpolate.interp1d", "line_number": 25, "usage_type": "call" }, { "api_name": "msu_esd.cross_flow...
74935111092
import os import json from django.db import transaction from api.models import Director, Distributor, Location, Movie, Actor, Writer, ProductionCompany def empty_database(): Director.objects.all().delete() Distributor.objects.all().delete() Location.objects.all().delete() Movie.objects.all().delete() Actor.object...
gurpreetsingh00885/moviemap
api/helpers.py
helpers.py
py
1,953
python
en
code
0
github-code
21
[ { "api_name": "api.models.Director.objects.all", "line_number": 7, "usage_type": "call" }, { "api_name": "api.models.Director.objects", "line_number": 7, "usage_type": "attribute" }, { "api_name": "api.models.Director", "line_number": 7, "usage_type": "name" }, { ...
25876662522
from django.urls import path from . import views urlpatterns = [ path( 'search/<str:keyword>', views.SearchAPIView.as_view(), name='search_api' ), path( 'suggest/<str:keyword>', views.SuggestAPIView.as_view(), name='suggest_api' ), path( 're...
BabyThor/bitcoin
search_service/api/urls.py
urls.py
py
678
python
en
code
0
github-code
21
[ { "api_name": "django.urls.path", "line_number": 7, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 12, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 17, "usage_type": "call" }, { "api_name": "django.urls.path", ...
32347995526
from typing import List class Solution: def isValidSudoku(self, board: List[List[str]]) -> bool: visited = set() for row in range(9): for col in range(9): value = board[row][col] if value == ".": continue ...
jsparadacelis/exercising
arrays-and-hashing/valid_sudoku/v3.py
v3.py
py
1,036
python
en
code
0
github-code
21
[ { "api_name": "typing.List", "line_number": 5, "usage_type": "name" } ]
11741874697
import json from src.tests.data.data_reader import read from unittest import TestCase, mock from src.handlers.universe_overview.get_universe_overview_handler import handler class TestGetUniverseOverviewHandler(TestCase): def setUp(self): self.universe_overview = read("sample_universe_overview.json") ...
kpinetwork/backend
src/tests/handlers/universe_overview/get_universe_overview_handler_test.py
get_universe_overview_handler_test.py
py
2,092
python
en
code
0
github-code
21
[ { "api_name": "unittest.TestCase", "line_number": 7, "usage_type": "name" }, { "api_name": "src.tests.data.data_reader.read", "line_number": 9, "usage_type": "call" }, { "api_name": "src.tests.data.data_reader.read", "line_number": 10, "usage_type": "call" }, { "a...
70558016374
# -*- coding: utf-8 -*- # @author: Dasheng Fan # @email: fandasheng1999@163.com """ For digital difference correction The code is very stupid, but it works well. 为了清晰的理顺思路,本代码使用汉语注释 和一般的数字微分纠正步骤不同,使用了特殊的方法 投影矩阵参数位于'../data/ex4/DSC00437.txt'中 DEM和原始图像都在ex4文件夹中 """ import numpy as np import numba from ...
Dash-RSer/Corner_Detecting-Image_maching-and-Digital_Difference_Correction
ddc/ddc.py
ddc.py
py
7,683
python
en
code
0
github-code
21
[ { "api_name": "utils.rasterio.readimage", "line_number": 27, "usage_type": "call" }, { "api_name": "utils.rasterio", "line_number": 27, "usage_type": "name" }, { "api_name": "utils.gray_processing.gray_processing", "line_number": 29, "usage_type": "call" }, { "api...
33713520317
''' MIT License Copyright (c) 2018 yiwang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish...
sudhamsugurijala/Facial-Reconstruction
server/functs/reconstruct.py
reconstruct.py
py
4,651
python
en
code
0
github-code
21
[ { "api_name": "data_store.options.test_options.TestOptions", "line_number": 35, "usage_type": "call" }, { "api_name": "os.path.isfile", "line_number": 38, "usage_type": "call" }, { "api_name": "os.path", "line_number": 38, "usage_type": "attribute" }, { "api_name"...
44792476125
from pynubank import Nubank from excel_writer import write_excel from pathlib import Path import logging def update_credit_balance_data(nu: Nubank, table_path: str): logger = logging.getLogger(__name__) credit_balance = nu.get_credit_card_balance() logger.info(f"Successful credit card balance request") ...
fbsabalete/nubank_spendings
credit_balance.py
credit_balance.py
py
593
python
en
code
0
github-code
21
[ { "api_name": "pynubank.Nubank", "line_number": 7, "usage_type": "name" }, { "api_name": "logging.getLogger", "line_number": 8, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 12, "usage_type": "call" }, { "api_name": "excel_writer.write_excel...
71391050292
import math import torch from torch import nn from torch.autograd import Variable # from .utils import load_state_dict_from_url # model_urls = { # 'efficientnet_b0': 'https://www.dropbox.com/s/9wigibun8n260qm/efficientnet-b0-4cfa50.pth?dl=1', # 'efficientnet_b1': 'https://www.dropbox.com/s/6745ear79b1ltkh/eff...
chrisqqq123/FA-Dist-EfficientNet
models/efficientnet.py
efficientnet.py
py
17,829
python
en
code
2
github-code
21
[ { "api_name": "torch.nn.Module", "line_number": 31, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 31, "usage_type": "name" }, { "api_name": "torch.sigmoid", "line_number": 37, "usage_type": "call" }, { "api_name": "torch.nn.Sequential", ...
9801114926
# coding:utf-8 import wx import wx.richtext from Utils import gl __author__ = 'Tacey Wong' __date__ = "2016年元月" ########################################################################### ##关于 ########################################################################### class MyAbout(wx.Panel): def __init__(self...
TaceyWong/wordcloud_gui
MyUI/MyAbout.py
MyAbout.py
py
4,230
python
en
code
8
github-code
21
[ { "api_name": "wx.Panel", "line_number": 14, "usage_type": "attribute" }, { "api_name": "wx.Panel.__init__", "line_number": 16, "usage_type": "call" }, { "api_name": "wx.Panel", "line_number": 16, "usage_type": "attribute" }, { "api_name": "wx.ID_ANY", "line_n...
21362379934
""" A top-level experimental script that run 100 iterations (on 2 cores) of the RW example (see simfMRI.exp_examples.RW()). """ import functools from simfMRI.exp_examples import RW from simfMRI.analysis.plot import hist_t_all_models from simfMRI.runclass import Run class RunRW100(Run): """ An example of a 100 it...
parenthetical-e/simfMRI
bin/rw100.py
rw100.py
py
1,654
python
en
code
3
github-code
21
[ { "api_name": "simfMRI.runclass.Run", "line_number": 9, "usage_type": "name" }, { "api_name": "simfMRI.runclass.Run.__init__", "line_number": 14, "usage_type": "call" }, { "api_name": "simfMRI.runclass.Run", "line_number": 14, "usage_type": "name" }, { "api_name":...
37722653181
import math from django.shortcuts import render, redirect from .models import * from django.views.decorators.csrf import csrf_protect def Client_0_list(request): countAll=countTable('clientinfo')[0] cntPerPage=10 totalPage= math.ceil(countAll/cntPerPage) try: page = int(request.GET['page']) ...
KihaJeong1994/tingAdminPage
adminPage/views.py
views.py
py
15,781
python
en
code
0
github-code
21
[ { "api_name": "math.ceil", "line_number": 11, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 20, "usage_type": "call" }, { "api_name": "math.ceil", "line_number": 25, "usage_type": "call" }, { "api_name": "django.shortcuts.render",...
72879561973
import time start = time.time() import datetime import dash_html_components as html import numpy as np import PIL from PIL import Image,ImageOps import base64 from io import BytesIO import dash_bootstrap_components as dbc import tensorflow as tf from tensorflow.keras.models import model_from_json print("------- %s l...
dishan3x/Dash-canopy-dive
utils/image_utils.py
image_utils.py
py
16,007
python
en
code
1
github-code
21
[ { "api_name": "time.time", "line_number": 3, "usage_type": "call" }, { "api_name": "time.time", "line_number": 16, "usage_type": "call" }, { "api_name": "time.time", "line_number": 38, "usage_type": "call" }, { "api_name": "time.time", "line_number": 39, "...
9710617860
# -*- coding: utf-8 -*- """ Created on Mon Jan 10 10:26:42 2022 @author: Youngbin Moon (y.moon@unibas.ch) """ import csv import matplotlib.pyplot as plt import argparse """ Aim : get a barchart of the number of polyA sites in each sample. """ def read_counts(input_directory): """ Parameters -------...
zavolanlab/SCINPAS
src/get_barchart_numpolyA_nextflow.py
get_barchart_numpolyA_nextflow.py
py
3,446
python
en
code
2
github-code
21
[ { "api_name": "csv.reader", "line_number": 39, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.subplots", "line_number": 83, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 83, "usage_type": "name" }, { "api_name": "matplotlib.py...
2366804879
from sys import stdin as s from collections import deque s=open("input.txt","rt") n= int(s.readline()) top_list = list(map(int,s.readline().split())) dq=deque() stack=[0]*n #0으로 초기화된 배열 선언 def razor(dq): for i in range(len(top_list)): while dq and dq[-1][0]<top_list[i] : dq.pop() if dq:...
heekyoung2000/jungle-algorithm
second/stack/2493_ag.py
2493_ag.py
py
435
python
en
code
0
github-code
21
[ { "api_name": "sys.stdin", "line_number": 4, "usage_type": "name" }, { "api_name": "sys.stdin.readline", "line_number": 6, "usage_type": "call" }, { "api_name": "sys.stdin", "line_number": 6, "usage_type": "name" }, { "api_name": "sys.stdin.readline", "line_nu...
23617215852
import asyncio import os import subprocess import sys import time from unittest import IsolatedAsyncioTestCase from ahk import AsyncAHK from ahk import AsyncWindow class TestWindowAsync(IsolatedAsyncioTestCase): win: AsyncWindow async def asyncSetUp(self) -> None: self.ahk = AsyncAHK() self....
spyoungtech/ahk-rewrite
tests/_async/test_window.py
test_window.py
py
5,192
python
en
code
0
github-code
21
[ { "api_name": "unittest.IsolatedAsyncioTestCase", "line_number": 12, "usage_type": "name" }, { "api_name": "ahk.AsyncWindow", "line_number": 13, "usage_type": "name" }, { "api_name": "ahk.AsyncAHK", "line_number": 16, "usage_type": "call" }, { "api_name": "subproc...
8064679577
from flask import Flask, request from flask import Response from werkzeug.contrib.fixers import ProxyFix from flask import request import sys import os import uuid import base64 import json import time import subprocess from subprocess import check_output, CalledProcessError, STDOUT import shlex import re from array im...
Halkyon64/docker-collection
ffmpeg/app.py
app.py
py
2,434
python
en
code
0
github-code
21
[ { "api_name": "flask.Flask", "line_number": 19, "usage_type": "call" }, { "api_name": "shlex.split", "line_number": 22, "usage_type": "call" }, { "api_name": "subprocess.Popen", "line_number": 25, "usage_type": "call" }, { "api_name": "subprocess.PIPE", "line_...
37218264737
from openpyxl import Workbook, load_workbook from selenium import webdriver import string import time from unidecode import unidecode estados = {"11": "RO", "12": "AC", "13": "AM", "14": "RR", "15": "PA", "16": "AP", "17": "TO", "21": "MA", ...
kslima/bootTransp
consulta_placa.py
consulta_placa.py
py
3,167
python
pt
code
0
github-code
21
[ { "api_name": "unidecode.unidecode", "line_number": 48, "usage_type": "call" }, { "api_name": "selenium.webdriver.Chrome", "line_number": 63, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 63, "usage_type": "name" }, { "api_name": "time...
37782123705
"""A thin wrapper of ROS clients.""" import time import logging import numpy as np import rospy import actionlib from actionlib_msgs.msg import GoalStatus import articulated.srv import articulated.msg logger = logging.getLogger(__name__) class ImpedanceRegulation: def __init__(self, prefix="franka_"): ...
Schule007/pixiu
packages/articulated/src/articulated_franka/robot.py
robot.py
py
3,934
python
en
code
0
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "rospy.ServiceProxy", "line_number": 18, "usage_type": "call" }, { "api_name": "articulated.srv.srv", "line_number": 19, "usage_type": "attribute" }, { "api_name": "articul...
73728218933
#!/usr/bin/env python # -*- coding: utf-8 -*- import multiprocessing # To make python setup.py test happy import os import shutil import subprocess from distutils.command.clean import clean from setuptools import find_packages from setuptools import setup multiprocessing PACKAGE = 'ndscheduler' __version__ = None ...
Nextdoor/ndscheduler
setup.py
setup.py
py
2,540
python
en
code
1,071
github-code
21
[ { "api_name": "os.path.join", "line_number": 18, "usage_type": "call" }, { "api_name": "os.path", "line_number": 18, "usage_type": "attribute" }, { "api_name": "distutils.command.clean.clean", "line_number": 23, "usage_type": "name" }, { "api_name": "distutils.com...
9295268413
# -*- coding: utf-8 -*- import tensorflow as tf assert tf.test.is_gpu_available() """# Experiment Notes - 1 vs 2.5 upper bound (1 seems to work fine) - Deeper vs more filters - 8 as lowest with 32 filters ( ~750k parameters) gave good results around 900 epochs for overfitting test of 3. Didn't generate all 3 equall...
waynchi/SC-Net
sc_cnn_cifar_grayscale.py
sc_cnn_cifar_grayscale.py
py
23,674
python
en
code
0
github-code
21
[ { "api_name": "tensorflow.test.is_gpu_available", "line_number": 3, "usage_type": "call" }, { "api_name": "tensorflow.test", "line_number": 3, "usage_type": "attribute" }, { "api_name": "numpy.float32", "line_number": 41, "usage_type": "attribute" }, { "api_name":...
10245545961
import os import shutil from colorama import init, Fore, Style init() print(Fore.GREEN + "Change to green text for move.") def move_videos(source_dir, dest_dir): for root, dirs, files in os.walk(source_dir): for file in files: if file.endswith((".mp4", ".mov", ".mkv", ".ts" "m4v")): ...
nprasad2077/scripts
src/extract_vid.py
extract_vid.py
py
1,200
python
en
code
0
github-code
21
[ { "api_name": "colorama.init", "line_number": 5, "usage_type": "call" }, { "api_name": "colorama.Fore.GREEN", "line_number": 6, "usage_type": "attribute" }, { "api_name": "colorama.Fore", "line_number": 6, "usage_type": "name" }, { "api_name": "os.walk", "line...
6543444144
import pandas as pd import nltk from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.feature_selection import chi2 import numpy as np from sklearn.model_selection import train_test_split from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfTran...
paz97/Twitter-Mood-Classifier
analysis.py
analysis.py
py
5,194
python
en
code
1
github-code
21
[ { "api_name": "pandas.read_table", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.nan", "line_number": 24, "usage_type": "attribute" }, { "api_name": "pandas.concat", "line_number": 39, "usage_type": "call" }, { "api_name": "sklearn.feature_extrac...
32470196931
import sys, warnings, types, copy, string, os, time, stat from math import pi, sin, cos, tan def wr_long(f, x): ''' "Internal; write a 32-bit int to a file in little-endian order." -<https://svn.python.org/projects/python/trunk/Lib/py_compile.py> License: (PYTHON SOFTWARE FOUNDATION LICENSE VERSION ...
Poikilos/flowchartpython
flowchartpython/sourceFile.py
sourceFile.py
py
220,327
python
en
code
0
github-code
21
[ { "api_name": "importlib.util.MAGIC_NUMBER.hex", "line_number": 23, "usage_type": "call" }, { "api_name": "importlib.util", "line_number": 23, "usage_type": "attribute" }, { "api_name": "string.ascii_letters", "line_number": 42, "usage_type": "attribute" }, { "api...
74445862772
from flask import Flask, render_template, redirect, flash, request from utils.dte_scraper import * from utils.blogs import * from flask import url_for from flask_cors import CORS import pandas as pd import numpy as np # Configure application app = Flask(__name__) CORS(app) @app.route('/', methods=['POST', 'GET']) def...
GrayFlash/carbon_footprint_estimator
app.py
app.py
py
1,859
python
en
code
0
github-code
21
[ { "api_name": "flask.Flask", "line_number": 11, "usage_type": "call" }, { "api_name": "flask_cors.CORS", "line_number": 12, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 15, "usage_type": "call" }, { "api_name": "flask.render_templa...
43971843387
""" Model contains set of functions to load pretrained model, make prediction with loaded model and functions that process input data to a format that model exprects. Model - Sentiment Analysis LSTM Model """ import os import re import pickle import torch import torch.nn as nn import numpy as np import nltk from nl...
bdnf/Application-Deployment-on-EKS-Cluster-using-Jenkins
app/predict.py
predict.py
py
5,104
python
en
code
0
github-code
21
[ { "api_name": "torch.nn.Module", "line_number": 24, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 24, "usage_type": "name" }, { "api_name": "torch.nn.Embedding", "line_number": 35, "usage_type": "call" }, { "api_name": "torch.nn", "line...
10507708071
import json import pytest import requests from hamcrest import assert_that, has_item from interface.service.tag import Tag class TestTag: def setup_class(self): # todo:数据清理的过程,把测试数据清空或者还原 self.tag = Tag() self.tag.get_token() self.origin_data = self.tag.list().json()["tag_group...
zhousk/hogwarts
interface/service/test_tag.py
test_tag.py
py
7,302
python
en
code
0
github-code
21
[ { "api_name": "interface.service.tag.Tag", "line_number": 15, "usage_type": "call" }, { "api_name": "pytest.mark.parametrize", "line_number": 59, "usage_type": "call" }, { "api_name": "pytest.mark", "line_number": 59, "usage_type": "attribute" }, { "api_name": "py...
2700806217
import tempfile import numpy as np import h5py from pyscf.pbc import lib as pbclib #einsum = np.einsum einsum = pbclib.einsum # This is restricted (R)CCSD # Ref: Hirata et al., J. Chem. Phys. 120, 2581 (2004) ### Eqs. (37)-(39) "kappa" def cc_Foo(t1,t2,eris): nocc, nvir = t1.shape foo = eris.fock[:nocc,:no...
sunchong137/pyscf_2017
cc/rintermediates.py
rintermediates.py
py
6,937
python
en
code
1
github-code
21
[ { "api_name": "pyscf.pbc.lib.einsum", "line_number": 8, "usage_type": "attribute" }, { "api_name": "pyscf.pbc.lib", "line_number": 8, "usage_type": "name" }, { "api_name": "numpy.array", "line_number": 64, "usage_type": "call" }, { "api_name": "numpy.complex", ...
26489952850
""" Tests for the graph object. """ import numpy as np import scipy as sp import scipy.sparse import networkx import pytest from context import stag import stag.graph import stag.random import stag.graphio # Define the matrices of some useful graphs. C4_ADJ_MAT = scipy.sparse.csc_matrix([[0, 1, 0, 1], ...
staglibrary/stagpy
test/test_graph.py
test_graph.py
py
16,651
python
en
code
3
github-code
21
[ { "api_name": "scipy.sparse.csc_matrix", "line_number": 15, "usage_type": "call" }, { "api_name": "scipy.sparse", "line_number": 15, "usage_type": "attribute" }, { "api_name": "scipy.sparse.csc_matrix", "line_number": 19, "usage_type": "call" }, { "api_name": "sci...
74370040694
from elasticsearch import Elasticsearch from elastic_transport import ApiResponse es = Elasticsearch('http://localhost:9200') def pretty_print_product_search(response: ApiResponse, comment): print("\n-----------------------------------------") print(comment) print("---------------------------------------...
FatManWalking/plennarylitics
backend/app/ElasticsearchQueries/query_get_top_missing_persons_from_party.py
query_get_top_missing_persons_from_party.py
py
1,036
python
en
code
2
github-code
21
[ { "api_name": "elasticsearch.Elasticsearch", "line_number": 4, "usage_type": "call" }, { "api_name": "elastic_transport.ApiResponse", "line_number": 7, "usage_type": "name" } ]
43131385163
"""classroom_app URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class...
adilsaju/classroom_app
classroom_app/urls.py
urls.py
py
1,571
python
en
code
0
github-code
21
[ { "api_name": "django.urls.path", "line_number": 24, "usage_type": "call" }, { "api_name": "django.contrib.admin.site", "line_number": 24, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 24, "usage_type": "name" }, { "api_name": "...
9004492943
import random import numpy as np from PIL import Image import cv2 from math import pow import neat import pickle import threading rand = lambda x: random.randint(0, x) SIZE = 50 N_EPISODES = 200 PLAYER_N = 1 FOOD_N = 2 ENEMY_N = 3 d = {1: (255, 175, 0), # blueish color 2: (0, 255, 0), # green 3: (0, 0, ...
StevenJPx2/neat-creature
creature_environment.py
creature_environment.py
py
8,238
python
en
code
0
github-code
21
[ { "api_name": "random.randint", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 29, "usage_type": "call" }, { "api_name": "numpy.uint8", "line_number": 29, "usage_type": "attribute" }, { "api_name": "numpy.zeros", "line_n...
37994959107
from config import CONFIG from string import ascii_uppercase class nodeManager(object): """ Here is a class that describe every function that a nodeManager shoudl have """ def createRepertory(self, directory_name): from os import makedirs makedirs(CONFIG[server]['dl_path']+directory_nam...
Fanboooy/projet_tutore
Aqua/core/nodeManager.py
nodeManager.py
py
828
python
en
code
1
github-code
21
[ { "api_name": "os.makedirs", "line_number": 10, "usage_type": "call" }, { "api_name": "config.CONFIG", "line_number": 10, "usage_type": "name" }, { "api_name": "string.ascii_uppercase", "line_number": 14, "usage_type": "argument" }, { "api_name": "{'makedirs': 'os...
71347147574
import numpy import matplotlib matplotlib.use('Qt5Agg') from matplotlib import pyplot sampling_frequency = 4096 # Hz time_resolution = 1/sampling_frequency time_start = 0 # s time_end = 8 # s time = numpy.arange(time_start, time_end, time_resolution) # attenzione ai valori finali signal_amplitude = 1 frequency = 3...
FedericoMuciaccia/binary_systems
code/phase_portrait.py
phase_portrait.py
py
1,465
python
en
code
0
github-code
21
[ { "api_name": "matplotlib.use", "line_number": 5, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.pi", "line_number": 17, "usage_type": "attribute" }, { "api_name": "numpy.sin", "line_number...
14016893599
# IMPORT PACKAGES import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import yfinance as yf from scipy.stats import norm from datetime import datetime from dateutil.relativedelta import relativedelta np.random.seed(42) # ======================================================...
acrizkyakbar/Value-at-Risk
Value-at-Risk.py
Value-at-Risk.py
py
23,126
python
en
code
0
github-code
21
[ { "api_name": "numpy.random.seed", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 11, "usage_type": "attribute" }, { "api_name": "yfinance.download", "line_number": 32, "usage_type": "call" }, { "api_name": "pandas.Series",...
6591864222
import cv2 import os max_sample = 2000 def create_dataset(intruder = False): face_cascade = cv2.CascadeClassifier("/home/aditya/College Project/data/haarcascade_frontalface_alt2.xml") cap = cv2.VideoCapture(0) id = input("Enter user ID: ") sampleNum = 0 folder = "Dataset" if intruder: ...
aditya-rawat-99/College-Project
CreateDataset.py
CreateDataset.py
py
1,588
python
en
code
0
github-code
21
[ { "api_name": "cv2.CascadeClassifier", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.VideoCapture", "line_number": 7, "usage_type": "call" }, { "api_name": "os.mkdir", "line_number": 17, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "lin...
36074094758
import numpy as np import torch import torch.nn.functional as F def softmax(scores): es = np.exp(scores - scores.max(axis=-1)[..., None]) return es / es.sum(axis=-1)[..., None] class AverageMeter(object): """Computes and stores the average and current value""" def __init__(self): self.reset(...
mengyuest/temporal-shift-module
ops/utils.py
utils.py
py
6,961
python
en
code
1
github-code
21
[ { "api_name": "numpy.exp", "line_number": 6, "usage_type": "call" }, { "api_name": "torch.matmul", "line_number": 49, "usage_type": "call" }, { "api_name": "torch.unique", "line_number": 70, "usage_type": "call" }, { "api_name": "torch.zeros", "line_number": 7...
27421650661
import cv2 import numpy as np img_rgb = cv2.imread('pictures/8.bmp') img = cv2.cvtColor(img_rgb, cv2.COLOR_BGR2GRAY) template1 = cv2.imread('img/comp1.bmp',0) template2 = cv2.imread('img/temp1.png',0) template3 = cv2.imread('img/temp2.png',0) w1, h1 = template1.shape[::-1] w2, h2 = template2.shape[::-1] w3, h3 = tem...
waranyadatong/InspectionMachine
check_head.py
check_head.py
py
3,410
python
en
code
1
github-code
21
[ { "api_name": "cv2.imread", "line_number": 4, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 5, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", "line_number": 5, "usage_type": "attribute" }, { "api_name": "cv2.imread", "line_n...
4299233712
import asyncio import aioredis import platform from sometools.async_tools.base import Base if not (platform.system() == 'Windows'): import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) # 使用 uvloop 来替换 asyncio 内部的事件循环。 class AsyncIoRedisMixIn(Base): def __init__(self, *args, **kwargs): ...
584807419/SomeTools
sometools/async_tools/redis_tools/async_io_redis.py
async_io_redis.py
py
1,193
python
en
code
0
github-code
21
[ { "api_name": "platform.system", "line_number": 6, "usage_type": "call" }, { "api_name": "asyncio.set_event_loop_policy", "line_number": 9, "usage_type": "call" }, { "api_name": "uvloop.EventLoopPolicy", "line_number": 9, "usage_type": "call" }, { "api_name": "som...
15825135895
from django.db import models from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from django.core import validators from evento.models import Evento # Create your models here. class Perfil(models.Model): telefono = models.CharField( max_length=16, help_text=...
jairoht10/siceft
usuario/models.py
models.py
py
1,815
python
es
code
0
github-code
21
[ { "api_name": "django.db.models.Model", "line_number": 9, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 9, "usage_type": "name" }, { "api_name": "django.db.models.CharField", "line_number": 10, "usage_type": "call" }, { "api_name": ...
32120499532
import os import time import shutil import tempfile import subprocess # nosec import argparse from yaml import YAMLError from ._config_parser import ParserError from ._write_script import write_script from .themes import installed_themes from .utils import terminal_colors BUILD_FILENAME = "webviz_app.py" STATIC_FOL...
elisasth/webviz-config
webviz_config/_build_webviz.py
_build_webviz.py
py
4,450
python
en
code
null
github-code
21
[ { "api_name": "os.path.join", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path", "line_number": 16, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 16, "usage_type": "call" }, { "api_name": "argparse.Namespace", "l...
18822341965
import pyparsing from helpers import vacation_helpers FILE = "input.txt" PLUS = "+" TIMES = "*" # Init pyparsing math_content = pyparsing.Word(pyparsing.alphanums) | '+' | '*' parens = pyparsing.nestedExpr('(', ')', content=math_content) def is_int(string): try: int(string) return True except...
BearHanded/advent_of_code-2020
day_18/bad_math2.py
bad_math2.py
py
2,778
python
en
code
0
github-code
21
[ { "api_name": "pyparsing.Word", "line_number": 8, "usage_type": "call" }, { "api_name": "pyparsing.alphanums", "line_number": 8, "usage_type": "attribute" }, { "api_name": "pyparsing.nestedExpr", "line_number": 9, "usage_type": "call" }, { "api_name": "helpers.vac...
23981745823
import chainlit as cl @cl.on_message async def start(): await cl.Text( content="Here is a global text", name="global text1", display="side" ).send(), elements = [ cl.Image(path="./cat.jpeg", name="image1", display="inline"), cl.Text(content="Here is a side text document", name="te...
onepointconsulting/chainlit-sept-2023
cypress/e2e/local_db/main.py
main.py
py
869
python
en
code
0
github-code
21
[ { "api_name": "chainlit.Text", "line_number": 6, "usage_type": "call" }, { "api_name": "chainlit.Image", "line_number": 11, "usage_type": "call" }, { "api_name": "chainlit.Text", "line_number": 12, "usage_type": "call" }, { "api_name": "chainlit.Text", "line_n...
39394318716
from http import HTTPStatus from django.contrib.auth import get_user_model from django.core.files.uploadedfile import SimpleUploadedFile from django.test import Client, TestCase from django.urls import reverse from posts.forms import PostForm from posts.models import Post, Group, Comment User = get_user_model() cl...
mnk96/yatube
yatube/posts/tests/test_forms.py
test_forms.py
py
6,633
python
ru
code
0
github-code
21
[ { "api_name": "django.contrib.auth.get_user_model", "line_number": 11, "usage_type": "call" }, { "api_name": "django.test.TestCase", "line_number": 14, "usage_type": "name" }, { "api_name": "django.core.files.uploadedfile.SimpleUploadedFile", "line_number": 27, "usage_typ...
20581868190
""" Напишите консольную программу, которой на вход подается единственное число N (без имени или с именем -n), а программа печатает значение Nго числа Фибоначчи """ import sys import argparse import functools @functools.lru_cache(None) def fib(n): if n < 2: return n return fib(n-1) + fib(n-2) def creat...
shinobu9/mipt_advanced_python
Lab 4 sys, argparse/task1.py
task1.py
py
681
python
ru
code
0
github-code
21
[ { "api_name": "functools.lru_cache", "line_number": 10, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 17, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 23, "usage_type": "attribute" } ]
19952502338
import skimage.io as io import numpy as np def box_hotspot_1D(arr, hotspot, pad_size, weight, direction): result = 0 if direction == 0: for i in range(-pad_size, pad_size + 1): # only row if hotspot[0] - i < 0 or hotspot[0] - i >= arr.shape[0]: continue # zero padding ...
Jamies13syx/ImageProcessing
IPTK/neighborhood_processing.py
neighborhood_processing.py
py
7,707
python
en
code
0
github-code
21
[ { "api_name": "numpy.zeros", "line_number": 28, "usage_type": "call" }, { "api_name": "skimage.io.imread", "line_number": 37, "usage_type": "call" }, { "api_name": "skimage.io", "line_number": 37, "usage_type": "name" }, { "api_name": "numpy.ones", "line_numbe...
27604414553
from __future__ import annotations import logging from time import time from typing import Callable, TYPE_CHECKING from anyio import sleep, WouldBlock from .exceptions import StopPropagation from .job import Job from .queue import PriorityQueue if TYPE_CHECKING: from .chat_context import ChatContext from .m...
lwesterhof/semaphore
semaphore/job_queue.py
job_queue.py
py
3,969
python
en
code
123
github-code
21
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 13, "usage_type": "name" }, { "api_name": "message_sender.MessageSender", "line_number": 21, "usage_type": "name" }, { "api_name": "queue.PriorityQueue", "line_number": 23, "usage_type": "name" }, { "api_name": ...
7574012907
MAXSENT = 100 from common.structure import get_contrastive_pairs from common.structure import get_opinions as structure_get_opinions def get_opinions(info): opinions = structure_get_opinions(info) return [i for i in opinions if i[0]] def representativiness(source, summ): points = 0 opinions_source...
raphsilva/contrastive-summarization
common/metrics.py
metrics.py
py
2,128
python
en
code
1
github-code
21
[ { "api_name": "common.structure.get_opinions", "line_number": 8, "usage_type": "call" }, { "api_name": "common.structure.get_contrastive_pairs", "line_number": 52, "usage_type": "call" } ]
1799758342
import math import pickle # import torch import torch.nn as nn import torch.optim as optim from torch.utils.data.dataset import random_split from ignite.engine import Engine, Events from ignite.metrics import Accuracy, Precision, Recall # from gat import GAT, GATFinal from train_utils import assert_vars_change, create_...
agpar/reddit_rep2
machine_learning/archive/bow_gat.py
bow_gat.py
py
3,350
python
en
code
0
github-code
21
[ { "api_name": "torch.nn.Module", "line_number": 14, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 14, "usage_type": "name" }, { "api_name": "gat.GAT", "line_number": 18, "usage_type": "call" }, { "api_name": "gat.GATFinal", "line_number...
37492628505
from django.conf.urls import url from app import views urlpatterns = [ url(r'^flags/new/$', views.flags_new), url(r'^flags/all/', views.flags_all), url(r'^flags/open/', views.open_flags), url(r'^flag/([0-9]+)/$', views.flag), url(r'^sh0ts/new/$', views.sh0ts_new), url(r'^sh0ts/all/', views.sh0t...
pavanw3b/sh00t
app/urls.py
urls.py
py
1,123
python
en
code
266
github-code
21
[ { "api_name": "django.conf.urls.url", "line_number": 5, "usage_type": "call" }, { "api_name": "app.views.flags_new", "line_number": 5, "usage_type": "attribute" }, { "api_name": "app.views", "line_number": 5, "usage_type": "name" }, { "api_name": "django.conf.urls...
28032414991
#IMPORTS# from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import numpy as np from datetime import datetime start = datetime.now() #INITIAL LIST# x = [] y = [] z = [] c = [] #INITIALIZERS# i = 0 j = 0 #"TIME STEP"# dt = 1e-1 #FUNCTIONS# #FIND Z# def Z_Value(x,y): return np....
Thesaxman1126/Online_Backup_of_my_PY_Files
4D_Graphing_MKII.py
4D_Graphing_MKII.py
py
879
python
en
code
0
github-code
21
[ { "api_name": "datetime.datetime.now", "line_number": 6, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 6, "usage_type": "name" }, { "api_name": "numpy.cos", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.sin", "line...
533139483
import pytest from cgpm.crosscat.engine import Engine from cgpm.dummy.twoway import TwoWay from cgpm.utils import general as gu def get_engine(): X = [[0.123, 1, 0], [1.12, 0, 1], [1.1, 1, 2]] rng = gu.gen_rng(1) return Engine( X, outputs=[8,7,9], num_states=4, cctypes=['n...
hiddenswitch/cgpm
tests/test_add_state.py
test_add_state.py
py
2,462
python
en
code
null
github-code
21
[ { "api_name": "cgpm.utils.general.gen_rng", "line_number": 10, "usage_type": "call" }, { "api_name": "cgpm.utils.general", "line_number": 10, "usage_type": "name" }, { "api_name": "cgpm.crosscat.engine.Engine", "line_number": 11, "usage_type": "call" }, { "api_nam...
10540870301
import markdown2 import secrets from django.http import HttpResponseRedirect from django.urls import reverse from django import forms from django.shortcuts import render from . import util from markdown2 import Markdown class NewTaskForm(forms.Form): subject = forms.CharField(label="Your title", widget=forms.Te...
NguyenThieuHuy/Wiki
tasks/views.py
views.py
py
3,665
python
en
code
0
github-code
21
[ { "api_name": "django.forms.Form", "line_number": 13, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 13, "usage_type": "name" }, { "api_name": "django.forms.CharField", "line_number": 14, "usage_type": "call" }, { "api_name": "django.for...