max_stars_repo_path
string
max_stars_repo_name
string
max_stars_count
int64
id
string
content
string
add_param_types
int64
add_return_types
int64
add_class_field_types
int64
add_instance_field_types
int64
add_total
int64
add_error
int64
CodeGen/Steamworks.NET_CodeGen.py
lithiumtoast/Steamworks.NET
1,962
3286656
import sys from SteamworksParser import steamworksparser import interfaces import constants import enums import structs import typedefs import output_dummy_files def main() -> None: if len(sys.argv) == 2: path = sys.argv[1] elif len(sys.argv) == 1: path = "steam" else: print("Usage:...
0
1
0
0
1
0
CPAC/surface/surf_preproc.py
FCP-INDI/C-PAC
125
3286674
from __future__ import annotations import os import nipype.interfaces.utility as util from CPAC.utils.interfaces.function import Function from CPAC.pipeline import nipype_pipeline_engine as pe def run_surface(post_freesurfer_folder, freesurfer_folder, subject, t1w_resto...
1
3
0
0
4
0
pytransform3d/test/test_transform_manager.py
alek5k/pytransform3d
304
3286678
import os import pickle import warnings import platform import tempfile import numpy as np from pytransform3d.rotations import ( q_id, active_matrix_from_intrinsic_euler_xyz, random_quaternion) from pytransform3d.transformations import ( random_transform, invert_transform, concat, transform_from_pq, transfo...
0
0
0
0
0
0
WebMirror/management/rss_parser_funcs/feed_parse_extractKuromin.py
fake-name/ReadableWebProxy
193
3286702
<filename>WebMirror/management/rss_parser_funcs/feed_parse_extractKuromin.py def extractKuromin(item): """ Kuromin """ vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol or frag) or 'preview' in item['title'].lower(): return None if item['title'].startswith('Potatoes ar...
0
0
0
0
0
0
tests/onnx2pytorch/test_utils.py
Robust-Robots/onnx2pytorch
147
3286713
import numpy as np import onnx import pytest import torch from torch import nn from onnx.backend.test.case.node.pad import pad_impl from onnx2pytorch.helpers import to_onnx from onnx2pytorch.utils import ( is_constant, get_ops_names, get_selection, assign_values_to_dim, get_activation_value, ex...
0
2
0
0
2
0
tutorial/triton_tf_deploy/hugectr_tf_dcn_client.py
xjqbest/HugeCTR
130
3286734
<filename>tutorial/triton_tf_deploy/hugectr_tf_dcn_client.py from tritonclient.utils import * import tritonclient.grpc as grpcclient import tritonclient.http as httpclient import numpy as np model_name = "hugectr_tf" dense =[0.01612903, 0.00555074, 0.000777, 0.00930233, 0.00431766, 0.00263806, 0.05597723, ...
0
0
0
0
0
0
test/integration_test/tools/lib/ofp/ofp_role_request.py
ryoon/lagopus
281
3286750
import os import sys import copy import logging from checker import * from .ofp import register_ofp_creators from .ofp import OfpBase # YAML: # role_request: # role: 0x0 # generation_id: 0 SCE_ROLE_REQUEST = "role_request" @register_ofp_creators(SCE_ROLE_REQUEST) class OfpRoleRequestCreator(OfpBase): @cla...
0
1
0
0
1
0
config.py
JiazeWang/R3Net
116
3286760
<filename>config.py # coding: utf-8 import os datasets_root = '/home/b3-542/文档/DataSets/saliency' # For each dataset, I put images and masks together msra10k_path = os.path.join(datasets_root, 'msra10k') ecssd_path = os.path.join(datasets_root, 'ecssd') hkuis_path = os.path.join(datasets_root, 'hkuis') pascals_path =...
0
0
0
0
0
0
app/lib/base/webpush.py
didi9575/crackerjack
237
3286763
import datetime import json from app import db from app.lib.models.webpush import WebPushSubscriptionModel, WebPushLogModel from pywebpush import webpush, WebPushException class WebPushManager: def __init__(self, vapid_private, admin_email, icon): self.vapid_private = vapid_private self.admin_emai...
0
4
0
0
4
0
language/capwap/preprocessing/v7w_qa.py
Xtuden-com/language
1,199
3286816
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
0
2
0
0
2
0
docs/examples/widgets/group.py
bkvalexey/aiogram_dialog
198
3286831
<filename>docs/examples/widgets/group.py from aiogram_dialog.widgets.kbd import Button, Group, Row from aiogram_dialog.widgets.text import Const group = Group( Row( Button(Const("Go"), id="go"), Button(Const("Run"), id="run"), ), Button(Const("Fly"), id="fly"), )
0
0
0
0
0
0
nnet/neuralnet.py
rakeshvar/rnn_ctc
255
3286863
from __future__ import annotations import numpy as np import theano as th import theano.tensor as tt from .ctc import CTCLayer from . import layers from . import updates class NeuralNet(): def __init__(self, n_dims, n_classes, mid_layer, mid_layer_args, use_log_space: bool=True, ...
4
1
0
0
5
0
networkit/csbridge.py
kit-parco/networkit
194
3286878
# local imports from __future__ import annotations from .support import MissingDependencyError from .structures import Partition from .vizbridges import widgetFromGraph # external imports try: import ipycytoscape except ImportError: have_cyto = False else: have_cyto = True try: import seaborn except ImportError: ...
4
1
0
0
5
0
dfirtrack_main/tests/system_importer/test_system_importer_file_csv_minimal.py
thomas-kropeit/dfirtrack
273
3286888
<gh_stars>100-1000 import os import urllib.parse from datetime import datetime from unittest.mock import patch from django.contrib.auth.models import User from django.contrib.messages import get_messages from django.test import TestCase from django.utils import timezone from dfirtrack.settings import BASE_DIR from df...
0
0
0
0
0
0
cleo/loaders/factory_command_loader.py
Ivoz/cleo
859
3286933
from typing import Callable from typing import Dict from typing import List from cleo.commands.command import Command from ..exceptions import CommandNotFoundException from .command_loader import CommandLoader class FactoryCommandLoader(CommandLoader): """ A simple command loader using factories to instanti...
3
4
0
0
7
0
atlas/foundations_events/src/foundations_events/consumers/jobs/queued/job_notifier.py
DeepLearnI/atlas
296
3286944
from foundations_events.consumers.jobs.mixins.job_event_notifier import JobEventNotifier class JobNotifier(JobEventNotifier): """Sends a notification message when a job is queued Arguments: job_notifier {JobNofitier} -- A JobNotifier for sending out the messages """ @staticmethod ...
0
1
0
0
1
0
Algo and DSA/LeetCode-Solutions-master/Python/minimum-possible-integer-after-at-most-k-adjacent-swaps-on-digits.py
Sourav692/FAANG-Interview-Preparation
3,269
3287010
<reponame>Sourav692/FAANG-Interview-Preparation<gh_stars>1000+ # Time: O(nlogn) # Space: O(n) import collections class BIT(object): # Fenwick Tree, 1-indexed def __init__(self, n): self.__bit = [0] * n def add(self, i, val): while i < len(self.__bit): self.__bit[i] += val ...
0
0
0
0
0
0
levels/02_mount_ns/rd.py
security-geeks/rubber-docker
2,710
3287029
<filename>levels/02_mount_ns/rd.py #!/usr/bin/env python2.7 """Docker From Scratch Workshop - Level 2: Adding mount namespace. Goal: Separate our mount table from the other processes. Usage: running: rd.py run -i ubuntu /bin/sh will: - fork a new chrooted process in a new mount namespace """ ...
0
0
0
0
0
0
src/score_submission/functions.py
MCFreddie777/2019
116
3287053
<reponame>MCFreddie777/2019<filename>src/score_submission/functions.py import numpy as np import pandas as pd def read_into_df(file): """Read csv file into data frame.""" df = ( pd.read_csv(file) .set_index(['user_id', 'session_id', 'timestamp', 'step']) ) return df def generate_r...
0
0
0
0
0
0
docs/code_snippets/hello_world_opening.py
Ying1123/pysmt
435
3287058
<gh_stars>100-1000 from pysmt.shortcuts import Symbol, LE, GE, And, Int from pysmt.typing import INT h = Symbol("H", INT) # domain = (1 <= h) & (10 >= h) domain = And(LE(Int(1), h), GE(Int(10), h))
0
0
0
0
0
0
tests/isolated/patcher_open_kwargs.py
li-caspar/eventlet_0.30.2
1,044
3287067
__test__ = False if __name__ == "__main__": import eventlet eventlet.monkey_patch(builtins=True, os=True) with open(__file__, mode="rt", buffering=16): pass print("pass")
0
0
0
0
0
0
SymbolExtractorAndRenamer/lldb/packages/Python/lldbsuite/test/functionalities/nosucharch/TestNoSuchArch.py
Polidea/SiriusObfuscator
427
3287069
""" Test that using a non-existent architecture name does not crash LLDB. """ from __future__ import print_function import lldb from lldbsuite.test.lldbtest import * import lldbsuite.test.lldbutil as lldbutil class NoSuchArchTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) def test(self): ...
0
0
0
0
0
0
pandas/tests/arrays/integer/test_construction.py
arushi-08/pandas
28,899
3287081
<filename>pandas/tests/arrays/integer/test_construction.py import numpy as np import pytest import pandas as pd import pandas._testing as tm from pandas.api.types import is_integer from pandas.core.arrays import IntegerArray from pandas.core.arrays.integer import ( Int8Dtype, Int32Dtype, Int64Dtype, ) @p...
0
0
0
0
0
0
venv/Lib/site-packages/win32com/test/testConversionErrors.py
ajayiagbebaku/NFL-Model
150
3287083
<gh_stars>100-1000 import unittest import win32com.client import win32com.test.util import win32com.server.util class Tester: _public_methods_ = ["TestValue"] def TestValue(self, v): pass def test_ob(): return win32com.client.Dispatch(win32com.server.util.wrap(Tester())) class TestException(...
0
0
0
0
0
0
third_party/gym/ant_wrapper_test.py
cclauss/episodic-curiosity
195
3287098
# coding=utf-8 # The MIT License # # Copyright (c) 2016 OpenAI (https://openai.com) # Copyright (c) 2018 The TF-Agents Authors. # Copyright (c) 2018 Google LLC (http://google.com) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the ...
0
1
0
0
1
0
poretools/Fast5File.py
ambro01/poretools
202
3287099
import sys import os import glob import tarfile import shutil import h5py import dateutil.parser import datetime import time #logging import logging logger = logging.getLogger('poretools') ### Some notes on nanopore FAST5 file format: ### start_time used to be represented in seconds, when stored in the /Analyses subd...
0
0
0
0
0
0
simdeblur/model/layers/resblock.py
ljzycmd/SimDeblur
190
3287103
# CMD import torch import torch.nn as nn import torch.nn.functional as F class BasicBlock(nn.Module): def __init__(self, in_channels): self.conv1 = nn.Conv2d(in_channels, in_channels, 3, 1, 1) self.conv2 = nn.Conv2d(in_channels, in_channels, 3, 1, 1) def forward(self, x) -> object: ...
0
1
0
0
1
0
etc/gen_type_stubs.py
welly87/zipline
412
3287129
<filename>etc/gen_type_stubs.py import inspect from operator import attrgetter from textwrap import dedent from zipline import api, TradingAlgorithm def main(): with open(api.__file__.rstrip('c') + 'i', 'w') as stub: # Imports so that Asset et al can be resolved. # "from MOD import *" will re-exp...
0
0
0
0
0
0
efficientdet/backbone/efficientnet_model_test.py
sujitahirrao/automl
5,277
3287135
<reponame>sujitahirrao/automl<filename>efficientdet/backbone/efficientnet_model_test.py # Copyright 2020 Google Research. 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 ...
0
0
0
0
0
0
easy_rec/python/utils/hpo_util.py
alibaba/EasyRec
285
3287140
<reponame>alibaba/EasyRec # -*- encoding:utf-8 -*- # Copyright (c) Alibaba, Inc. and its affiliates. import json import logging import os import psutil import tensorflow as tf from tensorflow.python.summary import summary_iterator if tf.__version__ >= '2.0': gfile = tf.compat.v1.gfile else: gfile = tf.gfile def...
0
0
0
0
0
0
python/cucim/tests/performance/clara/test_read_region_memory_usage.py
aasthajh/cucim
131
3287163
# # Copyright (c) 2021, <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 writing...
0
0
0
0
0
0
kafkashell/main.py
devshawn/kafka-shell
109
3287171
# -*- coding: utf-8 -*- # # Copyright 2019 <NAME>. 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. A copy of # the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "li...
0
0
0
0
0
0
guild/resolver.py
timt51/guildai
694
3287172
# Copyright 2017-2021 TensorHub, 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 agreed to in writ...
9
87
3
0
99
0
tests/expectations/test_util.py
cbonilla20/great_expectations
6,451
3287227
<reponame>cbonilla20/great_expectations import logging from typing import Dict, List import pandas as pd import pytest from great_expectations.core import ( ExpectationConfiguration, ExpectationValidationResult, ) from great_expectations.exceptions import GreatExpectationsError from great_expectations.executi...
0
0
0
0
0
0
pyzoo/zoo/ray/ray_daemon.py
limn2o4/analytics-zoo
2,970
3287242
# # Copyright 2018 Analytics Zoo 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...
0
0
0
0
0
0
gfsa/model/model_util.py
deepneuralmachine/google-research
23,901
3287260
<filename>gfsa/model/model_util.py<gh_stars>1000+ # coding=utf-8 # Copyright 2021 The Google Research 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/li...
0
0
0
0
0
0
test/UnitTest/test_allsubscription.py
jason-fox/fogflow
102
3287262
import os,sys # change the path accoring to the test folder in system sys.path.append('/home/ubuntu/fogflow/test/UnitTest') from datetime import datetime import copy import json import requests import time import pytest import data import sys # change it by broker ip and port brokerIp="http://192.168.100.120:8070" #...
0
0
0
0
0
0
scrapy_proj/openrecipes/spiders/loveandoliveoil_feedspider.py
fictivekin/openrecipes
300
3287280
from scrapy.spider import BaseSpider from scrapy.http import Request from scrapy.selector import XmlXPathSelector from openrecipes.spiders.loveandoliveoil_spider import Loveandoliveoil_Mixin class LoveandoliveoilfeedSpider(BaseSpider, Loveandoliveoil_Mixin): name: str = "loveandoliveoil.feed" allowed_domain...
0
1
3
0
4
0
minihack/tiles/tile.py
samvelyan/minihack-1
217
3287288
# This file is automatically generated. Do not edit. glyph2tile = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, ...
0
0
0
0
0
0
tools/embedding.py
datha88/kbqa-ar-smcnn
139
3287293
<reponame>datha88/kbqa-ar-smcnn #!/usr/bin/env python # -*- coding: utf-8 -*- # Mostly from https://github.com/OpenNMT/OpenNMT-py # Most Code in load/save word2vec format refer to Gensim import torch import torch.nn as nn from utils import load_word2vec_format, aeq class Embeddings(nn.Module): def __init__(self, ...
0
0
0
0
0
0
graphgallery/nn/metrics/pytorch/accuracy.py
TobiasSchmidtDE/GraphGallery
300
3287321
<reponame>TobiasSchmidtDE/GraphGallery import torch from torch import nn from .metric import Metric class Accuracy(Metric): """Calculates how often predictions equal labels. This metric creates two local variables, `total` and `count` that are used to compute the frequency with which `y_pred...
0
0
0
0
0
0
octavia/common/decorators.py
zjchao/octavia
129
3287364
<gh_stars>100-1000 # Copyright 2016 # 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 ...
0
0
0
0
0
0
plugins/modules/oci_database_vm_cluster.py
slmjy/oci-ansible-collection
108
3287386
#!/usr/bin/python # Copyright (c) 2020, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
0
13
0
0
13
0
brml/__init__.py
herupraptono/pybrml
136
3287388
#!/usr/bin/env python # http://stackoverflow.com/questions/5134893/importing-python-classes-from-different-files-in-a-subdirectory # __all__ = ['MyClass01','MyClass02'] from .potential import potential from .variable import variable from multpots import multpots from dag import dag from intersect import intersect fro...
0
0
0
0
0
0
examples/frompapers/Platkiewicz_Brette_2011.py
SimonAltrogge/brian2
674
3287410
#!/usr/bin/env python """ Slope-threshold relationship with noisy inputs, in the adaptive threshold model ------------------------------------------------------------------------------- Fig. 5E,F from: <NAME> and <NAME> (2011). Impact of Fast Sodium Channel Inactivation on Spike Threshold Dynamics and Synaptic Integra...
0
0
0
0
0
0
tests/functional/services/policy_engine/feeds_data_tests/conftest.py
rbrady/anchore-engine
1,484
3287430
from os import path import pytest from anchore_engine.db.entities.policy_engine import ( CpeV2Vulnerability, FeedGroupMetadata, FeedMetadata, FixedArtifact, Vulnerability, ) CURRENT_DIR = path.dirname(path.abspath(__file__)) FEEDS_DATA_PATH_PREFIX = path.join("data", "v1", "service", "feeds") DB...
0
1
0
0
1
0
tests/SampleApps/python/mssqlserver-sample/application.py
samruddhikhandale/Oryx
403
3287442
from flask import Flask, jsonify import pyodbc import os app = Flask(__name__) @app.errorhandler(Exception) def exception_handler(exc): return repr(exc) class Database: def listProductNames(self): host = os.getenv('SQLSERVER_DATABASE_HOST') databaseName = os.getenv('SQLSERVER_DATABASE_NAME') ...
0
0
0
0
0
0
openapi_core/deserializing/media_types/util.py
Yarn-e/openapi-core
160
3287457
<reponame>Yarn-e/openapi-core<filename>openapi_core/deserializing/media_types/util.py from email.parser import Parser from urllib.parse import parse_qsl def urlencoded_form_loads(value): return dict(parse_qsl(value)) def data_form_loads(value): if issubclass(type(value), bytes): value = value.decode...
0
0
0
0
0
0
rules/chromeext/CVI_4004.py
lavon321/Kunlun-M
1,059
3287458
<reponame>lavon321/Kunlun-M # -*- coding: utf-8 -*- """ auto rule template ~~~~ :author: LoRexxar <<EMAIL>> :homepage: https://github.com/LoRexxar/Kunlun-M :license: MIT, see LICENSE for more details. :copyright: Copyright (c) 2017 LoRexxar. All rights reserved """ from utils.api import ...
0
0
0
0
0
0
froide/helper/search/api_views.py
xenein/froide
198
3287471
<filename>froide/helper/search/api_views.py<gh_stars>100-1000 from elasticsearch_dsl.query import Q as ESQ from django_filters import rest_framework as filters from froide.team.models import Team from ..api_utils import ElasticLimitOffsetPagination from . import SearchQuerySetWrapper class ESQueryFilterBackend(fil...
0
0
0
0
0
0
tests/i18n/patterns/urls/default.py
ni-ning/django
61,676
3287505
from django.conf.urls.i18n import i18n_patterns from django.urls import include, path, re_path from django.utils.translation import gettext_lazy as _ from django.views.generic import TemplateView view = TemplateView.as_view(template_name='dummy.html') urlpatterns = [ path('not-prefixed/', view, name='not-prefixed...
0
0
0
0
0
0
tests/gdata_tests/core_test.py
dorosh/gdata-python-client
483
3287509
<reponame>dorosh/gdata-python-client #!/usr/bin/env python # # Copyright (C) 2010 Google 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
0
0
0
0
0
src/test/pythonFiles/terminalExec/sample1_raw.py
ChaseKnowlden/vscode-jupyter
2,461
3287514
<reponame>ChaseKnowlden/vscode-jupyter<filename>src/test/pythonFiles/terminalExec/sample1_raw.py # Sample block 1 def square(x): return x**2 print('hello') # Sample block 2 a = 2 if a < 2: print('less than 2') else: print('more than 2') print('hello') # Sample block 3 for i in range(5): print(i) ...
0
0
0
0
0
0
djangox/lib/python3.8/site-packages/allauth/socialaccount/providers/feedly/provider.py
DemarcusL/django_wiki_lab
6,342
3287574
from __future__ import unicode_literals from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class FeedlyAccount(ProviderAccount): def get_avatar_url(self) -> object: return self.account.extra_data.get("picture") ...
0
5
1
0
6
0
tests/utils.py
richardcole/uwsgi-nginx-flask-docker
2,798
3287577
import os from docker.client import DockerClient from docker.errors import NotFound from docker.models.containers import Container CONTAINER_NAME = "uwsgi-nginx-flask-test" def get_logs(container: Container) -> str: logs = container.logs() return logs.decode("utf-8") def get_nginx_config(container: Contai...
6
8
0
0
14
0
src/sage/combinat/sine_gordon.py
dimpase/sagetrac-mirror
1,742
3287585
from __future__ import annotations r""" sine-Gordon Y-system plotter This class builds the triangulations associated to sine-Gordon and reduced sine-Gordon Y-systems as constructed in [NS]_. AUTHORS: - <NAME> (2014-07-18): initial version EXAMPLES: A reduced sine-Gordon example with 3 generations:: sage: Y = ...
0
18
0
1
19
0
lale/lib/autogen/k_means.py
mfeffer/lale
265
3287605
<reponame>mfeffer/lale<filename>lale/lib/autogen/k_means.py from numpy import inf, nan from sklearn.cluster import KMeans as Op from lale.docstrings import set_docstrings from lale.operators import make_operator class _KMeansImpl: def __init__(self, **hyperparams): self._hyperparams = hyperparams ...
0
0
0
0
0
0
server/explorer/management/commands/setupdb.py
s-bauer/yang-explorer
437
3287667
<filename>server/explorer/management/commands/setupdb.py """ Copyright 2015, Cisco Systems, 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 re...
0
0
0
0
0
0
deep-rl/lib/python2.7/site-packages/OpenGL/raw/WGL/VERSION/WGL_1_0.py
ShujaKhalid/deep-rl
210
3287694
<reponame>ShujaKhalid/deep-rl '''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.WGL import _types as _cs # End users want this... from OpenGL.raw.WGL._types import * from OpenGL.raw.WGL import _errors from OpenGL.constant impor...
0
0
0
0
0
0
ruby/ruby_grpc_library.bzl
ashwin153/rules_proto_grpc
162
3287697
<reponame>ashwin153/rules_proto_grpc<filename>ruby/ruby_grpc_library.bzl<gh_stars>100-1000 """Generated definition of ruby_grpc_library.""" load("//ruby:ruby_grpc_compile.bzl", "ruby_grpc_compile") load("//internal:compile.bzl", "proto_compile_attrs") load("@bazelruby_rules_ruby//ruby:defs.bzl", "ruby_library") def r...
0
0
0
0
0
0
tests/models/test_order_status.py
olyoberdorf/tastyworks_api
198
3287737
<filename>tests/models/test_order_status.py import unittest from tastyworks.models.order import OrderStatus class TestOrderStatus(unittest.TestCase): def setUp(self): pass def test_is_active(self): new_status = OrderStatus.LIVE self.assertTrue(new_status.is_active()) new_stat...
0
0
0
0
0
0
txtorcon/onion.py
faridblack/txtorcon
180
3287759
import os import re import six import base64 import hashlib import functools import warnings from os.path import isabs, abspath from zope.interface import Interface, Attribute, implementer from twisted.internet import defer from twisted.python import log from txtorcon.util import find_keywords, version_at_least from...
0
0
0
0
0
0
analytics/migrations/0001_initial.py
TylerPham2000/zulip
17,004
3287773
import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies: list[object | tuple[str, str]] = [ ("zerver", "0030_realm_org_type"), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ...
0
0
2
0
2
0
app/__init__.py
JoneNaZi/Interfaceplatform
729
3287784
<reponame>JoneNaZi/Interfaceplatform<gh_stars>100-1000 # encoding: utf-8 """ @author: lileilei @site: @file: __init__.py @time: 2017/7/13 16:38 """ from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_bootstrap import Bootstrap from flask_login import LoginManager from config import lod from apsc...
0
0
0
0
0
0
anchore_engine/services/policy_engine/engine/feeds/client.py
ballad86/anchore-engine
1,484
3287793
<gh_stars>1000+ import abc import copy import datetime import json from dataclasses import dataclass, field from io import BytesIO from typing import Any, Dict, Optional, Tuple, Union import ijson import requests import requests.exceptions from anchore_engine.clients.grype_wrapper import GrypeWrapperSingleton from an...
0
0
0
0
0
0
openai/api_resources/search.py
abdulwahid789/openai-python
404
3287813
<reponame>abdulwahid789/openai-python from openai.api_resources.abstract.api_resource import APIResource class Search(APIResource): api_prefix = "v1" OBJECT_NAME = "search_indices" @classmethod def class_url(cls): return "/%s/%s" % (cls.api_prefix, cls.OBJECT_NAME) @classmethod def c...
0
0
0
0
0
0
tests/unit/controllers/platform/test_events.py
senstb/aws-elastic-beanstalk-cli
110
3287814
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
0
0
0
0
0
0
tests/generate_soundfiles.py
peircej/PySoundFile
219
3287852
#!/usr/bin/env python import struct def uint32(number) -> object: return struct.pack('<I', number) def uint16(number) -> object: return struct.pack('<H', number) mono_raw = struct.pack('<5h', 0, 1, 2, -2, -1) # floating point data is typically limited to the interval [-1.0, 1.0], # but smaller/larger va...
0
2
0
0
2
0
tests/salt-tcpdump.py
tomdoherty/salt
9,425
3287853
#!/usr/bin/python from __future__ import annotations """ Author: <NAME>, <EMAIL> Salt tcpdumper to visualize whats happening network-wise on the salt-master. It uses pcapy and inspects all incoming networks packets and filters only the ones relevant to salt-communication. based on: http://oss.coresecurity.com/project...
0
10
0
0
10
0
ppdet/modeling/backbones/dla.py
leakyH/PaddleDetection
7,782
3287889
<filename>ppdet/modeling/backbones/dla.py # Copyright (c) 2021 PaddlePaddle 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.apa...
0
0
0
0
0
0
tests/__init__.py
lpdescamps/dahua
114
3287891
<reponame>lpdescamps/dahua """Tests for dahua integration."""
0
0
0
0
0
0
tests/utils/test_attrdict.py
Semih-Kurt/scvi-tools
398
3287917
<reponame>Semih-Kurt/scvi-tools<gh_stars>100-1000 import pytest from scvi.utils import attrdict def test_attrdict_new(): ad = attrdict() ad.a = 1 assert ad.a == 1 and ad["a"] == 1 ad["b"] = "test" assert ad.b == "test" and ad["b"] == "test" ad.c = {"d": 2} assert isinstance(ad.c, dict) ...
0
0
0
0
0
0
walter/katana/WalterIn/Walter_In.py
all-in-one-of/OpenWalter
187
3287921
# Copyright 2017 <NAME>. All rights reserved. from Nodes3DAPI.Manifest import AssetAPI from Nodes3DAPI.Manifest import FnAttribute, FnGeolibServices from Nodes3DAPI.Manifest import NodegraphAPI from Nodes3DAPI.TimingUtils import GetModifiedFrameTime from Nodes3DAPI.TimingUtils import GetTimingParameterHints from Nodes...
0
0
0
0
0
0
cmt/modis/simple_modis_algorithms.py
fchapoton/CrisisMappingToolkit
178
3287922
<reponame>fchapoton/CrisisMappingToolkit # ----------------------------------------------------------------------------- # Copyright * 2014, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. All # rights reserved. # # The Crisis Mapping Toolkit (CMT) v...
0
0
0
0
0
0
examples/window_config.py
minuJeong/moderngl-window
142
3287926
import math import moderngl_window class BasicWindowConfig(moderngl_window.WindowConfig): """Minimal WindowConfig example""" gl_version: tuple[int, int] = (3, 3) title: str = "Basic Window Config" def __init__(self, **kwargs): super().__init__(**kwargs) def render(self, time,...
0
0
2
0
2
0
subaligner/lib/to_srt.py
baxtree/subaligner
227
3287940
<filename>subaligner/lib/to_srt.py #!/usr/bin/env python # -*- encoding=utf8 -*- # # stl2srt A program to convert EBU STL subtitle files in the more common SRT format # # Copyright 2014 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the L...
0
0
0
0
0
0
electrumsv/constants.py
electrumsv/electrumsv
136
3287957
<reponame>electrumsv/electrumsv from enum import Enum, IntEnum from enum import IntFlag as _IntFlag from typing import Optional, Sequence, Tuple from bitcoinx import pack_be_uint32, unpack_be_uint32_from ## Hacks to deal with standard library bugs. # https://bugs.python.org/issue41907 class IntFlag(_IntFlag): de...
0
0
0
0
0
0
binderhub/tests/test_ratelimit.py
jupyterhub/builderhub
2,134
3287988
from unittest import mock import pytest from binderhub.ratelimit import RateLimiter, RateLimitExceeded def test_rate_limit(): r = RateLimiter(limit=10, period_seconds=60) assert r._limits == {} now = r.time() reset = int(now) + 60 with mock.patch.object(r, "time", lambda: now): limit = r...
0
0
0
0
0
0
sdhash-ui/setup.py
malwaredb/sdhash
130
3287993
from distutils.core import setup import py2exe setup(console=['sdhashuiserver.py'])
0
0
0
0
0
0
shapely/tests/geometry/test_hash.py
jGaboardi/shapely
189
3288006
<reponame>jGaboardi/shapely from shapely import GeometryCollection, LineString, MultiPoint, Point def test_point(): g = Point(1, 2) assert hash(g) == hash(Point(1, 2)) assert hash(g) != hash(Point(1, 3)) def test_multipoint(): g = MultiPoint([(1, 2), (3, 4)]) assert hash(g) == hash(MultiPoint([(...
0
0
0
0
0
0
src/admin/godmode/templates.py
aimanow/sft
280
3288023
from collections import defaultdict from urllib.parse import urlencode from flask import g, Flask import settings from godmode.acl import ACL from godmode.models import models, model_map, model_hash def init_templates(app: Flask): app.context_processor(godmode_context_processor) app.add_template_filter(no_e...
2
4
0
0
6
0
models/net.py
JunjH/Visualizing-CNNs-for-monocular-depth-estimation
132
3288029
<gh_stars>100-1000 from collections import OrderedDict import math import torch import torch.nn.functional as F import torch.nn as nn from torch.utils import model_zoo import pdb import copy import numpy as np import modules from torchvision import utils import senet import resnet import densenet import net_mask clas...
0
0
0
0
0
0
mayan/apps/sources/events.py
atitaya1412/Mayan-EDMS
343
3288037
<filename>mayan/apps/sources/events.py from django.utils.translation import ugettext_lazy as _ from mayan.apps.events.classes import EventTypeNamespace namespace = EventTypeNamespace(label=_('Sources'), name='sources') event_source_created = namespace.add_event_type( label=_('Source created'), name='source_creat...
0
0
0
0
0
0
testData/typecheckerinspection/parsableTypeDisable.py
alek-sun/pydantic-pycharm-plugin
238
3288047
<filename>testData/typecheckerinspection/parsableTypeDisable.py from typing import Union from pydantic import BaseModel class A(BaseModel): a: str b: str A(a=str('123'), b=str('123')) A(a=int(123), b=int(123))
0
0
0
0
0
0
aliyun/log/etl_core/transform/condition_transform.py
topdown618/aliyun-log-python-sdk
130
3288066
<reponame>topdown618/aliyun-log-python-sdk<gh_stars>100-1000 from .transform_list import transform from .condition_list import condition from functools import wraps from .transform_base import transform_base from ..etl_util import process_event, support_event_list_simple import logging __all__ = ['dispatch_event', 'tr...
0
0
0
0
0
0
paramiko/auth_handler.py
mansz81/Cerbrutus
207
3288069
<gh_stars>100-1000 # Copyright (C) 2003-2007 <NAME> <<EMAIL>> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or...
0
0
0
0
0
0
all/environments/gym_test.py
drozzy/autonomous-learning-library
584
3288080
<filename>all/environments/gym_test.py import unittest import gym from all.environments import GymEnvironment class GymEnvironmentTest(unittest.TestCase): def test_env_name(self): env = GymEnvironment('CartPole-v0') self.assertEqual(env.name, 'CartPole-v0') def test_preconstructed_env_name(se...
0
0
0
0
0
0
filebrowser/actions.py
bastiaanraa/django-filebrowser
107
3288086
# coding: utf-8 import os import tempfile from django.contrib import messages from django.core.files import File from django.utils.translation import ugettext_lazy as _ from filebrowser.settings import VERSION_QUALITY, STRICT_PIL if STRICT_PIL: from PIL import Image else: try: from PIL import Image ...
0
1
0
0
1
0
tf_encrypted/tensor/shared.py
wqruan/tf-encrypted
825
3288111
"""Commonly used tensor functions.""" import math from typing import Optional from typing import Union import numpy as np import tensorflow as tf from .factory import AbstractTensor def binarize(tensor: tf.Tensor, bitsize: Optional[int] = None,) -> tf.Tensor: """Extract bits of values in `tensor`, returning a `...
11
4
0
0
15
0
test/visuals/test_dattext.py
colinmford/coldtype
142
3288115
from coldtype.test import * from coldtype.midi.controllers import LaunchControlXL @test((1000, 300)) def test_system_font(r) -> object: return DATText("Hello, world!", Style("Times", 100, load_font=0, fill=0), r.offset(100, 100)) @test((1000, 300), rstate=1) def test_return_string(r, rs) -> object: ri = r.ins...
0
3
0
0
3
0
code/custom_transformers.py
FedericoRicciardelli/pandas-pipelines-custom-transformers
169
3288184
<reponame>FedericoRicciardelli/pandas-pipelines-custom-transformers # Reference # http://zacstewart.com/2014/08/05/pipelines-of-featureunions-of-pipelines.html import numpy as np import pandas as pd from functools import reduce from sklearn.base import TransformerMixin from sklearn.feature_extraction import DictVecto...
0
0
0
0
0
0
tests/fido_client/fido_response_adapter_test.py
andriis/bravado
600
3288196
<gh_stars>100-1000 # -*- coding: utf-8 -*- from __future__ import unicode_literals import mock from bravado.fido_client import FidoResponseAdapter def test_header_conversion(): fido_response = mock.Mock( name='fido_response', headers={ b'Content-Type': [b'application/json'], ...
0
0
0
0
0
0
pysrc/gen_inst_list.py
CrackerCat/xed
1,261
3288210
<gh_stars>1000+ #!/usr/bin/env python # -*- python -*- #BEGIN_LEGAL # #Copyright (c) 2019 Intel Corporation # # 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/l...
0
0
0
0
0
0
src/ostorlab/cli/__init__.py
bbhunter/ostorlab
113
3288224
"""Ostorlab cli package.""" from ostorlab.cli import scan from ostorlab.cli import auth from ostorlab.cli import agent from ostorlab.cli import vulnz from ostorlab.cli import agentgroup from ostorlab.cli import ci_scan
0
0
0
0
0
0
containers/ddev-webserver/ddev-webserver-base-files/usr/local/bin/kill_supervisor.py
bserem/ddev
1,240
3288226
<reponame>bserem/ddev<gh_stars>1000+ #!/usr/bin/env python3 import sys import os import signal # From https://blog.zhaw.ch/icclab/process-management-in-docker-containers/ def write_stdout(s): sys.stdout.write(s) sys.stdout.flush() def write_stderr(s): sys.stderr.write(s) sys.stderr.flush() def main(): ...
0
0
0
0
0
0
bind/.report.py
shyamjangid07/Reverse-Engineering
337
3288234
<reponame>shyamjangid07/Reverse-Engineering # Decompiled by HTR-TECH | <NAME> # Github : https://github.com/htr-tech #--------------------------------------- # Source File : .report.py # Time : Wed Sep 9 08:26:09 2020 #--------------------------------------- # uncompyle6 version 3.7.4 # Python bytecode 2.7 # Decompil...
0
0
0
0
0
0
mako/ast.py
LordAro/mako
207
3288244
# mako/ast.py # Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """utilities for analyzing expressions and blocks of Python code, as well as generating Python from AST no...
2
2
0
6
10
0
doc/doxme.py
Skycoder42/QtAutoUpdater
594
3288279
#!/usr/bin/python # $1 The readme to be transformed # $2 brief description # $pwd: dest dir import sys import os.path def readFirst(line, brief, out): if line[0:2] != "# ": raise ValueError("Expected first line to start with '# '") # skip the first line if brief is not None: out.write(line + "\n"); out.write...
0
0
0
0
0
0
src/models/__init__.py
flxai/Confident_classifier
169
3288284
## Models from """The models subpackage contains definitions for the following model architectures: - `AlexNet`_ - `VGG`_ - `ResNet`_ - `SqueezeNet`_ - `DenseNet`_ You can construct a model with random weights by calling its constructor: .. code:: python import torchvision.models as models resnet18 = mod...
0
0
0
0
0
0
mlflow/tracking/request_header/registry.py
PeterSulcs/mlflow
10,351
3288301
<filename>mlflow/tracking/request_header/registry.py import entrypoints import warnings import logging from mlflow.tracking.request_header.databricks_request_header_provider import ( DatabricksRequestHeaderProvider, ) _logger = logging.getLogger(__name__) class RequestHeaderProviderRegistry(object): def __i...
0
0
0
0
0
0