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
seurat/generation/maya/seurat_rig.py
Asteur/vrhelper
819
12793751
<reponame>Asteur/vrhelper # Copyright 2017 Google Inc. 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 requi...
2.15625
2
cse/migrations/0009_auto_20210418_0602.py
Kunal614/Resources
1
12793752
<gh_stars>1-10 # Generated by Django 3.0.5 on 2021-04-18 06:02 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('cse', '0008_problemset_name'), ] operations = [ migrations.DeleteModel( name='cp', ), migrations.DeleteMo...
1.546875
2
smartcross/envs/obs/__init__.py
opendilab/DI-smartcross
49
12793753
from .sumo_obs import SumoObs from .sumo_obs_runner import SumoObsRunner
1.054688
1
Answer3.py
AshishK199/HackerRank
0
12793754
<gh_stars>0 count=0 r=[] def func1(c): global r global count if c in r: return else: r.append(c) c=c+1 c=str(c) c=c.rstrip('0') c=int(c) count=count+1 func1(c) n=int(input()) count=0 func1(n) print(count)
3.28125
3
print_lending_stats.py
m-Ferstl/bitfinex_lending_stats
1
12793755
<gh_stars>1-10 import argparse from funding_earnings_stats import FundingEarningsCalculator arg_parser = argparse.ArgumentParser() arg_parser.add_argument("funding_earnings_file", help="The path to the bitfinex funding earnings csv file.") args = arg_parser.parse_args() csv_parser = FundingEarningsCalculator(args.fun...
2.953125
3
auto-labeler/MATCH/analysis/precision_and_recall.py
nasa-petal/PeTaL-labeller
3
12793756
''' precision_and_recall.py Run MATCH with PeTaL data. Last modified on 10 August 2021. DESCRIPTION precision_and_recall.py produces three plots from results in MATCH/PeTaL. These three plots appear in plots/YYYYMMDD_precision_recall and are as follows: - HHMMSS_label...
2.984375
3
20_1.py
yunjung-lee/class_python_numpy
0
12793757
####################데이터프레임의 문자열 컬럼들을 합치는 등의 작업으로 새로운 컬럼 생성####################################### #이용함수 apply import pandas as pd import numpy as np from pandas import DataFrame, Series # df = pd.DataFrame({'id' : [1,2,10,20,100,200], # "name":['aaa','bbb','ccc','ddd','eee','fff']}) # print(df) # ...
3.40625
3
research/slim/eval_lib.py
plant-tw/models_plant
3
12793758
# -*- coding: utf-8 -*- # Copyright 2016 The TensorFlow Authors. 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...
2.359375
2
tools/agile-machine-learning-api/codes/trainer/utils/metric_utils.py
ruchirjain86/professional-services
2,116
12793759
<gh_stars>1000+ # Copyright 2019 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
2.671875
3
2-Medium/maxEvents.py
Sma-Das/Leetcode
0
12793760
<reponame>Sma-Das/Leetcode def maxEvents(events: list[list[int, int]]) -> int: events = sorted(events, key=lambda x: (x[1] - x[0], x[0], x[1])) reserved = set() for start, end in events: if start not in reserved: reserved.add(start) else: for day in range(start, end+...
2.75
3
test_app.py
suchayan01/scaler-boocamp
0
12793761
from app import app with app.test_client() as c: response= c.get('/') assert response.data == b'Hello World!' assert response.status_code==200
2.15625
2
coding/learn_collections/defaultdict_01_demo.py
yatao91/learning_road
3
12793762
<gh_stars>1-10 # -*- coding: utf-8 -*- from collections import defaultdict def default_factory(): return "default value" d = defaultdict(default_factory, foo="bar") print("d: ", d) print("foo => ", d["foo"]) print("bar => ", d["bar"])
3
3
dps.py
mattflanzer/photosort
0
12793763
# dropbox-photo-sorter # (c)2018 <NAME> # License: MIT import sys import re import os import shutil from PIL import Image import datetime import time import PIL.ExifTags import sqlite3 import requests import json import unidecode import argparse class Storage: def __init__(self, pathname): self.year = Non...
2.703125
3
tests/test_assessment_status.py
ivan-c/truenth-portal
0
12793764
"""Module to test assessment_status""" from __future__ import unicode_literals # isort:skip from datetime import datetime from random import choice from string import ascii_letters from dateutil.relativedelta import relativedelta from flask_webtest import SessionScope import pytest from sqlalchemy.orm.exc import NoR...
2.078125
2
resource.py
HADESAngelia/NumberedImageComparation
1
12793765
''' File: \resource.py Project: NumberRecongization Created Date: Monday March 26th 2018 Author: Huisama ----- Last Modified: Saturday March 31st 2018 11:08:21 pm Modified By: Huisama ----- Copyright (c) 2018 Hui ''' import os import scipy.misc as scm import random import numpy as np import PIL # STD_WIDTH = 667 # S...
2.546875
3
LeetCode/Python/container_with_most_water.py
wh-acmer/minixalpha-acm
0
12793766
#!/usr/bin/env python #coding: utf-8 class Solution: # @return an integer def maxArea(self, height): low, high = 0, len(height) - 1 max_area = 0 while low < high: max_area = max(max_area, (high - low) * min(height[low], height[high])) if heig...
3.546875
4
data_prepare.py
zhengsl/SmartInvetory
0
12793767
<filename>data_prepare.py #!/usr/bin/env python # -*- coding: utf-8 -*- import xlrd import pymongo import pymysql from datetime import datetime, timedelta import traceback month_dict = {'JAN': 1, 'FEB': 2, 'MAR': 3, 'APR': 4, 'MAY': 5, 'JUN': 6, 'JUL': 7, 'AUG': 8, 'SEP': 9, 'OCT': 10, 'NOV': 11, 'DEC'...
2.953125
3
src/kcri/bap/data.py
zwets/kcri-cge-bap
0
12793768
<reponame>zwets/kcri-cge-bap #!/usr/bin/env python3 # # kcri.bap.data # # Defines the data structures that are shared across the BAP services. # import os, enum from datetime import datetime from pico.workflow.blackboard import Blackboard ### BAPBlackboard class # # Wraps the generic Blackboard with an API that ...
2.140625
2
tensorflow/script/evaluation/building_iou_w_class_acc.py
christinazavou/ANNFASS_Structure
0
12793769
import os import json import sys from tqdm import tqdm from evaluation.mesh_utils import read_obj, read_ply, calculate_face_area, compute_face_centers, \ nearest_neighbour_of_face_centers from iou_calculations import * # BuildNet directories BUILDNET_BASE_DIR = os.path.join(os.sep, "media", "maria", "BigData1", "M...
2.171875
2
lc0253_meeting_rooms_ii.py
bowen0701/python-algorithms-data-structures
8
12793770
<gh_stars>1-10 """Leetcode 253. Meeting Rooms II (Premium) Medium URL: https://leetcode.com/problems/meeting-rooms-ii Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), find the minimum number of conference rooms required. Example1 Input: intervals = [[0,30],[...
3.578125
4
tests/fixtures/create_fixtures.py
brightway-lca/bw_default_backend
0
12793771
<reponame>brightway-lca/bw_default_backend<filename>tests/fixtures/create_fixtures.py<gh_stars>0 import bw_projects as bw import bw_default_backend as backend import pytest @pytest.fixture(scope="function") def basic_fixture(): NAME = "test-fixtures" # if NAME in bw.projects: # bw.projects.delete_proj...
2.078125
2
python/mxnet/ndarray/contrib.py
ijkguo/mxnet
4
12793772
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
2.125
2
bisect/41997.py
simonjayhawkins/pandas
1
12793773
# 1.3: (intended?) Behavior change with empty apply #41997 import pandas as pd print(pd.__version__) df = pd.DataFrame(columns=["a", "b"]) df["a"] = df.apply(lambda x: x["a"], axis=1) print(df)
3.421875
3
tests/examples/minlplib/graphpart_2g-0088-0088.py
ouyang-w-19/decogo
2
12793774
# MINLP written by GAMS Convert at 04/21/18 13:52:22 # # Equation counts # Total E G L N X C B # 65 65 0 0 0 0 0 0 # # Variable counts # x b i s1s s2s sc ...
1.632813
2
tests/conftest.py
verotel/pyzeebe
0
12793775
from random import randint from threading import Event from unittest.mock import patch, MagicMock from uuid import uuid4 import pytest from pyzeebe import ZeebeClient, ZeebeWorker, ZeebeTaskRouter, Job from pyzeebe.grpc_internals.zeebe_adapter import ZeebeAdapter from pyzeebe.task.task import Task from pyzeebe.worker...
1.921875
2
NLP/Word - Embeddings in Tensorflow.py
sunnyshah2894/Tensorflow
1
12793776
import tensorflow as tf import numpy as np # training set. Contains a row of size 5 per train example. The row is same as a sentence, with words replaced # by its equivalent unique index. The below dataset contains 6 unique words numbered 0-5. Ideally the word vector for # 4 and 5 indexed words should be same. X_trai...
3.53125
4
functions.py
krishnaaxo/Stock
0
12793777
import matplotlib.pyplot as plt import yfinance as yf #To access the financial data available on Yahoo Finance import numpy as np def get_stock_data(tickerSymbol, start_date, end_date): tickerData = yf.Ticker(tickerSymbol) df_ticker = tickerData.history(period='1d', start=start_date, end=end_date) return...
3.4375
3
Ubiquitous Computing/src/raspberry/RestSender.py
Alvarohf/University-work
0
12793778
<reponame>Alvarohf/University-work import requests import datetime import json from enum import Enum class Recivers (Enum): FLEX = 'flex' WEIGHT = 'weight' TEMPERATURE = 'temperature' HUMIDITY = 'humidity' NOISE = 'noise' LIGHT = 'light' POSITION = 'position' USER = 'user' class RestSender: def __init__(sel...
2.9375
3
Drawing-On-Images/accessingPixelValues.py
TUCchkul/OpenCV-ImageProcessing-and-Numpy
0
12793779
import cv2 image=cv2.imread(r'md.jpg',flags=1) print(image[0:100,0:100]) #Changes pixel value in the original images #image[0:100,0:100]=255#fully white image[0:100,0:100]=[165,42,42]#RGB format cv2.imshow('New Image',image) cv2.waitKey(0) cv2.destroyAllWindows()
3.21875
3
notes/algo-ds-practice/problems/array/rabin_karp.py
Anmol-Singh-Jaggi/interview-notes
6
12793780
# Verified on https://leetcode.com/problems/implement-strstr import string from functools import lru_cache @lru_cache(maxsize=None) def get_char_code(ch, char_set=string.ascii_letters + string.digits): # We could have also used: # return ord(ch) - ord('0') return char_set.index(ch) def rabin_karp(haysta...
3.484375
3
black_list/black_list/spiders/BL_ICEFugitivesList.py
Damon-zln/ws-scrapy
0
12793781
from bs4 import BeautifulSoup from black_list.items import BLICEFugitivesListItem from scrapy import Spider, Request import os class BlIcefugitiveslistSpider(Spider): name = 'BL_ICEFugitivesList' allowed_domains = ['www.ice.gov'] start_urls = ['https://www.ice.gov/most-wanted'] header = 'Name|Status|O...
3.015625
3
src/exception-handling/custom_exception.py
mrdulin/python-codelab
0
12793782
class UserDefinedException(Exception): def __init__(self, eid, message): self.eid = eid self.message = message class ExceptionDemo: def draw(self, number): print('called compute(%s)' % str(number)) if number > 500 or number <= 0: raise UserDefinedException(101, 'num...
3.296875
3
xotl/ql/core.py
merchise/xotl.ql
1
12793783
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Copyright (c) <NAME> [~º/~] and Contributors # All rights reserved. # # This is free software; you can do what the LICENCE file allows you to. # '''The query language core. ''' import ast import t...
2.21875
2
src/CIA_InternationalOrgnizationsAndGroups.py
Larz60p/WorldFactBook
1
12793784
# copyright (c) 2018 Larz60+ import ScraperPaths import GetPage import CIA_ScanTools from lxml import html from lxml.cssselect import CSSSelector from lxml import etree from lxml.etree import XPath import re import os import sys class CIA_InternationalOrgnizationsAndGroups: def __init__(self): self.spath...
2.65625
3
Char6 AlphaGo/test_qd.py
rh01/Deep-reinforcement-learning-with-pytorch
1
12793785
<gh_stars>1-10 # coding:utf-8 import sys sys.path.append('../../pythonModules') import wg4script, AI_QD, wgdensestranet if __name__ == '__main__': num_xd, strategy_id_r, strategy_id_b = 0, 0, 0 num_plays, num_objcutility = 50, 1 dic2_rolloutaiparas = { 'red': {'type_ai': AI_QD.AI_Q...
1.351563
1
permutations/permutations.py
QQuinn03/LeetHub
0
12793786
<filename>permutations/permutations.py<gh_stars>0 class Solution: def permute(self, nums: List[int]) -> List[List[int]]: if not nums: return [[]] path=[] res=[] self.helper(nums,res,path) return res def helper(self,nums,res,path): if not ...
3.59375
4
tempest/lib/api_schema/response/compute/v2_48/servers.py
mail2nsrajesh/tempest
0
12793787
# Copyright 2017 Mirantis Inc. # # 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 agre...
1.546875
2
recipes/Python/389203_Series_generator_using_multiple_generators_/recipe-389203.py
tdiprima/code
2,023
12793788
<gh_stars>1000+ # Simple series generator with # multiple generators & decorators. # Author : <NAME> def myfunc(**kwds): def func(f): cond = kwds['condition'] proc = kwds['process'] num = kwds['number'] x = 0 for item in f(): if cond and cond(item)...
2.890625
3
oferty/migrations/0012_auto_20181203_1119.py
minikdo/estates
0
12793789
# Generated by Django 2.1.2 on 2018-12-03 10:19 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('oferty', '0011_ofertyest_kto_prowadzi'), ] operations = [ migrations.AlterField( model_name='of...
1.429688
1
Listas de Python/Lista 2/L02EX04.py
4RandomProgrammer/Python
0
12793790
<filename>Listas de Python/Lista 2/L02EX04.py #L02EX04 #inputs CircJose = int(input()) PosJose = int(input()) CircFlav = int(input()) PosFlav = int(input()) #var counterJose = 1 CounterFlav = 1 vivos = 0 PosVivo1 = 1 PosVivo2 = 1 while counterJose <= CircJose: PosVivo1 += 2 if PosVivo1 > counterJose: ...
3.453125
3
finds/alfred.py
terence-lim/investment-data-science
2
12793791
<reponame>terence-lim/investment-data-science """Convenience class and methods to access ALFRED/FRED apis and FRED-MD/FRED-QD - FRED, ALFRED, revisions vintages - PCA, approximate factor model, EM algorithm Author: <NAME> License: MIT """ import os import sys import json import io import numpy as np import pandas as ...
2.671875
3
prompt.py
co/TheLastRogue
8
12793792
from compositecore import Leaf import menu import state __author__ = 'co' def start_accept_reject_prompt(state_stack, game_state, message): prompt = menu.AcceptRejectPrompt(state_stack, message) game_state.start_prompt(state.UIState(prompt)) return prompt.result class PromptPlayer(Leaf): def __init...
2.171875
2
insights/parsers/tests/test_ntp_sources.py
mglantz/insights-core
1
12793793
import pytest from insights.core.dr import SkipComponent from insights.parsers.ntp_sources import ChronycSources, NtpqPn, NtpqLeap from insights.tests import context_wrap chrony_output = """ 210 Number of sources = 3 MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================...
1.796875
2
zero_knowledge/verifier.py
Fritingo/hw
0
12793794
<gh_stars>0 import random as rd def verifier(C, y, g, p): e = rd.randint(1,100) t = yield e if (g**t == (y**e)*C): accept = 1 else: accept = 0 yield accept
2.28125
2
setup.py
tarunbatra/password-validator-python
11
12793795
<filename>setup.py #!/usr/bin/env python from setuptools import setup, find_packages with open("README.rst", "r") as f: long_description = f.read() name = "password_validator" version = "1.0" setup(name=name, version=version, description="Validates password according to flexible and intuitive specificat...
1.414063
1
src/ui/exif_view.py
jmacgrillen/perspective
0
12793796
#! /usr/bin/env python -*- coding: utf-8 -*- """ Name: exif_view.py Desscription: Display any EXIF data attached to the image. Version: 1 - Initial release Author: J.MacGrillen <<EMAIL>> Copyright: Copyright (c) <NAME>. All rights reserved. """ import logging ...
2.796875
3
setup.py
czajowaty/curry-bot
3
12793797
<filename>setup.py from setuptools import setup, find_packages setup( name='CurryBot', author='<NAME>', version='0.1dev', description='Discord bot for Azure Dreams', packages=find_packages(exclude=('tests', 'docs', 'data')), license='MIT', long_description=open('README.md').read(), pyth...
1.179688
1
byol/datasets/cifar100.py
hongxin001/SSL-Backdoor
18
12793798
from torchvision.datasets import CIFAR100 as C100 import torchvision.transforms as T from .transforms import MultiSample, aug_transform from .base import BaseDataset def base_transform(): return T.Compose( [T.ToTensor(), T.Normalize((0.5071, 0.4867, 0.4408), (0.2675, 0.2565, 0.2761))] ) class CIFAR1...
2.546875
3
declarative/overridable_object.py
jrollins/python-declarative
6
12793799
# -*- coding: utf-8 -*- """ """ import types from .properties import HasDeclaritiveAttributes from .utilities.representations import SuperBase class OverridableObject(HasDeclaritiveAttributes, SuperBase, object): """ """ _overridable_object_save_kwargs = False _overridable_object_kwargs = None ...
2.40625
2
bp_gen/bitpattern.py
nicholas-fr/mezzanine
3
12793800
<reponame>nicholas-fr/mezzanine<gh_stars>1-10 # Generates a bit pattern containing frame number, total frames, frame rate, horizontal and vertical resolution # Step 1: define bit pattern for 240x135 video # Step 2: upscale as needed towards target resolution # Note: intended for 480x270 video with 2x2 bit pattern "bit"...
3.046875
3
src/aws_scatter_gather/util/trace.py
cbuschka/aws-scatter-gather
2
12793801
import time import aws_scatter_gather.util.logger as logger def trace(message, *args): return Trace(message, *args) def traced(f): def wrapper(*args, **kwargs): with trace("{} args={}, kwargs={}", f.__name__, [*args], {**kwargs}): return f(*args, **kwargs) return wrapper class Tr...
2.390625
2
slgnn/tests/test_dude_datasets.py
thomasly/slgnn
2
12793802
import unittest from slgnn.data_processing.pyg_datasets import JAK1Dude, JAK2Dude, JAK3Dude from slgnn.config import FILTERED_PUBCHEM_FP_LEN class TestDudeDatasets(unittest.TestCase): def test_jak1_jak2_jak3(self): jak = JAK1Dude() data = jak[0] self.assertEqual(data.x.size()[1], 6) ...
2.0625
2
users/models.py
patxxi/ClonGram
1
12793803
<gh_stars>1-10 from django.db import models from django.contrib.auth.models import User # Create your models here. class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) biography = models.CharField(max_length=250, blank=True, null=True) image = models.ImageField(upload_...
2.296875
2
rpcpy/openapi.py
william-wambua/rpc.py
152
12793804
<reponame>william-wambua/rpc.py<gh_stars>100-1000 import functools import inspect import typing import warnings __all__ = [ "BaseModel", "create_model", "validate_arguments", "set_type_model", "is_typed_dict_type", "parse_typed_dict", "TEMPLATE", ] Callable = typing.TypeVar("Callable", bou...
2.484375
2
fyp/guardian/tests.py
Rishi-42/Guardain-1.0
0
12793805
<filename>fyp/guardian/tests.py from urllib import response from django.test import TestCase from selenium import webdriver from account.forms import RegistrationForm # class FunctionalTestCase(TestCase): # def setUp(self): # self.browser = webdriver.Firefox() # def test(self): # self.browser....
2.265625
2
deskwork_detector.py
sgarbirodrigo/ml-sound-classifier
118
12793806
from realtime_predictor import * emoji = {'Writing': '\U0001F4DD ', 'Scissors': '\u2701 ', 'Computer_keyboard': '\u2328 '} def on_predicted_deskwork(ensembled_pred): result = np.argmax(ensembled_pred) label = conf.labels[result] if label in ['Writing', 'Scissors', 'Computer_keyboard']: p ...
2.46875
2
hp/mechanism_hp.py
web8search/neutron-Neutron-
6
12793807
<reponame>web8search/neutron-Neutron-<gh_stars>1-10 # -*- coding: utf-8 -*- # # H3C Technologies Co., Limited Copyright 2003-2015, 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 Li...
1.492188
1
test/analytic_full_slab.py
pozulp/narrows
5
12793808
<reponame>pozulp/narrows<gh_stars>1-10 #!/usr/bin/env python3 import argparse import matplotlib.pyplot as plt import numpy as np import os import scipy.special as sp import sys MY_DIR = os.path.dirname(__file__) sys.path.append(f'{MY_DIR}/..') from narrows import parse_input, create_mesh # noqa: E402 sys.path.appen...
2.234375
2
examples/wave_share_gps_locator_runner.py
cezaryzelisko/gps-tracker
1
12793809
<reponame>cezaryzelisko/gps-tracker<filename>examples/wave_share_gps_locator_runner.py from gps_tracker.runner import main from gps_tracker.serial_connection import SerialConnection from gps_tracker.wave_share_config import WaveShareGPS from gps_tracker.wave_share_gps_locator import WaveShareGPSLocator from gps_tracker...
2.46875
2
tests/utils.py
mypaceshun/pyfortune
0
12793810
<gh_stars>0 import os from pyfortune.session import Session def get_login_session(): secrets_path = os.environ.get('SECRETS', 'secrets') with open(secrets_path, 'r') as f: lines = f.readlines() username = lines[0].strip() password = lines[1].strip() s = Session() s.login(userna...
2.296875
2
jewtrick/utils/settings.py
ZimnyCat/jewtrick-client
8
12793811
<filename>jewtrick/utils/settings.py # -*- coding: utf-8 -*- import utils.settingsHelper as helper import utils.system as sys booleanArray = { "autoclick": "false", "ping": "true", "time": "false", "requests-counter": "true" } numArray = { "delay": 1, "ping-delay": 5 } def getBoolean(settin...
2.578125
3
setup.py
gisce/esios
7
12793812
<reponame>gisce/esios from setuptools import setup, find_packages PACKAGES_DATA = {'esios': ['data/*.xsd']} setup( name='esios', version='0.12.2', packages=find_packages(), url='https://github.com/gisce/esios', license='MIT', install_requires=['libsaas'], author='GISCE-TI, S.L.', autho...
1.3125
1
setup.py
swasun/RFOMT
2
12793813
<filename>setup.py<gh_stars>1-10 from setuptools import find_packages, setup setup( name='bolsonaro', packages=find_packages(where="code", exclude=['doc', 'dev']), package_dir={'': "code"}, version='0.1.0', description='Bolsonaro project of QARMA non-permanents: deforesting random forest using OMP....
1.375
1
mindhome_alpha/erpnext/patches/v13_0/healthcare_lab_module_rename_doctypes.py
Mindhome/field_service
1
12793814
<reponame>Mindhome/field_service<gh_stars>1-10 from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field def execute(): if frappe.db.exists('DocType', 'Lab Test') and frappe.db.exists('DocType', 'Lab Test Template'): # rename child doctypes doctypes = { 'Lab...
1.921875
2
test/unit/test_firewall_api_v1.py
IBM/networking-services-python-sdk
1
12793815
<filename>test/unit/test_firewall_api_v1.py # -*- coding: utf-8 -*- # (C) Copyright IBM Corp. 2020. # # 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/LIC...
1.796875
2
tests/test_bobocep/test_setup/test_bobo_complex_event.py
r3w0p/bobocep
5
12793816
import unittest from bobocep.rules.actions.no_action import NoAction from bobocep.rules.nfas.patterns.bobo_pattern import BoboPattern from bobocep.setup.bobo_complex_event import \ BoboComplexEvent class TestBoboComplexEvent(unittest.TestCase): def test_constructor(self): name = "evdef_name" ...
2.71875
3
addressbook/models.py
Saviq/django-addressbook
0
12793817
<filename>addressbook/models.py from django.utils.translation import ugettext_lazy as _ from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ObjectDoesNotExist from django.db import models PROPERTY_LABELS = ( ('home', _('home')), ('work', _('work')), ('other', _('...
2.1875
2
RunTCAV.py
zxy317/CIFAR-ZOO
0
12793818
import cav as cav import model as model import tcav as tcav import utils as utils import utils_plot as utils_plot # utils_plot requires matplotlib import os import torch import activation_generator as act_gen import tensorflow as tf working_dir = './tcav_class_test' activation_dir = working_dir + '/activations/' cav_...
2.203125
2
job.py
DiOS-Analysis/Worker
3
12793819
<gh_stars>1-10 import os import logging import base64 import time from enum import Enum from store import AppStore, AppStoreException from pilot import Pilot logger = logging.getLogger('worker.'+__name__) class JobExecutionError(Exception): pass class Job(object): STATE = Enum([u'undefined', u'pending', u'runn...
2.328125
2
benchmarks/v3-app-note/run_benchmarks_pll_empirical.py
ayresdl/beagle-lib
110
12793820
<filename>benchmarks/v3-app-note/run_benchmarks_pll_empirical.py #!/usr/bin/env python2.7 # <NAME> import sys import argparse import subprocess import re from math import log, exp # def gen_log_site_list(min, max, samples): # log_range=(log(max) - log(min)) # samples_list = [] # for i in range(0, samples...
2.21875
2
common_helper_yara/yara_scan.py
mistressofjellyfish/common_helper_yara
0
12793821
from subprocess import check_output, CalledProcessError, STDOUT import sys import re import json import logging from .common import convert_external_variables def scan(signature_path, file_path, external_variables={}, recursive=False): ''' Scan files and return matches :param signature_path: path to sig...
2.609375
3
src/opihiexarata/astrometry/webclient.py
psmd-iberutaru/OpihiExarata
0
12793822
<reponame>psmd-iberutaru/OpihiExarata import os import urllib.parse import urllib.request import urllib.error import random import astropy.wcs as ap_wcs import opihiexarata.library as library import opihiexarata.library.error as error import opihiexarata.library.hint as hint # The base URL for the API which all other...
2.515625
3
docs/notebooks/examples/SED_emulator/ESB_functions.py
MCarmenCampos/XID_plus
3
12793823
from astropy.io import ascii, fits from astropy.table import QTable, Table import arviz as az from astropy.coordinates import SkyCoord from astropy import units as u import os import pymoc from astropy import wcs from astropy.table import vstack, hstack import numpy as np import xidplus # # Applying XID+CIGALE to E...
1.632813
2
back/babar_server/apps.py
dryvenn/babar3
0
12793824
from django.apps import AppConfig class BabarServerConfig(AppConfig): name = 'babar_server'
1.125
1
app/cronscript.py
Stienvdh/new-employee-onboarding
1
12793825
<gh_stars>1-10 """Copyright (c) 2020 Cisco and/or its affiliates. This software is licensed to you under the terms of the Cisco Sample Code License, Version 1.1 (the "License"). You may obtain a copy of the License at https://developer.cisco.com/docs/licenses All use of the material herein must be in ...
1.734375
2
fmri/experiment.py
mwaskom/pulses_experiment_code
0
12793826
<filename>fmri/experiment.py<gh_stars>0 from __future__ import division import os import json from glob import glob import numpy as np import pandas as pd from scipy import stats from scipy.spatial import distance from psychopy.visual import TextStim, Rect from visigoth.stimuli import Point, Points, PointCue, Pattern...
1.96875
2
pi4home/components/binary_sensor/rdm6300.py
khzd/pi4home
1
12793827
<reponame>khzd/pi4home import voluptuous as vol from pi4home.components import binary_sensor, rdm6300 import pi4home.config_validation as cv from pi4home.const import CONF_NAME, CONF_UID from pi4home.cpp_generator import get_variable DEPENDENCIES = ['rdm6300'] CONF_RDM6300_ID = 'rdm6300_id' RDM6300BinarySensor = bi...
2.203125
2
aiocloudflare/api/accounts/storage/analytics/analytics.py
Stewart86/aioCloudflare
2
12793828
<gh_stars>1-10 from aiocloudflare.commons.auth import Auth from .stored.stored import Stored class Analytics(Auth): _endpoint1 = "accounts" _endpoint2 = "storage/analytics" _endpoint3 = None @property def stored(self) -> Stored: return Stored(self._config, self._session)
1.84375
2
Python/processors/process_xsum.py
Williamyzd/NonIntNLP
1
12793829
<gh_stars>1-10 from transformers import XLNetTokenizer import glob, os from multiprocessing import Pool import random import torch # This function processes news articles gathered and preprocessed by the XSum data processor: # https://github.com/EdinburghNLP/XSum # # The pre-processor generates a large number of files...
3.078125
3
openeo/extra/spectral_indices/__init__.py
bontekasper/openeo-python-client
75
12793830
""" Easily calculate spectral indices (vegetation, water, urban etc.). Supports the indices defined in the `Awesome Spectral Indices <https://awesome-ee-spectral-indices.readthedocs.io/>`_ project by `<NAME> <https://github.com/davemlz>`_. .. versionadded:: 0.9.1 """ from openeo.extra.spectral_indices.spectral_ind...
1.445313
1
sipam/serializers/__init__.py
Selfnet/sipam
2
12793831
<gh_stars>1-10 from .assignment import AssignmentSerializer from .cidr import CIDRSerializer, RecursiveCIDRSerializer from .pool import PoolSerializer from .label import LabelSerializer
1.3125
1
koyeb_nb2/__init__.py
ffreemt/koyeb-nb2
4
12793832
"""Init.""" __version__ = "0.1.0" from .koyeb_nb2 import koyeb_nb2 # from .nb2chan import nb2chan __all__ = ("koyeb_nb2",)
0.984375
1
medium/15-3Sum.py
Davidxswang/leetcode
2
12793833
""" https://leetcode.com/problems/3sum/ Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: The solution set must not contain duplicate triplets. Example: Given array nums = [-1, 0, 1, 2, -1, -4], A ...
3.578125
4
mpl_interactions/ipyplot.py
redeboer/mpl-interactions
67
12793834
from .pyplot import interactive_axhline as axhline from .pyplot import interactive_axvline as axvline from .pyplot import interactive_hist as hist from .pyplot import interactive_imshow as imshow from .pyplot import interactive_plot as plot from .pyplot import interactive_scatter as scatter from .pyplot import interact...
1.203125
1
codes/algorithms/Harmony.py
pocokhc/metaheuristics
1
12793835
import math import random from ..algorithm_common import AlgorithmCommon as AC from ..algorithm_common import IAlgorithm class Harmony(IAlgorithm): def __init__(self, harmony_max, bandwidth=0.1, enable_bandwidth_rate=False, select_rate=0.8, change_rate=0.3, ): s...
2.953125
3
autos/test/utils/test_date.py
hans-t/autos
1
12793836
import datetime import unittest import autos.utils.date as date class TestDateRange(unittest.TestCase): def test_returns_today_date_as_default(self): actual = list(date.date_range()) expected = [datetime.date.today()] self.assertEqual(actual, expected) def test_returns_correct_range(...
2.9375
3
shawl/core/_base_collection.py
oiakinat/shawl
3
12793837
# -*- coding: utf-8 -*- from typing import Iterator, List, Optional, Tuple from selenium.common.exceptions import ( StaleElementReferenceException, TimeoutException ) from selenium.webdriver.remote.webdriver import WebDriver from selenium.webdriver.remote.webelement import WebElement from selenium.webdriver.su...
2.84375
3
examples/ReadDemo.py
Ellis0817/Introduction-to-Programming-Using-Python
0
12793838
<gh_stars>0 def main(): # Open file for input infile = open("Presidents.txt", "r") print("(1) Using read(): ") print(infile.read()) infile.close() # Close the input file # Open file for input infile = open("Presidents.txt", "r") print("\n(2) Using read(number): ") s1 = infile.read(4...
3.703125
4
octoprint_marlin_flasher/flasher/base_flasher.py
Renaud11232/Octoprint-Marlin-Flasher
0
12793839
from .flasher_error import FlasherError import time import flask import requests import tempfile import os import re from threading import Thread class BaseFlasher: def __init__(self, settings, printer, plugin, plugin_manager, identifier, logger): self._settings = settings self._printer = printer self._plugin...
2.25
2
OpenGLCffi/GLX/EXT/SGIX/dmbuffer.py
cydenix/OpenGLCffi
0
12793840
from OpenGLCffi.GLX import params @params(api='glx', prms=['dpy', 'pbuffer', 'params', 'dmbuffer']) def glXAssociateDMPbufferSGIX(dpy, pbuffer, params, dmbuffer): pass
1.742188
2
python/src/main/python/pygw/statistics/field/time_range_statistic.py
MC-JY/geowave
0
12793841
# # Copyright (c) 2013-2022 Contributors to the Eclipse Foundation # # See the NOTICE file distributed with this work for additional information regarding copyright # ownership. All rights reserved. This program and the accompanying materials are made available # under the terms of the Apache License, Version 2.0 whic...
1.882813
2
app/routers/__init__.py
gmelodie/pystebin
0
12793842
# This empty file allows us to # use app/ as a python package
1.148438
1
src/brusher/c_highlighter.py
CihatAltiparmak/C-EDITOR
11
12793843
<filename>src/brusher/c_highlighter.py #!/usr/bin/env python from PyQt5.QtCore import QFile, QRegExp, Qt from PyQt5.QtGui import QFont, QSyntaxHighlighter, QTextCharFormat, QColor from syntaxer import Syntax_Patcher class C_Highlighter(QSyntaxHighlighter): def __init__(self, parent=None): super(C_Highl...
2.3125
2
pyradar/Chapter06/optimum_binary_example.py
mberkanbicer/software
1
12793844
""" Project: RadarBook File: optimum_binary_example.py Created by: <NAME> On: 10/11/2018 Created with: PyCharm Copyright (C) 2019 Artech House (<EMAIL>) This file is part of Introduction to Radar Using Python and MATLAB and can not be copied and/or distributed without the express permission of Artech House. """ import...
2.453125
2
tests/test_auth.py
initfve/notify-server
1
12793845
<reponame>initfve/notify-server import httpx import pytest import respx from app import auth @respx.mock @pytest.mark.parametrize( "side_effect, expected", [ (httpx.Response(200), True), (httpx.Response(201), True), (httpx.ConnectError, False), (httpx.ConnectTimeout, False), ...
2.171875
2
tests/scheduler/instrument_coordinator/components/test_zhinst.py
quantify-os/quantify-scheduler
1
12793846
<reponame>quantify-os/quantify-scheduler # Repository: https://gitlab.com/quantify-os/quantify-scheduler # Licensed according to the LICENCE file on the master branch # pylint: disable=missing-module-docstring # pylint: disable=missing-class-docstring # pylint: disable=missing-function-docstring # pylint: disable=redef...
1.851563
2
app/dashapp1/callbacks.py
rseed42/dash_on_flask
258
12793847
from datetime import datetime as dt from dash.dependencies import Input from dash.dependencies import Output from dash.dependencies import State from flask_login import current_user import pandas_datareader as pdr def register_callbacks(dashapp): @dashapp.callback( Output('my-graph', 'figure'), I...
2.421875
2
mainapp/models.py
Raistlin11123/inquiry-soso
0
12793848
<reponame>Raistlin11123/inquiry-soso<filename>mainapp/models.py<gh_stars>0 from django.db import models from django.contrib.auth.models import User import datetime now = datetime.datetime.now() """ class Contact(models.Model): name = models.CharField(max_length=50) email = models.EmailField() content = mo...
2.40625
2
model-ms/benchmark/make_fixture_models.py
ncoop57/deep_parking
126
12793849
<reponame>ncoop57/deep_parking<filename>model-ms/benchmark/make_fixture_models.py import torchvision from fastai.vision import ImageDataBunch, cnn_learner, unet_learner, SegmentationItemList, imagenet_stats data = ImageDataBunch.from_csv('fixtures/classification').normalize(imagenet_stats) learner = cnn_learner(data, ...
1.992188
2
vnpy/app/algo_trading/algos/liquid_mining_algo.py
dos2004/vnpy
0
12793850
from collections import defaultdict from decimal import Decimal from _datetime import datetime, timedelta from enum import Enum import math import random import re import requests import time from vnpy.app.algo_trading import AlgoTemplate from vnpy.trader.utility import round_to from vnpy.trader.constant import Direct...
2.1875
2