seq_id stringlengths 4 11 | text stringlengths 113 2.92M | repo_name stringlengths 4 125 โ | sub_path stringlengths 3 214 | file_name stringlengths 3 160 | file_ext stringclasses 18
values | file_size_in_byte int64 113 2.92M | program_lang stringclasses 1
value | lang stringclasses 93
values | doc_type stringclasses 1
value | stars int64 0 179k โ | dataset stringclasses 3
values | pt stringclasses 78
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
31626736274 | import os
import json
CONFIG_FILE = "config.json"
ROLEPLAY_DIR = "roleplay/"
def print_config(config):
print(f"- Role: {config['role']}")
print(f"- Memorable: {config['memorable']}")
print(f"- Temperature: {config['temperature']}")
print(f"- Presence Penalty: {config['presence_penalty']}")
print(f... | GuoDCZ/termichat | ChatConfig.py | ChatConfig.py | py | 2,018 | python | en | code | 1 | github-code | 1 |
18297087048 | """
Authors: Bulelani Nkosi, Caryn Pialat
Main api to run chatbot
"""
# Imports
import os
import logging
from flask import Flask
from slack import WebClient
from slackeventsapi import SlackEventAdapter
from controllers.templates import QuestionAnswering
# Initialize a Flask app to host the events adapter
app = Flask... | BNkosi/odin | src/hera.py | hera.py | py | 2,060 | python | en | code | 1 | github-code | 1 |
28893034625 | # ์ฒซ๋ฒ์งธ ํ์ด
import heapq
def solution1(genres, plays):
answer = []
# ์ฅ๋ฅด๋ณ ์ฌ์์์ ๋ฐ๋ผ ์์ ์ค์
genres_dict = {}
for i in range(len(genres)):
if genres[i] in genres_dict:
genres_dict[genres[i]][0] += [i]
genres_dict[genres[i]][1] += plays[i]
else:
genres... | m0mt/Algorithm-practice | python/programmers/lv3/42579.py | 42579.py | py | 1,751 | python | ko | code | 0 | github-code | 1 |
16450676247 | from django.urls import path
from user import views
app_name = 'user'
urlpatterns = [
path('', views.UserViewSet.as_view(), name='list'),
path('manage/create/', views.CreateUserView.as_view(), name='create'),
path('token/', views.CreateTokenView.as_view(), name='token'),
path('manage/<int... | PittRgz/zebrands_backend | app/user/urls.py | urls.py | py | 383 | python | en | code | 0 | github-code | 1 |
38065948075 | class Solution:
def permute(self, nums: List[int]) -> List[List[int]]:
results = []
def dfs(perm, remaining):
if not remaining:
results.append(perm.copy())
return
rest = remaining.copy()
for num in remaining:
... | HongyuHe/leetcode-new-round | backtracking/46_backtrack.py | 46_backtrack.py | py | 615 | python | en | code | 6 | github-code | 1 |
23724183393 | from fastapi import FastAPI, File, UploadFile, HTTPException, Query, Body
from fastapi.responses import RedirectResponse
from fastapi.middleware.cors import CORSMiddleware
from app.s3_operations import upload_pdf, check_documents, initialize_s3_client, s3_object_exists, upload_file
from app.pdf_processing import proces... | Giocrisrai/chatpdfgio | api/main.py | main.py | py | 7,084 | python | en | code | 0 | github-code | 1 |
37296903973 | from __future__ import print_function
from __future__ import division
import logging
logging.basicConfig(format='%(asctime)s | %(levelname)s : %(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
logger.info("Loading packages ...")
import os
import sys
import torch
import numpy as np
f... | gzerveas/abject_detector | main.py | main.py | py | 10,229 | python | en | code | 1 | github-code | 1 |
34874596536 | '''
๋ฐฑ์ค 12970๋ฒ AB
๊ทธ๋ฆฌ๋
'''
N, M = map(int, input().split())
ans = ''
tu_num = 0
A_num = 0
for i in range(N):
if tu_num < M:
if tu_num - A_num + N - i - 1 <= M:
ans += 'A'
tu_num += - A_num + N - i - 1
A_num += 1
else:
ans += 'B'
else:
ans +... | CodeNinja1126/coding_test | coding_test_py/12970.py | 12970.py | py | 390 | python | en | code | 0 | github-code | 1 |
19323558592 | def solution(distance, rocks, n):
rocks.sort()
rocks.append(distance)
left, right = 0, distance
answer = 0
while left <= right:
prev = 0
min_gap = distance
removed_rocks = 0
mid = (left+right)//2
for rock in rocks:
if rock - prev < mid:
... | hanameee/Algorithm | Programmers/๊ณ ๋์ Kit/์ด๋ถํ์/src/์ง๊ฒ๋ค๋ฆฌ.py | ์ง๊ฒ๋ค๋ฆฌ.py | py | 845 | python | ko | code | 2 | github-code | 1 |
3963994843 | from datetime import datetime
import pandas as pd
import numpy as np
# import config
import yaml
# time_start = config.time_start
# time_end = config.time_end
with open("config.yaml", 'r') as stream:
try:
# print()
content = yaml.load(stream)
time_start = content['time_start']
tim... | heluye/performance-dashboard-by-Flask | transform.py | transform.py | py | 1,113 | python | en | code | 0 | github-code | 1 |
13762048150 | # https://github.com/irishNoah/Algorithm-Study
# 11651๋ฒ / ์ขํ ์ ๋ ฌํ๊ธฐ 2 / S5
# https://www.acmicpc.net/problem/11651
# ํด๋น ๋ฌธ์ ํ์ด๋ lamda๋ฅผ ์ด์ฉํ์ฌ ํด๊ฒฐํ์์
# ์ฐธ๊ณ : https://haesoo9410.tistory.com/193
import sys
sys = sys.stdin.readline
N = int(input())
list_arr = []
while 1:
if N == 0:
break
list_arr.append(list... | irishNoah/Algorithm-Study | BAEKJOON(๋ฐฑ์ค ์จ๋ผ์ธ ์ ์ง)/10000๋ฒ~/11651(์ขํ ์ ๋ ฌํ๊ธฐ 2).py | 11651(์ขํ ์ ๋ ฌํ๊ธฐ 2).py | py | 625 | python | ko | code | 4 | github-code | 1 |
72459539553 | #!/usr/bin/python
# encoding:utf-8
from __future__ import print_function
import json
import sxtwl
import damson
from damson.constraint import (Required, DataType, Between)
from flask import Flask, request
class Result(object):
@staticmethod
def fail(code, message):
return Result(False, code, messag... | stonenice/impulse | onion/onion-lunar.py | onion-lunar.py | py | 6,768 | python | en | code | 0 | github-code | 1 |
35718167183 | # -*- coding: utf-8 -*-
"""
Course: CS 4365/5354 [Computer Vision]
Author: Jose Perez [ID: 80473954]
Assignment: Lab 1
Instructor: Olac Fuentes
"""
from timeit import default_timer as timer
from PIL import Image
from scipy.ndimage import filters
from numpy import *
from pylab import *
def get_hog_data(im_array, number... | DeveloperJose/Python-CS4363-Computer-Vision | Exercise5/exercise5.py | exercise5.py | py | 5,796 | python | en | code | 0 | github-code | 1 |
41332546888 | fname = input("Enter file: ")
if len(fname) < 1:
fname = "mbox-short.txt"
fhand = open(fname)
tmail = dict()
for line in fhand:
line = line.rstrip()
if not line.startswith('From '):
continue
times = line.split()[5]
hour = times.split(':')[0]
tmail[hour] = tmail.get(hour, 0) + 1
lst = ... | supernaut1432/Coding-Things | Python Things/Python For Everybody/Chapter 10/ex_10_01.py | ex_10_01.py | py | 429 | python | en | code | 0 | github-code | 1 |
36630472524 | import numpy as np
def solve():
with open(file_name + ".in") as file:
R, C, L, H = map(int, file.readline().split(" "))
grid_bits = np.zeros(shape=(R, C), dtype=np.bool)
for r in range(R):
line = file.readline()[:C]
for c in range(len(line)):
grid_bi... | shemetz/Google_Hashcode_2018_Pizza_Practice | guillotine.py | guillotine.py | py | 2,849 | python | en | code | 0 | github-code | 1 |
74136094754 | """
Simple sample of an autoregressive model compared to a RNN, focus is on data processsing and making the forcast correctly on a synthetic dataset. Predicting the next value based on T past values.
Out of the box RNN has too much flexibility, over parameterized for this case. It does perform slightly better on a mor... | CodingDog67/ML-Projects | TimeSeries and Sequence Data/simple_timeseries_prediction.py | simple_timeseries_prediction.py | py | 4,143 | python | en | code | 0 | github-code | 1 |
43512574078 | '''
็ปๅฎไธไธชๅญ็ฌฆไธฒ s๏ผๆพๅฐ s ไธญๆ้ฟ็ๅๆๅญไธฒใไฝ ๅฏไปฅๅ่ฎพ s ็ๆๅคง้ฟๅบฆไธบ 1000ใ
็คบไพ 1๏ผ
่พๅ
ฅ: "babad"
่พๅบ: "bab"
ๆณจๆ: "aba" ไนๆฏไธไธชๆๆ็ญๆกใ
็คบไพ 2๏ผ
่พๅ
ฅ: "cbbd"
่พๅบ: "bb"
'''
import math
class Solution:
def longestPalindrome(self, s):
if len(s) < 1:
return ''
start = 0
end = 0
... | km1994/leetcode | old/t20190304/demo.py | demo.py | py | 1,191 | python | en | code | 24 | github-code | 1 |
42279822220 | from sense_hat import SenseHat
sense = SenseHat()
def tropisch_checker():
# Haal de temperatuur op van de Sense HAT
temp = sense.get_temperature()
if temp >= 30:
# Verander de achtergrondkleur van de Sense HAT naar rood
sense.clear((255, 0, 0))
print("Het is een tropische dag, den... | Abmvk/kmc | 014-ChatGPT-SenseHAT.py | 014-ChatGPT-SenseHAT.py | py | 547 | python | nl | code | 1 | github-code | 1 |
36043442065 | import threading
import time
def thread1_job():
print('T1 run')
for i in range(10):
time.sleep(0.1)
print('t1 finish')
def thread2_job():
print('T2 run')
print('t2 finish')
def main():
print("main run")
threading1 = threading.Thread(target=thread1_job,name='T1')
threading1.start... | ByronGe/Python-base-Learning | PythonLearning/LearningThread/TestThread2.py | TestThread2.py | py | 498 | python | en | code | 0 | github-code | 1 |
292220258 | import logging
import threading
import timeit
import os
import psutil
import inspect
from pyramid.threadlocal import get_current_request
lock = threading.Lock()
"""Provides an ``includeme`` function that lets developers configure the
package to be part of their Pyramid application with::
config.include('pyr... | dz0ny/pyramid_straw | pyramid_straw/profiler/__init__.py | __init__.py | py | 4,194 | python | en | code | 3 | github-code | 1 |
5822246836 | from pygbif import occurrences as occ
import json
from datetime import datetime
def latStat(left,right,top,bottom):
latCheck = str(bottom) + "," + str(top)
longCheck = str(left) + "," + str(right)
return [latCheck,longCheck]
#IF NOT HOG FOUND FIND CLOSEST ONE
def hogSearch(left,right,top,bottom):
l = left
r = ... | utkimchi/scrofa-scanner | gbif_occ.py | gbif_occ.py | py | 2,099 | python | en | code | 0 | github-code | 1 |
665699934 | import pandas as pd
from unidecode import unidecode
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity
import re
import numpy as np
class ProductSearch:
def __init__(self, database_csv: str):
self.database = self.__load_bd(database_csv)
... | maryane-castro/deploystreamlit | outro/bd_utils/ProductSearch.py | ProductSearch.py | py | 5,291 | python | pt | code | 1 | github-code | 1 |
7786710979 |
import cv2
import glob
import re
import os
from datetime import datetime
img_array = []
numbers = re.compile(r"(\d+)")
path_to_image_directory = glob.glob('images/ESP32-CAM/*')
latest_image_directory = glob.glob(max(path_to_image_directory, key=os.path.getctime))[0]
def numericalSort(value):
parts = numbers.spli... | ranavner/real_time_dashboard | code/timelapse_generator.py | timelapse_generator.py | py | 779 | python | en | code | 0 | github-code | 1 |
21793048707 | from django.contrib import admin
# Register your models here.
from blog.models import Profile, Post, Tag
@admin.register(Profile)
class ProfileAdmin(admin.ModelAdmin):
model = Profile
@admin.register(Tag)
class TagAdmin(admin.ModelAdmin):
model = Tag
@admin.register(Post)
class PostAdmin(admin.ModelAdmin)... | zhengfen/dvg-backend | blog/admin.py | admin.py | py | 1,527 | python | en | code | 0 | github-code | 1 |
922395795 | import logging
from typing import AsyncGenerator
from geopy import Point, distance
from treasurehunt.game.event_backend import EventBackend
from treasurehunt.game.exceptions import (
MailGatewayException,
WinnerAlreadyExists,
)
from treasurehunt.game.mail_gateway import MailGateway
from treasurehunt.game.repo... | lucekdudek/treasurehunt | treasurehunt/game/treasurehunt.py | treasurehunt.py | py | 3,524 | python | en | code | 0 | github-code | 1 |
23493376011 | import numpy as np
import pandas as pd
from sklearn.preprocessing import StandardScaler
from sklearn.feature_selection import VarianceThreshold
from sklearn.metrics import r2_score, mean_squared_error
from rdkit import Chem
from rdkit.Chem import AllChem
import dill
import pymc3 as pm
import arviz as az
## Helper Func... | cmwoodley/BART_LMWG_model | scripts/train.py | train.py | py | 9,209 | python | en | code | 0 | github-code | 1 |
74452980834 | import utils.format_population as fpt
import utils.population as pup
import utils.graphs as graph
def run():
data = fpt.read_csv('./world_population.csv')
country = input('Ingresa un paรญs => ')
result = pup.get_population_by_country(data, country)
if len(result) > 0:
keys, values = pup.get_popu... | alaydv/Graphics-with-matplotlib | main.py | main.py | py | 418 | python | en | code | 0 | github-code | 1 |
19031013022 | from plotnine import *
from sklearn.datasets import make_regression
from sklearn.model_selection import TimeSeriesSplit
from sklearn.model_selection import KFold
from src.cv_extensions.blocked_cv import BlockedKFold
from src.cv_extensions.hv_blocked_cv import hvBlockedKFold
from src.cv_extensions.modified_cv import Mo... | vcerqueira/blog | posts/8_cv_methods_visualized.py | 8_cv_methods_visualized.py | py | 2,077 | python | en | code | 15 | github-code | 1 |
915146248 | import argparse
import subprocess
import time
parser = argparse.ArgumentParser(description=None);
parser.add_argument("-p", "--parties", action="store", required=True, type=int, help="number of parties");
args = parser.parse_args();
num_parties = args.parties
port = 8888
print("Generating config.ini file...")
subpr... | asb9189/MPC | UDP_Peer_To_Peer/simulation.py | simulation.py | py | 825 | python | en | code | 0 | github-code | 1 |
34004338595 | S = input()
S = set(S)
if 1 not in [len(S&set(t)) for t in ["NS", "WE"]]:
print("Yes")
else:
print("No")
################################
# # s=set(input());print("YNeos"[1 in[(len(s&set(t)))for t in["NS","WE"]]::2])
# # s=set;print("NYoe s"[s(input())in map(s,["NS","EW","NSEW"])::2])
# print("NYoe s"[set(in... | yojiyama7/python_competitive_programming | atcoder/agc/agc003/a_wanna_go_back_home.py | a_wanna_go_back_home.py | py | 361 | python | en | code | 0 | github-code | 1 |
30656593324 | import pprint
import time
import pandas as pd
import requests
from config import *
from concurrent.futures import ThreadPoolExecutor
import logging
# ็ตๆดป้
็ฝฎๆฅๅฟ็บงๅซ,ๆฅๅฟๆ ผๅผ,่พๅบไฝ็ฝฎ
logging.basicConfig(level=logging.DEBUG, # ๆฅๅฟ็ฑปๅไธบDEBUGๆ่
ๆฏDEBUG็บงๅซๆด้ซ็็ฑปๅไฟๅญๅจๆฅๅฟๆไปถไธญ;
format='%(asctime)s %(filename)s[line:%(lineno)d]... | lvah/201903python | day28/LaGou/run.py | run.py | py | 3,518 | python | en | code | 5 | github-code | 1 |
16878784545 | from openerp import models, fields, api, _
from openerp.exceptions import Warning
class HrAppraisalInput(models.Model):
_name = 'hr.appraisal.input'
_inherit = ['mail.thread']
_description = "Appraisal input"
name = fields.Char(
compute='_get_name_hr_appraisal_input', string='Name',
s... | TinPlusIT05/tms | addons/app-trobz-hr/trobz_hr_simple_appraisal/models/hr_appraisal_input.py | hr_appraisal_input.py | py | 4,562 | python | en | code | 0 | github-code | 1 |
26219064236 | #!/usr/bin/python3
"""
Solution for N Queens problem
"""
import sys
n = int(sys.argv[1])
for z in range(1, n - 1):
step = z + 1
tstep = step
new_list = [list([0, 0]) for i in range(0, n)]
for x in range(0, n):
new_list[x] = [x, tstep - 1]
tstep += step
if (tstep > n and n % 2... | j-tyler/holbertonschool-higher_level_programming | 0x08-python-more_classes/101-nqueens.py | 101-nqueens.py | py | 440 | python | en | code | 1 | github-code | 1 |
19031136762 | import numpy as np
from sklearn.model_selection import KFold
from sklearn.utils import indexable, check_random_state
from sklearn.utils.validation import _num_samples
class ModifiedKFold(KFold):
def __init__(self,
n_splits: int,
gap: int = 1,
random_state: int ... | vcerqueira/blog | src/cv_extensions/modified_cv.py | modified_cv.py | py | 2,035 | python | en | code | 15 | github-code | 1 |
42489136503 | # ---
# Created by aitirga at 09/10/2019
# Description: This module contains the gradient descent class
# ---
import os
import time
import matplotlib.pyplot as plt
import numpy as np
from ann_solver.ann_core import ANN
from ann_solver.constants import *
class GradientDescent(ANN):
def initialize(self, alpha=1e-... | aitirga/ANN_solver | ann_solver/gradient_descent.py | gradient_descent.py | py | 8,992 | python | en | code | 0 | github-code | 1 |
3233038622 | criptograma = "UJ PDNAAJ MN ERNCWJV ODNDWLXWOURLCXKNURLXYJAJRVYNMRAUJANDWRORLJLRXWMNERNCWJVKJSXDWPXKRNAWXLXVDWRBCJNWM"
print("Criptograma: " + criptograma)
for d in range(0,26):
mensaje = ""
for c in range(len(criptograma)):
letra = criptograma[c]
mensaje += chr((ord(letra) + d - 65) % 26 + 65)... | dmonde77/Seguridad | ejercicio1-caesar/caesar.py | caesar.py | py | 383 | python | es | code | 0 | github-code | 1 |
16068978876 | """Write a Python program to SORT and print the result data of the above table.
User must have option to choose the Sorting parameter
[1. Sort by P_ID, 2. Sort by Start Time, 3. Sort by Priority]"""
flight_Table = [
{'P_ID': 'P1', 'Process': 'VSCode', 'Start Time': 100, 'Priority': 'MID'},
{'P_ID': 'P23', 'Proces... | Meme-Ruler420/LabAsg | python_asg.py | python_asg.py | py | 1,167 | python | en | code | 0 | github-code | 1 |
12047999152 | import os
import numpy as np
from dataclasses import dataclass
from typing import Dict, Union, NamedTuple
import torch
import torch.nn as nn
from torch.utils.data import TensorDataset, RandomSampler, SequentialSampler, DataLoader
from torch.utils.data.distributed import DistributedSampler
from pyutils.display import... | zphang/nlprunners | nlpr/shared/runner.py | runner.py | py | 9,333 | python | en | code | 1 | github-code | 1 |
2869740595 | class BinarySearchTree:
# left: BinarySearchTree
# right: BinarySearchTree
# key: int
# item: int
# size: int
def __init__(self, debugger = None):
self.left = None
self.right = None
self.key = None
self.item = None
self._size = 1
self.debugger = de... | saintcyrs/cs120 | fall2022/psets/ps2/ps2.py | ps2.py | py | 6,770 | python | en | code | 0 | github-code | 1 |
16199642933 | import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from sklearn.linear_model import LinearRegression
from sklearn.metrics import r2_score
# Funciรณn para estructurar los datos recibidos de txt a un dataframe
def structure_data(file):
data = {"E": [], "J": []}
with open(file) as f:
f... | Mauricio-Portilla-Bit/Non-Ohmic-Studies | SampleAnalysis.py | SampleAnalysis.py | py | 5,312 | python | es | code | 0 | github-code | 1 |
25901547403 | import socket
ip = "127.0.0.1"
port = 4444
server = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
print("Socket Succesfully Created")
server.bind((ip, port))
print("Socket Succesfully Binded")
server.listen(5)
print("Socket is Listening..")
while True:
client, address = server.accept ()
print (f"Connecti... | yat2k/6thSemLabPrograms | CN/ServerClient/AnotherWayOfDoingIt/serverNew.py | serverNew.py | py | 512 | python | en | code | 7 | github-code | 1 |
44122120006 | import sys
def gen(n, count_l, count_r, sequence):
if count_l + count_r == n:
if abs(count_r - count_l) % 4 == 0:
print(sequence)
return
gen(n, count_l + 1, count_r, sequence + 'L')
gen(n, count_l, count_r + 1, sequence + 'R')
sys.stdout = open("sequences.txt", "w")
for i in r... | arodionov18/Langton-s-ant | generator.py | generator.py | py | 359 | python | en | code | 0 | github-code | 1 |
40110859075 | import sys
input = sys.stdin.readline
N, M = map(int, input().split())
# conditions: bit weights
vowels = 'aeiou'
cons = 'bcdfghjklmnpqrstvwxyz'
bit_weights = dict()
for i in range(len(cons)):
bit_weights[cons[i]] = i
# preprocessing
words = []
for i in range(N):
# input word
temp = set()
for c... | WoojunePark/coding_test_python | 2_Implementation/2_C/18119_๋จ์ด์๊ธฐ.py | 18119_๋จ์ด์๊ธฐ.py | py | 918 | python | en | code | 0 | github-code | 1 |
43679593308 | import math
def cilinder_square():
side = 2 * math.pi * radius * height
cicle_square = math.pi * (radius ** 2)
return side, cicle_square
height = int(input('ะััะพัะฐ ัะธะปะธะฝะดัะฐ: '))
radius = int(input('ะ ะฐะดะธัั ัะธะปะธะฝะดัะฐ: '))
full = cilinder_square()[0] + 2 * cilinder_square()[1]
print(f'ะะปะพัะฐะดั ัะธะปะธะฝะดัะฐ {round... | Dober616/work | 20/20.2/2. ะฆะธะปะธะฝะดั.py | 2. ะฆะธะปะธะฝะดั.py | py | 375 | python | ru | code | 0 | github-code | 1 |
38934075635 | class Sieve:
def __init__(self, n: int, sieve_max=100_000_000):
self.sieve_max = sieve_max
self.values = self.sieve(n)
def sieve(self, n: int) -> [int]:
"""takes n and returns a list of all primes from 2 to n using
the sieve of Eratosthenes"""
if n > self.sieve_max:
... | Crossroadsman/python-notes | sieve.py | sieve.py | py | 2,306 | python | en | code | 0 | github-code | 1 |
40167117838 | import os
from google.cloud.devtools import cloudbuild_v1
client = cloudbuild_v1.services.cloud_build.CloudBuildClient()
def validate(event, context):
"""Triggered by a change to a Cloud Storage bucket.
Args:
event (dict): Event payload.
context (google.cloud.functions.Context): Metadata for t... | craigenator/pbmm-lz-terragrunt | terraform-guardrails/modules/guardrails/functions/gcf-guardrails-run-validation/main.py | main.py | py | 3,549 | python | en | code | 0 | github-code | 1 |
10678466176 | '''
INFO 523 Final Project DBSCAN code
https://www.kaggle.com/code/rpsuraj/outlier-detection-techniques-simplified
'''
import pandas as pd
from sklearn.cluster import DBSCAN
import matplotlib.pyplot as plt
df = pd.read_csv("fetal_health.csv")
X = df[['abnormal_short_term_variability', 'baseline value']].values
db = D... | norabaccam/info523-finalproj | dbscan.py | dbscan.py | py | 762 | python | en | code | 0 | github-code | 1 |
35913587611 | # Lisa's Workbook
# A workbook with chapters. Some number of problems per page. How many problems have a number equal to a page's number?
#
# https://www.hackerrank.com/challenges/lisa-workbook/problem
#
# pas compliquรฉ, il faut bien lire et suivre l'รฉnoncรฉ
def workbook(n, k, arr):
resultat = 0
page = 0
... | rene-d/hackerrank | algorithms/implementation/lisa-workbook.py | lisa-workbook.py | py | 1,069 | python | fr | code | 72 | github-code | 1 |
7423041627 | import torch
import torch.nn as nn
from torchsummary import summary
from dataclasses import asdict
from typing import Optional
from .configs.dqn import DQNConfig
from .utils.layer_params import LinearParams, ConvParams
def conv(params: ConvParams, pool: bool = True) -> nn.Module:
layers = [
nn.Conv2d(**a... | ShkarupaDC/game_ai | src/pacman/rl/dqn/network.py | network.py | py | 1,808 | python | en | code | 2 | github-code | 1 |
74574084512 | """Simulations module
simulation_1():
"Preliminary observations" - There are three possible cases.
simulation_2():
"Homogeneous case" - Calculates asymptotic eigenvalues and alignments of eigenvectors.
simulation_3():
"Homogeneous case" - Calculates asymptotic alignment of eigenvectors for growing n.
si... | leobianco/Masters | m2/random_matrix_theory_MVA/Code/simulations.py | simulations.py | py | 6,349 | python | en | code | 0 | github-code | 1 |
20185918794 | import csv
import requests
from bs4 import BeautifulSoup
import write_db as wdb
def check_in_file(file_csv,line_csv):
open(f'{file_csv}','a')
with open(f'{file_csv}',encoding='utf-16', newline="") as file:
reader = csv.reader(file)
for line in reader:
if line == line_csv:
... | Elena-from-UA/GeekHub_PYTHON_2021 | HT_12/parsing.py | parsing.py | py | 2,712 | python | en | code | 0 | github-code | 1 |
19259385951 | import numpy as np
import matplotlib.pyplot as plt
import time
def integrate(f, a, b, N):
""" Uses pure python to integrate function using Riemann sum
Example usage:
integrate(f=lambda x: x**2 , a=0, b=1, N=6000000)
"""
y = np.zeros(1)
if isinstance(f(y), (int, float)): #Checking if th... | kristtuv/UiO | INF4331/Assignment4/integratormod/integrator.py | integrator.py | py | 2,240 | python | en | code | 0 | github-code | 1 |
38139742926 | '''
Descripciรณn: Operando con Listas
Autor: Jessica Castillo
Fecha: 29 de Septiembre 2022
'''
my_list = [1, 2, 4, 4, 1, 4, 2, 6, 2, 9]
resultado = []
for i in my_list:
if i not in resultado:
resultado.append(i)
print("La lista con elementos รบnicos:")
print(resultado) | Castillo0Jessica/Programaci-n-de-Redes | Unidad 1/modulo_3/lab_3_6_1_9.py | lab_3_6_1_9.py | py | 292 | python | es | code | 1 | github-code | 1 |
9436071028 | # -----------------------------------------------------------
# Creating a candlestick chart of stock-market data using python.
#
# (C) 2020 Sandra VS Nair, Trivandrum
# email sandravsnair@gmail.com
# -----------------------------------------------------------
from pandas_datareader import data
from bokeh.models.annot... | sandra-vs-nair/stockmarket-visualization | stock_market_visualization.py | stock_market_visualization.py | py | 2,911 | python | en | code | 0 | github-code | 1 |
38441084623 | from math import *
import numpy as np
class Kinematics:
def __init__(self):
# Leg length
self.l1 = 50
self.l2 = 20
self.l3 = 100
self.l4 = 100
# Body width, length
self.L = 140
self.W = 75
# Leg iterator
# ex) LEG_BACK + LEG_LEFT = a... | danichoi737/SpotMicroJetson | Kinematics/kinematics_new.py | kinematics_new.py | py | 4,165 | python | en | code | null | github-code | 1 |
72533120033 | #%%
import gspread
import pandas as pd
import re
gc = gspread.service_account()
# %%
worksheet = gc.open('Total partidas').sheet1
rows = worksheet.get_all_values()
data = pd.DataFrame.from_records(rows)
data.columns = data.iloc[0]
data.drop(0, inplace=True)
display(data.info())
display(data.describe())
#%%
| bjimenezTechnodomus/licitaciones | clasificacion.py | clasificacion.py | py | 313 | python | en | code | 0 | github-code | 1 |
16847803816 | from django import template
register = template.Library()
@register.filter(nome="remover_texto")
def remover(texto, r):
return texto.replace(r, "")
@register.filter(name="verificardddpr")
def verificardddpr(telefone):
ddd = telefone[0:4]
if ddd == "(44)":
return True
else:
return Fa... | RafaelBicario/P.Road-Django | paginas/templatetags/meus_filtros.py | meus_filtros.py | py | 695 | python | es | code | 1 | github-code | 1 |
20519516626 | #!/usr/bin/env python
import os
import sys
from django.core.exceptions import ImproperlyConfigured
def run_gunicorn(is_production: bool):
from django_events.wsgi import application # noqa
from django_docker_helpers.management import run_gunicorn # noqa
gunicorn_module_name = 'gunicorn_prod' if is_prod... | atten/django_events | manage.py | manage.py | py | 2,025 | python | en | code | 0 | github-code | 1 |
20185055392 | """
this is a classifier
input is the normalized ECG vector
output is the class of the ECG
"""
import json
import os
import random
import sys
import matplotlib.pyplot as plt
import numpy as np
import torch
import torch.optim as optim
from datetime import datetime
from torch.utils.data import DataLoa... | mah533/Synthetic-ECG-Generation---GAN-Models-Comparison | main_classifier_ecg.py | main_classifier_ecg.py | py | 12,172 | python | en | code | 16 | github-code | 1 |
43009584424 | import random
from typing import List, Dict
"""
This file can be a nice home for your move logic, and to write helper functions.
We have started this for you, with a function to help remove the 'neck' direction
from the list of possible moves!
"""
def avoid_my_neck(my_head: Dict[str, int], my_body: List[di... | CaribbeanCool/BattleSnake-Fall-2021 | project3(server_logic).py | project3(server_logic).py | py | 7,876 | python | en | code | 0 | github-code | 1 |
12442256141 | import sys
from PIL import Image
import struct
if len(sys.argv)!=2:
print("Usage: python read_bin.py in_bin_file")
infile = open(sys.argv[1],'rb')
# infile = open('y.bin','rb')
w = int(struct.unpack("i",infile.read(4))[0])
h = int(struct.unpack("i",infile.read(4))[0])
print("The picture\'s size is:")
print(w,h)
# ... | QSCTech/zju-icicles | ่ฎก็ฎๆบ็ปๆไธ็ณป็ป็ปๆ/prj_1/src/read_bin.py | read_bin.py | py | 1,688 | python | en | code | 34,263 | github-code | 1 |
18568061325 | '''
Created on May 15, 2012
@author: lwoydziak
'''
import unittest
from trackeritemstatus import TrackerItemStatus
from jiraticket import JiraTicket
from mockito.mockito import verify, when
from mockito.mocking import mock
from mockito import inorder
from mockito.verification import never
from mockito.matchers import ... | lwoydziak/pivotal-tracker-syncing | src/trackeritemstatus_test.py | trackeritemstatus_test.py | py | 2,516 | python | en | code | 0 | github-code | 1 |
39510095998 | T = int(input())
for i in range(T):
A,B = map(str,input().split())
C = sorted(A)
D = sorted(B)
if C == D:
print(f"{A} & {B} are anagrams.")
else:
print(f"{A} & {B} are NOT anagrams.") | choikeunyoung/algorithm | ๋ฐฑ์ค/Bronze 1/6996.py | 6996.py | py | 220 | python | en | code | 1 | github-code | 1 |
32486153611 | def bt(x, s):
global ans
# if s > K:
# return
if x == N:
if s == K:
ans += 1
return
bt(x+1, s)
if s+arr[x] <= K:
bt(x+1, s+arr[x])
for tc in range(1, int(input())+1):
N, K = map(int, input().split())
arr = list(map(int, input().split()))
visi... | CrimsonTheLegoBuilder/MyBaekjoonSolve | hw/sw2817.py | sw2817.py | py | 385 | python | en | code | 0 | github-code | 1 |
13822947237 | import os
import json
import matplotlib.pyplot as plt
import logging
parent_folder = "/home/nianzu/python_project/comparative-master/Classification/graph_network_for_comparative_sentence/run_graph_attention_model/result/comp_GAT/original_bert_model_using_original_text_uncased"
#single_folder = "/home/nianzu/python_pro... | NianzuMa/ED-GAT-model | result_analysis_lib.py | result_analysis_lib.py | py | 10,911 | python | en | code | 2 | github-code | 1 |
34534755480 | #!/usr/bin/python
"""
GUI for extracting inflectional stems based on substrings, multisets, and subsequences
Jackson Lee and John Goldsmith
May 2014
"""
import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import stemExtract as SE
class widgetFromFile(QWidget):
def __init__(self, parent=None):
... | jacksonllee/stem-extract | stemGUI.pyw | stemGUI.pyw | pyw | 6,993 | python | en | code | 1 | github-code | 1 |
16850168243 | #!/usr/bin/env python3
import rospy
import numpy as np
from sensor_msgs.msg import LaserScan
from ...nodes.update import Update
'''
Calculates the closest distance to the robot according to the
LIDAR scanner.
'''
class CalcNearestDist(Update):
def __init__(self, scan_var_name, dist_var_name):
super... | jarumihooi/Object_Sorter_Robot | scratch/mr_bt/nodes/update_nodes/scan_updates/calc_nearest_dist.py | calc_nearest_dist.py | py | 787 | python | en | code | 1 | github-code | 1 |
8691452126 | # -*- coding: utf-8 -*-
"""
Created on Sun Sep 6 08:37:49 2020
@author: USER
"""
import json
import numpy as np
f = open("C:\Ripplage\ไพกๆ ผใใผใฟ.json", "r")
data = json.load(f)
#dataใฏ1ๆ้่ถณใฎใญใผๆธฌใใผใฟ5999ๅๅ
#็งปๅๅนณๅใBBใฎ่จ็ฎๆ้
term=20
#ในใฏใคใผใบใๅฎ็พฉใใๆ้
squeeze_term=15
#ARใๅๅพใใๆ้
average_range_term=5
#ๆๅฐๆจๆบๅๅทฎใใง... | jumpei7771/githubcodes | bb_btc.1.1.py | bb_btc.1.1.py | py | 8,436 | python | en | code | 0 | github-code | 1 |
37411976792 | import json
products_suppliers = dict() # { product_name : supplier_id}
def filling_tables(connect,file):
""" ะคัะฝะบัะธั ะทะฐะฟะพะปะฝัะตั ะฝะพะฒัะผะธ ะดะฐะฝะฝัะผะธ ัะฐะฑะปะธัั suppliers ะธะท ัะฐะนะปะฐ ะธ ะดะพะฑะฐะฒะปัะตั suppliers_id ะฒ products"""
with connect.cursor() as cursor:
with open(f'{file}') as file:
suppliers = jso... | Vadelevich/change_db | filling_tables.py | filling_tables.py | py | 1,842 | python | ru | code | 0 | github-code | 1 |
70314606115 | #coding:utf-8
import numpy as np
from utils import dataLoader
import os
import tensorflow as tf
from tensorflow.contrib import rnn
class LstmModel():
def __init__(self,config,training=True):
#config
batch_size = config.batch_size
seq_length = config.seq_length
rnn_size = config.rn... | foriyte/NLPTK | classfier/lstm2/model.py | model.py | py | 3,049 | python | en | code | 12 | github-code | 1 |
71464396195 | import numpy as np
from math import sqrt
from utils.transform import list2str, str2list
def combine(parts):
if len(parts) == 1:
return parts[0]
columns = []
for i in range(0, int(sqrt(len(parts)))):
columns.append([])
key = len(columns) - 1
for j in range(i, len(parts), i... | cdubz/advent-of-code-2017 | 21/utils/refactor.py | refactor.py | py | 886 | python | en | code | 3 | github-code | 1 |
26771832343 | from keras.models import Sequential
from keras.models import model_from_json
from keras.layers import Dense
import numpy
import os
numpy.random.seed(7)
# DATASET
train_dataset = numpy.loadtxt("pima-indians-diabetes.train_data.txt", delimiter=",")
X = train_dataset[:,0:8]
Y = train_dataset[:,8]
eval_dataset = numpy.l... | ousainoujaiteh/diabetes-classification | network.py | network.py | py | 1,781 | python | en | code | 0 | github-code | 1 |
72183241954 | #coding=utf-8
#########################################################################
# File Name: mlp_train.py
# Author: guhao
# mail: guhaohit@foxmail.com
# Created Time: 2015ๅนด11ๆ14ๆฅ ๆๆๅ
ญ 19ๆถ04ๅ41็ง
#########################################################################
#!/usr/bin/python
import numpy as np ... | guhaohit/kaggle-coupon | mlp_train.py | mlp_train.py | py | 3,211 | python | en | code | 0 | github-code | 1 |
14793079597 | import argparse
import os
import pprint
import random
import time
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from scipy import special, stats
from tqdm import tqdm
from algorithms.decision import get_decision
from algorithms.forecast import ExponentialMovingAverage
from datasets.base impor... | IElearner/Data-driven-safety-stock-setup | plot.py | plot.py | py | 5,677 | python | en | code | 0 | github-code | 1 |
35799840968 | # -*- coding: utf-8 -*-
# @Author: Lishi
# @Date: 2017-11-09 18:41:13
# @Last Modified by: Lishi
# @Last Modified time: 2017-11-14 20:00:48
from __future__ import print_function
import torch as t
import numpy as np
from torch.autograd import Variable #
import os, sys
import shutil
import pdb
def testTensor():... | stonels0/pytorchLearning | chapter2-ๅฟซ้ๅ
ฅ้จ/chapter2.py | chapter2.py | py | 1,440 | python | en | code | 0 | github-code | 1 |
30346487437 | # A Program that gives the value of present-day human contamination (with error bars) (c_mle) from simulated-data, by implementing the model given in OUR recent WORK (https://doi.org/10.1093/bioinformatics/btz660)
# c_mle stands for the maximum likelihood estimate of contamination
# doc stands for the depth of covera... | JyotiDalal93/contamination_simulated_DNAdata | Python_scripts/Contamination_Error bars.py | Contamination_Error bars.py | py | 9,108 | python | en | code | 0 | github-code | 1 |
26657456323 | """ESMValTool CMORizer for ERA5 data.
Tier
Tier 3: restricted datasets (i.e., dataset which requires a registration
to be retrieved or provided upon request to the respective contact or PI).
Source
https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-pressure-levels
https://cds.climate.cope... | leontavares/ESMValTool | esmvaltool/cmorizers/obs/cmorize_obs_era5.py | cmorize_obs_era5.py | py | 6,003 | python | en | code | null | github-code | 1 |
21695893971 | import pygame
import localisation
import warp
from battle import Battle
import config
import pokemon
import trainer
from draw_area import DrawArea
from player import Player
from game_map import GameMap
from direction import Directions as dir
from animation import ScreenAnimationManager
from pokemon import Pokemon
from ... | dirdr/PokESIEE | game.py | game.py | py | 12,983 | python | en | code | 0 | github-code | 1 |
74780923553 |
import os
gx = 55
gy = 45
tx = 48
ty = 40
ux = 50
uy = 50
ans = 'start'
marks = 100
name = input('What is your name (no space please): ')
file_name = 'D:\\game\\'+name+'.txt'
command = 'notepad '+file_name
game_file = open('d:\\gamedata.txt', 'a')
leader_board = open(file_name, 'a')
print("Game is Starting...")... | AungWinnHtut/CStutorial | Python 2023/adventure4.py | adventure4.py | py | 1,889 | python | en | code | 10 | github-code | 1 |
25252549926 | from flask import Flask, render_template, redirect, request, session, flash
from flask_app import app
from flask_app.models.video_model import Video
from werkzeug.utils import secure_filename
import os
UPLOAD_FOLDER = 'flask_app\\static\\files'
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
ALLOWED_EXTENSIONS = { 'png', ... | blake-jensen99/WeThrow | flask_app/controllers/video_controller.py | video_controller.py | py | 1,613 | python | en | code | 0 | github-code | 1 |
13956333578 | #!/usr/bin/env python
# coding: utf-8
# In[7]:
import MySQLdb
import pandas as pd
import numpy as np
import xgboost as xgb
import datetime
import math
import matplotlib.pyplot as plt
conn = MySQLdb.connect(host="remotemysql.com", user="6txKRsiwk3", passwd="nPoqT54q3m", db="6txKRsiwk3")
cursor = conn.cursor()
sql ... | anandroid/ML-Cryptocurrency | Moving_Average.py | Moving_Average.py | py | 3,091 | python | en | code | 0 | github-code | 1 |
71112271714 | from AIPUBuilder.Optimizer.ops.eltwise import *
from AIPUBuilder.Optimizer.framework import *
from AIPUBuilder.Optimizer.utils import *
import torch
'''
IR float:
layer_id=3
layer_name=ScatterND_0
layer_type=ScatterND
layer_bottom=[Placeholder_0,Placeholder_1,Placeholder_2]
layer_bottom_shape=[[4,... | Arm-China/Compass_Optimizer | AIPUBuilder/Optimizer/ops/scatter_nd.py | scatter_nd.py | py | 6,757 | python | en | code | 18 | github-code | 1 |
43513109388 | '''
216. ็ปๅๆปๅ III
ๆพๅบๆๆ็ธๅ ไนๅไธบย n ็ย kย ไธชๆฐ็็ปๅใ็ปๅไธญๅชๅ
่ฎธๅซๆ 1 -ย 9 ็ๆญฃๆดๆฐ๏ผๅนถไธๆฏ็ง็ปๅไธญไธๅญๅจ้ๅค็ๆฐๅญใ
่ฏดๆ๏ผ
ๆๆๆฐๅญ้ฝๆฏๆญฃๆดๆฐใ
่งฃ้ไธ่ฝๅ
ๅซ้ๅค็็ปๅใย
็คบไพ 1:
่พๅ
ฅ: k = 3, n = 7
่พๅบ: [[1,2,4]]
็คบไพ 2:
่พๅ
ฅ: k = 3, n = 9
่พๅบ: [[1,2,6], [1,3,5], [2,3,4]]
'''
class Solution:
def combinationSum3(self, k: int, n: int) -> List... | km1994/leetcode | topic12_backtrack/T216_combinationSum3/interview.py | interview.py | py | 1,944 | python | en | code | 24 | github-code | 1 |
29553461810 | import pandas as pd
from sklearn.cross_validation import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn import linear_model
from sklearn.model_selection import KFold
from sklearn.metrics import mean_squared_error
from sklearn.preprocessing import PolynomialFeatures
import matplotlib.pypl... | anirudhajitani/ImplementAIHackathon | code.py | code.py | py | 3,462 | python | en | code | 0 | github-code | 1 |
20076957826 | # -*- coding: utf-8 -*-
import scrapy
from pyquery import PyQuery as pq
from hebei.items import HebeiItem
import copy
class MuseumSpider(scrapy.Spider):
name = 'museum'
allowed_domains = ['www.hebeimuseum.org']
start_urls = ['http://www.hebeimuseum.org/channels/175.html']
base_url = "http://www.heb... | X1903/spider-2018 | hebei/hebei/spiders/museum.py | museum.py | py | 2,572 | python | en | code | 2 | github-code | 1 |
29855984768 | def solution(name, yearning, photo):
answer = []
d = {}
for i in range(len(name)):
d[name[i]] = yearning[i]
for p in photo:
point = 0
for i in range(len(p)):
if p[i] in d:
point += d[p[i]]
answer.append(point)
return answer
| wisehero/programmers | level1/์ถ์ต์ ์.py | ์ถ์ต์ ์.py | py | 307 | python | en | code | 0 | github-code | 1 |
11912724357 | import twitter, json, csv
from urllib.parse import unquote
q = 'homepod'
count = 100
loop = 120
CONSUMER_KEY = ''
CONSUMER_SECRET = ''
OAUTH_TOKEN = ''
OAUTH_TOKEN_SECRET = ''
# Set the key and secret of your twitter developer
auth = twitter.oauth.OAuth(OAUTH_TOKEN, OAUTH_TOKEN_SECRET,
CONSUMER_KEY, CONSU... | vic8-j/sandbox | twitter_search.py | twitter_search.py | py | 2,483 | python | en | code | 0 | github-code | 1 |
44468882523 |
import geojson
from dataviz import parse, MY_FILE
def create_map(data_file):
geo_map = {"type": "FeatureCollection"} # Type of GeoJSON
item_list = [] # List to collect each point to graph
for index, line in enumerate(data_file): # Iterate data using enumerate to get line and index
... | rimonberhe/Data-Visualization | map.py | map.py | py | 1,298 | python | en | code | 0 | github-code | 1 |
30272689977 | # coding=utf-8
import logging
import traceback
import re
import types
from qfcommon.thriftclient.presms import PreSmsThriftServer
from qfcommon.server.client import ThriftClient
presmsClient_log = logging.getLogger("presmslog")
class PreSms():
_MOBILESS_RE = '^(1\d{10},)*(1\d{10},?)$'
def... | liusiquan/open_test | qfcommon/qfpay/presmsclient.py | presmsclient.py | py | 4,367 | python | en | code | 0 | github-code | 1 |
70410754274 | import pandas as pd
from sklearn import preprocessing
from sklearn.model_selection import train_test_split
from Algorithms.KNN import KNN
from Algorithms.Naive_Bayes import Naive_Bayes
def main():
# open the dataset
Data_set = pd.read_csv("Data_Sets/bodyPerformance.csv", delimiter=",")
# number of rows... | 7oSkaaa/Data_Mining_Practical | main.py | main.py | py | 1,551 | python | en | code | 0 | github-code | 1 |
3260476545 | import sys
input = lambda: sys.stdin.readline().strip()
def sol():
n = int(input())
wine = [0] * 10001
for i in range(n):
wine[i+1] = int(input())
dp = [0] * 10001
dp[1] = wine[1]
dp[2] = wine[1] + wine[2]
for i in range(3, n+1):
dp[i] = max(dp[i-1], dp[i-3] + wine[i-1] + wi... | zinnnn37/BaekJoon | ๋ฐฑ์ค/Silver/2156.โ
ํฌ๋์ฃผโ
์์/ํฌ๋์ฃผโ
์์.py | ํฌ๋์ฃผโ
์์.py | py | 369 | python | en | code | 0 | github-code | 1 |
72198179235 | from operator import itemgetter
from sklearn.model_selection import train_test_split
from sklearn.feature_selection import RFE
import numpy as np
from scipy.stats.stats import pearsonr
from numpy import zeros
from myFunctions import cv2NN
from myFunctions import cv2NM
from sklearn.feature_selection import SelectKBest
f... | karmelowsky/AcuteInflammations | Main.py | Main.py | py | 4,440 | python | en | code | 0 | github-code | 1 |
10957026616 | def caesarCipher(s, k):
# Write your code here
l_s = [chr(i) for i in range(ord('a'),ord('z')+1)]
u_s = [chr(i) for i in range(ord('A'),ord('Z')+1)]
str = ''
for i in s:
if i in l_s:
str += l_s[(l_s.index(i) + k) % 26]
elif i in u_s:
str += u_s[(u_s.i... | Jaymin28/Hackerrank-Solutions | Caesar Cipher.py | Caesar Cipher.py | py | 391 | python | en | code | 0 | github-code | 1 |
27581269483 | '''
'''
def is_good_data_event(event) :
if not event.isSingle1Trigger() : return False
if not event.isSvtBiasOn() : return False
if not event.isSvtClosed() : return False
if event.hasSvtBurstModeNoise() : return False
if event.hasSvtEventHeaderErrors() : return False
return True
def get... | omar-moreno/hps-analysis | python/utils/AnalysisUtils.py | AnalysisUtils.py | py | 1,023 | python | en | code | 0 | github-code | 1 |
70953303075 | import os
import sys
path = str(sys.argv[1])
print("Folder file Path {0}".format(path))
for filename in os.listdir(path):
input_path = os.path.join(path,filename)
output_name = filename[:-4]
output_path = os.path.join(path,output_name)
if filename.endswith(".mp4"):
os.system("ffmpeg -i {0} -c... | sudoHub/ffmpeg_mp4_Prores | mp4_to_proRes.py | mp4_to_proRes.py | py | 480 | python | en | code | 1 | github-code | 1 |
6325188161 | import numpy as np
# edited code from Corrfunc code to allow Peebles estimator of correlation function
def convert_counts_to_cf(ND1, ND2, NR1, NR2,
D1D2, D1R2, D2R1, R1R2,
estimator='Peebles'):
pair_counts = dict()
fields = ['D1D2', 'D1R2', 'D2R1', 'R1R2']
arrays = [D1D2, D1R2, D2R1, R1R2]
for (fi... | gpetter/QSO_CMB_lens_stacking | myCorrfunc.py | myCorrfunc.py | py | 3,113 | python | en | code | 0 | github-code | 1 |
21929302411 | from playwright.sync_api import expect
def test_go_to_api_page_from_main_page(browser):
context = browser.new_context()
page = context.new_page()
page.goto("https://cloud.ru")
page.wait_for_selector("//li[normalize-space(.)='ะกะตัะฒะธัั']").click()
page.wait_for_selector("//div[@id='portal']//div[nor... | SvetlanaIM/HW_playwright | test_cloud.py | test_cloud.py | py | 703 | python | en | code | 0 | github-code | 1 |
20942099310 | """
Finone API Controller
Processes XML response from Mortech, parses, and stores into database.
Returns response object for user consumption as JSON.
"""
import requests
import xmltodict
from requests import ConnectionError, HTTPError, RequestException, Timeout
from finone import db, app
from finone.constants impor... | diveone/finone | finone/api.py | api.py | py | 6,749 | python | en | code | 0 | github-code | 1 |
32630063402 | #!/usr/bin/env python
# coding: utf-8
# In[18]:
lista = [1, 2, 3, 15, 12, 10, 8]
# In[19]:
for numero in lista:
if (numero % 2 == 0):
print(numero)
# In[ ]:
| rosanenicacio/MBA.IMPACTA.BI23. | laco_for_lista.py | laco_for_lista.py | py | 190 | python | en | code | 0 | github-code | 1 |
4213589271 | # -*- coding: utf-8 -*-
# Learn more: https://github.com/kennethreitz/setup.py
from setuptools import setup
with open('README.md') as f:
readme = f.read()
with open('LICENSE.md') as f:
license = f.read()
setup(
name='BERRYBEEF',
version='0.1',
description='Softbeef for Raspberry ..',
long_... | ferlete/BerryBeef | setup.py | setup.py | py | 680 | python | en | code | 0 | github-code | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.