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
XtDac/ChandraUtils/configuration.py
giacomov/XtDac
0
12782451
<reponame>giacomov/XtDac import yaml import os from XtDac.ChandraUtils.sanitize_filename import sanitize_filename class ReadOnlyContainer(object): def __init__(self, dictionary): self._dict = dict(dictionary) def __getitem__(self, item): return self._dict[item] def get_configuration(file...
2.703125
3
DS&Algo Programs in Python/inserting_heap.py
prathimacode-hub/HacktoberFest-2020
386
12782452
<reponame>prathimacode-hub/HacktoberFest-2020 import heapq H = [21,1,45,78,3,5] # Covert to a heap heapq.heapify(H) print(H) # Add element heapq.heappush(H,8) print(H)
2.546875
3
fiftyone/core/view.py
seantrue/fiftyone
0
12782453
<reponame>seantrue/fiftyone """ Dataset views. | Copyright 2017-2020, Voxel51, Inc. | `voxel51.com <https://voxel51.com/>`_ | """ from collections import OrderedDict from copy import copy, deepcopy import numbers from bson import ObjectId import fiftyone.core.aggregations as foa import fiftyone.core.collections as f...
2.921875
3
billy/scrape/actions.py
paultag/billy
0
12782454
<filename>billy/scrape/actions.py import re from collections import namedtuple, defaultdict, Iterable class Rule(namedtuple('Rule', 'regexes types stop attrs')): '''If any of ``regexes`` matches the action text, the resulting action's types should include ``types``. If stop is true, no other rules should...
2.875
3
wallet_one/__init__.py
everhide/wallet-one-payments
0
12782455
<reponame>everhide/wallet-one-payments from typing import Dict from collections import defaultdict import binascii from hashlib import md5, sha1 from enum import Enum class TypeCrypt(Enum): """Types of crypts.""" MD5 = 1 SHA1 = 2 class Payment(object): """Wallet one payments.""" def __init__(...
2.9375
3
src/algorithms/simulated_annealing.py
amasiukevich/ALHE
0
12782456
<gh_stars>0 from .base_algorithm import BaseAlgorithm import numpy as np class SimulatedAnnealing(BaseAlgorithm): def __init__(self, begin_curr_idx, end_curr_idx, num_currs, rates_data, random_state, next_state...
3.09375
3
npreadtext/_loadtxt.py
rossbar/npreadtext
0
12782457
<filename>npreadtext/_loadtxt.py import numpy as np from ._readers import read def _loadtxt(fname, dtype=float, comments='#', delimiter=None, converters=None, skiprows=0, usecols=None, unpack=False, ndmin=0, encoding='bytes', max_rows=None, **kwargs): """ Monkeypatched version of `n...
2.6875
3
prosemirror/schema/list/__init__.py
p7g/prosemirror-py
18
12782458
from .schema_list import * # noqa
1
1
backend/api/db/schemas/users.py
kkevinn114/Yacht
1
12782459
from fastapi_users import models
1.101563
1
tests/test_index.py
alytle/local-lambda-toolkit
0
12782460
import mock import unittest from mock import patch, Mock, MagicMock import boto3 from botocore.stub import Stubber import sys sys.path.append("..") import awslambda class TestHandler(unittest.TestCase): def test_handler(self): """ Test the handler operates as expected. """ pass ...
2.625
3
py3canvas/apis/brand_configs.py
tylerclair/py3canvas
0
12782461
<reponame>tylerclair/py3canvas """BrandConfigs API Version 1.0. This API client was generated using a template. Make sure this code is valid before using it. """ import logging from datetime import date, datetime from .base import BaseCanvasAPI class BrandConfigsAPI(BaseCanvasAPI): """BrandConfigs API Version 1....
2.5
2
lang/Python/draw-a-cuboid-1.py
ethansaxenian/RosettaDecode
1
12782462
def _pr(t, x, y, z): txt = '\n'.join(''.join(t[(n,m)] for n in range(3+x+z)).rstrip() for m in reversed(range(3+y+z))) return txt def cuboid(x,y,z): t = {(n,m):' ' for n in range(3+x+z) for m in range(3+y+z)} xrow = ['+'] + ['%i' % (i % 10) for i in range(x)] + ['+'] for i,ch ...
2.90625
3
TZ/normalization/test.py
dreamiond/TZ-KPrototypes
0
12782463
from kmodes.util.dissim import num_TZ_dissim,cat_TZ_dissim from sklearn.decomposition import PCA import numpy centroid = [ [1,2,3], [5,6,6] ] Xnum = [ [54,2,44], [89,6,4], [1.5,0,-5], [5346,874,212] ] centroid = numpy.array(centroid) Xnum = numpy.array(Xnum) x = numpy.array([[1,2,3],[2,3,3],[12...
2.59375
3
tests/int_rep/test_ops.py
thomashopkins32/LEAP
0
12782464
<reponame>thomashopkins32/LEAP<gh_stars>0 """Unit tests for operators in the integer representation package.""" from collections import Counter import pytest from scipy import stats import toolz from leap_ec.individual import Individual import leap_ec.ops import leap_ec.int_rep.ops as intrep_ops from leap_ec import s...
2.734375
3
src/grpc_router.py
Biano-AI/serving-compare-middleware
6
12782465
<filename>src/grpc_router.py # -*- encoding: utf-8 -*- # ! python3 from __future__ import annotations import io import logging from pathlib import Path import platform from typing import BinaryIO, cast, Final import aiofiles import grpc import httpx import numpy as np from devtools import debug from fastapi import A...
2.078125
2
scripts/generate-framework-agreement-signature-pages.py
jonodrew/digitalmarketplace-scripts
0
12782466
<gh_stars>0 #!/usr/bin/env python """ PREREQUISITE: You'll need wkhtmltopdf installed for this to work (http://wkhtmltopdf.org/) Generate framework agreement signature pages from supplier "about you" information for suppliers who successfully applied to a framework. This script supersedes the old "generate-agreement...
2.390625
2
conf_site/cms/__init__.py
jasongrout/conf_site
0
12782467
<filename>conf_site/cms/__init__.py default_app_config = "conf_site.cms.apps.CmsConfig"
1.070313
1
dl_markup/UndoRedo.py
ekuptsov/dl_markup
0
12782468
from abc import ABC, abstractmethod from PyQt5 import QtWidgets from .Scene import Scene class ICommand(ABC): """Abstract command.""" @abstractmethod def execute(self): """Execute command.""" pass @abstractmethod def un_execute(self): """Undo command execution.""" ...
3.265625
3
Scripts/sims4communitylib/utils/sims/common_buff_utils.py
ColonolNutty/Sims4CommunityLibrary
118
12782469
""" The Sims 4 Community Library is licensed under the Creative Commons Attribution 4.0 International public license (CC BY 4.0). https://creativecommons.org/licenses/by/4.0/ https://creativecommons.org/licenses/by/4.0/legalcode Copyright (c) COLONOLNUTTY """ from typing import Union, List, Tuple, Iterator from buffs...
1.445313
1
src/robot/pythonpathsetter.py
gdw2/robot-framework
0
12782470
# Copyright 2008-2010 Nokia Siemens Networks Oyj # # 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...
2.1875
2
teste.py
j0nathan-calist0/Aula-18_03
0
12782471
<reponame>j0nathan-calist0/Aula-18_03 import pytest from principal import somar from principal import subtrair def test_somar(): assert somar (2,4)==6
1.992188
2
MetaScreener/analyze_results/Get_histogram/PlipGraph.py
bio-hpc/metascreener
8
12782472
<reponame>bio-hpc/metascreener #!/usr/bin/env python2 # -*- coding: utf-8 -*- import subprocess try: from StringIO import StringIO except ImportError: from io import StringIO from .Tools import * from .debug import BColors TAG = "plipGraph.py :" color = BColors.GREEN class PlipGraph(object): def __init...
2.03125
2
tests/units/utils/test_log_linear_exp.py
nilin/vmcnet
17
12782473
"""Tests for log_linear_exp function.""" import chex import jax import jax.numpy as jnp import numpy as np from vmcnet.utils.log_linear_exp import log_linear_exp import vmcnet.utils.slog_helpers as slog_helpers def test_log_linear_exp_shape(): """Test output shape of log linear exp.""" signs = jnp.ones((5, ...
2.59375
3
tests/gamestonk_terminal/stocks/discovery/test_disc_api.py
minhhoang1023/GamestonkTerminal
1
12782474
<filename>tests/gamestonk_terminal/stocks/discovery/test_disc_api.py<gh_stars>1-10 # IMPORTATION STANDARD # IMPORTATION THIRDPARTY # IMPORTATION INTERNAL from gamestonk_terminal.helper_classes import ModelsNamespace as _models from gamestonk_terminal.stocks.discovery import disc_api def test_models(): assert is...
1.742188
2
tests/datamodules/util/test_predict_dataset.py
DIVA-DIA/DIVA-DAF
3
12782475
<filename>tests/datamodules/util/test_predict_dataset.py import pytest import torch from torchvision.transforms import ToTensor from src.datamodules.utils.dataset_predict import DatasetPredict from src.datamodules.utils.misc import ImageDimensions from tests.test_data.dummy_data_hisdb.dummy_data import data_dir @pyt...
2.1875
2
proliantutils/ipa_hw_manager/hardware_manager.py
mail2nsrajesh/proliantutils
12
12782476
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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 applicabl...
2.140625
2
Day_07/part1.py
Uklusi/AdventOfCode2021
0
12782477
from AoCUtils import * result = 0 partNumber = "1" writeToLog = False if writeToLog: logFile = open("log" + partNumber + ".txt", "w") else: logFile = "stdout" printLog = printLogFactory(logFile) with open("input.txt", "r") as inputFile: lines = inputFile.read().strip().split("\n") for line in lines...
2.953125
3
tests/test_mdtoc.py
scottfrazer/mdtoc
2
12782478
<filename>tests/test_mdtoc.py # -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals import os import tempfile import textwrap import pytest import mdtoc.main @pytest.mark.parametrize( "i,out", [ ("# Simple markdown", "Simple markdown"), (" # ...
2.53125
3
examples/demo_array.py
bmerry/pyopencl
7
12782479
import pyopencl as cl import pyopencl.array as cl_array import numpy import numpy.linalg as la a = numpy.random.rand(50000).astype(numpy.float32) b = numpy.random.rand(50000).astype(numpy.float32) ctx = cl.create_some_context() queue = cl.CommandQueue(ctx) a_dev = cl_array.to_device(queue, a) b_dev = cl_array.to_dev...
2.1875
2
File Handling/ReadLines.py
UgainJain/LearnPythonByDoing
5
12782480
f = open("Writelist.txt", "r") lines = f.readlines() for line in lines: print(line , end = '') f.close()
3.328125
3
callbacks.py
chansoopark98/MobileNet-SSD
2
12782481
import tensorflow as tf class Scalar_LR(tf.keras.callbacks.Callback): def __init__(self, name, TENSORBOARD_DIR): super().__init__() self.name = name # self.previous_loss = None self.file_writer = tf.summary.create_file_writer(TENSORBOARD_DIR) self.file_writer.set_as_default(...
2.6875
3
scrape.py
gontzalm/cycling-seer
0
12782482
#!/home/gontz/miniconda3/envs/ih/bin/python3 from itertools import product import click from conf import RACES from src import dbops, procyclingstats @click.command() @click.argument("items") @click.option("-v", "--verbose", is_flag=True) def scrape(items, verbose): """Scrape ITEMS from procyclingstats.com.""" ...
2.65625
3
ec2objects/ec2object/networkinterface.py
zorani/aws-ec2-objects
0
12782483
from __future__ import annotations from dataclasses import dataclass from dataclasses import field from ..ec2common.ec2exceptions import * @dataclass class NetworkInterfaceAttributes: Association: object = None Attachment: object = None Description: str = None Groups: object = field(default_factory=...
2.4375
2
main.py
SunwardTree/LinearRegression
0
12782484
<filename>main.py # -*- coding: utf-8 -*- """ Created on Fri Dec 22 15:25:07 2017 @author: Jack """ import matplotlib.pyplot as plt import functions as fun # Read dataset x, y = [], [] for sample in open("./data/prices.txt", "r"): xx, yy = sample.split(",") x.append(float(xx)) y.append(float(yy)) x, y = ...
3.421875
3
Yellow_Pages_USA/unit_tests.py
Jay4C/Web-Scraping
1
12782485
from bs4 import BeautifulSoup import requests import time import pymysql.cursors import unittest from validate_email import validate_email class UnitTestsDataMinerYellowPagesUsa(unittest.TestCase): def test_web_scraper_email_usa(self): activites = [ {'id': '1', 'url': 'https://...
2.5625
3
pygameUoN-hy-dev/restructured/walldata.py
moumou666/collection
0
12782486
# -*- coding: utf-8 -*- """ Created on Wed Dec 2 19:44:15 2020 @author: Zane """ # width = 50,height = 40 walls=[{"x":0,"y":430}, {"x":50,"y":430}, {"x":100,"y":430}, {"x":145,"y":385}, {"x":195,"y":385}, {"x":245,"y":385}, {"x":285,"y":345}, {"x":335,"y":3...
2.078125
2
core/main.py
DploY707/static-apk-analyzer
0
12782487
<gh_stars>0 import os import pickle import utils from code_extractor import CodeExtractor DATASET_ROOT_PATH = '/root/workDir/data' RESULT_ROOT_PATH = '/root/result' def print_analyzing_status(index, dataSetSize, dataSetDir, targetAPK) : print(utils.set_string_colored('[' + str(index+1) + ' / ' + str(dataSetSize) ...
2.28125
2
src/python/grpcio_testing/grpc_testing/_channel/_channel_state.py
clsater/grpc
0
12782488
# Copyright 2017 gRPC authors. # # 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 writing...
2.109375
2
scripts/modules.d/199-Keyboard-Default.py
pauljeremyturner/gizmod
0
12782489
<gh_stars>0 #*** #********************************************************************* #************************************************************************* #*** #*** GizmoDaemon Config Script #*** Keyboard Default config #*** #***************************************** #*********************************...
1.492188
1
ansible/lib/ansible/modules/core/network/nxos/nxos_gir.py
kiv-box/kafka
0
12782490
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
1.320313
1
Calendars.py
noahwc/gtfs-pyparse
0
12782491
<reponame>noahwc/gtfs-pyparse<gh_stars>0 # This file models the data of a single line of a calendar_dates.txt gtfs file from Reader import Reader from pathlib import Path from collections import defaultdict class Calendar: def __init__(self, line): self.start_date = line["start_date"] self.service...
3.34375
3
scripts/experiments/rpy_PELT.py
JackKelly/slicedpy
3
12782492
<filename>scripts/experiments/rpy_PELT.py from __future__ import print_function, division from rpy2.robjects.packages import importr from rpy2.robjects import FloatVector import numpy as np from os import path from pda.channel import Channel """ Documentation for changepoint R package: http://cran.r-project.org/web/pa...
2.453125
2
likert_field/templatetags/likert_fa_stars.py
juliandehne/django-likert-field
17
12782493
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import template from .likert_star_tools import render_stars from django.utils.safestring import mark_safe register = template.Library() # Font-awesome stars ver 3 star_set_3 = { 'star': "<i class='icon-star likert-star'></i>", 'unl...
2.359375
2
model.py
nachewigkeit/StegaStamp_pytorch
33
12782494
import sys sys.path.append("PerceptualSimilarity\\") import os import utils import torch import numpy as np from torch import nn import torchgeometry from kornia import color import torch.nn.functional as F from torchvision import transforms class Dense(nn.Module): def __init__(self, in_features, out_features, a...
2.546875
3
fuse/utils/rand/tests/test_param_sampler.py
alexgo1/fuse-med-ml
0
12782495
""" (C) Copyright 2021 IBM Corp. 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 writing, software d...
2.5625
3
sa/profiles/Huawei/VRP/get_interface_status_ex.py
prorevizor/noc
84
12782496
<gh_stars>10-100 # --------------------------------------------------------------------- # Huawei.VRP.get_interface_status_ex # --------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # ----------------------------------------------------...
2.125
2
pDESy/model/organization.py
swanaka/pDESy
0
12782497
#!/usr/bin/env python # -*- coding: utf-8 -*- from .base_organization import BaseOrganization from .base_team import BaseTeam from typing import List class Organization(BaseOrganization): def __init__(self, team_list:List[BaseTeam]): super().__init__(team_list)
2.71875
3
Part8/merge_features.py
usc-cs599-group5/Content_Enrichment
0
12782498
<reponame>usc-cs599-group5/Content_Enrichment<gh_stars>0 from itertools import izip import json from datetime import datetime def main(): start_time = datetime.now() data_files_paths = [ 'E:\Sem2\CSCI599\Assignment2\Others\Part8\outputs\doi.json', 'E:\Sem2\CSCI599\Assignment2\Others\Part8\outpu...
2.265625
2
python/orthomcl/tree-for-codeml.py
lotharwissler/bioinformatics
10
12782499
#!/usr/bin/python import os, sys import string def usage(): print >> sys.stderr, "usage: " + sys.argv[0] + " orthomcl.out base.tree" sys.exit(1) def plausi(): if len(sys.argv) != 3: usage() inOrtho, inTree = sys.argv[1:3] return inOrtho, inTree class OrthoCluster(): def __init__(self, line): desc...
2.921875
3
eve_station/database/models/core/api_key.py
narthollis/eve-station
0
12782500
from ...database import Base from sqlalchemy import Column, Integer, String from sqlalchemy import Column, Integer, String, ForeignKey from sqlalchemy.orm import relationship from sqlalchemy.dialects.postgresql import ARRAY from ...database import Base class ApiKey(Base): api_key_id = Column(Integer, primary_ke...
2.703125
3
Exercicios/Resposta-EstruturaDeRepeticao/Exerc_46.py
ThaisAlves7/Exercicios_PythonBrasil
0
12782501
<reponame>ThaisAlves7/Exercicios_PythonBrasil<filename>Exercicios/Resposta-EstruturaDeRepeticao/Exerc_46.py # Em uma competição de salto em distância cada atleta tem direito a cinco saltos. No final da série de saltos de cada atleta, o # melhor e o pior resultados são eliminados. O seu resultado fica sendo a média dos ...
3.65625
4
src/annalist_root/annalist/tests/test_render_bool_checkbox.py
gklyne/annalist
18
12782502
<gh_stars>10-100 """ Tests for boolean value rendering as checkbox """ from __future__ import unicode_literals from __future__ import absolute_import, division, print_function __author__ = "<NAME> (<EMAIL>)" __copyright__ = "Copyright 2014, <NAME>" __license__ = "MIT (http://opensource.org/licenses/MIT)" ...
2.359375
2
tests/stresstest/map_test.py
realead/tighthash
0
12782503
import sys sys.path.append('..') from tighthash import pmap from testutils import testing_map testing_map("TightHashMap", pmap)
1.296875
1
Calculate_GridShape.py
Valentin-Aslanyan/ASOT
0
12782504
<reponame>Valentin-Aslanyan/ASOT plot_defined_region=False #Red line showing defining regions target_R=1.0 target_phi=1.0 import sys sys.path[:0]=['/Change/This/Path'] from ASOT_Functions_Python import * import matplotlib.pyplot as plt plt.rc('text', usetex=True) plt.rc('font', family='serif') # rl...
1.9375
2
test/api/test_scope.py
SAEON/Open-Data-Platform
0
12782505
<filename>test/api/test_scope.py from random import randint import pytest from sqlalchemy import select from odp import ODPScope from odp.db import Session from odp.db.models import Scope from test.api import all_scopes, all_scopes_excluding, assert_forbidden from test.factories import ScopeFactory @pytest.fixture ...
2.40625
2
Source/Utility/GameMetrics.py
MoritzGrundei/Informaticup
0
12782506
import json import random import numpy as np from Source.Utility.Pathfinding.Graph import Graph def get_distance_to_players(game_state): own_player = game_state["players"][str(game_state["you"])] distances = [0, 0, 0, 0, 0, 0] current_position = (own_player["x"], own_player["y"]) if game_state["players...
3.09375
3
settings.py
moki9/flickrize
0
12782507
FLICKR_FEED='https://api.flickr.com/services/feeds/photos_public.gne'
1.140625
1
authentik/outposts/controllers/k8s/service_monitor.py
BeryJu/passbook
15
12782508
<reponame>BeryJu/passbook """Kubernetes Prometheus ServiceMonitor Reconciler""" from dataclasses import asdict, dataclass, field from typing import TYPE_CHECKING from dacite import from_dict from kubernetes.client import ApiextensionsV1Api, CustomObjectsApi from authentik.outposts.controllers.base import FIELD_MANAGE...
1.914063
2
app/views.py
TheMoonWalker1/HackTJ8.0
0
12782509
from django.shortcuts import render, redirect from django.contrib import messages from django.http import HttpResponseForbidden from django.contrib.auth.decorators import login_required from .forms import * from .models import * from urllib.request import urlopen, Request import json import random # Create your views...
2.390625
2
py3status/modules/timer.py
ChoiZ/py3status
0
12782510
<filename>py3status/modules/timer.py # -*- coding: utf-8 -*- """ A simple countdown timer. This is a very basic countdown timer. You can change the timer length as well as pausing, restarting and resetting it. Currently this is more of a demo of a composite. Each part of the timer can be changed independently hours...
3.921875
4
App/models/users.py
MaiXiaochai/SnailAPI
0
12782511
<reponame>MaiXiaochai/SnailAPI # -*- coding: utf-8 -*- """ -------------------------------------- @File : users.py @Author : maixiaochai @Email : <EMAIL> @Created on : 2020/5/22 15:42 -------------------------------------- """
0.949219
1
sentry/plugins/sentry_redmine/models.py
m0sth8/django-sentry
1
12782512
<gh_stars>1-10 """ sentry.plugins.sentry_redmine.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from django import forms from django.core.context_processors import csrf from django.core.urlresolvers im...
1.976563
2
rsatoolbox/data/noise.py
smazurchuk/rsatoolbox
80
12782513
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Functions for estimating the precision matrix based on the covariance of either the residuals (temporal based precision matrix) or of the measurements (instance based precision matrix) """ from collections.abc import Iterable import numpy as np from rsatoolbox.data im...
2.9375
3
src/node.py
mattianeroni/MSTOP
0
12782514
<reponame>mattianeroni/MSTOP """ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% This file is part of the collaboration with Universitat Oberta de Catalunya (UOC) on Multi-Source Team Orienteering Problem (MSTOP). The objective of the project is to develop an efficient al...
3.515625
4
utils.py
YunzhuLi/CompositionalKoopmanOperators
56
12782515
import sys import h5py import numpy as np import torch from torch.autograd import Variable def print_args(args): print("===== Experiment Configuration =====") options = vars(args) for key, value in options.items(): print(f'{key}: {value}') print("====================================") def ran...
2.125
2
decode-vbe.py
Hong5489/TwoReal
2
12782516
#!/usr/bin/env python __description__ = 'Decode VBE script' __author__ = '<NAME>' __version__ = '0.0.2' __date__ = '2016/03/29' """ Source code put in public domain by Didier Stevens, no Copyright https://DidierStevens.com Use at your own risk History: 2016/03/28: start 2016/03/29: 0.0.2 added support for ZIP f...
2.765625
3
utils.py
STEELISI/SENMO
1
12782517
import os import time import numpy as np import pandas as pd from nltk import word_tokenize from nltk.util import ngrams import tensorflow as tf from transformers import TFBertModel from transformers import BertTokenizer from transformers import TFBertModel from tensorflow.keras.layers import Dense, Flatten bert_model...
2.59375
3
Amazon.py
Shaur-Repositories/PS5-Bots
0
12782518
<reponame>Shaur-Repositories/PS5-Bots from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions i...
1.9375
2
mockingbird/unstructured_data_document/docx_document.py
openraven/mockingbird
15
12782519
# # Copyright 2021 Open Raven Inc. and the Mockingbird project authors # # 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 ...
1.78125
2
src/secondaires/tags/editeurs/selection_tags.py
vlegoff/tsunami
14
12782520
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 <NAME> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of...
1.414063
1
{{cookiecutter.project_name}}/{{cookiecutter.app_name}}/extensions.py
sreecodeslayer/cookiecutter-flask-restful
5
12782521
<gh_stars>1-10 from passlib.hash import pbkdf2_sha256 from flask_jwt_extended import JWTManager from flask_marshmallow import Marshmallow from flask_mongoengine import MongoEngine db = MongoEngine() jwt = JWTManager() ma = Marshmallow() pwd_context = pbkdf2_sha256
1.84375
2
formidable/migrations/0009_field_parameters.py
jayvdb/django-formidable
11
12782522
<gh_stars>10-100 # Generated by Django 1.11.6 on 2018-07-23 10:37 from django.db import migrations import jsonfield.fields class Migration(migrations.Migration): dependencies = [ ('formidable', '0008_formidable_item_value_field_size'), ] operations = [ migrations.AddField( m...
1.5625
2
custom_email_user/models.py
garyburgmann/django-custom-email-user
2
12782523
<filename>custom_email_user/models.py from django.db import models from django.contrib.auth.models import BaseUserManager, AbstractUser from django.core.validators import EmailValidator from django.contrib.auth.validators import UnicodeUsernameValidator class UserManager(BaseUserManager): def create_user(self, em...
2.78125
3
next/apps/AppDashboard.py
sumeetsk/NEXT-1
0
12782524
<reponame>sumeetsk/NEXT-1 import json import numpy import numpy.random from datetime import datetime from datetime import timedelta import next.utils as utils import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import mpld3 MAX_SAMPLES_PER_PLOT = 100 class AppDashboard(object): def __init__(...
2.328125
2
signal_ocean/vessels/models.py
SignalOceanSdk/SignalSDK
10
12782525
"""Models instantiated by the vessels api.""" from dataclasses import dataclass from datetime import datetime from typing import Optional @dataclass(frozen=True) class VesselClass: """Vessel class characteristics. Detailed characteristics of each vessel class, including its defining measurement and the r...
3.46875
3
omnipresence/connection.py
kxz/omnipresence
0
12782526
<reponame>kxz/omnipresence<gh_stars>0 # -*- test-case-name: omnipresence.test.test_connection -*- """Core IRC connection protocol class and supporting machinery.""" from collections import defaultdict import re from weakref import WeakSet from twisted.internet import reactor from twisted.internet.defer import (Defer...
1.992188
2
px/nmt/utils/diverse_decoder_utils.py
jmrf/active-qa
0
12782527
<reponame>jmrf/active-qa<filename>px/nmt/utils/diverse_decoder_utils.py # 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/LIC...
1.875
2
src/extern/cnn_on_lstm.py
wxy1224/cs224n_project
1
12782528
<filename>src/extern/cnn_on_lstm.py<gh_stars>1-10 ''' Example of an LSTM model with GloVe embeddings along with magic features Tested under Keras 2.0 with Tensorflow 1.0 backend Single model may achieve LB scores at around 0.18+, average ensembles can get 0.17+ ''' ######################################## ## import ...
2.25
2
tests/recipes/test_libffi.py
syrykh/python-for-android
6,278
12782529
import unittest from tests.recipes.recipe_lib_test import BaseTestForMakeRecipe class TestLibffiRecipe(BaseTestForMakeRecipe, unittest.TestCase): """ An unittest for recipe :mod:`~pythonforandroid.recipes.libffi` """ recipe_name = "libffi" sh_command_calls = ["./autogen.sh", "autoreconf", "./confi...
2.46875
2
create_trainingset_and_classifier/analyse_gt_aa_nb.py
ganzri/Tracking-Pixels
0
12782530
<reponame>ganzri/Tracking-Pixels<filename>create_trainingset_and_classifier/analyse_gt_aa_nb.py # Copyright (C) 2022 <NAME>, ETH Zürich, Information Security Group # Released under the MIT License """ Similar to analyse but to be used with the larger (200, or all) data set, but because track.hubspot.com and some others...
3.21875
3
main.py
Brocenzo0599/print_notes
0
12782531
<reponame>Brocenzo0599/print_notes<gh_stars>0 import os, sys import win32print, win32api import datetime as dt win32print.SetDefaultPrinter(win32print.GetDefaultPrinter()) #Gets list of already printed documents from printed.txt printed_docs = [] f= open("printed.txt", "a") f1 = open ("printed.txt", "r") print ("alrea...
3.15625
3
src/rule_part_widget.py
DavidKnodt/heuristica
0
12782532
from PySide2 import QtWidgets, QtGui, QtCore class RulePartWidget(QtWidgets.QWidget): def __init__(self, parent=None, feature_ranges={'feature X': [0, 100]}, rule_number=-1): QtWidgets.QWidget.__init__(self, parent) self.layout = QtWidgets.QHBoxLayout(self) # combobox self.combo_...
2.484375
2
src/LinConGauss/core/linear_constraints.py
alpiges/LinConGauss
9
12782533
import numpy as np class LinearConstraints(): def __init__(self, A, b, mode='Intersection'): """ Defines linear functions f(x) = Ax + b. The integration domain is defined as the union of where all of these functions are positive if mode='Union' or the domain where any of the functio...
3.578125
4
paperswithcode/models/method.py
Kabongosalomon/paperswithcode-client
78
12782534
from typing import List, Optional from tea_client.models import TeaClientModel from paperswithcode.models.page import Page class Method(TeaClientModel): """Method object. Attributes: id (str): Method ID. name (str): Method short name. full_name (str): Method full name. descr...
2.828125
3
gs/content/form/base/__init__.py
groupserver/gs.content.form.base
0
12782535
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals #lint:disable from .checkbox import multi_check_box_widget from .form import SiteForm from .radio import radio_widget from .select import select_widget from .disabledtextwidget import disabled_text_widget #lint:enable
1.015625
1
setup.py
Etaoni/qiagen-clinical-insights-requests-api
0
12782536
<reponame>Etaoni/qiagen-clinical-insights-requests-api from setuptools import setup with open('README.md', 'r') as readme: long_description = readme.read() setup( name='qci-api', version='0.1.1', packages=['qci'], url='https://github.com/Etaoni/qci-api', license='MIT License', author='<NAM...
1.179688
1
examples/demo_purge.py
shirui-japina/tensorboardX
5,378
12782537
from time import sleep from tensorboardX import SummaryWriter with SummaryWriter(logdir='runs/purge') as w: for i in range(100): w.add_scalar('purgetest', i, i) sleep(1.0) with SummaryWriter(logdir='runs/purge', purge_step=42) as w: # event 42~99 are removed (inclusively) for i in range(42, 100):...
2.125
2
meeshkan/nlp/ids/gib_detect.py
meeshkan/meeshkan-nlp
1
12782538
<filename>meeshkan/nlp/ids/gib_detect.py """The MIT License (MIT) Copyright (c) 2015 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the r...
1.804688
2
Packages/LiveReload/server/SimpleResourceServer.py
kangTaehee/st3
4
12782539
#!/usr/bin/python # -*- coding: utf-8 -*- class SimpleResourceServer(object): """SimpleResourceServer""" def __init__(self): self.static_files = [] def has_file(self, path): """Traverse added static_files return object""" for l_file in self.static_files: if path == ...
2.921875
3
utility/surface.py
strevol-mpi-mis/RAFFT
1
12782540
<reponame>strevol-mpi-mis/RAFFT<gh_stars>1-10 """Draw a surface from a set of structures """ import argparse import matplotlib.pyplot as plt import matplotlib.cm as cm from matplotlib.colors import LightSource from scipy import interpolate from matplotlib.pyplot import rcParams import numpy as np from sklearn import ...
2.640625
3
src/aadcUserPython/ParkingTrajectory.py
LITdrive/aadc2018
5
12782541
# Imports import math import numpy as np import matplotlib.pyplot as plt class ParkingTrajectoryGenerator: # Class Variables # Vehicle Parameters __l = 0.356 # length between front and rear axle in m __b = 0.37 # width of car in m __l_1 = 0.12 # length between front axle and bumper in m _...
2.984375
3
asset/test.py
745184532/cmdb
251
12782542
<reponame>745184532/cmdb import time print(time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time())))
2.21875
2
test1.py
Aqua5lad/CDs-Sample-Python-Code
0
12782543
<reponame>Aqua5lad/CDs-Sample-Python-Code # testing commands & logic by <NAME> # Using While, If, Else, Print. n = 20 while n <= 100: if (n % 2 == 0): print("this number", n, "is even") else: print("this number", n, "is odd") n = n + 1
3.765625
4
Image_Stitching/testVideoCode.py
RogerZhangsc/VDAS
0
12782544
# -*- coding: utf-8 -*- """ Created on Fri Jan 12 13:07:35 2018 @author: Sunny """ import numpy as np import cv2 print(cv2.__version__) TOTAL_CAMERAS=1 HEIGHT = 240 WIDTH = 320 RECORD_WIDTH = WIDTH*3 RECORD_HEIGHT = HEIGHT FPS = 90 cam = [] frame = [] ret = [] rgb = [] i = 0 rgb_current=0 cam = cv2.VideoCapture(0...
2.515625
3
src/biking/views.py
AlexDevelop/seen-movies
0
12782545
<gh_stars>0 from rest_framework import viewsets from rest_framework.viewsets import ModelViewSet from biking.models import BikeRide from biking.serializers import BikeRideSerializer class BikeRideViewSet(viewsets.ViewSet, ModelViewSet): serializer_class = BikeRideSerializer queryset = BikeRide.objec...
1.867188
2
appengine/monorail/framework/servlet_helpers.py
allaparthi/monorail
2
12782546
<reponame>allaparthi/monorail # Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file or at # https://developers.google.com/open-source/licenses/bsd """Helper functions used by the Monorail servlet base class.""" f...
1.882813
2
app/account/migrations/0001_initial.py
newer027/hlf_backend
0
12782547
# Generated by Django 2.2.3 on 2019-09-20 05:05 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('cont...
1.765625
2
sancus/lib/cogs/filter/filter.py
Solar-Productions/sancus
1
12782548
import discord from discord import Embed from discord.errors import NotFound from discord.ext import commands import requests import asyncio from lib.bot import bot class Filter(commands.Cog): def __init__(self, client: bot): self.client = client @commands.Cog.listener() async def on_message(se...
2.703125
3
dlotter/arguments.py
dmidk/dlotter
0
12782549
#!/usr/bin/env python # -*- coding: utf-8 -*- """Master module for dlotter.arguments Called from dlotter.__main__ """ import sys import argparse from argparse import ArgumentDefaultsHelpFormatter class MyParser(argparse.ArgumentParser): def error(self, message): sys.stderr.write('error: %s\n' % message) ...
2.703125
3
navmenu/io/__init__.py
rashidsh/navmenu
0
12782550
from navmenu.io.base import BaseIO from navmenu.io.console import ConsoleIO from navmenu.io.telegram import TelegramIO from navmenu.io.vk import VKIO __all__ = 'BaseIO', 'ConsoleIO', 'TelegramIO', 'VKIO',
1.203125
1