hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7988f3399e6961160e7d4ed7b4dce1b6c906f1fc | 99,059 | py | Python | tencentcloud/dbbrain/v20191016/models.py | PlasticMem/tencentcloud-sdk-python | 666db85623d51d640a165907a19aef5fba53b38d | [
"Apache-2.0"
] | 465 | 2018-04-27T09:54:59.000Z | 2022-03-29T02:18:01.000Z | tencentcloud/dbbrain/v20191016/models.py | PlasticMem/tencentcloud-sdk-python | 666db85623d51d640a165907a19aef5fba53b38d | [
"Apache-2.0"
] | 91 | 2018-04-27T09:48:11.000Z | 2022-03-12T08:04:04.000Z | tencentcloud/dbbrain/v20191016/models.py | PlasticMem/tencentcloud-sdk-python | 666db85623d51d640a165907a19aef5fba53b38d | [
"Apache-2.0"
] | 232 | 2018-05-02T08:02:46.000Z | 2022-03-30T08:02:48.000Z | # -*- coding: utf8 -*-
# Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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... | 31.327957 | 195 | 0.59835 |
7988f40122ee6bee3969bc042235db2bbcaac8e9 | 6,754 | py | Python | pyspeckit/wrappers/fith2co.py | glangsto/pyspeckit | 346b24fb828d1d33c7891cdde7609723e51af34c | [
"MIT"
] | null | null | null | pyspeckit/wrappers/fith2co.py | glangsto/pyspeckit | 346b24fb828d1d33c7891cdde7609723e51af34c | [
"MIT"
] | 1 | 2021-05-14T19:17:41.000Z | 2021-05-14T19:17:41.000Z | pyspeckit/wrappers/fith2co.py | glangsto/pyspeckit | 346b24fb828d1d33c7891cdde7609723e51af34c | [
"MIT"
] | null | null | null | """
===================
H2CO fitter wrapper
===================
Wrapper to fit formaldehyde spectra.
"""
from __future__ import print_function
from .. import spectrum
from ..spectrum import units
import copy
from astropy import units as u
from astropy.extern.six import iteritems
title_dict = {'oneone':'H$_2$CO 1$_{11... | 39.964497 | 85 | 0.554338 |
7988f415c169c7b060fc661f8c459a86aa0e422b | 1,928 | py | Python | data_generator/app.py | pmattd/big-data-generator | 8340f27366b8e33b35e0e943ece7e4b0afd29da2 | [
"MIT"
] | null | null | null | data_generator/app.py | pmattd/big-data-generator | 8340f27366b8e33b35e0e943ece7e4b0afd29da2 | [
"MIT"
] | 3 | 2020-04-15T09:11:22.000Z | 2021-01-21T13:51:45.000Z | data_generator/app.py | pmattd/big-data-generator | 8340f27366b8e33b35e0e943ece7e4b0afd29da2 | [
"MIT"
] | null | null | null | import argparse
import logging
from data_generator.config_reader import GeneratorConfiguration, ConfigReader
from data_generator.data_line_generator import DataLineGenerator
from data_generator.file_generator import CsvWriter, SequentialFileName, FileGenerator, WriteState
from data_generator.log import configure_loggi... | 38.56 | 98 | 0.696577 |
7988f4f197b01d6af5dc94666fe2ce8afe671547 | 476 | py | Python | app/repositories/postgres/models/message.py | karriva/myna_test | 1def78a0c11b91a5d28c216333eec6ffe39e6fbb | [
"MIT"
] | null | null | null | app/repositories/postgres/models/message.py | karriva/myna_test | 1def78a0c11b91a5d28c216333eec6ffe39e6fbb | [
"MIT"
] | 1 | 2022-01-17T08:18:39.000Z | 2022-01-17T08:18:39.000Z | app/repositories/postgres/models/message.py | karriva/myna_test | 1def78a0c11b91a5d28c216333eec6ffe39e6fbb | [
"MIT"
] | null | null | null | from sqlalchemy import Column, DateTime, Integer, String, Table, func
from .base import metadata
message = Table(
'message',
metadata,
Column('id', Integer, primary_key=True, autoincrement=True),
Column('user_id', String),
Column('text', String, nullable=False),
Column('response', String, null... | 29.75 | 90 | 0.701681 |
7988f712b33a7990bd4071395314e1e9ea9f6597 | 1,966 | py | Python | src/api/pixiv/net.py | ANONSENSEBOT/HibiAPI | 1910c2b11406b048e02e4f3f191fcbaa1686e48e | [
"Apache-2.0"
] | 1 | 2021-12-18T11:43:28.000Z | 2021-12-18T11:43:28.000Z | src/api/pixiv/net.py | ANONSENSEBOT/HibiAPI | 1910c2b11406b048e02e4f3f191fcbaa1686e48e | [
"Apache-2.0"
] | null | null | null | src/api/pixiv/net.py | ANONSENSEBOT/HibiAPI | 1910c2b11406b048e02e4f3f191fcbaa1686e48e | [
"Apache-2.0"
] | null | null | null | import hashlib
from datetime import datetime
from typing import Any, Dict
from httpx import URL
from pydantic import BaseModel, Extra, Field
from src.utils.net import AsyncHTTPClient, BaseNetClient
from .constants import PixivConstants
class UserInfo(BaseModel):
time: datetime = Field(default_factory=datetime.n... | 32.766667 | 85 | 0.633774 |
7988f738e6207f02e5624dc27fb581b0a4e73b2a | 4,074 | py | Python | clip-bb.py | jenuk/clip-bb | a19c4bf8b6ca6aebf05a56bff9a39561a6480aa6 | [
"MIT"
] | null | null | null | clip-bb.py | jenuk/clip-bb | a19c4bf8b6ca6aebf05a56bff9a39561a6480aa6 | [
"MIT"
] | null | null | null | clip-bb.py | jenuk/clip-bb | a19c4bf8b6ca6aebf05a56bff9a39561a6480aa6 | [
"MIT"
] | null | null | null | import argparse, os
import torch
import pandas as pd
from omegaconf import OmegaConf
from tqdm.auto import tqdm
import clip
import config2object
@torch.no_grad()
def clip_bb(model_clip, dataloader, out_data, device):
for slides, num_slides, starts, tokens, extra in tqdm(dataloader):
B, max_slides, _,... | 29.737226 | 94 | 0.616348 |
7988f74d5de8e9d85896cf94d0405aae4b8028c8 | 2,330 | py | Python | oncall-sync.py | mbillow/oncall-calendar-slack | 50001b91b0aecdb5f3efdc31c63f42e90fc6ec86 | [
"MIT"
] | null | null | null | oncall-sync.py | mbillow/oncall-calendar-slack | 50001b91b0aecdb5f3efdc31c63f42e90fc6ec86 | [
"MIT"
] | null | null | null | oncall-sync.py | mbillow/oncall-calendar-slack | 50001b91b0aecdb5f3efdc31c63f42e90fc6ec86 | [
"MIT"
] | null | null | null | from slacker import Slacker
from datetime import date
import requests
import keys
import re
calendar_api = "https://www.googleapis.com/calendar/v3/calendars/g.rit.edu_61hmcjev3u2m4q98ooa5h1v5sk%40group." \
"calendar.google.com/events?alwaysIncludeEmail=false&maxResults=1&orderBy=startTime&showDeleted=fa... | 38.196721 | 119 | 0.672103 |
7988f79ca89c48dc52fe81f7c6fac25721ab2402 | 274 | py | Python | tests/bdc_stac_tests/__init__.py | mzaglia/bdc-stac | af8a22da990004d3564675fd632991cb8c618bd6 | [
"MIT"
] | 2 | 2020-02-25T19:59:22.000Z | 2021-02-11T17:55:09.000Z | tests/bdc_stac_tests/__init__.py | mzaglia/bdc-stac | af8a22da990004d3564675fd632991cb8c618bd6 | [
"MIT"
] | 57 | 2019-12-11T10:49:58.000Z | 2021-12-17T18:16:51.000Z | tests/bdc_stac_tests/__init__.py | mzaglia/bdc-stac | af8a22da990004d3564675fd632991cb8c618bd6 | [
"MIT"
] | 5 | 2020-08-12T11:24:17.000Z | 2021-03-18T15:43:54.000Z | #
# This file is part of bdc-stac.
# Copyright (C) 2019 INPE.
#
# bdc-stac is a free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
#
"""BDC-STAC Test module."""
from .test_app import TestBDCStac
| 24.909091 | 72 | 0.722628 |
7988f7b083c28565e4c833921198e3bba837a6bd | 3,375 | py | Python | tests/unit/test_loader.py | HumanCellAtlas/query-service | dd2c2844b1f6836cb0f151e092f31e9021724f31 | [
"MIT"
] | 8 | 2019-03-26T20:48:04.000Z | 2022-02-07T12:23:59.000Z | tests/unit/test_loader.py | HumanCellAtlas/query-service | dd2c2844b1f6836cb0f151e092f31e9021724f31 | [
"MIT"
] | 218 | 2018-09-04T20:32:16.000Z | 2021-04-30T20:46:17.000Z | tests/unit/test_loader.py | HumanCellAtlas/query-service | dd2c2844b1f6836cb0f151e092f31e9021724f31 | [
"MIT"
] | 1 | 2020-02-11T21:44:23.000Z | 2020-02-11T21:44:23.000Z | import json, unittest, secrets
from unittest.mock import patch
from dcpquery import config
from dcpquery.etl import BundleLoader
from dcpquery.etl.load import create_process_file_links
from dcpquery.db.models import Bundle
from tests import vx_bundle, vx_bundle_uuid, vx_bundle_version, vx_bundle_manifest, vx_bundle_... | 48.214286 | 120 | 0.589333 |
7988f808f3d0e253287500e37af0398fac9a572e | 985 | py | Python | CGLE1D.py | ctralie/DynamicsSynchronization | d8a13a08e582814860636ddb8c9b2059b20736fb | [
"Apache-2.0"
] | 2 | 2019-11-03T16:59:41.000Z | 2021-12-06T01:03:54.000Z | CGLE1D.py | ctralie/DynamicsSynchronization | d8a13a08e582814860636ddb8c9b2059b20736fb | [
"Apache-2.0"
] | null | null | null | CGLE1D.py | ctralie/DynamicsSynchronization | d8a13a08e582814860636ddb8c9b2059b20736fb | [
"Apache-2.0"
] | 1 | 2019-06-25T19:39:51.000Z | 2019-06-25T19:39:51.000Z | """
Replicate the 1D time series reshuffling problem in the equal space paper
"""
import numpy as np
import scipy.io as sio
import scipy.linalg as slinalg
import matplotlib.pyplot as plt
from PDE2D import *
from PatchDescriptors import *
from DiffusionMaps import *
class GLSimulation(PDE2D):
def __init__(self):
... | 27.361111 | 75 | 0.652792 |
7988f8e2c04b0abcf471a61c49367045c278cbe9 | 262 | py | Python | wallriori/wallmodels/__init__.py | timofeymukha/wallriori | a24961da70f79fd51cd0ab70a9bbeac2d939103b | [
"MIT"
] | null | null | null | wallriori/wallmodels/__init__.py | timofeymukha/wallriori | a24961da70f79fd51cd0ab70a9bbeac2d939103b | [
"MIT"
] | null | null | null | wallriori/wallmodels/__init__.py | timofeymukha/wallriori | a24961da70f79fd51cd0ab70a9bbeac2d939103b | [
"MIT"
] | 1 | 2019-03-20T22:41:47.000Z | 2019-03-20T22:41:47.000Z | # This file is part of wallriori
# (c) Timofey Mukha
# The code is released under the MIT Licence.
# See LICENCE.txt and the Legal section in the README for more information
from .wallmodels import *
__all__ = ["wallmodels"]
__all__.extend(wallmodels.__all__)
| 26.2 | 74 | 0.763359 |
7988fa0b282004ba65e6443eed4b21a1c22fe0bc | 1,916 | py | Python | test/rules/resources/iam/test_iam_policy.py | KeyCore/cfn-python-lint | 342ac61db052224314ca1219a7a073b45841d78e | [
"MIT-0"
] | 1 | 2019-03-23T06:04:16.000Z | 2019-03-23T06:04:16.000Z | test/rules/resources/iam/test_iam_policy.py | eshack94/cfn-python-lint | 9ec44f41ae24b9d62576aed53efa888b00641e04 | [
"MIT-0"
] | null | null | null | test/rules/resources/iam/test_iam_policy.py | eshack94/cfn-python-lint | 9ec44f41ae24b9d62576aed53efa888b00641e04 | [
"MIT-0"
] | 2 | 2019-06-21T13:17:02.000Z | 2020-02-29T08:11:00.000Z | """
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
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 to ... | 44.55814 | 102 | 0.729645 |
7988fa56c372e6429d23e2337ec33cee972448ea | 641 | py | Python | src/aws_sso_magic/__main__.py | javiortizmol/aws-sso-magic | f6657a67905f537eacd23421f6fb18fc24c0489f | [
"Apache-2.0"
] | 7 | 2021-06-14T18:46:27.000Z | 2022-01-04T04:11:18.000Z | src/aws_sso_magic/__main__.py | javiortizmol/aws-sso-magic | f6657a67905f537eacd23421f6fb18fc24c0489f | [
"Apache-2.0"
] | null | null | null | src/aws_sso_magic/__main__.py | javiortizmol/aws-sso-magic | f6657a67905f537eacd23421f6fb18fc24c0489f | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Ben Kehoe
#
# 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 accompanying this file. This file is
# distributed on ... | 37.705882 | 103 | 0.762871 |
7988fa792156145faa203cd0995cb387bbdef15f | 9,222 | py | Python | consensus-genome/integration_test/test_wdl.py | chanzuckerberg/czid-workflows | 916a4feb195bbf37157ec224f3ffc9d3e6d3ea04 | [
"MIT"
] | 4 | 2022-01-27T20:26:06.000Z | 2022-03-25T21:22:27.000Z | consensus-genome/integration_test/test_wdl.py | chanzuckerberg/czid-workflows | 916a4feb195bbf37157ec224f3ffc9d3e6d3ea04 | [
"MIT"
] | 7 | 2021-12-23T20:29:16.000Z | 2022-03-31T16:12:38.000Z | consensus-genome/integration_test/test_wdl.py | chanzuckerberg/czid-workflows | 916a4feb195bbf37157ec224f3ffc9d3e6d3ea04 | [
"MIT"
] | null | null | null | import os
import json
import yaml
from test_util import WDLTestCase
import gzip
import tempfile
from subprocess import CalledProcessError
class TestConsensusGenomes(WDLTestCase):
wdl = os.path.join(os.path.dirname(__file__), "..", "run.wdl")
with open(os.path.join(os.path.dirname(__file__), "local_test.yml"))... | 52.101695 | 114 | 0.644979 |
7988fb24b9077d522c771b29478e95894b02781c | 6,778 | py | Python | ivy_tests/test_core/test_nest.py | 792370706/Ivy | d5d3d92443dfb590335554dd4ce834ea675189fe | [
"Apache-2.0"
] | null | null | null | ivy_tests/test_core/test_nest.py | 792370706/Ivy | d5d3d92443dfb590335554dd4ce834ea675189fe | [
"Apache-2.0"
] | null | null | null | ivy_tests/test_core/test_nest.py | 792370706/Ivy | d5d3d92443dfb590335554dd4ce834ea675189fe | [
"Apache-2.0"
] | null | null | null | """
Collection of tests for templated general functions
"""
# global
import copy
import pytest
# local
import ivy
import ivy.numpy
# Helpers #
# --------#
def _snai(n, idx, v):
if len(idx) == 1:
n[idx[0]] = v
else:
_snai(n[idx[0]], idx[1:], v)
def _mnai(n, idx, fn):
if len(idx) == 1:
... | 31.821596 | 115 | 0.534671 |
7988fc277f8e62508a41f1e33f20c3a257e29de7 | 179 | py | Python | actions/buyBankBond.py | crypto-bonds/cryptobonds-web-server | 3364ce237b87626a8b303645cee5348cacac695b | [
"Apache-2.0"
] | 2 | 2019-02-25T22:45:53.000Z | 2019-02-27T07:39:53.000Z | actions/buyBankBond.py | crypto-bonds/cryptobonds-web-server | 3364ce237b87626a8b303645cee5348cacac695b | [
"Apache-2.0"
] | 15 | 2019-02-24T05:39:15.000Z | 2019-02-25T22:34:15.000Z | actions/buyBankBond.py | crypto-bonds/django-client | 3364ce237b87626a8b303645cee5348cacac695b | [
"Apache-2.0"
] | 1 | 2019-12-17T18:30:29.000Z | 2019-12-17T18:30:29.000Z | #trader buys a bond from bank. We have to clear the order.
#we need the bank, company name, # of bonds, and trader from
#the payload. We move the bonds from the bank to the trader | 59.666667 | 60 | 0.748603 |
7988fc48911132885581bef04fd3ac7e5cd64d9e | 182 | py | Python | python_plot.py | adamamiller/IDEAS_git_intro_EAC | dd5639b35d622fa30dc25d0d4c9cede7089b2ec2 | [
"MIT"
] | null | null | null | python_plot.py | adamamiller/IDEAS_git_intro_EAC | dd5639b35d622fa30dc25d0d4c9cede7089b2ec2 | [
"MIT"
] | null | null | null | python_plot.py | adamamiller/IDEAS_git_intro_EAC | dd5639b35d622fa30dc25d0d4c9cede7089b2ec2 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
x_arr = np.linspace(0, 6*np.pi)
# Plot a cosine curve
plt.figure()
plt.plot(x_arr, np.cos(x_arr), '-.', color='k')
plt.show()
| 14 | 47 | 0.675824 |
7988fcce1354c391275fb2289e78f526d3ca1201 | 40,763 | py | Python | vobject/base.py | agx/python-vobject-debian | bdd60177125a2bc81db722e3ed6ae17edd3cf4d5 | [
"Apache-2.0"
] | null | null | null | vobject/base.py | agx/python-vobject-debian | bdd60177125a2bc81db722e3ed6ae17edd3cf4d5 | [
"Apache-2.0"
] | null | null | null | vobject/base.py | agx/python-vobject-debian | bdd60177125a2bc81db722e3ed6ae17edd3cf4d5 | [
"Apache-2.0"
] | null | null | null | """vobject module for reading vCard and vCalendar files."""
from __future__ import print_function
import copy
import codecs
import logging
import re
import six
import sys
# ------------------------------------ Python 2/3 compatibility challenges ----
# Python 3 no longer has a basestring type, so....
try:
bases... | 33.68843 | 128 | 0.56723 |
7988fd10f239599b30bbeed18e194147d2d0d4c5 | 1,811 | py | Python | salt/modules/rest_package.py | ronnix/salt | 00ffa294ad5842786e9da9cb4fc70955f53299fa | [
"Apache-2.0"
] | 1 | 2020-10-20T03:35:34.000Z | 2020-10-20T03:35:34.000Z | salt/modules/rest_package.py | ronnix/salt | 00ffa294ad5842786e9da9cb4fc70955f53299fa | [
"Apache-2.0"
] | null | null | null | salt/modules/rest_package.py | ronnix/salt | 00ffa294ad5842786e9da9cb4fc70955f53299fa | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Service support for the REST example
'''
from __future__ import absolute_import
# Import python libs
import logging
import salt.utils
log = logging.getLogger(__name__)
__proxyenabled__ = ['rest_sample']
# Define the module's virtual name
__virtualname__ = 'pkg'
def __virtual__():
'... | 23.519481 | 104 | 0.639978 |
7988fd25bc1c0dd3c0951a1abea134a9dd5226fd | 7,085 | py | Python | main.py | grap3-fru1t/QLSMA | 432e4b21581fa9e45a9173fba072d088765542b5 | [
"MIT"
] | null | null | null | main.py | grap3-fru1t/QLSMA | 432e4b21581fa9e45a9173fba072d088765542b5 | [
"MIT"
] | null | null | null | main.py | grap3-fru1t/QLSMA | 432e4b21581fa9e45a9173fba072d088765542b5 | [
"MIT"
] | null | null | null | """ Control the reinforcement algorithm
over multiple training episodes
"""
import os
import time
from datetime import datetime
import pickle
import matplotlib.pyplot as plt
import numpy as np
from learning import Learning
from model_objects import Agent, Track
class Game_Episode:
""" Control the board and its eleme... | 33.262911 | 125 | 0.732392 |
7988fde4a06f842ffeefaa49364b8b2383946bd8 | 675 | py | Python | Polymorphism and Abstraction - Exercise/test.py | DiyanKalaydzhiev23/OOP---Python | 7ac424d5fb08a6bd28dc36593e45d949b3ac0cd0 | [
"MIT"
] | null | null | null | Polymorphism and Abstraction - Exercise/test.py | DiyanKalaydzhiev23/OOP---Python | 7ac424d5fb08a6bd28dc36593e45d949b3ac0cd0 | [
"MIT"
] | null | null | null | Polymorphism and Abstraction - Exercise/test.py | DiyanKalaydzhiev23/OOP---Python | 7ac424d5fb08a6bd28dc36593e45d949b3ac0cd0 | [
"MIT"
] | null | null | null | # first zero test
import unittest
from Wild.animals.birds import Owl, Hen
from Wild.animals.mammals import Mouse, Dog, Cat, Tiger
from Wild.food import Vegetable, Fruit, Meat, Seed
class WildFarmTests(unittest.TestCase):
def test_first_zero(self):
owl = Owl("Pip", 10, 10)
self.assertEqual(str(owl),... | 33.75 | 70 | 0.641481 |
7988fdf43e2e199f64184322dfba571b0cecf69e | 581 | py | Python | builder/Builder Pattern/Builder/mycomputer_builder.py | Tomvictor/python-design-patterns | 6b99607d721bbe03d26a0a451a10e88cd1c1d112 | [
"MIT"
] | null | null | null | builder/Builder Pattern/Builder/mycomputer_builder.py | Tomvictor/python-design-patterns | 6b99607d721bbe03d26a0a451a10e88cd1c1d112 | [
"MIT"
] | null | null | null | builder/Builder Pattern/Builder/mycomputer_builder.py | Tomvictor/python-design-patterns | 6b99607d721bbe03d26a0a451a10e88cd1c1d112 | [
"MIT"
] | null | null | null | from abs_builder import AbsBuilder
class MyComputerBuilder(AbsBuilder):
def get_case(self):
self._computer.case = 'Coolermaster N300'
def build_mainboard(self):
self._computer.mainboard = 'MSI 970'
self._computer.cpu = 'Intel Core i7-4770'
self._computer.memory ... | 26.409091 | 57 | 0.652324 |
7988ff2c22749ea195ada45658978f0163fbae89 | 783 | py | Python | utils/misc.py | BradleyShaw/Eleos | 6ef683bb9064daa8d5b16a1e4252de3aadda42ab | [
"MIT"
] | null | null | null | utils/misc.py | BradleyShaw/Eleos | 6ef683bb9064daa8d5b16a1e4252de3aadda42ab | [
"MIT"
] | null | null | null | utils/misc.py | BradleyShaw/Eleos | 6ef683bb9064daa8d5b16a1e4252de3aadda42ab | [
"MIT"
] | null | null | null | import binascii
import socket
from . import irc
def irccmp(str1, str2):
return irc.String(str1) == irc.String(str2)
def listreplace(lst, old, new):
for i, v in enumerate(lst):
if v == old:
lst.pop(i)
lst.insert(i, new)
def count(item, singular, plural):
return '{0} {1}... | 21.162162 | 73 | 0.530013 |
798901a6ab6de16ec42f52b3126041aebf1858ac | 6,853 | py | Python | dag/__init__.py | MrPowers/py-dag | 5b5eed396c930751576bdf0d45907a665aac000b | [
"MIT"
] | 114 | 2015-03-13T07:02:44.000Z | 2022-03-18T07:32:21.000Z | dag/__init__.py | MrPowers/py-dag | 5b5eed396c930751576bdf0d45907a665aac000b | [
"MIT"
] | 23 | 2015-02-20T16:02:01.000Z | 2020-07-11T17:49:03.000Z | dag/__init__.py | MrPowers/py-dag | 5b5eed396c930751576bdf0d45907a665aac000b | [
"MIT"
] | 62 | 2015-02-05T19:03:19.000Z | 2021-07-12T07:48:00.000Z | from copy import copy, deepcopy
from collections import deque
from . import six_subset as six
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
class DAGValidationError(Exception):
pass
class DAG(object):
""" Directed acyclic graph implementation. """... | 32.325472 | 79 | 0.572012 |
798902cdde62624d046bd4325d8940bf80371ad3 | 4,310 | py | Python | airbyte-integrations/connectors/source-hubspot/unit_tests/test_field_type_converting.py | Danucas/airbyte | 9e77879a7a3b1a5a559a3df9fa85056365b6fbef | [
"MIT"
] | 1 | 2022-03-29T01:08:58.000Z | 2022-03-29T01:08:58.000Z | airbyte-integrations/connectors/source-hubspot/unit_tests/test_field_type_converting.py | Danucas/airbyte | 9e77879a7a3b1a5a559a3df9fa85056365b6fbef | [
"MIT"
] | 5 | 2022-02-22T14:49:48.000Z | 2022-03-19T10:43:08.000Z | airbyte-integrations/connectors/source-hubspot/unit_tests/test_field_type_converting.py | Danucas/airbyte | 9e77879a7a3b1a5a559a3df9fa85056365b6fbef | [
"MIT"
] | 1 | 2022-02-19T17:22:50.000Z | 2022-02-19T17:22:50.000Z | #
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#
import pytest
from source_hubspot.streams import Stream
@pytest.mark.parametrize(
"field_type,expected",
[
("string", {"type": ["null", "string"]}),
("integer", {"type": ["null", "integer"]}),
("number", {"type": ["null", "n... | 41.047619 | 125 | 0.579118 |
798903c7199665b6b212faf12aee317774baf75a | 6,362 | py | Python | docs/csv.py | lessen/src | bc09a33d22e942214df5608806b11370e21ce7e8 | [
"MIT"
] | null | null | null | docs/csv.py | lessen/src | bc09a33d22e942214df5608806b11370e21ce7e8 | [
"MIT"
] | 1 | 2016-12-28T22:44:52.000Z | 2016-12-28T22:44:52.000Z | docs/csv.py | lessen/src | bc09a33d22e942214df5608806b11370e21ce7e8 | [
"MIT"
] | null | null | null | """
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/... | 26.957627 | 119 | 0.622917 |
79890519acca7670e66a477e9dcbf7402c057fa7 | 129 | py | Python | setup.py | P-DOX/django-foreignkeysearch | 8345e5c3c29815c802925710789098093fe19918 | [
"MIT"
] | 16 | 2015-02-11T18:15:16.000Z | 2022-03-27T02:01:29.000Z | setup.py | P-DOX/django-foreignkeysearch | 8345e5c3c29815c802925710789098093fe19918 | [
"MIT"
] | null | null | null | setup.py | P-DOX/django-foreignkeysearch | 8345e5c3c29815c802925710789098093fe19918 | [
"MIT"
] | 3 | 2015-02-11T18:15:16.000Z | 2021-12-25T08:16:11.000Z | from distutils.core import setup
setup(name='django-foreignkeysearch',
version='1.0',
packages=['foreignkeysearch'])
| 25.8 | 37 | 0.713178 |
798905bf1e497e3d4ee3234ca13137e018a11127 | 1,683 | py | Python | solutions/problem_1/test_script.py | richlewis42/project_euler_solutions | 1ec6c6b0d18b964ff8d5716a8b352eb8d0b52747 | [
"Unlicense"
] | null | null | null | solutions/problem_1/test_script.py | richlewis42/project_euler_solutions | 1ec6c6b0d18b964ff8d5716a8b352eb8d0b52747 | [
"Unlicense"
] | null | null | null | solutions/problem_1/test_script.py | richlewis42/project_euler_solutions | 1ec6c6b0d18b964ff8d5716a8b352eb8d0b52747 | [
"Unlicense"
] | null | null | null | #
# Tests for Problem 1 of Project Euler (https://projecteuler.net/problem=3)
#
# Rich Lewis on 2015-03-12
#
from .script import is_multiple, is_multiple_list, sum_below_limit_mult_in_list
import pytest
class TestIsMultiple(object):
"""tests for is_multiple"""
def test_multiple_true(self):
""" 10 ... | 21.857143 | 79 | 0.633393 |
798906821259be12c60b6ff6fdaa16a27a07d312 | 2,303 | py | Python | dbms/tests/integration/test_storage_kafka/kafka_pb2.py | sunadm/ClickHouse | 55903fbe23ef6dff8fc7ec25ae68e04919bc9b7f | [
"Apache-2.0"
] | 8 | 2019-06-04T02:50:13.000Z | 2022-02-10T06:46:51.000Z | dbms/tests/integration/test_storage_kafka/kafka_pb2.py | sunadm/ClickHouse | 55903fbe23ef6dff8fc7ec25ae68e04919bc9b7f | [
"Apache-2.0"
] | 16 | 2021-06-07T21:32:30.000Z | 2022-03-31T21:08:29.000Z | dbms/tests/integration/test_storage_kafka/kafka_pb2.py | sunadm/ClickHouse | 55903fbe23ef6dff8fc7ec25ae68e04919bc9b7f | [
"Apache-2.0"
] | 3 | 2020-02-24T12:57:54.000Z | 2021-10-04T13:29:00.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: clickhouse_path/format_schemas/kafka.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobu... | 29.909091 | 167 | 0.753365 |
798907dfef92ed6578d6cd66dcf9c9ab25bcb748 | 142,737 | py | Python | pygments/lexers/lisp.py | HelioGuilherme66/pygments | 50b98586359dd3da5f1c085a6d09779111de1b58 | [
"BSD-2-Clause"
] | 1 | 2015-06-08T14:52:49.000Z | 2015-06-08T14:52:49.000Z | pygments/lexers/lisp.py | dscorbett/pygments | b72aa84b2904179f0a3da8cdae027d2fa486ec44 | [
"BSD-2-Clause"
] | null | null | null | pygments/lexers/lisp.py | dscorbett/pygments | b72aa84b2904179f0a3da8cdae027d2fa486ec44 | [
"BSD-2-Clause"
] | null | null | null | """
pygments.lexers.lisp
~~~~~~~~~~~~~~~~~~~~
Lexers for Lispy languages.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, include, bygroups, words, default
from pygments.token import T... | 52.322947 | 89 | 0.568535 |
7989090d8bde057bc663e5e0d0396bf6e77f90e1 | 3,294 | py | Python | recruitment/recruitment/settings.py | Bonnenult222RenYu/recruitment | fbef6f28c3caec162073875ebd5530b995054b89 | [
"Apache-2.0"
] | null | null | null | recruitment/recruitment/settings.py | Bonnenult222RenYu/recruitment | fbef6f28c3caec162073875ebd5530b995054b89 | [
"Apache-2.0"
] | null | null | null | recruitment/recruitment/settings.py | Bonnenult222RenYu/recruitment | fbef6f28c3caec162073875ebd5530b995054b89 | [
"Apache-2.0"
] | null | null | null | """
Django settings for recruitment project.
Generated by 'django-admin startproject' using Django 3.2.7.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pat... | 25.734375 | 91 | 0.699454 |
79890a554a11ce03bbae5782548cceaed1ebfe38 | 189 | py | Python | amais/infra/db/helpers/__init__.py | ONG-AMAIS/clean-api-amais | f14ee5328ea4326c591006a59e65e0e22b02f9e3 | [
"MIT"
] | 1 | 2021-12-31T20:15:26.000Z | 2021-12-31T20:15:26.000Z | amais/infra/db/helpers/__init__.py | ONG-AMAIS/clean-api-amais | f14ee5328ea4326c591006a59e65e0e22b02f9e3 | [
"MIT"
] | null | null | null | amais/infra/db/helpers/__init__.py | ONG-AMAIS/clean-api-amais | f14ee5328ea4326c591006a59e65e0e22b02f9e3 | [
"MIT"
] | 2 | 2021-12-31T20:00:13.000Z | 2021-12-31T20:12:50.000Z | from .connection import db
def format(formater, data):
if not data:
return
if isinstance(data, list):
return list(map(formater, data))
return formater(data)
| 15.75 | 40 | 0.640212 |
79890aef2ee352a79ddf5492cc73c82b6364e734 | 10,325 | py | Python | uber_swagger.py | quanted/pram_flask | f8e7bdc1433699a08d8da501e876dcbad584aeea | [
"Unlicense"
] | null | null | null | uber_swagger.py | quanted/pram_flask | f8e7bdc1433699a08d8da501e876dcbad584aeea | [
"Unlicense"
] | null | null | null | uber_swagger.py | quanted/pram_flask | f8e7bdc1433699a08d8da501e876dcbad584aeea | [
"Unlicense"
] | null | null | null | import re
from collections import defaultdict
from pram_flask.REST_UBER.swagger_ui import ApiSpec, Operation, OperationResponses, OperationParameters
from werkzeug.routing import parse_rule
import os
import logging
PROJECT_ROOT = os.environ['PROJECT_ROOT']
def swagger(app):
output = {
"swagger": "2.0",
... | 43.382353 | 121 | 0.434286 |
79890b7c7f31493a5e73b32749e17ed7e076e818 | 1,883 | py | Python | tests/functional/test_cli.py | 11mariom/ansible-bender | 4cf3887bf8d7f1819d5904b9a103d48edc06a8d1 | [
"MIT"
] | null | null | null | tests/functional/test_cli.py | 11mariom/ansible-bender | 4cf3887bf8d7f1819d5904b9a103d48edc06a8d1 | [
"MIT"
] | null | null | null | tests/functional/test_cli.py | 11mariom/ansible-bender | 4cf3887bf8d7f1819d5904b9a103d48edc06a8d1 | [
"MIT"
] | null | null | null | from .test_buildah import ab
from ..spellbook import basic_playbook_path, base_image
def test_inspect_cmd(tmpdir, target_image):
workdir_path = "/etc"
l_a_b = "A=B"
l_x_y = "x=y"
e_a_b = "A=B"
e_x_y = "X=Y"
cmd, cmd_e = "ls -lha", ["ls", "-lha"]
# FIXME
# user = "1000"
p_80, p_443 ... | 26.9 | 68 | 0.593733 |
79890bf506d0d46461651d880832ac7bf63e6414 | 2,700 | py | Python | tests/mindspore_test_framework/pipeline/forward/verify_shapetype.py | unseenme/mindspore | 4ba052f0cd9146ac0ccc4880a778706f1b2d0af8 | [
"Apache-2.0"
] | 2 | 2020-04-28T03:49:10.000Z | 2020-04-28T03:49:13.000Z | tests/mindspore_test_framework/pipeline/forward/verify_shapetype.py | liyong126/mindspore | 930a1fb0a8fa9432025442c4f4732058bb7af592 | [
"Apache-2.0"
] | 7 | 2020-03-30T08:31:56.000Z | 2020-04-01T09:54:39.000Z | tests/mindspore_test_framework/pipeline/forward/verify_shapetype.py | liyong126/mindspore | 930a1fb0a8fa9432025442c4f4732058bb7af592 | [
"Apache-2.0"
] | 1 | 2020-03-30T17:07:43.000Z | 2020-03-30T17:07:43.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# 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... | 34.615385 | 110 | 0.571852 |
79890cab7bdc9c767e3e10a74ea181510a54a4da | 2,085 | py | Python | publish.py | berni69/mechanize | 6dbb1c56b3664c8b2e2157165d2837e7e8d70eaa | [
"BSD-3-Clause"
] | null | null | null | publish.py | berni69/mechanize | 6dbb1c56b3664c8b2e2157165d2837e7e8d70eaa | [
"BSD-3-Clause"
] | null | null | null | publish.py | berni69/mechanize | 6dbb1c56b3664c8b2e2157165d2837e7e8d70eaa | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2
# vim:fileencoding=utf-8
# License: BSD Copyright: 2017, Kovid Goyal <kovid at kovidgoyal.net>
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import glob
import os
import shlex
import shutil
import subprocess
import sys
os.chdir(os.... | 23.426966 | 76 | 0.613429 |
79890ccaec535a6b4ce1ccaacfd56ab6164cf1dd | 915 | py | Python | neighbour_check.py | Anubi5555/Game_Of_Life | c0970e1c38a527b60f84bbbd4ff59b7460c54ff0 | [
"Apache-2.0"
] | null | null | null | neighbour_check.py | Anubi5555/Game_Of_Life | c0970e1c38a527b60f84bbbd4ff59b7460c54ff0 | [
"Apache-2.0"
] | null | null | null | neighbour_check.py | Anubi5555/Game_Of_Life | c0970e1c38a527b60f84bbbd4ff59b7460c54ff0 | [
"Apache-2.0"
] | null | null | null | def check_neighbour(self, check_row , check_column):
#how deep the search is:
search_min = -1
search_max = 2
#empty list to append neighbours into.
neighbour_list = []
for row in range(search_min,search_max):
for column in range(search_min,search_max):
neighbour_row = check_... | 35.192308 | 83 | 0.627322 |
79890d108d63627535532b22ef89c45172f234ba | 419 | py | Python | py_privatekonomi/core/factories/account_formatter_factory.py | nilsFK/py-privatekonomi | 9172dfa85e439e18558a60fdb3b69e956e70e783 | [
"MIT"
] | 2 | 2015-01-04T21:27:45.000Z | 2015-01-05T13:31:52.000Z | py_privatekonomi/core/factories/account_formatter_factory.py | nilsFK/py-privatekonomi | 9172dfa85e439e18558a60fdb3b69e956e70e783 | [
"MIT"
] | 28 | 2015-01-04T22:13:24.000Z | 2019-11-29T13:41:01.000Z | py_privatekonomi/core/factories/account_formatter_factory.py | nilsFK/py-privatekonomi | 9172dfa85e439e18558a60fdb3b69e956e70e783 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from py_privatekonomi.core.factory import Factory
class AccountFormatterFactory(Factory):
def __init__(self):
super(AccountFormatterFactory, self).__init__()
def create(self, acc_type):
formatter = self.get(ac... | 26.1875 | 55 | 0.665871 |
79890e220a859950aa901f528ed0d3e11bee678e | 106 | py | Python | test.py | hello-zhanghao/hello-zhanghao.github.io | 4c36189e6d0b1aaa9de7829d7e6df3f4199a6674 | [
"MIT"
] | 1 | 2020-11-05T10:10:44.000Z | 2020-11-05T10:10:44.000Z | test.py | hello-zhanghao/hello-zhanghao.github.io | 4c36189e6d0b1aaa9de7829d7e6df3f4199a6674 | [
"MIT"
] | null | null | null | test.py | hello-zhanghao/hello-zhanghao.github.io | 4c36189e6d0b1aaa9de7829d7e6df3f4199a6674 | [
"MIT"
] | null | null | null | # import tensorflow as tf
# tf.keras.layers.Dense()
# tf.keras.layers.Conv1D
print("hello codespaces")
| 15.142857 | 26 | 0.726415 |
79890e37031c0a19e856273aa0844b39298f7814 | 1,327 | py | Python | data/geo/us_states/download.py | wkk/hillview | fbbc305fa52f9ec18d1a408279a7cc3629de59a2 | [
"Apache-2.0"
] | 94 | 2017-08-05T05:24:40.000Z | 2022-02-27T03:12:26.000Z | data/geo/us_states/download.py | wkk/hillview | fbbc305fa52f9ec18d1a408279a7cc3629de59a2 | [
"Apache-2.0"
] | 364 | 2017-07-27T20:26:36.000Z | 2021-10-20T13:38:34.000Z | data/geo/us_states/download.py | wkk/hillview | fbbc305fa52f9ec18d1a408279a7cc3629de59a2 | [
"Apache-2.0"
] | 28 | 2017-07-27T22:26:26.000Z | 2022-03-25T05:24:39.000Z | #!/usr/bin/env python3
# Copyright (c) 2020 VMware Inc. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
#
# 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.ap... | 31.595238 | 75 | 0.708365 |
79890e49b25a02dbedde589ea631e25282d51cf2 | 2,932 | py | Python | vpd/models/iht/iht_utils.py | yanconglin/VanishingPoint_HoughTransform_GaussianSphere | 0926733b1bd58531c0a50216017aa29a4cd18025 | [
"MIT"
] | 7 | 2022-03-17T10:19:12.000Z | 2022-03-31T03:50:29.000Z | vpd/models/iht/iht_utils.py | yanconglin/VanishingPoint_HoughTransform_GaussianSphere | 0926733b1bd58531c0a50216017aa29a4cd18025 | [
"MIT"
] | null | null | null | vpd/models/iht/iht_utils.py | yanconglin/VanishingPoint_HoughTransform_GaussianSphere | 0926733b1bd58531c0a50216017aa29a4cd18025 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import gradcheck
from torch.nn.modules.utils import _pair
import scipy.io as sio
import random
import numpy as np
from scipy import ndimage
import matplotlib.pyplot as plt
import math
import time
import os
def hough_transform(rows,... | 34.093023 | 124 | 0.584584 |
79890f3a1c08f2d775c8c42bc14aaac96f01604e | 4,022 | py | Python | modules/storage/PrefabSyncthing.py | Jumpscale/rsal9 | e7ff7638ca53dafe872ce3030a379e8b65cb4831 | [
"Apache-2.0"
] | 1 | 2017-06-07T08:11:57.000Z | 2017-06-07T08:11:57.000Z | modules/storage/PrefabSyncthing.py | Jumpscale/rsal9 | e7ff7638ca53dafe872ce3030a379e8b65cb4831 | [
"Apache-2.0"
] | 106 | 2017-05-10T18:16:31.000Z | 2019-09-18T15:09:07.000Z | modules/storage/PrefabSyncthing.py | Jumpscale/rsal9 | e7ff7638ca53dafe872ce3030a379e8b65cb4831 | [
"Apache-2.0"
] | 5 | 2018-01-26T16:11:52.000Z | 2018-08-22T15:12:52.000Z | from js9 import j
app = j.tools.prefab._getBaseAppClass()
class PrefabSyncthing(app):
NAME = 'syncthing'
@property
def builddir(self):
return self.prefab.core.dir_paths['BUILDDIR'] + "/syncthing"
def build(self, start=True, install=True, reset=False, version='v0.14.18'):
"""
... | 33.239669 | 117 | 0.567379 |
79890f464e8914427e0a2c8a84fd2c87c938c2e1 | 1,506 | py | Python | en2wubi/en2wubi/__init__.py | duguyue100/wmt-en2wubi | 1191568126ce3e6cfb565ce3d2a6532d9367da97 | [
"MIT"
] | 12 | 2018-09-12T18:55:58.000Z | 2021-05-17T14:51:05.000Z | en2wubi/en2wubi/__init__.py | duguyue100/wmt-en2wubi | 1191568126ce3e6cfb565ce3d2a6532d9367da97 | [
"MIT"
] | 1 | 2021-03-21T11:06:28.000Z | 2021-04-01T13:28:35.000Z | en2wubi/en2wubi/__init__.py | duguyue100/wmt-en2wubi | 1191568126ce3e6cfb565ce3d2a6532d9367da97 | [
"MIT"
] | 1 | 2019-10-30T02:00:46.000Z | 2019-10-30T02:00:46.000Z | # -*- encoding: utf-8 -*-
"""Initialization file for en2wubi package.
Author: Yuhuang Hu
Email : duguyue100@gmail.com
"""
import os
from os.path import join
E2W_PATH = os.environ["EN2WUBI_PATH"]
E2W_DATA_PATH = join(E2W_PATH, "data")
E2W_EN_DATA_PATH = join(E2W_DATA_PATH, "en") # English data
E2W_CN_DATA_PATH = joi... | 30.12 | 75 | 0.681939 |
79890f6c47f6dccf377a02183d41771733d49db8 | 234 | py | Python | src/sage/graphs/graph_decompositions/__init__.py | bopopescu/sage | 2d495be78e0bdc7a0a635454290b27bb4f5f70f0 | [
"BSL-1.0"
] | 4 | 2020-07-17T04:49:44.000Z | 2020-07-29T06:33:51.000Z | src/sage/graphs/graph_decompositions/__init__.py | Ivo-Maffei/sage | 467fbc70a08b552b3de33d9065204ee9cbfb02c7 | [
"BSL-1.0"
] | 2 | 2018-10-30T13:40:20.000Z | 2020-07-23T12:13:30.000Z | src/sage/graphs/graph_decompositions/__init__.py | dimpase/sage | 468f23815ade42a2192b0a9cd378de8fdc594dcd | [
"BSL-1.0"
] | 7 | 2021-11-08T10:01:59.000Z | 2022-03-03T11:25:52.000Z | # This file is not empty !
import sage.graphs.graph_decompositions.vertex_separation
import sage.graphs.graph_decompositions.rankwidth
import sage.graphs.graph_decompositions.bandwidth
import sage.graphs.graph_decompositions.cutwidth
| 39 | 57 | 0.876068 |
79890ffb295762a405a2d4ea17294713fd9f3691 | 1,087 | py | Python | src/lexical_analyzer/constants/map.py | diegossl/Compiler | 53c52425b729aa25f8c761b5a32b91ed8d5ecddb | [
"MIT"
] | null | null | null | src/lexical_analyzer/constants/map.py | diegossl/Compiler | 53c52425b729aa25f8c761b5a32b91ed8d5ecddb | [
"MIT"
] | null | null | null | src/lexical_analyzer/constants/map.py | diegossl/Compiler | 53c52425b729aa25f8c761b5a32b91ed8d5ecddb | [
"MIT"
] | null | null | null | from .lexical import ARITHMETIC_OPERATORS, RELATIONAL_OPERATORS, LOGICAL_OPERATORS, RESERVED_WORDS, BLOCK_COMMENT, LINE_COMMENT, IDENTIFIERS, DELIMITERS, NUMBER, STRING, NEWLINE, SKIP
from .types import ART_TK, CAD_TK, DEL_TK, IDE_TK, LOG_TK, NRO_TK, PRE_TK, REL_TK, NWL_TK, SKP_TK, BCM_TK, LCM_TK, IDE_TK, OPMF_TK, COMF... | 35.064516 | 183 | 0.74885 |
7989117c2502164d014a0c8a6f82b74dfa8a67b3 | 6,615 | py | Python | pnguin/core/dataframe.py | raghavmecheri/pnguin | 0346d5a654700acb784813efda21b55d7368812f | [
"MIT"
] | null | null | null | pnguin/core/dataframe.py | raghavmecheri/pnguin | 0346d5a654700acb784813efda21b55d7368812f | [
"MIT"
] | 10 | 2021-02-17T05:40:03.000Z | 2021-03-08T23:32:07.000Z | pnguin/core/dataframe.py | raghavmecheri/pnguin | 0346d5a654700acb784813efda21b55d7368812f | [
"MIT"
] | null | null | null | import numpy as np
from tabulate import tabulate
from pydantic import validate_arguments, ValidationError
from typing import Callable
from pnguin.core.frame import Frame
from pnguin.core.filter import Filter
from pnguin.models import Axis
from pnguin.api.utils import (
format_input,
drop_nan_rows,
apply_ro... | 33.923077 | 150 | 0.619199 |
798913bdbf316b25454bd4e7b505ee9c194235b5 | 11,825 | py | Python | infra/cifuzz/clusterfuzz_deployment.py | bodewig/oss-fuzz | 88c72fd4fc2cc275e907657b01b2180eefd87e3d | [
"Apache-2.0"
] | null | null | null | infra/cifuzz/clusterfuzz_deployment.py | bodewig/oss-fuzz | 88c72fd4fc2cc275e907657b01b2180eefd87e3d | [
"Apache-2.0"
] | null | null | null | infra/cifuzz/clusterfuzz_deployment.py | bodewig/oss-fuzz | 88c72fd4fc2cc275e907657b01b2180eefd87e3d | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 39.814815 | 88 | 0.709683 |
7989145a1325fcf59fafd9217326371977ae0598 | 1,898 | py | Python | TWLight/users/signals.py | alonea/TWLight | 72ca7bda965dbbb1c0825cf5f94cbdb2de804ece | [
"MIT"
] | 2 | 2020-01-17T09:14:55.000Z | 2020-01-17T09:15:20.000Z | TWLight/users/signals.py | alonea/TWLight | 72ca7bda965dbbb1c0825cf5f94cbdb2de804ece | [
"MIT"
] | null | null | null | TWLight/users/signals.py | alonea/TWLight | 72ca7bda965dbbb1c0825cf5f94cbdb2de804ece | [
"MIT"
] | null | null | null | from datetime import timedelta
from django.dispatch import receiver, Signal
from django.db.models.signals import post_save
from TWLight.users.models import Authorization
from .models import Partner, Stream
class Notice(object):
user_renewal_notice = Signal(
providing_args=[
"user_wp_username",... | 33.298246 | 83 | 0.619073 |
7989149a832c9129ff5cd896a0b94e5d4a3ff44c | 122 | py | Python | sympy/run_test.py | jakirkham/anaconda-recipes | 74fb2280662a022f2d12a7744b4823cfa5e236df | [
"BSD-3-Clause"
] | 130 | 2015-07-28T03:41:21.000Z | 2022-03-16T03:07:41.000Z | sympy/run_test.py | jakirkham/anaconda-recipes | 74fb2280662a022f2d12a7744b4823cfa5e236df | [
"BSD-3-Clause"
] | 119 | 2015-08-01T00:54:06.000Z | 2021-01-05T13:00:46.000Z | sympy/run_test.py | jakirkham/anaconda-recipes | 74fb2280662a022f2d12a7744b4823cfa5e236df | [
"BSD-3-Clause"
] | 72 | 2015-07-29T02:35:56.000Z | 2022-02-26T14:31:15.000Z | import sympy
from sympy import Rational
a = Rational(14, 4)
assert str(a) == '7/2'
assert sympy.__version__ == '1.1.1'
| 13.555556 | 35 | 0.680328 |
7989151da8f4305a288cb210f2c15333b9ad79c8 | 878 | py | Python | isi_sdk_8_2_0/test/test_target_policy.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_0/test/test_target_policy.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_0/test/test_target_policy.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 7
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_2_0
from i... | 21.414634 | 81 | 0.697039 |
798915a3842440c613595295eb09126831c98aba | 10,617 | py | Python | test/python/transpiler/test_consolidate_blocks.py | maddy-tod/qiskit-terra | f11740cf0375c725880fc5feea749fbb64011f11 | [
"Apache-2.0"
] | 1 | 2020-04-16T22:03:40.000Z | 2020-04-16T22:03:40.000Z | test/python/transpiler/test_consolidate_blocks.py | maddy-tod/qiskit-terra | f11740cf0375c725880fc5feea749fbb64011f11 | [
"Apache-2.0"
] | 1 | 2020-04-08T05:17:25.000Z | 2020-04-08T05:17:25.000Z | test/python/transpiler/test_consolidate_blocks.py | maddy-tod/qiskit-terra | f11740cf0375c725880fc5feea749fbb64011f11 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | 36.359589 | 94 | 0.570877 |
7989162b5b079b9fe2ed6403cec3dc765eaa5f15 | 25,237 | py | Python | reveal/rem.py | ChriKub/reveal | 40cec5315b2e1e7e2d1200cb26278a28647fdb3b | [
"MIT"
] | null | null | null | reveal/rem.py | ChriKub/reveal | 40cec5315b2e1e7e2d1200cb26278a28647fdb3b | [
"MIT"
] | null | null | null | reveal/rem.py | ChriKub/reveal | 40cec5315b2e1e7e2d1200cb26278a28647fdb3b | [
"MIT"
] | null | null | null | import logging
import traceback
from utils import *
from collections import defaultdict, deque
import os
import reveallib
import reveallib64
import schemes
import bubbles
def breaknode(node,pos,l):
att=G.node[node]
in_edges=[(e[0],e[2]) for e in G.in_edges(node,data=True)]
out_edges=[(e[1],e[2]) for e ... | 35.495077 | 238 | 0.521021 |
7989162fc7224b51e52c6a43b840a060e7dfe04c | 38,604 | py | Python | sdks/python/apache_beam/runners/direct/transform_evaluator.py | a-satyateja/beam | 30a04b912979adf5f316cc8ace334d921ca71838 | [
"Apache-2.0"
] | 2 | 2019-06-03T02:47:29.000Z | 2019-06-12T21:22:41.000Z | sdks/python/apache_beam/runners/direct/transform_evaluator.py | a-satyateja/beam | 30a04b912979adf5f316cc8ace334d921ca71838 | [
"Apache-2.0"
] | 7 | 2020-01-28T22:46:48.000Z | 2022-02-10T00:10:51.000Z | sdks/python/apache_beam/runners/direct/transform_evaluator.py | a-satyateja/beam | 30a04b912979adf5f316cc8ace334d921ca71838 | [
"Apache-2.0"
] | 6 | 2019-06-02T16:18:52.000Z | 2020-11-04T04:17:08.000Z | #
# 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 us... | 38.954591 | 106 | 0.734121 |
7989166dd459660cd3aaa02cd1bb5a2a7c205700 | 1,180 | py | Python | q3/q3c/setup.py | virtimus/makaronLab | 10b9be7d7d65d3da6219f929ea7070dd5fed3a81 | [
"0BSD"
] | 2 | 2021-03-16T05:48:36.000Z | 2021-10-11T01:55:48.000Z | q3/q3c/setup.py | virtimus/makaronLab | 10b9be7d7d65d3da6219f929ea7070dd5fed3a81 | [
"0BSD"
] | null | null | null | q3/q3c/setup.py | virtimus/makaronLab | 10b9be7d7d65d3da6219f929ea7070dd5fed3a81 | [
"0BSD"
] | 1 | 2021-03-16T05:48:39.000Z | 2021-03-16T05:48:39.000Z | #from setuptools import setup
from distutils.core import setup, Extension
#,"-lxi", "-lxrandr","-lglfw3","-lGLU", "-lGL", "-lGLEW""-lX11","-lasound","-z defs|--no-undefined"
#'xrandr', 'xi', 'xxf86vm', 'gl''glew', 'glfw3',"-shared","-DC6502OFF"
def main():
setup(
name='q3c',
version='0.0.1',
... | 42.142857 | 147 | 0.509322 |
7989168871177d4f850ae56a223daa6cbaf2dc87 | 5,549 | py | Python | openapi-python-client/openapi_client/models/event_subscription_query_dto_sorting.py | yanavasileva/camunda-bpm-examples | 051f8f28c62845e68ce4059ab64264c5a0bdc009 | [
"Apache-2.0"
] | null | null | null | openapi-python-client/openapi_client/models/event_subscription_query_dto_sorting.py | yanavasileva/camunda-bpm-examples | 051f8f28c62845e68ce4059ab64264c5a0bdc009 | [
"Apache-2.0"
] | null | null | null | openapi-python-client/openapi_client/models/event_subscription_query_dto_sorting.py | yanavasileva/camunda-bpm-examples | 051f8f28c62845e68ce4059ab64264c5a0bdc009 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Camunda BPM REST API
OpenApi Spec for Camunda BPM REST API. # noqa: E501
The version of the OpenAPI document: 7.13.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from openapi_client.configuration import Configuration
clas... | 34.042945 | 183 | 0.615066 |
798916af23f6a5e42be409bea00b877c32dc0fd6 | 366 | py | Python | vitu/__init__.py | Wanxiang-Blockchain-Hackathon-2020/N01-Vitu | fe12ec814cb1754f86fa4fe482c05262a2aad99a | [
"Apache-2.0"
] | 1 | 2020-03-04T03:05:55.000Z | 2020-03-04T03:05:55.000Z | vitu/__init__.py | Wanxiang-Blockchain-Hackathon-2020/N01-Vitu | fe12ec814cb1754f86fa4fe482c05262a2aad99a | [
"Apache-2.0"
] | null | null | null | vitu/__init__.py | Wanxiang-Blockchain-Hackathon-2020/N01-Vitu | fe12ec814cb1754f86fa4fe482c05262a2aad99a | [
"Apache-2.0"
] | 1 | 2021-05-20T08:55:42.000Z | 2021-05-20T08:55:42.000Z | import os
from matplotlib.font_manager import FontProperties
# from vitu.data_api import API
from vitu.configuration import Config
from vitu.utils.log_utils import logger
# api = API(Config.tushare_token())
log = logger
font = None
dirName = os.path.dirname(os.path.abspath(__file__))
font = FontProperties(fname=os.pa... | 30.5 | 79 | 0.789617 |
798916d59ac75dd046bd0838e76ee82277910605 | 3,665 | py | Python | app/examples/eg029_brands_apply_to_envelope/controller.py | unodeej/code-examples-python | ead7e5d4247b458f9ce3836a0fa256b6d3b8acab | [
"MIT"
] | null | null | null | app/examples/eg029_brands_apply_to_envelope/controller.py | unodeej/code-examples-python | ead7e5d4247b458f9ce3836a0fa256b6d3b8acab | [
"MIT"
] | null | null | null | app/examples/eg029_brands_apply_to_envelope/controller.py | unodeej/code-examples-python | ead7e5d4247b458f9ce3836a0fa256b6d3b8acab | [
"MIT"
] | null | null | null | import base64
from os import path
from docusign_esign import AccountsApi, EnvelopesApi, EnvelopeDefinition, Document, Signer, SignHere, Tabs, Recipients
from docusign_esign.client.api_exception import ApiException
from flask import request, session
from ...consts import demo_docs_path, pattern
from ...docusign import c... | 33.935185 | 119 | 0.625102 |
7989172c80efb0a6edb98e3f8b383c82a283f1e3 | 4,690 | py | Python | jesse/indicators/__init__.py | MikeOwino/jesse | 9890569743a1e45db0eded35db6c01fd408d7bb6 | [
"MIT"
] | null | null | null | jesse/indicators/__init__.py | MikeOwino/jesse | 9890569743a1e45db0eded35db6c01fd408d7bb6 | [
"MIT"
] | null | null | null | jesse/indicators/__init__.py | MikeOwino/jesse | 9890569743a1e45db0eded35db6c01fd408d7bb6 | [
"MIT"
] | null | null | null | from .acosc import acosc
from .ad import ad
from .adosc import adosc
from .adx import adx
from .adxr import adxr
from .alligator import alligator
from .alma import alma
from .ao import ao
from .apo import apo
from .aroon import aroon
from .aroonosc import aroonosc
from .atr import atr
from .avgprice import avgprice
fro... | 26.647727 | 56 | 0.813433 |
7989184bb1812b532b6239f76c293cdf71774cb8 | 72 | py | Python | process_message/argsLoader.py | sidrai97/DarwinBot | 7865b1fde3b5e842ce92206c0bb89738e41f342d | [
"MIT"
] | 1 | 2020-08-16T16:48:19.000Z | 2020-08-16T16:48:19.000Z | process_message/argsLoader.py | sidrai97/DarwinBot | 7865b1fde3b5e842ce92206c0bb89738e41f342d | [
"MIT"
] | null | null | null | process_message/argsLoader.py | sidrai97/DarwinBot | 7865b1fde3b5e842ce92206c0bb89738e41f342d | [
"MIT"
] | null | null | null | import json
import sys
def loadCmdArgs(idx=1):
return sys.argv[idx] | 14.4 | 24 | 0.736111 |
7989189b072d98852df30fbbb28393ea94ae5a3e | 854 | py | Python | isi_sdk_8_0/test/test_auth_shells.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_0/test/test_auth_shells.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_0/test/test_auth_shells.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 3
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_0
from isi... | 20.829268 | 79 | 0.688525 |
79891a457c26005a1c1b9a4f71400a0e364f9191 | 648 | py | Python | app.py | thisisgopal/Jiofi-low-battery-alert | 29afbcbf0a9bd61eb4ae0e4a5e13fa8d3c8b9e8b | [
"MIT"
] | 2 | 2020-06-23T13:05:53.000Z | 2020-12-03T13:38:52.000Z | app.py | thisisgopal/Jiofi-low-battery-alert | 29afbcbf0a9bd61eb4ae0e4a5e13fa8d3c8b9e8b | [
"MIT"
] | null | null | null | app.py | thisisgopal/Jiofi-low-battery-alert | 29afbcbf0a9bd61eb4ae0e4a5e13fa8d3c8b9e8b | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import requests
import time
import subprocess as sp
# Gopal Narayanan - 14.05.2020 @ 5.45 PM - gopalnarayanantn@gmail.com
# Jiofi product ID - JMR1040 ( Mine )
def scrap():
web_page = requests.get('http://jiofi.local.html/')
source_code = BeautifulSoup(web_page.content, 'html.par... | 29.454545 | 83 | 0.691358 |
79891a84dec558f57c75a8f92d9b227839478359 | 1,290 | py | Python | setup.py | amancevice/knackhq | a348141b5b289a69a4f268595e915a2449314a3b | [
"MIT"
] | 2 | 2017-11-16T22:02:31.000Z | 2018-03-25T18:58:59.000Z | setup.py | amancevice/knackhq | a348141b5b289a69a4f268595e915a2449314a3b | [
"MIT"
] | 3 | 2017-05-08T22:36:52.000Z | 2021-06-03T12:36:19.000Z | setup.py | amancevice/knackhq | a348141b5b289a69a4f268595e915a2449314a3b | [
"MIT"
] | 3 | 2017-03-29T01:24:12.000Z | 2018-08-09T14:27:52.000Z | from setuptools import find_packages
from setuptools import setup
with open('README.md', 'r') as readme:
long_description = readme.read()
setup(
author='amancevice',
author_email='smallweirdnum@gmail.com',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developer... | 34.864865 | 53 | 0.636434 |
79891afa1ee8f8e414cf9be3cfd241cf3cc71aae | 2,181 | py | Python | scipy/sparse/linalg/tests/test_matfuncs.py | seberg/scipy | d8081cdd40ed8cbebd5905c0ad6c323c57d5da6e | [
"BSD-3-Clause"
] | 1 | 2018-10-04T15:34:14.000Z | 2018-10-04T15:34:14.000Z | scipy/sparse/linalg/tests/test_matfuncs.py | seberg/scipy | d8081cdd40ed8cbebd5905c0ad6c323c57d5da6e | [
"BSD-3-Clause"
] | null | null | null | scipy/sparse/linalg/tests/test_matfuncs.py | seberg/scipy | d8081cdd40ed8cbebd5905c0ad6c323c57d5da6e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Created by: Pearu Peterson, March 2002
#
""" Test functions for scipy.linalg.matfuncs module
"""
import numpy as np
from numpy import array, eye, dot, sqrt, double, exp, random
from numpy.testing import TestCase, run_module_suite, assert_array_almost_equal, \
assert_array_almost_equal_nu... | 38.263158 | 82 | 0.599725 |
79891b17b52eb41786d098f92c8c0c41a4f3924a | 1,256 | py | Python | retinanet/models/subnet.py | amirassov/retinanet | 5b8a05bcf705607166f83efb91bec6f7bfb0c86c | [
"MIT"
] | 6 | 2019-02-01T19:54:07.000Z | 2019-11-29T15:16:48.000Z | retinanet/models/subnet.py | amirassov/fpnssd | 5b8a05bcf705607166f83efb91bec6f7bfb0c86c | [
"MIT"
] | null | null | null | retinanet/models/subnet.py | amirassov/fpnssd | 5b8a05bcf705607166f83efb91bec6f7bfb0c86c | [
"MIT"
] | 2 | 2018-08-31T11:32:54.000Z | 2018-09-17T21:45:41.000Z | import torch
import torch.nn as nn
class Subnet(nn.Module):
def __init__(self, num_classes, num_anchors, num_layers):
super().__init__()
self.num_classes = num_classes
self.num_anchors = num_anchors
self.num_layers = num_layers
self.layers = self._make_layers(self.num_ancho... | 39.25 | 109 | 0.624204 |
79891b2485db7f959df2f89c35bf71cf56d5bcab | 2,760 | py | Python | config_cascade_mask_rcnn_swinS.py | VGrondin/CBNetV2_mask_remote | b27246af5081d5395db3c3105d32226de05fcd13 | [
"Apache-2.0"
] | null | null | null | config_cascade_mask_rcnn_swinS.py | VGrondin/CBNetV2_mask_remote | b27246af5081d5395db3c3105d32226de05fcd13 | [
"Apache-2.0"
] | null | null | null | config_cascade_mask_rcnn_swinS.py | VGrondin/CBNetV2_mask_remote | b27246af5081d5395db3c3105d32226de05fcd13 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 11 09:51:45 2022
@author: vince
"""
# The new config inherits a base config to highlight the necessary modification
_base_ = [
"configs/keypoints/cascade_mask_rcnn_swinS_3x_coco.py", # dual swin backbone
]
model = dict(
backbone=dict(
f... | 34.5 | 134 | 0.50471 |
79891b3b82a4738c76b1bde910155e48e7350d6b | 5,681 | py | Python | BaseTools/Source/Python/GenFds/OptRomInfStatement.py | ya-enot/edk2 | 40cb1f25d4237a483f53fa435308608095b27d1c | [
"BSD-2-Clause"
] | 1 | 2019-02-05T09:58:28.000Z | 2019-02-05T09:58:28.000Z | BaseTools/Source/Python/GenFds/OptRomInfStatement.py | ya-enot/edk2 | 40cb1f25d4237a483f53fa435308608095b27d1c | [
"BSD-2-Clause"
] | null | null | null | BaseTools/Source/Python/GenFds/OptRomInfStatement.py | ya-enot/edk2 | 40cb1f25d4237a483f53fa435308608095b27d1c | [
"BSD-2-Clause"
] | null | null | null | ## @file
# process OptionROM generation from INF statement
#
# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The... | 36.88961 | 116 | 0.630171 |
79891b68d417b2d9502c6b4363854179f0d19b6c | 171 | py | Python | chipy_org/apps/announcements/urls.py | smandekar1/chipy.org | d70c6936a389d3e8b7c3530360f08d01aa4fa7f3 | [
"MIT"
] | null | null | null | chipy_org/apps/announcements/urls.py | smandekar1/chipy.org | d70c6936a389d3e8b7c3530360f08d01aa4fa7f3 | [
"MIT"
] | null | null | null | chipy_org/apps/announcements/urls.py | smandekar1/chipy.org | d70c6936a389d3e8b7c3530360f08d01aa4fa7f3 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from .views import AnnouncementsList
urlpatterns = [
url(r'^$',
AnnouncementsList.as_view(), name='announcements_list'),
]
| 17.1 | 64 | 0.701754 |
79891b99ca8fbedee34041c6365f5c65f2e9a011 | 6,516 | py | Python | gslib/addlhelp/crc32c.py | postmasters/gsutil | 9def26920ef3e15b3cb9a216f9e48f3483bd8034 | [
"Apache-2.0"
] | null | null | null | gslib/addlhelp/crc32c.py | postmasters/gsutil | 9def26920ef3e15b3cb9a216f9e48f3483bd8034 | [
"Apache-2.0"
] | null | null | null | gslib/addlhelp/crc32c.py | postmasters/gsutil | 9def26920ef3e15b3cb9a216f9e48f3483bd8034 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 39.253012 | 81 | 0.739257 |
79891d7a7299adf45ee2d7a1b344ba6ef74ec53c | 2,747 | py | Python | tools/gen_json_video.py | jiangwenj02/mmdetection | cdc0b7937cd23ee3ab2eef50d002d6cac6956cac | [
"Apache-2.0"
] | null | null | null | tools/gen_json_video.py | jiangwenj02/mmdetection | cdc0b7937cd23ee3ab2eef50d002d6cac6956cac | [
"Apache-2.0"
] | null | null | null | tools/gen_json_video.py | jiangwenj02/mmdetection | cdc0b7937cd23ee3ab2eef50d002d6cac6956cac | [
"Apache-2.0"
] | null | null | null | import json
import os
import shutil
import os.path as osp
import mmcv
from tqdm import tqdm
import glob
image_id = 0
annotation_id = 0
adenomatous_json_dir = '/data3/publicData/antiUAVtestimages/'
image_root = ''
dataset_root = ''
out_json = 'data/test.json'
merged_data = {
"licenses": [{"name": "", ... | 37.121622 | 121 | 0.515107 |
79891ed29602d2efbeac20321a07f28a38340ce8 | 2,058 | py | Python | dowhy/causal_refuter.py | LeihuaYe/dowhy | 96450741c9dd8c9fb4d2c40e964d8183c4dd8ec3 | [
"MIT"
] | 1 | 2019-12-28T01:49:36.000Z | 2019-12-28T01:49:36.000Z | dowhy/causal_refuter.py | LeihuaYe/dowhy | 96450741c9dd8c9fb4d2c40e964d8183c4dd8ec3 | [
"MIT"
] | null | null | null | dowhy/causal_refuter.py | LeihuaYe/dowhy | 96450741c9dd8c9fb4d2c40e964d8183c4dd8ec3 | [
"MIT"
] | null | null | null | import logging
import numpy as np
class CausalRefuter:
"""Base class for different refutation methods.
Subclasses implement specific refutations methods.
"""
def __init__(self, data, identified_estimand, estimate, **kwargs):
self._data = data
self._target_estimand = identifie... | 34.881356 | 125 | 0.66861 |
79891ef23443c0f2a3be24ff433d1f0f67beacd6 | 977 | py | Python | api_basic/serializers.py | damiso15/rest_basic | b264135c91c8db9f416730fe3ff446c5b3afced7 | [
"MIT"
] | null | null | null | api_basic/serializers.py | damiso15/rest_basic | b264135c91c8db9f416730fe3ff446c5b3afced7 | [
"MIT"
] | 3 | 2021-04-08T21:38:38.000Z | 2021-09-22T19:32:01.000Z | api_basic/serializers.py | damiso15/rest_basic | b264135c91c8db9f416730fe3ff446c5b3afced7 | [
"MIT"
] | null | null | null | from abc import ABC
from rest_framework import serializers
from .models import Article
# class ArticleSerializer(serializers.Serializer, ABC):
# title = serializers.CharField(max_length=100)
# author = serializers.CharField(max_length=100)
# email = serializers.EmailField(max_length=100)
# date = seri... | 36.185185 | 73 | 0.692938 |
79891f2caf633451af4798040fad1e16adfa2036 | 169 | py | Python | account/models.py | belloshehu/multiple-choice-questions | abfb7ac8cc24bc3f9ee34e9505bc6c6944786ac0 | [
"MIT"
] | null | null | null | account/models.py | belloshehu/multiple-choice-questions | abfb7ac8cc24bc3f9ee34e9505bc6c6944786ac0 | [
"MIT"
] | 2 | 2020-09-03T21:48:33.000Z | 2020-09-22T08:51:14.000Z | account/models.py | belloshehu/multiple-choice-questions | abfb7ac8cc24bc3f9ee34e9505bc6c6944786ac0 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractUser
class User(AbstractUser):
middle_name = models.CharField(max_length=20, null=True)
| 24.142857 | 59 | 0.804734 |
7989200dd75883b8a43ed57b476439a8bb9abe96 | 820 | py | Python | services/django_server/mydata/timeline/admin.py | aapris/MyData | b001ae74c118126e2540b933a84d9a90725b0b24 | [
"MIT"
] | null | null | null | services/django_server/mydata/timeline/admin.py | aapris/MyData | b001ae74c118126e2540b933a84d9a90725b0b24 | [
"MIT"
] | null | null | null | services/django_server/mydata/timeline/admin.py | aapris/MyData | b001ae74c118126e2540b933a84d9a90725b0b24 | [
"MIT"
] | null | null | null | from django.contrib import admin
from timeline.models import Source, Event
TIMESTAMP_FORMAT = "%Y-%m-%d %H:%M:%S %z"
def starttime_iso(obj):
return obj.starttime.strftime(TIMESTAMP_FORMAT)
starttime_iso.admin_order_field = "starttime"
starttime_iso.short_description = "Start time"
class SourceAdmin(admin.Mo... | 24.848485 | 108 | 0.704878 |
7989203cfe81e0e8d3c0d24807a9031ba9e4654f | 1,228 | py | Python | lib/sqlalchemy/dialects/mysql/pymysql.py | smarkets/sqlalchemy | 9c96d96d0fe558d625755277e0b23a7bc82cd148 | [
"MIT"
] | 2 | 2015-11-05T09:43:45.000Z | 2017-05-31T14:22:02.000Z | lib/sqlalchemy/dialects/mysql/pymysql.py | smarkets/sqlalchemy | 9c96d96d0fe558d625755277e0b23a7bc82cd148 | [
"MIT"
] | 4 | 2017-10-24T22:44:01.000Z | 2017-10-24T22:44:19.000Z | lib/sqlalchemy/dialects/mysql/pymysql.py | smarkets/sqlalchemy | 9c96d96d0fe558d625755277e0b23a7bc82cd148 | [
"MIT"
] | 1 | 2021-03-25T00:26:15.000Z | 2021-03-25T00:26:15.000Z | # mysql/pymysql.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: mysql+pymysql
:name: PyMySQL
:dbapi: pymysql
:connectst... | 26.695652 | 85 | 0.689739 |
7989216fecbcd5c6707055917a94fedc1bfbb6f4 | 1,933 | py | Python | tests/test_utils.py | cbwang2016/quimb | 633ae4117e6fc5518f9b1bc07a0ae734f058072c | [
"Apache-2.0"
] | 264 | 2018-01-30T10:06:09.000Z | 2022-03-28T01:39:40.000Z | tests/test_utils.py | adamcallison/quimb | a06fb9fc58976936bf7d631179ece0f832bf96a9 | [
"Apache-2.0"
] | 114 | 2017-10-24T22:37:15.000Z | 2022-03-31T18:58:55.000Z | tests/test_utils.py | adamcallison/quimb | a06fb9fc58976936bf7d631179ece0f832bf96a9 | [
"Apache-2.0"
] | 60 | 2017-10-24T22:28:43.000Z | 2022-02-28T13:54:20.000Z | import pytest
from quimb.utils import (
raise_cant_find_library_function,
deprecated,
oset,
)
class TestLibraryFinding:
def test_raise_cant_find_library_function(self):
fn = raise_cant_find_library_function(
"alibthatisdefinitelynotinstalledasfeasdf")
with pytest.raises(I... | 22.218391 | 56 | 0.495085 |
79892458c205b348dc29869215055676770b75d9 | 916 | py | Python | train_test_split.py | skorzewski/amused | d9f64e0d4a89fad6d6700149d5274a69af238fbe | [
"MIT"
] | null | null | null | train_test_split.py | skorzewski/amused | d9f64e0d4a89fad6d6700149d5274a69af238fbe | [
"MIT"
] | null | null | null | train_test_split.py | skorzewski/amused | d9f64e0d4a89fad6d6700149d5274a69af238fbe | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
from random import choices
def train_test_split(dataset_path, trainset_path, testset_path,
ratio=0.2):
weights = [ratio, 1 - ratio]
with open(dataset_path, 'r') as data, \
open(trainset_path, 'w') as train, \
open(te... | 31.586207 | 67 | 0.548035 |
7989254e2039ae8e4a430326d2419908b673306e | 16,011 | py | Python | log_casp_act/model_269.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_casp_act/model_269.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_casp_act/model_269.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | # exported from PySB model 'model'
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD
Model()
Monomer('Ligand', ['Receptor'])
Monomer('ParpU', ['C3A'])
Monomer('C8A', ['BidU', 'C3pro'])
Monomer('BaxM', ['BidM', 'BaxA'])
Monomer('Apop', ['C... | 84.268421 | 614 | 0.812254 |
79892550279f61f2c9b4b9694bd7d803beb8e928 | 2,753 | py | Python | core/sql.py | linty1997/Discord-bot-Blackhole | bcfe9a5303d8250d300f351b6825c3c8b3c48c0b | [
"MIT"
] | null | null | null | core/sql.py | linty1997/Discord-bot-Blackhole | bcfe9a5303d8250d300f351b6825c3c8b3c48c0b | [
"MIT"
] | null | null | null | core/sql.py | linty1997/Discord-bot-Blackhole | bcfe9a5303d8250d300f351b6825c3c8b3c48c0b | [
"MIT"
] | 1 | 2022-03-29T15:19:44.000Z | 2022-03-29T15:19:44.000Z | import pymysql
host = ""
database = ""
user = ""
password = ""
class SQL:
# 初始
def __init__(self, host=host, user=user, password=password, database=database):
self.host = host
self.user = user
self.passwd = password
self.database = database
self.db = None
self.... | 25.971698 | 132 | 0.490011 |
798925517d561ff819d7176bdec9136a6f6fcaf9 | 3,320 | py | Python | native/sta2dfft.py | julianmak/pydra | eee7dbd5fbb2c64ead9f732ed1475634606b035a | [
"MIT"
] | null | null | null | native/sta2dfft.py | julianmak/pydra | eee7dbd5fbb2c64ead9f732ed1475634606b035a | [
"MIT"
] | null | null | null | native/sta2dfft.py | julianmak/pydra | eee7dbd5fbb2c64ead9f732ed1475634606b035a | [
"MIT"
] | 1 | 2020-10-09T09:54:52.000Z | 2020-10-09T09:54:52.000Z | #/usr/bin/env python3
#
# JM: 12 Apr 2018
#
# the sta2dfft.f90 adapted for python
# contains 2d spectral commands which uses stafft
from stafft import *
# This module performs FFTs in two directions on two dimensional arrays using
# the stafft library module to actually compute the FFTs. If FFTs in one
# direction ... | 38.16092 | 80 | 0.632831 |
798925bea356dfbda5ee920290af1a10f2b8fec9 | 12,327 | py | Python | dashboard/dashboard/common/descriptor.py | tobeqj/catapult | 4d850033271b29cd51e6343747c75631d335f14c | [
"BSD-3-Clause"
] | 1 | 2019-05-18T02:43:02.000Z | 2019-05-18T02:43:02.000Z | dashboard/dashboard/common/descriptor.py | tobeqj/catapult | 4d850033271b29cd51e6343747c75631d335f14c | [
"BSD-3-Clause"
] | null | null | null | dashboard/dashboard/common/descriptor.py | tobeqj/catapult | 4d850033271b29cd51e6343747c75631d335f14c | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2018 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.
"""Translate between test paths and Descriptors.
Test paths describe a timeseries by its path in a tree of timeseries.
Descriptors describe a timeseries sem... | 35.119658 | 80 | 0.675752 |
7989268ab65106c24a96d7bda848e49a91883251 | 2,082 | py | Python | faker/providers/profile/__init__.py | jacksmith15/faker | bc5dda1983e4d055aa2698ccf0806a462cb8370e | [
"MIT"
] | 1 | 2022-02-16T23:14:19.000Z | 2022-02-16T23:14:19.000Z | faker/providers/profile/__init__.py | jacksmith15/faker | bc5dda1983e4d055aa2698ccf0806a462cb8370e | [
"MIT"
] | 33 | 2020-12-09T16:49:15.000Z | 2022-01-04T22:03:10.000Z | faker/providers/profile/__init__.py | jacksmith15/faker | bc5dda1983e4d055aa2698ccf0806a462cb8370e | [
"MIT"
] | 3 | 2022-02-07T18:18:54.000Z | 2022-03-11T22:09:01.000Z | import itertools
from datetime import date
from decimal import Decimal
from typing import Dict, List, Optional, Tuple, Union
from ...typing import GenderType
from .. import BaseProvider
class Provider(BaseProvider):
"""
This provider is a collection of functions to generate personal profiles and identities.... | 34.131148 | 116 | 0.572046 |
798926b81ac70afb709e068edfcbdc5eb81ad719 | 3,530 | py | Python | tempest/api/object_storage/test_account_quotas_negative.py | rishabh20111990/tempest | df15531cd4231000b0da016f5cd8641523ce984e | [
"Apache-2.0"
] | 254 | 2015-01-05T19:22:52.000Z | 2022-03-29T08:14:54.000Z | tempest/api/object_storage/test_account_quotas_negative.py | rishabh20111990/tempest | df15531cd4231000b0da016f5cd8641523ce984e | [
"Apache-2.0"
] | 13 | 2015-03-02T15:53:04.000Z | 2022-02-16T02:28:14.000Z | tempest/api/object_storage/test_account_quotas_negative.py | rishabh20111990/tempest | df15531cd4231000b0da016f5cd8641523ce984e | [
"Apache-2.0"
] | 367 | 2015-01-07T15:05:39.000Z | 2022-03-04T09:50:35.000Z | # Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
#
# 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... | 37.553191 | 78 | 0.693484 |
7989273192c64cdad6ce321c781d439e42cfb70f | 438 | py | Python | searchapp/users/urls.py | mrkarezina/awesome-search | a3f2c86421be4fbf36de5b94828bd6a749efb744 | [
"MIT"
] | 10 | 2021-05-15T23:57:48.000Z | 2022-02-13T11:38:35.000Z | searchapp/users/urls.py | redis-developer/awesome-search | 9b9717ccaffe5eb3ae08ca13c7fcd88b152bad56 | [
"MIT"
] | null | null | null | searchapp/users/urls.py | redis-developer/awesome-search | 9b9717ccaffe5eb3ae08ca13c7fcd88b152bad56 | [
"MIT"
] | 1 | 2022-03-06T19:52:37.000Z | 2022-03-06T19:52:37.000Z | from django.urls import path, include
from .views import RegisterAPI, LoginAPI, UserAPI
from knox import views as knox_views
urlpatterns = [
path('api/auth', include('knox.urls')),
path('api/auth/register', RegisterAPI.as_view(), name='register'),
path('api/auth/login', LoginAPI.as_view(), name='login'),
path(... | 36.5 | 78 | 0.723744 |
798927f30565f690baa84d8934e7d9ba41e2e760 | 1,784 | py | Python | .venv/lib/python3.8/site-packages/pandas_datareader/compat/__init__.py | eo1989/VectorBTanalysis | bea3deaf2ee3fc114b308146f2af3e4f35f70197 | [
"MIT"
] | 1 | 2021-11-16T19:06:56.000Z | 2021-11-16T19:06:56.000Z | .venv/lib/python3.8/site-packages/pandas_datareader/compat/__init__.py | eo1989/VectorBTanalysis | bea3deaf2ee3fc114b308146f2af3e4f35f70197 | [
"MIT"
] | null | null | null | .venv/lib/python3.8/site-packages/pandas_datareader/compat/__init__.py | eo1989/VectorBTanalysis | bea3deaf2ee3fc114b308146f2af3e4f35f70197 | [
"MIT"
] | 1 | 2021-11-16T19:06:53.000Z | 2021-11-16T19:06:53.000Z | from distutils.version import LooseVersion
from functools import reduce
from io import StringIO
from urllib.error import HTTPError
import pandas as pd
from pandas.api.types import is_list_like, is_number
import pandas.io.common as com
from pandas.testing import assert_frame_equal
PANDAS_VERSION = LooseVersion(pd.__ve... | 23.168831 | 80 | 0.698991 |
7989286cbab34c27b32cf5c7db33cddd3bd8fee3 | 5,863 | py | Python | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/types/geo_target_constant_service.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/types/geo_target_constant_service.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/types/geo_target_constant_service.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 30.857895 | 142 | 0.653761 |
798928bbf788b5888e9c30ea2628333fd547e184 | 6,931 | py | Python | src/util/HTMLLogger.py | WaterHyacinthInNANHU/ArkOS | 1919b7a2f22bc407d0a5503a9c1db8e30bbbc092 | [
"MIT"
] | null | null | null | src/util/HTMLLogger.py | WaterHyacinthInNANHU/ArkOS | 1919b7a2f22bc407d0a5503a9c1db8e30bbbc092 | [
"MIT"
] | null | null | null | src/util/HTMLLogger.py | WaterHyacinthInNANHU/ArkOS | 1919b7a2f22bc407d0a5503a9c1db8e30bbbc092 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
from os.path import dirname, realpath, join, isdir, isfile
from shutil import copyfile
import os
from base64 import b64encode
from io import BytesIO
from datetime import datetime
from copy import copy
from PIL import Image
import config
from abc import ABC, abstractmethod
from . import Hid... | 33.322115 | 101 | 0.598471 |
798929418bbaf802e8562a59b30fc0ae16755bd7 | 6,203 | py | Python | research/object_detection/predictors/mask_rcnn_box_predictor.py | carranza96/models | 50a6b6d2e75e0f323a8589e5c4c8e2f526183dec | [
"Apache-2.0"
] | null | null | null | research/object_detection/predictors/mask_rcnn_box_predictor.py | carranza96/models | 50a6b6d2e75e0f323a8589e5c4c8e2f526183dec | [
"Apache-2.0"
] | null | null | null | research/object_detection/predictors/mask_rcnn_box_predictor.py | carranza96/models | 50a6b6d2e75e0f323a8589e5c4c8e2f526183dec | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 42.486301 | 80 | 0.709334 |
7989294461d3e597708d39a4de30ea41c0e1cb25 | 588 | py | Python | ai_semiconductors/tests/test_standardize.py | xiaofx2/ai_semiconductors | 9f4a92b76acbd0ac1c04fc5ea038e175d13a7193 | [
"MIT"
] | 4 | 2020-04-09T21:26:51.000Z | 2022-02-24T18:30:18.000Z | ai_semiconductors/tests/test_standardize.py | xiaofx2/ai_semiconductors | 9f4a92b76acbd0ac1c04fc5ea038e175d13a7193 | [
"MIT"
] | 6 | 2020-06-17T18:27:25.000Z | 2021-11-10T19:59:51.000Z | ai_semiconductors/tests/test_standardize.py | xiaofx2/ai_semiconductors | 9f4a92b76acbd0ac1c04fc5ea038e175d13a7193 | [
"MIT"
] | 3 | 2020-06-23T13:51:46.000Z | 2021-08-15T12:26:32.000Z | #!/usr/bin/env python
# coding: utf-8
# In[5]:
import sys
sys.path.append("../")
# In[34]:
def test_standardize():
import standardize
import numpy as np
a = np.array([1, 2, 3, 4, 5])
std_a = (a - a.mean())/a.std()
assert np.alltrue(std_a == standardize.standardize(a)),\
"standardizati... | 16.333333 | 60 | 0.579932 |
7989298a2e647b496cd4cb8fd8c64d4ccd408fef | 23,396 | py | Python | pymc3_hmm/step_methods.py | brandonwillard/pymc3-hmm | a90b13937601a77217d901e9f3daed0ffe1315a2 | [
"Apache-2.0"
] | 56 | 2020-10-13T15:12:30.000Z | 2022-03-08T12:47:21.000Z | pymc3_hmm/step_methods.py | brandonwillard/pymc3-hmm | a90b13937601a77217d901e9f3daed0ffe1315a2 | [
"Apache-2.0"
] | 40 | 2020-10-14T00:16:05.000Z | 2022-03-09T21:25:36.000Z | pymc3_hmm/step_methods.py | brandonwillard/pymc3-hmm | a90b13937601a77217d901e9f3daed0ffe1315a2 | [
"Apache-2.0"
] | 9 | 2020-10-13T19:08:41.000Z | 2021-09-27T19:19:11.000Z | from itertools import chain
from typing import Callable, Tuple
import numpy as np
try: # pragma: no cover
import aesara.scalar as aes
import aesara.tensor as at
from aesara import config
from aesara.compile import optdb
from aesara.graph.basic import Variable, graph_inputs
from aesara.graph.f... | 33.809249 | 119 | 0.608993 |
798929a2543ba17a312f5af3962cdc5dcfebb6e5 | 6,415 | py | Python | purity_fb/purity_fb_1dot10/models/array_connection_path.py | mabdelhafez/purity_fb_python_client | a9856875b3df43b4302a2e4addd1a6b71f51f5ce | [
"Apache-2.0"
] | null | null | null | purity_fb/purity_fb_1dot10/models/array_connection_path.py | mabdelhafez/purity_fb_python_client | a9856875b3df43b4302a2e4addd1a6b71f51f5ce | [
"Apache-2.0"
] | null | null | null | purity_fb/purity_fb_1dot10/models/array_connection_path.py | mabdelhafez/purity_fb_python_client | a9856875b3df43b4302a2e4addd1a6b71f51f5ce | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Pure Storage FlashBlade REST 1.10 Python SDK
Pure Storage FlashBlade REST 1.10 Python SDK, developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/).
OpenAPI spec version: 1.10
Contact... | 26.953782 | 205 | 0.566485 |
79892ab2996863c6cafbb7d4123ed42254733b0c | 3,060 | py | Python | pagerduty/komand_pagerduty/actions/get_user_by_email/schema.py | emartin-merrill-r7/insightconnect-plugins | a589745dbcc9f01d3e601431e77ab7221a84c117 | [
"MIT"
] | 1 | 2020-03-18T09:14:55.000Z | 2020-03-18T09:14:55.000Z | pagerduty/komand_pagerduty/actions/get_user_by_email/schema.py | OSSSP/insightconnect-plugins | 846758dab745170cf1a8c146211a8bea9592e8ff | [
"MIT"
] | null | null | null | pagerduty/komand_pagerduty/actions/get_user_by_email/schema.py | OSSSP/insightconnect-plugins | 846758dab745170cf1a8c146211a8bea9592e8ff | [
"MIT"
] | null | null | null | # GENERATED BY KOMAND SDK - DO NOT EDIT
import komand
import json
class Component:
DESCRIPTION = "Get a User by Email"
class Input:
EMAIL = "email"
class Output:
FOUND = "found"
USER = "user"
class GetUserByEmailInput(komand.Input):
schema = json.loads("""
{
"type": "object",
... | 20.264901 | 57 | 0.416013 |
79892b7bc7ba7b1498b1a030117b00af512a393a | 1,462 | py | Python | code/index.py | PokaInc/christmas-gift-generator | dda47cf3df7f0e7aaa3f3ce239dcdfc88aec78e1 | [
"MIT"
] | null | null | null | code/index.py | PokaInc/christmas-gift-generator | dda47cf3df7f0e7aaa3f3ce239dcdfc88aec78e1 | [
"MIT"
] | null | null | null | code/index.py | PokaInc/christmas-gift-generator | dda47cf3df7f0e7aaa3f3ce239dcdfc88aec78e1 | [
"MIT"
] | null | null | null | import json
import random
from collections import namedtuple
Object = namedtuple(field_names=['determiner', 'object'], typename='Object')
objects = [
Object('A', 'Star Wars Mug'),
Object('A', 'Mickey Mouse Toaster'),
Object('Some', 'Socks'),
Object('A', 'Cup of tea'),
Object('A', 'Pack of Bacon'),... | 21.5 | 76 | 0.569083 |
79892c56550bef314f1b3560f2c93943ab91cc6b | 288 | py | Python | paf_tools/database/__init__.py | osgirl/paf-tools | 9c55108266b2f50f934edfdfab0f7573b5bba90f | [
"MIT"
] | 3 | 2015-05-13T21:25:03.000Z | 2019-10-01T14:21:52.000Z | paf_tools/database/__init__.py | osgirl/paf-tools | 9c55108266b2f50f934edfdfab0f7573b5bba90f | [
"MIT"
] | 1 | 2015-06-03T09:58:26.000Z | 2015-06-05T12:32:48.000Z | paf_tools/database/__init__.py | osgirl/paf-tools | 9c55108266b2f50f934edfdfab0f7573b5bba90f | [
"MIT"
] | 1 | 2019-02-05T14:14:52.000Z | 2019-02-05T14:14:52.000Z | """Database init module.
Contains configurable settings for the database tool, and initialises the
database itself.
"""
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
engine = create_engine('sqlite:///./paf-tools.db')
Session = sessionmaker(bind=engine)
| 24 | 74 | 0.788194 |
79892c5c9ab181a18bde78365bb2dba9e8c2896b | 3,144 | py | Python | sdk/python/pulumi_azure_nextgen/search/v20200313/list_query_key_by_search_service.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/search/v20200313/list_query_key_by_search_service.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/search/v20200313/list_query_key_by_search_service.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 39.797468 | 176 | 0.7007 |
79892e2cb4a28c269ba255e43bd488dade62b91e | 2,465 | py | Python | test/units/formats/test_stego.py | bronxc/refinery | 9448facf48a0008f27861dd1a5ee8f5218e6bb86 | [
"BSD-3-Clause"
] | 1 | 2022-02-13T20:57:15.000Z | 2022-02-13T20:57:15.000Z | test/units/formats/test_stego.py | bronxc/refinery | 9448facf48a0008f27861dd1a5ee8f5218e6bb86 | [
"BSD-3-Clause"
] | null | null | null | test/units/formats/test_stego.py | bronxc/refinery | 9448facf48a0008f27861dd1a5ee8f5218e6bb86 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from .. import TestUnitBase
class TestStegoUnit(TestUnitBase):
def test_simple(self):
expected_rows = [
bytes.fromhex(r) for r in [
'2C 15 15 75 50 50 A2 51 51 C1 85 85 AC 5B 5B C9 95 95 CD 9E 9E 98 40 40 00 00 00 00 00 00',
... | 66.621622 | 108 | 0.674645 |
79892e2cdc7b074a4bd6f5f0fc8b7aba4e07a1e6 | 1,234 | py | Python | test/test_pipe.py | aisipos/jsonpipe | 9b299b3df373536d7f53c3e4cc321c4071d8892a | [
"Unlicense"
] | 1 | 2021-01-10T22:27:55.000Z | 2021-01-10T22:27:55.000Z | test/test_pipe.py | aisipos/jsonpipe | 9b299b3df373536d7f53c3e4cc321c4071d8892a | [
"Unlicense"
] | null | null | null | test/test_pipe.py | aisipos/jsonpipe | 9b299b3df373536d7f53c3e4cc321c4071d8892a | [
"Unlicense"
] | 1 | 2020-12-29T18:20:48.000Z | 2020-12-29T18:20:48.000Z | import pytest
from functools import partial
from jsonpipe.sh import select
from jsonpipe import jsonunpipe, pipe
from jsonpipe import jsonpipe
# Shim for easier demonstration.
def jpipe(obj):
return ''.join(jsonpipe(obj))
# The simplest case is outputting JSON values (strings, numbers, booleans and
# nulls
def t... | 33.351351 | 104 | 0.628039 |
79892e5ac0a35e012c688b60dcfb1194fecd4f57 | 9,158 | py | Python | gym_ds3/schedulers/models/deepsocs_model.py | EpiSci/SoCRATES | 901a896c5a765e3cb56f290188cde71c8707192d | [
"MIT"
] | 6 | 2021-09-24T13:40:39.000Z | 2022-02-14T02:59:52.000Z | gym_ds3/schedulers/models/deepsocs_model.py | EpiSci/SoCRATES | 901a896c5a765e3cb56f290188cde71c8707192d | [
"MIT"
] | null | null | null | gym_ds3/schedulers/models/deepsocs_model.py | EpiSci/SoCRATES | 901a896c5a765e3cb56f290188cde71c8707192d | [
"MIT"
] | null | null | null | import tensorflow as tf
from gym_ds3.envs.utils.helper_deepsocs import get_vars, count_vars
def create_deepsocs_model(args, feat_hdims=[32,16], gnn_hdims=[16,8],
task_hdims=[32,16,8], pe_hdims=[64,32,16,8], output_actv=None):
"""
Create DeepSoCS Model (compatible with Ray)
"""
# ... | 41.252252 | 132 | 0.645228 |
79892f308d10ed2ef15df4b55fdf222fe9ac64ef | 2,375 | py | Python | google/ads/google_ads/v2/proto/services/payments_account_service_pb2_grpc.py | jiulongw/google-ads-python | 6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e | [
"Apache-2.0"
] | 1 | 2019-11-30T23:42:39.000Z | 2019-11-30T23:42:39.000Z | google/ads/google_ads/v2/proto/services/payments_account_service_pb2_grpc.py | jiulongw/google-ads-python | 6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v2/proto/services/payments_account_service_pb2_grpc.py | jiulongw/google-ads-python | 6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e | [
"Apache-2.0"
] | 1 | 2020-03-13T00:14:31.000Z | 2020-03-13T00:14:31.000Z | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from google.ads.google_ads.v2.proto.services import payments_account_service_pb2 as google_dot_ads_dot_googleads__v2_dot_proto_dot_services_dot_payments__account__service__pb2
class PaymentsAccountServiceStub(object):
"""Proto file d... | 43.181818 | 175 | 0.812211 |
79892f360c45fec332f9ba140c0288a0def37c51 | 2,154 | py | Python | contrib/devtools/clang-format.py | cryptosurance/energi | 0de140747aef369ae82ae658a44d62509a9d053b | [
"MIT"
] | 1 | 2018-11-30T12:11:58.000Z | 2018-11-30T12:11:58.000Z | contrib/devtools/clang-format.py | cryptosurance/energi | 0de140747aef369ae82ae658a44d62509a9d053b | [
"MIT"
] | null | null | null | contrib/devtools/clang-format.py | cryptosurance/energi | 0de140747aef369ae82ae658a44d62509a9d053b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
Wrapper script for clang-format
Copyright (c) 2015 MarcoFalke
Copyright (c) 2015 The Bitcoin Core developers
Distributed under the MIT software license, see the accompanying
file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
import os
import sys
import subprocess
tested... | 34.190476 | 139 | 0.640669 |
79892f772ea1371bbcae3071879a94041e60fe8e | 708 | py | Python | LeetCode/0118. Pascal's Triangle/Solution.py | InnoFang/oh-my-algorithms | f559dba371ce725a926725ad28d5e1c2facd0ab2 | [
"Apache-2.0"
] | 19 | 2018-08-26T03:10:58.000Z | 2022-03-07T18:12:52.000Z | LeetCode/0118. Pascal's Triangle/Solution.py | InnoFang/Algorithm-Library | 1896b9d8b1fa4cd73879aaecf97bc32d13ae0169 | [
"Apache-2.0"
] | null | null | null | LeetCode/0118. Pascal's Triangle/Solution.py | InnoFang/Algorithm-Library | 1896b9d8b1fa4cd73879aaecf97bc32d13ae0169 | [
"Apache-2.0"
] | 6 | 2020-03-16T23:00:06.000Z | 2022-01-13T07:02:08.000Z | class Solution:
def generate(self, numRows):
"""
:type numRows: int
:rtype: List[List[int]]
---------
15 / 15 test cases passed.
Status: Accepted
Runtime: 40 ms
"""
triangle = []
def row():
line = [1]
while True... | 24.413793 | 88 | 0.484463 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.