max_stars_repo_path
stringlengths
3
269
max_stars_repo_name
stringlengths
4
119
max_stars_count
int64
0
191k
id
stringlengths
1
7
content
stringlengths
6
1.05M
score
float64
0.23
5.13
int_score
int64
0
5
tallguiseindex/providers/coto.py
seppo0010/tall-guise-index
0
12774851
<reponame>seppo0010/tall-guise-index import requests from lxml import etree from . import Provider class Coto(Provider): URLS = [ 'https://www.cotodigital3.com.ar/sitios/cdigi/browse/catalogo-alimentos-frescos-frutas-y-verduras-hortalizas-pesadas/_/N-g7vcbk?Ntt=1004&Ntk=product.sDisp_091', 'https...
2.390625
2
lamp/__init__.py
leonardocunha2107/LaMP
78
12774852
<filename>lamp/__init__.py import lamp.Constants import lamp.Layers import lamp.SubLayers import lamp.Models import lamp.Translator import lamp.Beam import lamp.Encoders import lamp.Decoders __all__ = [ lamp.Constants, lamp.Layers, lamp.SubLayers, lamp.Models, lamp.Translator, lamp.Beam, la...
1.195313
1
setup.py
NepsAcademy/course-introduction-to-apis
0
12774853
import sys from xml.etree.ElementInclude import include from cx_Freeze import setup, Executable # Dependencies are automatically detected, but it might need fine tuning. # "packages": ["os"] is used as example only # build_exe_options = {"packages": ["os"], "excludes": ["tkinter"]} # base="Win32GUI" should be used on...
2.125
2
python/DynamicProgramming.py/LargestSquare1Matrix.py
sinderpl/CodingExamples
0
12774854
# -*- coding: utf-8 -*- """ Created on Mon Aug 30 15:49:24 2021 @author: alann """ arr = [[1,1,0,1,0], [0,1,1,1,0], [1,1,1,1,0], [0,1,1,1,1]] def largestSquare(arr ) -> int: if len(arr) < 1 or len(arr[0]) < 1: return 0 largest = 0 cache = [[0 for i in range(len(arr[0]))] for j in range(len(a...
3.359375
3
moonlight/score/reader_test.py
lithomas1/moonlight
288
12774855
<reponame>lithomas1/moonlight # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
2.046875
2
vsmomi/command_line_parser.py
dahuebi/vsmomi
0
12774856
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * from future.builtins.disabled import * import sys import fnmatch import re import os import argparse from argparse import ArgumentTypeError import traceback from . import comman...
2.78125
3
deal_solver/_context/__init__.py
orsinium-labs/deal-solver
8
12774857
from ._context import Context from ._layer import ExceptionInfo, ReturnInfo from ._scope import Scope __all__ = [ 'Context', 'ExceptionInfo', 'ReturnInfo', 'Scope', ]
1.195313
1
hatspil/hatspil.py
dodomorandi/hatspil
2
12774858
<gh_stars>1-10 """The execution module of HaTSPiL. This module contains the basic elements to start the execution of the software from command line. """ import argparse import itertools import logging import os import re import shutil import sys import traceback from email.mime.text import MIMEText from enum import En...
2.59375
3
latools/helpers/helpers.py
douglascoenen/latools
0
12774859
""" Helper functions used by multiple parts of LAtools. (c) <NAME> : https://github.com/oscarbranson """ import os import shutil import re import configparser import datetime as dt import numpy as np import dateutil as du import pkg_resources as pkgrs import uncertainties.unumpy as un import scipy.interpolate as inter...
2.578125
3
tasrif/test_scripts/test_pipeline_FillNAOperator.py
qcri/tasrif
20
12774860
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.11.2 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- import numpy as np # %% import pandas as pd from t...
2.75
3
Deeplabv3_Ensemble/get_feature_distribution.py
jackyjsy/CVPR21Chal-Agrivision
5
12774861
<gh_stars>1-10 import argparse import os import time from tqdm import tqdm import shutil from datetime import datetime import matplotlib.pyplot as plt import torch import torch.distributed as dist import torch.nn as nn import apex from apex import amp from apex.parallel import DistributedDataParallel as DDP import s...
2.03125
2
realestate/utils.py
jigartarpara/realestate
1
12774862
<gh_stars>1-10 import frappe def sales_invoice_submit(doc, method = None): return assets = [] for item in doc.items: asset = frappe.get_doc("RealEstate Assets",{"item": item.item_code}) if asset not in assets: asset.save() assets.append(asset) def sales_invoice_cancel(doc, method = None): return assets...
2.265625
2
utils.py
valmsmith39a/u-capstone-casting
0
12774863
<gh_stars>0 import json def format(data): return [item.format() for item in data]
2.375
2
froide/foirequest/migrations/0026_deliverystatus_retry_count.py
manonthemat/froide
0
12774864
<gh_stars>0 # -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2018-07-19 10:35 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('foirequest', '0025_foimessage_original'), ] operations = [ mig...
1.492188
1
SmartDoctor/patient_new/views.py
alirezadaghigh99/Software-Project
0
12774865
<reponame>alirezadaghigh99/Software-Project<gh_stars>0 from django.contrib.auth import authenticate, logout, login from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect from django.shortcuts import render # Create your views here. from patient.models import UserModel, V...
2.453125
2
Curso-em-video-Python/PycharmProjects/pythonExercicios/ex048 #.py
sartinicj/curso-em-video-python
0
12774866
<reponame>sartinicj/curso-em-video-python<filename>Curso-em-video-Python/PycharmProjects/pythonExercicios/ex048 #.py s = 0 for i in range(1, 500+1, 2): m = i + 3 s += m print(s) # imprime 63250 na tela ''' soma = 0 for c in range(1, 501, 2) if c%3 == 0: soma = soma + c print('A soma de todos os va...
3.078125
3
bin/hexes/polyhexes-34-hexagram.py
tiwo/puzzler
0
12774867
<reponame>tiwo/puzzler #!/usr/bin/env python # $Id$ """167 solutions""" import puzzler from puzzler.puzzles.polyhexes34 import Polyhexes34Hexagram puzzler.run(Polyhexes34Hexagram)
1.070313
1
day2/shopping_list_miniprojectpy.py
dikshaa1702/ml
1
12774868
<gh_stars>1-10 # -*- coding: utf-8 -*- """ Created on Sun May 12 19:10:03 2019 @author: DiPu """ shopping_list=[] print("enter items to add in list and type quit when you arew done") while True: ip=input("enter list") if ip=="QUIT": break elif ip.upper()=="SHOW": print(shopping_list) el...
3.59375
4
delimg.py
Liang457/gk-imagebed-server
0
12774869
<filename>delimg.py import os def del_img(): try: file_name = "./img" for root, dirs, files in os.walk(file_name): for name in files: if name.endswith(".png"): # 填写规则 os.remove(os.path.join(root, name)) print("Delete File: " + os.p...
3.21875
3
global_metrics.py
yanb514/I24-trajectory-generation
1
12774870
<gh_stars>1-10 # -*- coding: utf-8 -*- """ Created on Mon Oct 25 13:43:23 2021 @author: wangy79 Produce metrics in the absence of ground truth - Global metrics ID counts (Y) Space gap distribution Valid/invalid (Y) - Tracklet quality Collision Lane-change tracks Outliers Wlh mean/stdev Lengths of tracks Mis...
2.390625
2
0-notes/job-search/SamplesDSAlgos/data_structures/datastructures-linkedlist_singly.py
webdevhub42/Lambda
0
12774871
<reponame>webdevhub42/Lambda<gh_stars>0 """ What is the difference between an array and a linked list? Arrays use memory differently. Arrays store and index elements contiguously. Each element of linked list is stored in a node. Each node has reference or pointer to next node. Linked lists desc...
3.515625
4
examples/keras/Progressive growing of GANs/Progressive growing of GANs/main.py
DYG111/samples-for-ai
0
12774872
<filename>examples/keras/Progressive growing of GANs/Progressive growing of GANs/main.py from __future__ import print_function import numpy as np import sys import os import argparse ################################################################### # Variables ...
2.296875
2
grammars/job/job_normalization.py
JasperGuo/MeaningRepresentationBenchmark
9
12774873
# coding=utf8 import re def tokenize_prolog(logical_form): # Tokenize Prolog normalized_lf = logical_form.replace(" ", "::") replacements = [ ('(', ' ( '), (')', ' ) '), (',', ' , '), ("\\+", " \\+ "), ] for a, b in replacements: normalized_lf = normalized_...
2.953125
3
soteria/executor.py
sreeja/soteria_tool
2
12774874
from datetime import datetime from shutil import copy2, copytree import os import errno import subprocess import re from soteria.exceptions import BoogieParseError, BoogieTypeError, BoogieVerificationError, BoogieUnknownError from soteria.debug_support.debugger import Debugger ##TODO : refactor this class class Execu...
2.1875
2
jabs/ilf/comp.py
hertogp/jabs
1
12774875
''' ilf - compiler ''' import os import json from .parse import parse from .core import Ip4Filter, Ival # -- GLOBALS # (re)initialized by compile_file GROUPS = {} # grp-name -> set([networks,.. , services, ..]) # -- AST = [(pos, [type, id, value]), ..] def ast_iter(ast, types=None): 'iterate across statemen...
2.078125
2
checkov/terraform/module_loading/loaders/git_loader.py
ekmixon/checkov
0
12774876
<filename>checkov/terraform/module_loading/loaders/git_loader.py<gh_stars>0 import os from checkov.common.goget.github.get_git import GitGetter from checkov.terraform.module_loading.content import ModuleContent from checkov.terraform.module_loading.loader import ModuleLoader class GenericGitLoader(ModuleLoader): ...
2.15625
2
tests/parsers/c_parser/exprs/unary_ops/post_increment_op_tests.py
mehrdad-shokri/retdec-regression-tests-framework
21
12774877
<reponame>mehrdad-shokri/retdec-regression-tests-framework<gh_stars>10-100 """ Tests for the :module`regression_tests.parsers.c_parser.exprs.unary_ops.post_increment_op` module. """ from tests.parsers.c_parser import WithModuleTests class PostIncrementOpExprTests(WithModuleTests): """Tests for `PostI...
2.28125
2
python/py-set-add.py
gajubadge11/HackerRank-1
340
12774878
#!/usr/bin/env python3 if __name__ == "__main__": N = int(input().strip()) stamps = set() for _ in range(N): stamp = input().strip() stamps.add(stamp) print(len(stamps))
3.734375
4
src/mpi4py/futures/_core.py
renefritze/mpi4py
0
12774879
# Author: <NAME> # Contact: <EMAIL> # pylint: disable=unused-import # pylint: disable=redefined-builtin # pylint: disable=missing-module-docstring try: from concurrent.futures import ( FIRST_COMPLETED, FIRST_EXCEPTION, ALL_COMPLETED, CancelledError, TimeoutError, ...
1.914063
2
tests/run_hook_test.py
SeaOfOcean/EasyParallelLibrary
100
12774880
# Copyright 2021 Alibaba Group Holding Limited. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
1.515625
2
veronica/interfaces/event.py
nirmalhk7/veronica-cli
0
12774881
<filename>veronica/interfaces/event.py<gh_stars>0 from os import stat_result from datetime import date, datetime, timedelta class EventInterface(): link = None title = "Untitled" calendar = None color = None hangoutLink = None start = None end = None def set_date(self, start, end): ...
2.6875
3
messy_pypi/done/main_readmereader.py
Maxio-Arkanyota/Maxio-Arkanyota
2
12774882
from collections import deque # Implement Mathematiques Stacks # from main_terminalFunctions import from os import get_terminal_size from main_terminalGetKey import getKey def readfile(file): # Gras, Italique, Strike, code, Mcode, Hilight # 0** 1* 2__ 3_ 4~~ 5` 6``...
3.0625
3
provenance/core.py
dmaljovec/provenance
0
12774883
<filename>provenance/core.py import datetime import os import shutil import time from collections import namedtuple from copy import copy import toolz as t from boltons import funcutils as bfu from . import artifact_hasher as ah from . import repos as repos from . import serializers as s from . import utils from ._de...
1.921875
2
tests/active_learning/experiments_test.py
MetaExp/backend
1
12774884
from active_learning.oracles import UserOracle, FunctionalOracle from active_learning.evaluation import Evaluator from active_learning.active_learner import RandomSelectionAlgorithm, GPSelect_Algorithm, UncertaintySamplingAlgorithm from active_learning.rating import length_based import unittest class ActiveLearningEx...
2.25
2
nutszebra_download_cifar10.py
nutszebra/trainer
5
12774885
import six import numpy as np import nutszebra_utility as nz import sys import pickle def unpickle(file_name): fp = open(file_name, 'rb') if sys.version_info.major == 2: data = pickle.load(fp) elif sys.version_info.major == 3: data = pickle.load(fp, encoding='latin-1') fp.close() r...
2.609375
3
tests/bugs/core_5676_test.py
FirebirdSQL/firebird-qa
1
12774886
#coding:utf-8 # # id: bugs.core_5676 # title: Consider equivalence classes for index navigation # decription: # Confirmed inefficiense on: # 3.0.3.32837 # 4.0.0.800 # Checked on: # 3.0.3.32852: OK, ...
1.59375
2
statistics.py
gmurro/MCTS
0
12774887
from tqdm import tqdm from MCTS import MCTS from BinaryTree import BinaryTree import numpy as np import matplotlib.pyplot as plt np.random.seed(15) def run_experiment(max_iterations, dynamic_c=False): """ Run a single experiment of a sequence of MCTS searches to find the optimal path. :param max_iterati...
3.09375
3
src/pywriter/model/chapter.py
peter88213/PyWriter
1
12774888
"""Provide a class for yWriter chapter representation. Copyright (c) 2021 <NAME> For further information see https://github.com/peter88213/PyWriter Published under the MIT License (https://opensource.org/licenses/mit-license.php) """ class Chapter(): """yWriter chapter representation. # xml: <CHAPT...
3.046875
3
Python/main.py
ltzheng/OFDClean
1
12774889
import argparse from utils.data_loader import DataLoader from algorithms.OFDClean import OFDClean if __name__ == '__main__': threshold = 20 sense_dir = ['sense2/', 'sense4/', 'sense6/', 'sense8/', 'sense10/'] sense_path = 'clinical' # sense_dir[1] err_data_path = ['data_err3', 'data_err6', 'data_er...
2.125
2
geosoft/gxapi/GXTEST.py
fearaschiarrai/gxpy
25
12774890
<reponame>fearaschiarrai/gxpy ### extends 'class_empty.py' ### block ClassImports # NOTICE: Do not edit anything here, it is generated code from . import gxapi_cy from geosoft.gxapi import GXContext, float_ref, int_ref, str_ref ### endblock ClassImports ### block Header # NOTICE: The code generator will not replace ...
1.976563
2
DSP Lab 1/make_sin02.py
bubbledoodle/EL-GY-6183-Digital-Signal-Processing-LAB
0
12774891
<filename>DSP Lab 1/make_sin02.py # Make a wave file (.wav) consisting of a sine wave # Adapted from http://www.swharden.com from struct import pack from math import sin, pi import wave Fs = 8000 ## CREATE MONO FILE ## wf = wave.open('sin02_mono.wav', 'w') # wf : wave file wf.setnchannels(1) # one channel (mono) ...
3.21875
3
mytreelstm/Tree.py
luosichengx/treelstm.pytorch
0
12774892
<filename>mytreelstm/Tree.py import os op = ["forall","exists","and","or","not","distinct","implies","iff","symbol","function","real_constant", "bool_constant","int_constant","str_constant","plus","minus","times","le","lt","equals", "ite","toreal","bv_constant","bvnot","bvand","bvor","bvxor","concat","extr...
2.34375
2
utill.py
geekSiddharth/decompiler
4
12774893
""" """ # TODO: make this list complete [exclude stuffs ending with 's'] conditionals = [ "cmp", "cmn", "tst", "teq" ] class CMP(object): def __init__(self, line_no, text): self.line_no = line_no self.text = text class Branch(object): def __init__(self, line_no, text, label...
3.234375
3
examples/geometry/09_projection_matrix_full_CT.py
BAMresearch/ctsimu-toolbox
0
12774894
from ctsimu.geometry import * # Set up a quick CT geometry: myCT = Geometry() myCT.stage.center.x = 250 # SOD myCT.detector.center.x = 800 # SDD # Set the detector size: myCT.detector.setSize( pixelsU = 2000, pixelsV = 1000, pitchU = 0.2, pitchV = 0.2) myCT.update() # signals that we made manual changes m...
2.40625
2
inselect/lib/templates/__init__.py
NaturalHistoryMuseum/inselect
128
12774895
"""Metadata templates """
0.9375
1
data_structures/sets/quick_find_union_find.py
vinta/fuck-coding-interviews
590
12774896
# coding: utf-8 """ Union-Find (Disjoint Set) https://en.wikipedia.org/wiki/Disjoint-set_data_structure """ class QuickFindUnionFind: def __init__(self, union_pairs=()): self.num_groups = 0 self.auto_increment_id = 1 self.element_groups = { # element: group_id, } ...
3.625
4
db_api/apps.py
constantine7cd/database-coursework
6
12774897
<gh_stars>1-10 from django.apps import AppConfig class DbApiConfig(AppConfig): name = 'db_api'
1.203125
1
ogl/shader.py
flintforge/Aris
0
12774898
<filename>ogl/shader.py ''' ARIS Author: 𝓟𝓱𝓲𝓵.𝓔𝓼𝓽𝓲𝓿𝓪𝓵 @ 𝓕𝓻𝓮𝓮.𝓯𝓻 Date:<2018-05-18 15:52:43> Released under the MIT License ''' from OpenGL.GL import * from shadercompiler import ShaderCompiler from ctypes import sizeof, c_float, c_void_p, c_uint import debuglog log = debuglog.init(__name__) # goes in...
2.140625
2
a03_rakhimovb.py
2020-Spring-CSC-226/a03-master
0
12774899
###################################################################### # Author: <NAME> # Username: rakhimovb # Assignment: A03: A Pair of Fully Functional Gitty Psychedelic Robotic Turtles ###################################################################### import turtle def draw_rectangle(t, h, c): """ T...
3.953125
4
fabfile.py
khamidou/kite
136
12774900
<filename>fabfile.py # fabfile for update and deploy # it's necessary to specify an host from fabric.api import * from fabric.contrib.project import rsync_project from fabric.contrib.files import upload_template from setup_config import * PACKAGES = ('rsync', 'puppet') def update_sources(): rsync_project("~", ".....
2.078125
2
apps/tp/mdtp_strategy.py
yt7589/iching
32
12774901
<reponame>yt7589/iching # import numpy as np import pandas as pd import matplotlib.pyplot as plt class MdtpStrategy(object): def __init__(self): self.name = 'apps.tp.MdtpStrategy' self.stock_pool = [ '600000','600010','600015','600016','600018', '60...
2.140625
2
LeetCode/next_permutation.py
milkrong/Basic-Python-DS-Algs
0
12774902
<filename>LeetCode/next_permutation.py class Solution(object): def nextPermutation(self, nums): """ :type nums: List[int] :rtype: void Do not return anything, modify nums in-place instead. """ if not nums: return None i = len(nums)-1 j = -1 # j is set to -1 fo...
3.4375
3
randompy/__init__.py
brennerm/randompy
7
12774903
<gh_stars>1-10 import random import string as st import datetime as dt def string(length, chars='', uppercase=True, lowercase=True, digits=True): if chars == '': chars += st.ascii_uppercase if uppercase else '' chars += st.ascii_lowercase if lowercase else '' chars += st.digits if digits e...
2.890625
3
character_functions.py
Aearsears/mapleai
0
12774904
import numpy as np import time import keyboard import math import threading def attack_mob(boxes,classes): """ recevies in the player box and the mob box and then will move the player towards the mob and then attack it """ #midpoints X1 and X2 player, closestmob = calculate_distance(boxes,classes) ...
2.921875
3
cryptex/test/api_mock.py
coink/cryptex
1
12774905
import os import io import httpretty class APIMock(): """ Responses should be a {method: filename} map """ def __init__(self, mock_url, mock_dir, responses): self.mock_url = mock_url self.responses = responses self.mock_dir = mock_dir def request_callback(self, request, ur...
2.765625
3
py/liquid/vpn/client.py
hoover/liquid-setup
3
12774906
<filename>py/liquid/vpn/client.py import sys import re import json import subprocess from . import ca with open('/var/lib/liquid/conf/options.json', encoding='utf8') as f: OPTIONS = json.load(f) CLIENT_OVPN_TEMPLATE = """\ client dev tun proto udp remote {address} {port} resolv-retry infinite nobind user nobody g...
2.203125
2
Src/query1_svr.py
Mohib-hub/CSO-SBoM
2
12774907
## Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. import sys from load_db import load_graph from load_db import intermediate from load_db import svr_pkgs from load_db import svr_cve_pkgs from load_db import pkg_cve_supr from load_db import pkg_cve_cvss_threshold from load_db import pkgs_with_no_cv...
2.265625
2
camos/plugins/burstclean/burstclean.py
danilexn/camos
1
12774908
# -*- coding: utf-8 -*- # Created on Sat Jun 05 2021 # Last modified on Mon Jun 07 2021 # Copyright (c) CaMOS Development Team. All Rights Reserved. # Distributed under a MIT License. See LICENSE for more info. import numpy as np from camos.tasks.analysis import Analysis from camos.utils.generategui import NumericInp...
2.28125
2
tests/python/unittest/test_gluon_model_zoo.py
zt706/-mxnet_for_ssd
0
12774909
from __future__ import print_function import mxnet as mx from mxnet.gluon import nn from mxnet.gluon.model_zoo.custom_layers import HybridConcurrent, Identity from mxnet.gluon.model_zoo.vision import get_model def test_concurrent(): model = HybridConcurrent(concat_dim=1) model.add(nn.Dense(128, activation='ta...
2.078125
2
complex_auto/dataloader.py
entn-at/cae-invar
31
12774910
""" Created on April 13, 2018 Edited on July 05, 2019 @author: <NAME> & <NAME> Sony CSL Paris, France Institute for Computational Perception, Johannes Kepler University, Linz Austrian Research Institute for Artificial Intelligence, Vienna """ import numpy as np import librosa import torch.utils.data as data import t...
2.265625
2
utils/sort_data_by_cumulus.py
CONABIO/Sipecam-Kobo-a-Zendro
0
12774911
def sort_data_by_cumulus(data): """ Sort data by submitted_by field, which holds the cumulus number (or id), Parameters: data (list): A list containing the report data. Returns: (dict): A dict containg the data sorted by the cumulus ...
3.4375
3
parseTestSet.py
franneck94/Variable-Neighborhood-Search-FLP
1
12774912
import os import errno import itertools directory = 'C:/Users/Jan/Dropbox/Bachelorarbeit/Programm/Testdaten/Raw DataSet/' # listdir = [file for file in os.listdir(directory) if file not in ['capa.txt', 'capb.txt', 'capc.txt']] # for d in listdir: # print('Opening dir: ', directory+'/'+d) # with open(directory...
2.453125
2
git_commits/schedule.py
akaprasanga/SentimentAnalysis_MajorProject
1
12774913
import schedule import time from gql import Main import configparser import json from jsondiff import diff from writedb import writedb import pandas as pd from pandas import DataFrame config = configparser.RawConfigParser() config.read('refresh_time.cfg') interval = config.getint('Main','time') t = int(interval) res...
2.4375
2
app-sdk/python/iagent_sdk/iagent/model/group.py
iconnect-iot/intel-device-resource-mgt-lib
2
12774914
# -*- coding: utf-8 -*- # Copyright (C) 2017 Intel Corporation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
2.296875
2
lib/python/pySitools2_idoc.py
HELIO-HFC/SPoCA
2
12774915
<filename>lib/python/pySitools2_idoc.py # -*- coding: utf-8 -*- """ This is a generic python Sitools2 tool The code defines several classes SitoolsInstance, Field, Query, Dataset and Project @author: <NAME> for IAS 28-08-2012 """ __version__ = "0.9" __license__ = "GPL" __author__ ="<NAME>" __credit__=["<NAME>", "<NAME...
2.640625
3
embeddings/embedding/static/config.py
CLARIN-PL/embeddings
33
12774916
from dataclasses import dataclass from typing import Any, Dict from urllib.error import HTTPError from urllib.request import urlopen import requests import srsly from huggingface_hub import cached_download, hf_hub_url from embeddings.utils.loggers import get_logger _logger = get_logger(__name__) @dataclass class S...
2.40625
2
alipay/aop/api/domain/AlipayBossOrderDiagnosisGetModel.py
snowxmas/alipay-sdk-python-all
213
12774917
<reponame>snowxmas/alipay-sdk-python-all #!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AlipayBossOrderDiagnosisGetModel(object): def __init__(self): self._code = None self._end_time = None self._find_operator = None ...
1.8125
2
biasimpacter/app/app.py
sammous/biasimpact
1
12774918
from dataprovider import Date, Validator, RSSReader, StoryRSS from models import ModelRSS from threading import Thread import logging import schedule import time import json import os logging.basicConfig(filename=os.getenv("BIASIMPACTER_OUTPUT"), level=logging.INFO, format='%...
2.328125
2
gui/snd.py
celephicus/tadtas-joystick
0
12774919
<filename>gui/snd.py #!/usr/bin/env python3 import sys import numpy as np import sounddevice as sd start_idx = 0 f1, f2 = 261.5, 261.5*2 finc = amplitude = 0.4 device = None # Seems to use speaker as a default. samplerate = sd.query_devices(device, 'output')['default_samplerate'] def mk_samples(t, f): a = amplit...
2.375
2
amieclient/client.py
ericblau/amieclient
0
12774920
import json from math import ceil, floor import requests from .packet import PacketList from .packet.base import Packet from .transaction import Transaction from .usage import (UsageMessage, UsageRecord, UsageResponse, UsageResponseError, FailedUsageResponse, UsageStatus) """AMIE client and Usa...
2.421875
2
app/config.py
pawan0410/aig-docs
0
12774921
""" Configuration file """ class Config: """ Base Configuration """ DEBUG = True SECRET_KEY = r'<KEY>' SQLALCHEMY_POOL_SIZE = 5 SQLALCHEMY_POOL_TIMEOUT = 120 SQLALCHEMY_POOL_RECYCLE = 280 MAIL_SERVER = 'smtp.gmail.com' MAIL_PORT = 465 MAIL_USERNAME = r'<EMAIL>' MAIL_PA...
2.171875
2
contre/weights.py
b2-hive/CONTRE
2
12774922
<filename>contre/weights.py from numpy import mean def get_weights(expert_df, normalize_to): """Return dataframe with additional weight column. The weights are calculated with w = q / (1 - q). This is only valid if the output of the classifier is in the range [0,1). The weights should be normalized t...
3.515625
4
xetra/transformers/xetra_transformer.py
Kenebehi/xetra-production-etl-pipeline
0
12774923
"""Xetra ETL Component""" import logging from datetime import datetime from typing import NamedTuple import pandas as pd from xetra.common.s3 import S3BucketConnector from xetra.common.meta_process import MetaProcess class XetraSourceConfig(NamedTuple): """ Class for source configuration data src_first_...
2.171875
2
tests/test_stereo.py
zkbt/two-eyes
0
12774924
<filename>tests/test_stereo.py<gh_stars>0 from twoeyes import Stereo from twoeyes.imports import data_directory, os example_directory = 'two-eyes-examples' try: os.mkdir(example_directory) except: pass def test_stereo(): s = Stereo(os.path.join(data_directory, 'left.jpg'), os.path.join(data...
2.46875
2
60-69/60_Permutation Sequence.py
yanchdh/LeetCode
2
12774925
<filename>60-69/60_Permutation Sequence.py # -*- coding:utf-8 -*- # https://leetcode.com/problems/permutation-sequence/description/ class Solution(object): def getPermutation(self, n, k): """ :type n: int :type k: int :rtype: str """ factorial = [1] ...
3.515625
4
vuln_check/wapitiCore/net/web.py
erick-maina/was
2
12774926
<gh_stars>1-10 #!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file is part of the Wapiti project (http://wapiti.sourceforge.io) # Copyright (C) 2008-2020 <NAME> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Fr...
2.390625
2
spatialstats/polyspectra/cuda_powerspectrum.py
mjo22/mobstats
10
12774927
""" Implementation using CuPy acceleration. .. moduleauthor:: <NAME> <<EMAIL>> """ import numpy as np from time import time import cupy as cp from cupyx.scipy import fft as cufft def powerspectrum(*u, average=True, diagnostics=False, kmin=None, kmax=None, npts=None, compute_fft=...
2.453125
2
process.py
fgassert/grace-processing
0
12774928
#!/usr/bin/env python import numpy as np import netCDF4 as nc import scipy.stats as stats import rasterio as rio from rasterio import Affine as A NETCDFS=['jpl.nc','csr.nc','gfz.nc'] SCALER='scaler.nc' SLOPE='slope.csv' R2='r2.csv' P='p.csv' ERR='err.csv' OUT='grace.tif' def main(): # load and average netcdfs ...
2.109375
2
HW5_LeNet/src/config.py
Citing/CV-Course
4
12774929
<filename>HW5_LeNet/src/config.py<gh_stars>1-10 datasetDir = '../dataset/' model = '../model/lenet' modelDir = '../model/' epochs = 20 batchSize = 128 rate = 0.001 mu = 0 sigma = 0.1
1.140625
1
algorithms/refinement/parameterisation/scan_varying_model_parameters.py
jbeilstenedmands/dials
0
12774930
from __future__ import absolute_import, division, print_function from dials.algorithms.refinement.parameterisation.model_parameters import ( Parameter, ModelParameterisation, ) import abc from scitbx.array_family import flex from dials_refinement_helpers_ext import GaussianSmoother as GS # reusable PHIL string...
2.109375
2
Week6/a3.py
stuart22/coursera-p1-002
0
12774931
<gh_stars>0 """A board is a list of list of str. For example, the board ANTT XSOB is represented as the list [['A', 'N', 'T', 'T'], ['X', 'S', 'O', 'B']] A word list is a list of str. For example, the list of words ANT BOX SOB TO is represented as the list ['ANT', 'BOX', 'SOB', 'TO'] ""...
4.25
4
torchero/models/model.py
juancruzsosa/torchero
10
12774932
import json import zipfile import importlib from functools import partial import numpy as np import torch from torch import nn from torch.utils.data import DataLoader, Dataset import torchero from torchero.utils.mixins import DeviceMixin from torchero import meters from torchero import SupervisedTrainer class Input...
2.484375
2
Hackerrank_python/6.itertools/51.itertools.combinations_with_replacement().py
manish1822510059/Hackerrank
39
12774933
<gh_stars>10-100 # Enter your code here. Read input from STDIN. Print output to STDOUT from itertools import combinations_with_replacement x=input().split() s,p=x[0],int(x[1]) y=combinations_with_replacement(sorted(s),p) for i in (y): print(*i,sep="")
3.03125
3
Data Visualization/titanic/Missing Value5.py
ALDOR99/Python
2
12774934
<reponame>ALDOR99/Python<gh_stars>1-10 # -*- coding: utf-8 -*- """ Created on Fri Jun 18 14:34:17 2021 @author: ali_d """ #Missing Value # -Find Missing Value # -Fill Missing Value #Load and Check Data import numpy as np import pandas as pd import matplotlib.pyplot as plt plt.style.use("seaborn-whitegrid") impor...
3.34375
3
nnet/losses.py
c-ma13/sepTFNet
1
12774935
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import torch from itertools import permutations def loss_calc(est, ref, loss_type): """ time-domain loss: sisdr """ # time domain (wav input) if loss_type == "sisdr": loss = batch_SDR_torch(est, ref) if loss_type == "mse"...
2.265625
2
Parser.py
DoubleNy/WADE-HACKATON
0
12774936
<reponame>DoubleNy/WADE-HACKATON import xlrd from xlrd.sheet import ctype_text class Parser: def __init__(self): self.parsed_sheets = dict() self.parsed_sheets_names = [] def get_parsed(self): return self.parsed_sheets_names, self.parsed_sheets def parse(self, file): workb...
2.953125
3
python/import.py
mkanenobu/trashbox
2
12774937
<gh_stars>1-10 #!/usr/bin/python3 # name_main.pyをモジュールとして読み込む import name_main
1.398438
1
backend/src/__init__.py
fjacob21/mididecweb
0
12774938
from .event import Event __all__ = [Event]
1.085938
1
pyRVtest/construction.py
chrissullivanecon/pyRVtest
0
12774939
<gh_stars>0 """Data construction.""" from typing import Any, Callable, Dict, Iterator, List, Mapping, Optional, Union import numpy as np from numpy.linalg import inv from . import exceptions, options from .configurations.formulation import Formulation from .utilities.basics import Array, Groups, RecArray, e...
2.515625
3
code/src/main/python/store/mongo_store.py
DynamicCodeSearch/CodeSeer
5
12774940
import sys import os sys.path.append(os.path.abspath(".")) sys.dont_write_bytecode = True __author__ = "bigfatnoob" from store import base_store, mongo_driver from utils import logger, lib import properties import re LOGGER = logger.get_logger(os.path.basename(__file__.split(".")[0])) class InputStore(base_store...
2.203125
2
blog/migrations/0010_auto_20200309_1619.py
thecodeblogs/django-tcp-blog
1
12774941
<filename>blog/migrations/0010_auto_20200309_1619.py<gh_stars>1-10 # Generated by Django 3.0.3 on 2020-03-09 16:19 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('blog', '0009_auto_20200309_1619'), ] operations = [ migrations.RenameField('Comme...
1.460938
1
okonomiyaki/runtimes/runtime_schemas.py
enthought/okonomiyaki
1
12774942
# flake8: noqa _JULIA_V1 = { "$schema": "http://json-schema.org/draft-04/schema#", "title": "PythonRuntimeMetadata v1.0", "description": "PythonRuntimeMetadata runtime/metadata.json schema.", "type": "object", "properties": { "metadata_version": { "description": "The metadata ver...
1.898438
2
python_sandbox/python_sandbox/tests/effective_python/test_item11.py
jduan/cosmos
0
12774943
<gh_stars>0 import unittest from itertools import zip_longest class TestItem11(unittest.TestCase): def test1(self): names = ['Cecilia', 'Lise', 'Marie'] letters = [len(n) for n in names] max_letters = 0 longest_name = None for name, count in zip(names, letters): ...
3.5625
4
python/pymxp/pymxp/messages/program_fragment.py
MoysheBenRabi/setp
1
12774944
# Copyright 2009 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
2.015625
2
Server/app/views/v1/mixed/post/faq.py
moreal/DMS-Backend
27
12774945
<reponame>moreal/DMS-Backend from flask import Blueprint from flask_restful import Api from app.views.v1 import auth_required from app.models.post import FAQModel from app.views.v1.mixed.post import PostAPIResource api = Api(Blueprint('faq-api', __name__)) @api.resource('/faq') class FAQList(PostAPIResource): ...
2.25
2
python/Coffee Machine/coffeeMachine.py
ninefyi/hacktoberfest2021
0
12774946
<filename>python/Coffee Machine/coffeeMachine.py<gh_stars>0 # In need of coffee but it's lockdown, # so Here I bring a digital coffee machine... import os import coffeeMachine_art from coffeeMachine_data import MENU, resources money_in_machine = 0 machine_ON = True def make_transaction(): print("Please insert ...
3.796875
4
Code/photometry_functions.py
MichaelDAlbrow/pyDIA
10
12774947
import sys import os import numpy as np from astropy.io import fits from pyraf import iraf from io_functions import read_fits_file, write_image from image_functions import compute_saturated_pixel_mask, subtract_sky def transform_coeffs(deg,dx,xx,yy): a = np.zeros((deg+1,deg+1)) nterms = (deg+1)*(deg+2)/2 ...
2.25
2
label_studio/utils/functions.py
sdadas/label-studio
0
12774948
<reponame>sdadas/label-studio # big chunks of code import os import numpy as np import pandas as pd from collections import defaultdict from urllib.parse import urlencode from lxml import etree try: import ujson as json except: import json # examples for import tasks _DATA_EXAMPLES = None # label config vali...
2.34375
2
posturlgenerator/post_url_generator.py
sean-bailey/image-to-svg
1
12774949
<gh_stars>1-10 # -*- coding: utf-8 -*- import os import boto3 import logging import json logger = logging.getLogger("handler_logger") logger.setLevel(logging.DEBUG) def handler(event, context): statuscode=200 bodydata=None try: file_name = event.get('fileName') operation_type=event.get('op...
2.015625
2
pauli_tm.py
johnkerl/sack
6
12774950
<reponame>johnkerl/sack<gh_stars>1-10 #!/usr/bin/python -Wall # ================================================================ # Please see LICENSE.txt in the same directory as this file. # <NAME> # <EMAIL> # 2007-05-31 # ================================================================ # Type module for the group o...
2.40625
2