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
deep_qa/training/text_trainer.py
richarajpal/deep_qa
459
3213237
from copy import deepcopy from typing import Any, Dict, List, Tuple import logging import dill as pickle from keras import backend as K from keras.layers import Dense, Dropout, Layer, TimeDistributed, Embedding from overrides import overrides import numpy import tensorflow from ..common.checks import ConfigurationErr...
27
21
0
5
53
0
release/stubs.min/Tekla/Structures/ModelInternal_parts/dotHierarchicDefinition_t.py
htlcnn/ironpython-stubs
182
3213254
class dotHierarchicDefinition_t(object): # no doc aCustomType: None = None aHierarchyIdentifier: None = None aName: None = None aSubHierarchyIds: None = None Drawable: None = None HierarchyType: None = None ModelObject: None = None nSubHierarchyIds: None = None ObjectParent: None = None OperationType: None =...
0
0
10
0
10
0
hail/python/hail/hail_logging.py
tdeboer-ilmn/hail
789
3213266
<reponame>tdeboer-ilmn/hail<filename>hail/python/hail/hail_logging.py import abc import logging class Logger(abc.ABC): @abc.abstractmethod def error(self, msg): pass @abc.abstractmethod def warning(self, msg): pass @abc.abstractmethod def info(self, msg): pass class...
0
0
0
0
0
0
pyno/codeEditor.py
cgarjun/Pyno
163
3213274
import pyglet import pyperclip import keyword import tokenize import io import os from pyno.utils import x_y_pan_scale, font from pyno.draw import quad_aligned highlight = set(list(__builtins__.keys()) + list(keyword.__dict__.keys()) + keyword.kwlist + ['call', 'clean...
1
4
0
6
11
0
backend/prod/package.py
sleepingAnt/viewfinder
645
3213323
<gh_stars>100-1000 #!/usr/bin/env python # # Copyright (C) 2011 Viewfinder Inc. # """Bundle up a collection of python servers for deployment to the Amazon Web Services cloud on a single AMI instance. Creates a self-extracting Python deployment file for use with AWS. Every deployment starts with a deployment template,...
0
0
0
0
0
0
nautobot/ipam/migrations/0003_remove_max_length.py
psmware-ltd/nautobot
384
3213348
# Generated by Django 3.1.8 on 2021-05-14 19:58 from django.db import migrations import nautobot.ipam.fields class Migration(migrations.Migration): dependencies: list[tuple[str, str]] = [ ("ipam", "0002_initial_part_2"), ] operations: list[object] = [ migrations.AlterField( ...
0
0
2
0
2
0
ALGORITHMS/Greedy/Fractional_Knapsack/Fractional-Knapsack.py
anishsingh42/CodeChef
127
3213349
<filename>ALGORITHMS/Greedy/Fractional_Knapsack/Fractional-Knapsack.py # Uses python3 # A thief finds much more loot than his bag can fit. Help him to find the most valuable combination of items assuming that any fraction of a loot item can be put into his bag. #This provides solution to the Greedy Algorithm problem ca...
0
0
0
0
0
0
packages/core/minos-microservice-networks/tests/test_networks/test_scheduling/test_requests.py
sorasful/minos-python
247
3213384
<filename>packages/core/minos-microservice-networks/tests/test_networks/test_scheduling/test_requests.py import unittest from minos.common import ( DeclarativeModel, current_datetime, ) from minos.networks import ( NotHasParamsException, ScheduledRequest, ScheduledRequestContent, ) class TestSche...
0
0
0
0
0
0
62-reticulate/simple.py
nmutai/webnar
1,547
3213405
<filename>62-reticulate/simple.py import matplotlib.pyplot as plt import numpy as np x = np.array([1,2,3]) y = np.square(x) plt.figure() plt.plot(x,y) plt.show()
0
0
0
0
0
0
packages/pytea/pylib/torch/distributions/bernoulli.py
Sehun0819/pytea
241
3213406
<reponame>Sehun0819/pytea<gh_stars>100-1000 import LibCall import torch from .distribution import Distribution class Bernoulli(Distribution): def __init__(self, probs=None, logits=None, validate_args=None): if probs is not None: self.is_scalar = isinstance(probs, float) or isinstance(probs, in...
0
0
0
0
0
0
rpython/flowspace/framestate.py
nanjekyejoannah/pypy
381
3213416
<reponame>nanjekyejoannah/pypy from rpython.flowspace.model import Variable, Constant, FSException from rpython.rlib.unroll import SpecTag def _copy(v): from rpython.flowspace.flowcontext import FlowSignal if isinstance(v, Variable): return Variable(v) elif isinstance(v, FlowSignal): vars =...
0
0
0
0
0
0
OnlineStudy/generic/handlers/tutor.py
NanRenTeam-9/MongoMicroCourse
132
3213417
<reponame>NanRenTeam-9/MongoMicroCourse from startX.serivce.v1 import StartXHandler from django.urls import re_path from .base_promission import PermissionHandler class TutorHandler(PermissionHandler, StartXHandler): def get_urls(self): """预留的重新自定义url钩子函数,主要是覆盖掉默认的url,并设置name别名""" patterns = [ ...
0
0
0
0
0
0
gryphon/lib/arbitrage.py
qiquanzhijia/gryphon
1,109
3213419
<reponame>qiquanzhijia/gryphon """ Arbitrage library. Takes in orderbooks and gives back information about arbitrage opportunities present in them. The current orderbook format is a dictionary of bid and ask exchange orders. This could be changed as part of a larger refactor to bring all our orderbook representations ...
0
0
0
0
0
0
examples/2_animations_and_callbacks/0_wait_for_raytracing_done.py
robertsulej/plotoptix
307
3213441
""" Simple synchronization example. The code is launching ray tracing and waiting until the image is completed. Ray tracing is running on GPU, in the separate thread. Callback functions allow to execute code synchronized with the GPU computations or signal when they are finished. """ import numpy as np from plotoptix...
1
1
1
0
3
0
arsdk-xml/ARSDKBuildUtils/SDK3Build.py
2016-Capstone/PythonController
114
3213529
<reponame>2016-Capstone/PythonController<gh_stars>100-1000 #!/usr/bin/env python ''' Copyright (C) 2014 <NAME> 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 ...
0
0
0
0
0
0
src/pythae/models/vae_lin_nf/vae_lin_nf_config.py
clementchadebec/benchmark_VAE
143
3213547
from dataclasses import field from typing import List from pydantic.dataclasses import dataclass from ..vae import VAEConfig @dataclass class VAE_LinNF_Config(VAEConfig): """VAE with linear Normalizing Flow config class. Parameters: input_dim (int): The input_data dimension latent_dim (int)...
0
0
1
0
1
0
tests/BlazingSQLTest/Runner/runTest.py
Ethyling/blazingsql
1,059
3213554
<gh_stars>1000+ # Cast column to f64 before convert it to pandas # This is a hack, use the assert_equal comparator when nulls is # fully supported on cudf.sort_values import json import logging import os import re import time import yaml import numpy as np import pandas as pd import blazingsql from blazingsql import ...
0
0
0
0
0
0
couler/tests/while_test.py
javoweb/couler
700
3213567
# Copyright 2021 The Couler 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 required by applicable law or...
0
1
0
0
1
0
n-queens/solution.py
mahimadubey/leetcode-python
528
3213568
<reponame>mahimadubey/leetcode-python class Solution: # @return a list of lists of string def solveNQueens(self, n): self.n = n res = [] columns = [-1 for i in range(n)] self.solve(columns, 0, res) return res def make_string_list(self, columns): sol = [] # O...
0
0
0
0
0
0
examples/paper_generation_code/2020-08-26-local_fmri_hyper_training.py
CoMind-Technologies/deepinterpolation
178
3213572
<filename>examples/paper_generation_code/2020-08-26-local_fmri_hyper_training.py import deepinterpolation as de import sys from shutil import copyfile import os from deepinterpolation.generic import JsonSaver, ClassLoader import datetime from typing import Any, Dict from kerastuner.tuners import RandomSearch, BayesianO...
0
0
0
0
0
0
src/colorme.py
MustangYM/xia0LLDB
464
3213596
#! /usr/bin/env python3 # # colorme.py # xia0LLDB # # Created by <NAME> on 3/4/20. # Copyright 2020 <NAME>. All rights reserved. # import os # Used to test if we are in Xcode def envtest_inXcode() -> bool: lookup = os.environ["PATH"] if "/Xcode.app/Contents/Developer/usr/bin" in lookup: return True ...
2
4
0
0
6
0
redshift_sqlalchemy/__init__.py
jferg368/sqlalchemy-redshift
177
3213610
""" Compatibility module for projects referencing sqlalchemy_redshift by its old name "redshift_sqlalchemy". """ import sys import warnings import sqlalchemy_redshift DEPRECATION_MESSAGE = """\ redshift_sqlalchemy has been renamed to sqlalchemy_redshift. The redshift_sqlalchemy compatibility package will be remove...
0
0
0
0
0
0
jupyter_contrib_core/testing_utils/__init__.py
EnjoyLifeFund/macHighSierra-py36-pkgs
445
3213618
<reponame>EnjoyLifeFund/macHighSierra-py36-pkgs<filename>jupyter_contrib_core/testing_utils/__init__.py # -*- coding: utf-8 -*- """Test utilities.""" from __future__ import ( absolute_import, division, print_function, unicode_literals, ) import logging import os import re import sys from threading import RLock f...
0
0
0
0
0
0
pyvisgraph/__init__.py
TaipanRex/oceanspp
181
3213638
<gh_stars>100-1000 from __future__ import division from pyvisgraph.graph import Point, Edge, Graph from pyvisgraph.vis_graph import VisGraph
0
0
0
0
0
0
src/h3fake/api/basic_str.py
ajfriend/h3fake
498
3213647
""" This API handles H3 Indexes of type `str`, using basic Python collections (`set`, `list`, `tuple`). `h3` will interpret these Indexes as hexadecimal representations of unsigned 64-bit integers. Input collections: - `Iterable[str]` Output collections: - `Set[str]` for unordered - `List[str]` for ordered """ fro...
0
3
0
0
3
0
dash_renderer/version.py
odidev/dash-renderer
109
3213666
__version__ = '0.24.0'
0
0
0
0
0
0
src/datasets/utils/doc_utils.py
WojciechKusa/datasets
10,608
3213700
<filename>src/datasets/utils/doc_utils.py from typing import Callable def is_documented_by(function_with_docstring: Callable): """Decorator to share docstrings across common functions. Args: function_with_docstring (`Callable`): Name of the function with the docstring. """ def wrapper(target...
0
0
0
0
0
0
llvm/utils/lit/tests/use-llvm-tool.py
mkinsner/llvm
2,338
3213722
<filename>llvm/utils/lit/tests/use-llvm-tool.py ## Show that lit reports the path of tools found via use_llvm_tool. ## Additionally show that use_llvm_tool uses in order of preference: ## 1) The path specified in an environment variable, ## 2) The LLVM tools build directory, ## 3) The PATH, if requested. # RUN: %{lit}...
0
0
0
0
0
0
examples/chemtrails.py
mewbak/hypertools
1,681
3213725
<reponame>mewbak/hypertools # -*- coding: utf-8 -*- """ ============================= Chemtrails ============================= The past trajectory of an animated plot can be visualized with the chemtrails argument. This displays a low opacity version of the trace behind the current points being plotted. This can be ...
0
0
0
0
0
0
test_accounts/urls.py
AllFactors/django-organizations
855
3213788
from django.conf.urls import include from django.urls import path from django.contrib import admin from organizations.backends.modeled import ModelInvitation from test_accounts.models import Account admin.autodiscover() app_name = "test_accounts" urlpatterns = [ path( "register/", include( ...
0
0
0
0
0
0
pytorch_translate/tasks/utils.py
dzhulgakov/translate
748
3213820
<reponame>dzhulgakov/translate #!/usr/bin/env python3 from collections import OrderedDict from pytorch_translate.data import dictionary as pytorch_translate_dictionary def load_multilingual_vocabulary(args): dicts = OrderedDict() vocabulary_list = getattr(args, "vocabulary", []) comparison_lang = None ...
0
0
0
0
0
0
EventFilter/HcalRawToDigi/test/hcal_laser_filter_testUpdate_cfg.py
ckamtsikis/cmssw
852
3213828
# Auto generated configuration file # using: # Revision: 1.381.2.17 # Source: /local/reps/CMSSW/CMSSW/Configuration/PyReleaseValidation/python/ConfigBuilder.py,v # with command line options: exampleFilters -s RAW2DIGI,FILTER:hcallaserhbhehffilter2012_cff.hcallLaser2012Filter --data --python hcal_test_exampleFilters....
0
0
0
0
0
0
localgraphclustering/algorithms/acl_list.py
vishalbelsare/LocalGraphClustering
106
3213829
<filename>localgraphclustering/algorithms/acl_list.py import time import numpy as np def acl_list(ref_node, g, alpha = 0.15, rho = 1.0e-5, max_iter = 100000, max_time = 100): n = g.adjacency_matrix.shape[0] r = np.zeros(n) p = np.zeros(n) nodes = [] for i in ref_node: r[...
0
0
0
0
0
0
src/opendr/perception/object_detection_3d/voxel_object_detection_3d/second_detector/torchplus_tanet/nn/__init__.py
makistsantekidis/opendr
217
3213853
<filename>src/opendr/perception/object_detection_3d/voxel_object_detection_3d/second_detector/torchplus_tanet/nn/__init__.py from opendr.perception.object_detection_3d.voxel_object_detection_3d.second_detector.torchplus_tanet.nn.functional import ( one_hot ) from opendr.perception.object_detection_3d.voxel_object_d...
0
0
0
0
0
0
pytorch/network.py
mjm522/gpd
439
3213856
import torch import torch.nn as nn import torch.nn.functional as F CHANNELS = [20, 50, 500] #CHANNELS = [40, 100, 500] #CHANNELS = [10, 20, 100] #CHANNELS = [6, 16, 120, 84] #CHANNELS = [12, 32, 120, 84] #CHANNELS = [32, 32, 120, 84] class NetCCFFF(nn.Module): def __init__(self, input_channels): super(Ne...
0
4
0
0
4
0
hippy/module/standard/glob/cglob.py
jweinraub/hippyvm
289
3213901
<gh_stars>100-1000 from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.rtyper.tool import rffi_platform as platform from rpython.rtyper.lltypesystem import rffi, lltype from rpython.rlib.rarithmetic import intmask eci = ExternalCompilationInfo(includes=['glob.h']) class CConfig: _com...
0
0
0
0
0
0
Python/Templates/Django/ItemTemplates/Python/DjangoNewAppFiles19/apps.py
techkey/PTVS
404
3213909
<reponame>techkey/PTVS from django.apps import AppConfig class $fileinputname$Config(AppConfig): name = '$fileinputname$'
0
0
0
0
0
0
model/activation.py
PINTO0309/MS-G3D
343
3213964
<reponame>PINTO0309/MS-G3D import torch import torch.nn as nn import torch.nn.functional as F def activation_factory(name, inplace=True): if name == 'relu': return nn.ReLU(inplace=inplace) elif name == 'leakyrelu': return nn.LeakyReLU(0.2, inplace=inplace) elif name == 'tanh': retu...
0
0
0
0
0
0
share/gamedir/scripts/pwn0meter.py
JiPRA/openlierox
192
3213972
<filename>share/gamedir/scripts/pwn0meter.py<gh_stars>100-1000 #!/usr/bin/python -u import sys, time, cgi, os, random, traceback, re f = open("pwn0meter.txt","r") w = open("pwn0meter.html","w") #w = sys.stdout w.write("<html><HEAD>\n") w.write("<META HTTP-EQUIV=\"content-type\" CONTENT=\"text/html; charset=utf-8\">\n...
0
0
0
0
0
0
wrappers/python/tests/payment/test_build_verify_payment_request.py
absltkaos/indy-sdk
636
3214023
import pytest from indy import payment, error from tests.payment.constants import * @pytest.mark.asyncio async def test_build_verify_payment_request_works_for_unknown_payment_method(wallet_handle, did_trustee): with pytest.raises(error.PaymentUnknownMethodError): await payment.build_verify_payment_req(wa...
0
0
0
0
0
0
FWCore/Integration/test/SlimmingTest3D_cfg.py
ckamtsikis/cmssw
852
3214040
<filename>FWCore/Integration/test/SlimmingTest3D_cfg.py import FWCore.ParameterSet.Config as cms process = cms.Process("TEST3D") process.maxEvents.input = 3 process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring('file:testSlimmingTest2D.root') ) process.testBD = cms.EDAnalyzer("ThinningTestAn...
0
0
0
0
0
0
simulation/util.py
bopopescu/sparrow-mod
200
3214069
# # Copyright 2013 The Regents of The University California # # 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 applicab...
1
1
1
5
8
0
Android/sample/android-app-dexdump.py
jiaxw32/FridaLib
106
3214073
<reponame>jiaxw32/FridaLib #!/usr/bin/python import frida import sys import time import os import codecs def on_message(message, data): if message['type'] == 'send': print("[*] {0}".format(message['payload'])) else: print(message) def loadJSScript(filePath): source = '' script_dir = os.path.dirname(os.path.re...
0
0
0
0
0
0
homeassistant/components/ampio/__init__.py
domwillcode/home-assistant
30,023
3214120
<filename>homeassistant/components/ampio/__init__.py """The Ampio component."""
0
0
0
0
0
0
tests/test_tutorial/test_automatic_id_none_refresh/test_tutorial001_tutorial002.py
spawn08/sqlmodel
5,490
3214243
from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine from tests.conftest import get_testing_print_function def check_calls(calls: List[List[Union[str, Dict[str, Any]]]]): assert calls[0] == ["Before interacting with the database"] assert calls[1] == [ ...
1
0
0
0
1
0
test/data/no_qa.py
javulticat/flake8-commas
136
3214281
some_code = 2 this_should_not_be_checked = 1 # noqa some_code = 3
0
0
0
0
0
0
lessons/05_relax/multigrid_helper.py
mcarpe/numerical-mooc
748
3214287
import numpy from numba import autojit @autojit(nopython=True) def poisson1d_GS_SingleItr(nx, dx, p, b) -> object: ''' Gauss-Seidel method for 1D Poisson eq. with Dirichlet BCs at both ends. Only a single iteration is executed. **blitz** is used. Parameters: ---------- nx: int, number of ...
0
5
0
0
5
0
libs/JAF/plugin_DumpCredsViaJob.py
sc979/jenkins-attack-framework
451
3214292
<gh_stars>100-1000 import base64 import os import random import re import string import time import xml.sax.saxutils import requests.exceptions as req_exc from libs import jenkinslib, quik from .BasePlugin import BasePlugin, HijackStdOut class NonCriticalException(Exception): pass def xmlescape(data): re...
0
0
0
0
0
0
CurvesGenerator/bezier_path.py
CodesHub/PathPlanning
3,693
3214335
<gh_stars>1000+ """ bezier path author: <NAME>(@Atsushi_twi) modified: huiming zhou """ import numpy as np import matplotlib.pyplot as plt from scipy.special import comb import draw def calc_4points_bezier_path(sx, sy, syaw, gx, gy, gyaw, offset): dist = np.hypot(sx - gx, sy - gy) / offset control_points =...
0
0
0
0
0
0
web/sales_app/apps/home/urls.py
iabok/sales-tracker
163
3214344
<reponame>iabok/sales-tracker """urlconf for the base application""" from django.conf.urls import url from .views import home urlpatterns = [ url(r'^$', home, name='home'), ]
0
0
0
0
0
0
tests/test_compression.py
MikeSpreitzer/uefi-firmware-parser
492
3214422
import unittest import struct from uefi_firmware import efi_compressor class CompressionTest(unittest.TestCase): def _test_compress(self, compress_algorithm): default_buffer = b"AAAAAAAA" * 90 compressed_buffer = compress_algorithm( default_buffer, len(default_buffer)) self....
0
0
0
0
0
0
integration_tests/interop/wrap2.py
Thirumalai-Shaktivel/lfortran
316
3214425
<reponame>Thirumalai-Shaktivel/lfortran """ # Design This file converts from a GFortran module file representation (documented in the `lfortran.adapters.gfortran.mod` module) to an Abstract Semantic Representation (ASR). """ # TODO: move this into the lfortran package itself import sys sys.path.append("../..") from ...
0
0
0
0
0
0
bibliopixel/util/image/__init__.py
rec/leds
253
3214430
<reponame>rec/leds from .. import deprecated if deprecated.allowed(): # pragma: no cover from . reshape import crop, resize from . load_image import show_image, showImage, loadImage from . gif import ( animated_gif_to_colorlists, convert_mode, image_to_colorlist)
0
0
0
0
0
0
mmhuman3d/core/conventions/keypoints_mapping/mpi_inf_3dhp.py
ykk648/mmhuman3d
472
3214438
MPI_INF_3DHP_KEYPOINTS = [ 'spine_3', 'spine_4_3dhp', 'spine_2', 'spine_extra', # close to spine2 'pelvis_extra', 'neck_extra', # throat 'head_extra', 'headtop', 'left_clavicle_3dhp', 'left_shoulder', 'left_elbow', 'left_wrist', 'left_hand_3dhp', 'right_clavicle...
0
0
0
0
0
0
code/quick_scraper/quick_scraper/spiders/quick_scraper.py
ayush237/Business-news-scrapper
111
3214452
<filename>code/quick_scraper/quick_scraper/spiders/quick_scraper.py<gh_stars>100-1000 import scrapy from bs4 import BeautifulSoup import sys import os import _pickle as pickle import pandas as pd from .scrape_with_bs4 import * import datetime import os DATA_DIR = os.path.join(os.getcwd(),'..','..','data') print(DATA_D...
0
0
0
0
0
0
pyjobs/core/tests/test_job_challenge.py
Mdslino/PyJobs
132
3214457
<reponame>Mdslino/PyJobs<filename>pyjobs/core/tests/test_job_challenge.py from unittest.mock import patch from django.contrib.auth.models import User from django.http import HttpRequest from django.test import Client, TestCase from django.urls import resolve, reverse from model_bakery import baker as mommy impo...
0
0
0
0
0
0
TexSoup/category.py
pablo-angulo/TexSoup
190
3214487
"""Categorize all characters into one of category codes.""" from TexSoup.utils import CC, Token, to_buffer import string # Core category codes # https://www.overleaf.com/learn/latex/Table_of_TeX_category_codes others = set(string.printable) - set(string.ascii_letters) - \ set('{}\\$&\n\r#^_~%\x00\x7d \t[]()') CA...
0
0
0
0
0
0
extensions/labgraph_protocol/labgraph_protocol/helpers/mouse_target.py
Yunusbcr/labgraph
124
3214513
<reponame>Yunusbcr/labgraph #!/usr/bin/env python3 # Copyright 2004-present Facebook. All Rights Reserved. import random import typing from labgraph_protocol.helpers.common import ( get_position, POSITION_T, RANDOM, ) from labgraph_protocol.qt_stimulus import Deferred, QtStimulus from labgraph_protocol.st...
0
0
0
0
0
0
BetaMeow/ai.py
MashiMaroLjc/ML-and-DM-in-action
370
3214523
<gh_stars>100-1000 # -*- coding:utf-8 -*- from flask import Flask from decision_tree import DecisionTree import json from flask import request from flask import render_template import random import sys __author__ = "fatRabit" __version__ = 1.6 app = Flask(__name__) #The p_tree,which stored in P_TREE.txt, is a de...
0
0
0
0
0
0
tests/test_tk.py
chubbymaggie/LibRadar
196
3214527
# -*- coding: utf-8 -*- from Tkinter import * class Application(Frame): def say_hi(self): print "hi there, everyone!" def createWidgets(self): self.Label = Label(self, text='|---- LibRadar Tagging System -----|\n| Version: 2.0.1.dev1 |') self.Label.pack() self.QUI...
0
0
0
0
0
0
generate_names.py
Emoji-COLRv0/emojitwo
313
3214557
<reponame>Emoji-COLRv0/emojitwo #!/usr/bin/env python3 # -*- mode: python; coding: utf-8 -*- # By HarJIT in 2020. MIT/Expat licence. import os, xml.dom.minidom, unicodedata, shutil, glob cldrnames = {} _document = xml.dom.minidom.parse("CLDR/annotations/en.xml") for _i in _document.getElementsByTagName("annotation"):...
0
0
0
0
0
0
matchpy/matching/syntactic.py
Upabjojr/matchpy
142
3214559
<filename>matchpy/matching/syntactic.py # -*- coding: utf-8 -*- """This module contains various many-to-one matchers for syntactic patterns: - There `DiscriminationNet` class that is a many-to-one matcher for syntactic patterns. - The `SequenceMatcher` can be used to match patterns with a common surrounding operation ...
0
0
0
0
0
0
src/encoded/tests/test_audit_antibody_characterization.py
procha2/encoded
102
3214563
import pytest def test_audit_antibody_mismatched_in_review(testapp, base_antibody_characterization, inconsistent_biosample_type): characterization_review_list = base_antibody_characterization.get('characterization_reviews') ...
0
0
0
0
0
0
Python/221. MaximalSquare.py
nizD/LeetCode-Solutions
263
3214587
<reponame>nizD/LeetCode-Solutions class Solution(object): def maximalSquare(self, matrix): # handle 0 and 1 dimensional arrays if len(matrix) == 0: return 0 if len(matrix) == 1: for i in range(len(matrix[0])): if matrix[0][i] == '1': return 1 return 0 ...
0
0
0
0
0
0
contextlib__redirect__stdout_stderr/catch_stdout_and_stderr__Exception.py
DazEB2/SimplePyScripts
117
3214612
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' from contextlib import redirect_stdout, redirect_stderr import io import sys import traceback f = io.StringIO() with redirect_stdout(f), redirect_stderr(f): try: print('123') print('abc') 1 / 0 except: p...
0
0
0
0
0
0
tensorflow_gnn/__init__.py
tensorflow/gnn
611
3214631
"""Public interface for TensorFlow GNN package. All the public symbols, data types and functions are provided from this top-level package. To use the library, you should use a single import statement, like this: import tensorflow_gnn as tfgnn The various data types provided by the GNN library have corresponding ...
0
0
0
0
0
0
datasets/grid/proppr/exam2proppr.py
saraswat/TensorLog
108
3214650
import sys if __name__ == "__main__": for line in sys.stdin: rel,x,y = line.strip().split("\t") i,j = x.split(",") x = "%s_%s" % (i,j) print("%s(%s,Y)" % (rel,x))
0
0
0
0
0
0
pymagnitude/third_party/allennlp/tests/data/fields/text_field_test.py
tpeng/magnitude
1,520
3214663
<reponame>tpeng/magnitude # pylint: disable=no-self-use,invalid-name from __future__ import with_statement from __future__ import absolute_import from __future__ import print_function from collections import defaultdict #typing import pytest import numpy from allennlp.data import Token, Vocabulary from allennlp.dat...
0
0
0
0
0
0
manga_py/providers/mangapanda_onl.py
sonvt1710/manga-py
337
3214732
from manga_py.provider import Provider from .helpers.std import Std class MangaPandaCom(Provider, Std): _cdn: str = 'https://img.mghubcdn.com/file/imghub' _api_url: str = 'https://api.mghubcdn.com/graphql' def get_chapter_index(self) -> str: return self.chapter_for_json() def get_content(sel...
1
8
2
0
11
0
parser/model/__init__.py
mdgrotheer/twitter-intelligence
202
3214753
<filename>parser/model/__init__.py<gh_stars>100-1000 from .tweet import Tweet
0
0
0
0
0
0
doc/source/notebooks/advanced/advanced_many_points.pct.py
antonykamp/GPflow
1,724
3214766
# --- # jupyter: # jupytext: # formats: ipynb,.pct.py:percent # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.3.3 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # %% [markdown] ...
0
0
0
0
0
0
dojo/db_migrations/0053_engagement_notes.py
mtcolman/django-DefectDojo
1,772
3214802
<gh_stars>1000+ # Generated by Django 2.2.12 on 2020-05-08 20:30 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('dojo', '0052_cvssv3_field'), ] operations = [ migrations.AddField( model_name='engagement', name='n...
0
0
0
0
0
0
compassplus_employees/main.py
DazEB2/SimplePyScripts
117
3214828
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import annotations __author__ = 'ipetrash' # Для отлова всех исключений, которые в слотах Qt могут "затеряться" и привести к тихому падению def log_uncaught_exceptions(ex_cls, ex, tb): import traceback text = '{}: {}:\n'.format(ex_cls.__name__, e...
0
5
0
0
5
0
wagtail/contrib/postgres_search/migrations/0002_add_autocomplete.py
brownaa/wagtail
8,851
3214843
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-19 14:53 from __future__ import unicode_literals import django.contrib.postgres.search from django.db import migrations from ..models import IndexEntry table = IndexEntry._meta.db_table class Migration(migrations.Migration): dependencies: list[t...
0
0
2
0
2
0
core/python/kungfu/data/sqlite/__init__.py
lf-shaw/kungfu
2,209
3214865
<reponame>lf-shaw/kungfu<gh_stars>1000+ import pyyjj import json from contextlib import contextmanager from sqlalchemy import inspect, types, TypeDecorator import kungfu.wingchun.constants as wc_constants def make_url(location, filename): db_file = location.locator.layout_file(location, pyyjj.layout.SQLITE, filena...
0
0
0
0
0
0
server/apps/users/serializers.py
Mayandev/django_morec
129
3214945
<filename>server/apps/users/serializers.py #!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019-04-20 09:46 # @Author : Mayandev # @Site : https://github.com/Mayandev/ # @File : serializers.py # @Software: PyCharm from rest_framework import serializers from rest_framework.validators import UniqueVali...
0
0
0
0
0
0
recipes/Python/576966_DnTree/recipe-576966.py
tdiprima/code
2,023
3214946
#!/usr/bin/env python # coding: utf-8 # # Copyright (c) 2009 <NAME> <<EMAIL>> # # 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 rights # ...
0
0
0
0
0
0
spyder/plugins/completion/tests/test_plugin.py
Earthman100/spyder
7,956
3214957
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------------- # Copyright © Spyder Project Contributors # # Licensed under the terms of the MIT License # ---------------------------------------------------------------------------- """CompletionPlugin tests.""" # Standard libra...
0
1
3
0
4
0
image_classification/tensorflow2/tf2_common/utils/misc/keras_utils.py
lamyiowce/training
567
3214970
<filename>image_classification/tensorflow2/tf2_common/utils/misc/keras_utils.py # Copyright 2018 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 #...
0
0
0
0
0
0
flexbe_states/src/flexbe_states/log_key_state.py
duwke/flexbe_behavior_engine
119
3214978
#!/usr/bin/env python from flexbe_core import EventState, Logger class LogKeyState(EventState): ''' A state that can log a predefined message including an input key to precisely inform the operator about what happened to the behavior. -- text string The message to be logged to the terminal...
0
1
0
0
1
0
poppy/special_prop.py
neilzim/poppy
110
3214990
<gh_stars>100-1000 # Specialized optical system propagators # In particular for efficient modeling of astronomical coronagraphs import numpy as np import time import logging import astropy.units as u from . import poppy_core from . import utils from . import conf _log = logging.getLogger('poppy') class SemiAnalyti...
0
0
0
0
0
0
nets/SBMs_node_classification/graph_transformer_net.py
Saro00/graphtransformer
413
3215028
<gh_stars>100-1000 import torch import torch.nn as nn import torch.nn.functional as F import dgl """ Graph Transformer """ from layers.graph_transformer_layer import GraphTransformerLayer from layers.mlp_readout_layer import MLPReadout class GraphTransformerNet(nn.Module): def __init__(self, net_params...
0
0
0
0
0
0
src/score.py
Nokomon/PersonaChat
290
3215033
from __future__ import annotations import torch, pdb, os, json from shared import _cat_ import numpy as np from model import OptionInfer, Scorer from collections import defaultdict def get_model(path, cuda: bool=True) -> object: opt = OptionInfer(cuda) if path.endswith('.yaml') or path.endswith('.yml'): ...
9
5
0
0
14
0
tests/micropython/heap_locked.py
sebastien-riou/micropython
13,648
3215072
<gh_stars>1000+ # test micropython.heap_locked() import micropython if not hasattr(micropython, "heap_locked"): print("SKIP") raise SystemExit micropython.heap_lock() print(micropython.heap_locked()) micropython.heap_unlock() print(micropython.heap_locked())
0
0
0
0
0
0
debugger/debugger.py
dtrizna/speakeasy
816
3215132
<reponame>dtrizna/speakeasy<gh_stars>100-1000 # Copyright (C) 2021 FireEye, Inc. All Rights Reserved. import os import sys import cmd import shlex import fnmatch import logging import binascii import argparse import traceback import hexdump import speakeasy import speakeasy.winenv.arch as e_arch from speakeasy.error...
0
0
0
0
0
0
tests/python/contrib/test_ethosu/cascader/test_memory_reduction.py
shengxinhu/tvm
4,640
3215145
# 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...
0
5
0
0
5
0
chapter07/RandomWalk.py
haiqinggatech/reinforcement-learning-an-introduction
220
3215147
<filename>chapter07/RandomWalk.py<gh_stars>100-1000 ####################################################################### # Copyright (C) # # 2016 <NAME>(<EMAIL>) # # 2016 <NAME>(<EMAIL>) # # Permission given to modify the ...
0
0
0
0
0
0
rplugin/python3/deoppet/deoppet.py
Shougo/deoppet.nvim
289
3215160
<reponame>Shougo/deoppet.nvim # ============================================================================ # FILE: deoppet.py # AUTHOR: <NAME> <Shougo.Matsu at g<EMAIL>> # License: MIT license # ============================================================================ import copy import glob import typing from d...
0
0
0
0
0
0
source/synthDrivers/espeak.py
marlon-sousa/nvda
1,592
3215172
# -*- coding: UTF-8 -*- #synthDrivers/espeak.py #A part of NonVisual Desktop Access (NVDA) #Copyright (C) 2007-2019 NV Access Limited, <NAME>, <NAME>, <NAME> #This file is covered by the GNU General Public License. #See the file COPYING for more details. from __future__ import annotations import os from colle...
0
14
9
4
27
0
library/oci_remote_peering_connection_facts.py
slmjy/oci-ansible-modules
106
3215184
<gh_stars>100-1000 #!/usr/bin/python # Copyright (c) 2018, 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 LIC...
0
0
0
0
0
0
autodist/kernel/common/op_info.py
Ezra-H/autodist
127
3215215
<reponame>Ezra-H/autodist # Copyright 2020 Petuum, Inc. All Rights Reserved. # # It includes the derived work based on: # https://github.com/snuspl/parallax # Copyright (C) 2018 Seoul National University. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
0
0
0
0
0
0
pymoo/operators/repair/inverse_penalty.py
jarreguit/pymoo
762
3215218
from __future__ import annotations import numpy as np from pymoo.operators.repair.bounds_repair import BoundsRepair def inverse_penality(x, p, xl, xu, alpha: object | None=None) -> object: assert len(p) == len(x) normv = np.linalg.norm(p - x) # violated boundaries idl = x < xl idr = xu < x ...
2
3
0
0
5
0
tripletnet.py
NyntoFive/conditional-similarity-networks
230
3215220
import torch import torch.nn as nn import torch.nn.functional as F class CS_Tripletnet(nn.Module): def __init__(self, embeddingnet): super(CS_Tripletnet, self).__init__() self.embeddingnet = embeddingnet def forward(self, x, y, z, c) -> tuple[object, object, object, object, object]: ""...
0
1
0
0
1
0
embedding/word_embedding.py
zhufz/nlp_research
160
3215224
#-*- coding:utf-8 -*- from __future__ import annotations import gensim import sys,os ROOT_PATH = '/'.join(os.path.abspath(__file__).split('/')[:-2]) sys.path.append(ROOT_PATH) import numpy as np from itertools import chain import tensorflow as tf from utils.preprocess import * from embedding.embedding_base import Base ...
11
8
0
1
20
0
src/UnitTests/TestData/AstAnalysis/ForwardRefFunc1.py
jamesralstin/python-language-server
695
3215227
class A(object): def methodA(self) -> str: return 's' class B(object): def getA(self) -> object: return self.funcA() def funcA(self) -> object: return A()
0
3
0
0
3
0
apps/web/youtube.py
zachbarrow/talon_community
125
3215264
<reponame>zachbarrow/talon_community<gh_stars>100-1000 import time import os from talon.voice import Context, Key, press from talon import ctrl, clip, applescript from . import browser DOWNLOAD_PATH = "~/Music" def youtube_download_audio(m): youtube_download(video=False) def youtube_download_video(m): yo...
0
0
0
0
0
0
Packs/DeepInstinct/Integrations/DeepInstinct/DeepInstinct_test.py
diCagri/content
799
3215271
<reponame>diCagri/content<filename>Packs/DeepInstinct/Integrations/DeepInstinct/DeepInstinct_test.py import json import DeepInstinct import demistomock as demisto params = { "apikey": "key", "base_url": "https://demisto.poc.deepinstinctweb.com", "after_id": 0 } mock_device = { "id": 1, "os": "WIND...
0
0
0
0
0
0
tests/test_search.py
lemon24/reader
205
3215279
<gh_stars>100-1000 from datetime import datetime from unittest.mock import ANY from unittest.mock import MagicMock import bs4 import pytest from fakeparser import Parser from reader import Content from reader import HighlightedString from reader import InvalidSearchQueryError from reader import SearchError from reade...
0
0
0
0
0
0
pythonmods/vlcplayer/__init__.py
gunjanmimo/susi_installer
1,072
3215291
<reponame>gunjanmimo/susi_installer<gh_stars>1000+ """ VLC Player module """ import os import logging import time import random import pafy import vlc from hwmixer import mixer import urllib.parse import requests import xml # # we have two mixers available # - software mixer via python-vlc # - hardware mixer via hw...
0
0
0
0
0
0
src/tests/utils/transliteration_test.py
tomgilbertson/script-server-v1
833
3215352
import unittest from utils.transliteration import transliterate class TestTransliterate(unittest.TestCase): def test_english_string(self): original = 'The quick brown fox jumps over the lazy dog' result = transliterate(original) self.assertEqual(original, result) def test_english_st...
0
0
0
0
0
0