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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a1209c5954e1405274be90df26ff3a3a703cb49 | 1,771 | py | Python | src/solvers/backtracking.py | daniel-toncu/N-Queens | 363f3f43af7ee453c060d296979c041d50327794 | [
"MIT"
] | null | null | null | src/solvers/backtracking.py | daniel-toncu/N-Queens | 363f3f43af7ee453c060d296979c041d50327794 | [
"MIT"
] | null | null | null | src/solvers/backtracking.py | daniel-toncu/N-Queens | 363f3f43af7ee453c060d296979c041d50327794 | [
"MIT"
] | null | null | null | """
"""
from solvers.base import BaseSolver
class BacktrackingSolver(BaseSolver):
"""
"""
def _is_safe_place(self, board, row, column):
"""
"""
# Check Row on Left Side
for i in range(column):
if board[row][i] == 1:
return False
# Che... | 20.125 | 71 | 0.468097 |
4a120ae022baf346ae18fe691b11e1650d0df2db | 2,475 | py | Python | isometric-deformation/ext/libigl/python/tutorial/605_Tetgen.py | jiayaozhang/CS-370-Mesh-Processing | 26646d29af8cbc0d461302afa137f12b508b8b1b | [
"MIT"
] | 187 | 2019-01-23T04:07:11.000Z | 2022-03-27T03:44:58.000Z | isometric-deformation/ext/libigl/python/tutorial/605_Tetgen.py | jiayaozhang/CS-370-Mesh-Processing | 26646d29af8cbc0d461302afa137f12b508b8b1b | [
"MIT"
] | 8 | 2019-03-22T13:27:38.000Z | 2020-06-18T13:23:23.000Z | isometric-deformation/ext/libigl/python/tutorial/605_Tetgen.py | jiayaozhang/CS-370-Mesh-Processing | 26646d29af8cbc0d461302afa137f12b508b8b1b | [
"MIT"
] | 34 | 2019-02-13T01:11:12.000Z | 2022-02-28T03:29:40.000Z | # This file is part of libigl, a simple c++ geometry processing library.
#
# Copyright (C) 2017 Sebastian Koch <s.koch@tu-berlin.de> and Daniele Panozzo <daniele.panozzo@gmail.com>
#
# This Source Code Form is subject to the terms of the Mozilla Public License
# v. 2.0. If a copy of the MPL was not distributed with thi... | 30.182927 | 105 | 0.598788 |
4a120b692ee7f2eb7220fdf1a372094184b7a72b | 5,372 | py | Python | test/test_java_timestamp.py | pombredanne/javaproperties | 23c23bfae27d0d7c94338810e84d763ebd0d81f8 | [
"MIT"
] | 21 | 2016-10-03T18:38:45.000Z | 2021-06-29T02:20:48.000Z | test/test_java_timestamp.py | pombredanne/javaproperties | 23c23bfae27d0d7c94338810e84d763ebd0d81f8 | [
"MIT"
] | 13 | 2017-03-07T17:53:05.000Z | 2020-11-27T22:07:11.000Z | test/test_java_timestamp.py | pombredanne/javaproperties | 23c23bfae27d0d7c94338810e84d763ebd0d81f8 | [
"MIT"
] | 11 | 2016-12-05T08:48:33.000Z | 2022-03-11T10:15:11.000Z | from datetime import datetime
import sys
from dateutil.tz import tzstr
import pytest
from javaproperties import java_timestamp
# Unix timestamps and datetime objects don't support leap seconds or month 13,
# so there's no need (and no way) to test handling of them here.
old_pacific = tzstr("PST8PDT,M4.1.0,M10.5.0")
... | 37.830986 | 81 | 0.566828 |
4a120b8498f65daa1ee84fa0d2ca6b8f861ba69a | 27,391 | py | Python | corehq/apps/userreports/tasks.py | EXTREMOPHILARUM/commcare-hq | b97aa9095615d0c3c5f259db67ad9438afa3d7a5 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/userreports/tasks.py | EXTREMOPHILARUM/commcare-hq | b97aa9095615d0c3c5f259db67ad9438afa3d7a5 | [
"BSD-3-Clause"
] | 1 | 2021-06-02T04:45:16.000Z | 2021-06-02T04:45:16.000Z | corehq/apps/userreports/tasks.py | EXTREMOPHILARUM/commcare-hq | b97aa9095615d0c3c5f259db67ad9438afa3d7a5 | [
"BSD-3-Clause"
] | null | null | null | import logging
from collections import defaultdict
from datetime import datetime, timedelta
from django.conf import settings
from django.db import DatabaseError, InternalError, transaction
from django.db.models import Count, Min
from django.utils.translation import ugettext as _
from botocore.vendored.requests.except... | 43.408875 | 138 | 0.681319 |
4a120c80de0f04200cb93bab524ffe4fe749cb72 | 5,193 | py | Python | scripts/icsexport.py | cigno5/pyscripts | 10be001ec03d806d3e742b828020b1e07dd8dada | [
"MIT"
] | null | null | null | scripts/icsexport.py | cigno5/pyscripts | 10be001ec03d806d3e742b828020b1e07dd8dada | [
"MIT"
] | null | null | null | scripts/icsexport.py | cigno5/pyscripts | 10be001ec03d806d3e742b828020b1e07dd8dada | [
"MIT"
] | null | null | null | import argparse
import getpass
import json
import os
import re
import sys
from datetime import datetime, timedelta
import requests
import abnconv
from abnconv import QIFOutput, Trsx
def extract_transactions():
base_url = "https://www.icscards.nl"
login_url = "%s/pub/nl/pub/login" % base_url
account_url ... | 33.076433 | 116 | 0.620643 |
4a120cfa5ab9bbc993f275a351a3407ae81a1ea8 | 6,744 | py | Python | census/customestimator/trainer/task.py | lakshmanok/cloudml-samples | 57311b1c8a7640801c6638c642884cd85bbc2c85 | [
"Apache-2.0"
] | 1 | 2018-08-16T02:16:59.000Z | 2018-08-16T02:16:59.000Z | census/customestimator/trainer/task.py | Ugenteraan/cloudml-samples | 57311b1c8a7640801c6638c642884cd85bbc2c85 | [
"Apache-2.0"
] | null | null | null | census/customestimator/trainer/task.py | Ugenteraan/cloudml-samples | 57311b1c8a7640801c6638c642884cd85bbc2c85 | [
"Apache-2.0"
] | 2 | 2019-06-30T18:47:22.000Z | 2020-08-14T16:41:38.000Z | import argparse
import os
import model
import tensorflow as tf
from tensorflow.contrib.learn import learn_runner
from tensorflow.contrib.learn.python.learn.utils import (
saved_model_export_utils)
from tensorflow.contrib.training.python.training import hparam
def generate_experiment_fn(**experiment_args):
"""... | 29.068966 | 80 | 0.640273 |
4a120d9ddeffdd305183215536c9364f02f1c8da | 1,402 | py | Python | app_reservas/migrations/0004_clase_recurso.py | fedegallar/reservas | 75fc06b9dedf53eca76b61ea0ccc914d5e084b2d | [
"MIT"
] | 1 | 2018-11-10T14:57:54.000Z | 2018-11-10T14:57:54.000Z | app_reservas/migrations/0004_clase_recurso.py | fedegallar/reservas | 75fc06b9dedf53eca76b61ea0ccc914d5e084b2d | [
"MIT"
] | 6 | 2020-06-05T17:11:56.000Z | 2021-09-07T23:38:00.000Z | app_reservas/migrations/0004_clase_recurso.py | fedegallar/reservas | 75fc06b9dedf53eca76b61ea0ccc914d5e084b2d | [
"MIT"
] | 1 | 2019-04-16T20:00:05.000Z | 2019-04-16T20:00:05.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
"""
Creación de modelo Recurso.
"""
dependencies = [
('app_reservas', '0003_verbose_names'),
]
operations = [
migrations.CreateMode... | 31.863636 | 80 | 0.445792 |
4a120e7884f331c97f408d6f62f5bd9296be7ef7 | 1,080 | py | Python | 82. Remove Duplicates from Sorted List II.py | alijon30/Leetcode | 73e8171945e1fcbc59e76f79667c9ea130db27e9 | [
"Unlicense"
] | null | null | null | 82. Remove Duplicates from Sorted List II.py | alijon30/Leetcode | 73e8171945e1fcbc59e76f79667c9ea130db27e9 | [
"Unlicense"
] | null | null | null | 82. Remove Duplicates from Sorted List II.py | alijon30/Leetcode | 73e8171945e1fcbc59e76f79667c9ea130db27e9 | [
"Unlicense"
] | null | null | null |
Given the head of a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Return the linked list sorted as well.
Example 1:
Input: head = [1,2,3,3,4,4,5]
Output: [1,2,5]
Example 2:
Input: head = [1,1,1,2,3]
Output: [2,3]
# Definition for ... | 21.176471 | 178 | 0.502778 |
4a120e9f1ec48f2c7236f24d785314da9083f91a | 59,025 | py | Python | Lib/logging/handlers.py | chexca/cpython | cfc6ce4d40f2f01314b7e283fb972a7bb3ed3faa | [
"CNRI-Python-GPL-Compatible"
] | 4 | 2019-04-17T19:09:30.000Z | 2021-08-18T14:51:39.000Z | Lib/logging/handlers.py | chexca/cpython | cfc6ce4d40f2f01314b7e283fb972a7bb3ed3faa | [
"CNRI-Python-GPL-Compatible"
] | 4 | 2020-03-13T22:24:05.000Z | 2020-03-19T15:08:18.000Z | Lib/logging/handlers.py | chexca/cpython | cfc6ce4d40f2f01314b7e283fb972a7bb3ed3faa | [
"CNRI-Python-GPL-Compatible"
] | 5 | 2018-12-29T15:43:57.000Z | 2020-12-14T15:29:43.000Z | # Copyright 2001-2016 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copyright notice and this permissio... | 38.327922 | 120 | 0.57906 |
4a120f228aa7b8769b252e7935b8322659a78bf6 | 7,057 | py | Python | frappe/api.py | kidsyn/frappe | 8de131dab29b69b33729240a66bc3483513dafc4 | [
"MIT"
] | 1 | 2021-04-25T07:07:36.000Z | 2021-04-25T07:07:36.000Z | frappe/api.py | kidsyn/frappe | 8de131dab29b69b33729240a66bc3483513dafc4 | [
"MIT"
] | null | null | null | frappe/api.py | kidsyn/frappe | 8de131dab29b69b33729240a66bc3483513dafc4 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
import base64
import binascii
import json
from urllib.parse import urlencode, urlparse
import frappe
import frappe.client
import frappe.handler
from frappe import _
from frappe.utils.response import build_response
de... | 28.922131 | 123 | 0.715602 |
4a120f4dd5a5f0ecd35b71e45f2b2d9ab271f82c | 48,458 | py | Python | python/ccxt/async_support/liquid.py | 0shimax/ccxt | 2fd7e65dc13800b331274cd4a73345de94ee3c9b | [
"MIT"
] | null | null | null | python/ccxt/async_support/liquid.py | 0shimax/ccxt | 2fd7e65dc13800b331274cd4a73345de94ee3c9b | [
"MIT"
] | null | null | null | python/ccxt/async_support/liquid.py | 0shimax/ccxt | 2fd7e65dc13800b331274cd4a73345de94ee3c9b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
import math
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import A... | 41.135823 | 143 | 0.459367 |
4a120f7da2f1d6ee270a44ffa009bb7e5f2605ba | 86,976 | py | Python | sphinxcontrib/confluencebuilder/translator/storage.py | sphinx-contrib/confluencebuilder | ef93320ead496a4e55458dd46a2a23669f62f17a | [
"BSD-2-Clause"
] | 158 | 2019-03-18T13:42:40.000Z | 2022-03-25T09:46:59.000Z | sphinxcontrib/confluencebuilder/translator/storage.py | sphinx-contrib/confluencebuilder | ef93320ead496a4e55458dd46a2a23669f62f17a | [
"BSD-2-Clause"
] | 192 | 2019-03-15T14:12:25.000Z | 2022-03-27T18:35:48.000Z | sphinxcontrib/confluencebuilder/translator/storage.py | sphinx-contrib/confluencebuilder | ef93320ead496a4e55458dd46a2a23669f62f17a | [
"BSD-2-Clause"
] | 54 | 2019-03-22T14:14:31.000Z | 2022-03-08T06:54:28.000Z | # -*- coding: utf-8 -*-
"""
:copyright: Copyright 2016-2020 Sphinx Confluence Builder Contributors (AUTHORS)
:copyright: Copyright 2018-2020 by the Sphinx team (sphinx-doc/sphinx#AUTHORS)
:license: BSD-2-Clause (LICENSE)
"""
from __future__ import unicode_literals
from docutils import nodes
from os import path
from sp... | 37.91456 | 83 | 0.596429 |
4a120fd6beccc7b72c2a16e9829834ad1dddbaff | 2,218 | py | Python | fetchy/utils.py | ThomasKluiters/fetchy | dfe1a73aa72cad4338445bec370be064707bff0c | [
"MIT"
] | 114 | 2019-07-20T19:27:34.000Z | 2022-03-11T16:49:22.000Z | fetchy/utils.py | ThomasKluiters/fetchy | dfe1a73aa72cad4338445bec370be064707bff0c | [
"MIT"
] | 49 | 2019-07-20T21:44:20.000Z | 2019-10-03T16:52:40.000Z | fetchy/utils.py | ThomasKluiters/fetchy | dfe1a73aa72cad4338445bec370be064707bff0c | [
"MIT"
] | 10 | 2019-07-26T21:26:32.000Z | 2022-02-25T08:43:31.000Z | import os
import gzip
import urllib
import distro
import shutil
import platform
import logging
import validators
from tqdm import tqdm
from pathlib import Path
logger = logging.getLogger(__name__)
_known_versions = {
"ubuntu": [
"devel",
"precise",
"cosmic",
"trusty",
"xen... | 21.960396 | 117 | 0.62083 |
4a121116fc9e145fd5a631f8b93b92a8c287a61a | 534 | py | Python | tests/test_openapierr.py | shyrwinsia/saxo_openapi | 8e5c1bf336654d059ea87ba2ff7e7aaef33d1262 | [
"MIT"
] | 52 | 2019-03-13T13:27:36.000Z | 2022-03-18T08:27:22.000Z | tests/test_openapierr.py | shyrwinsia/saxo_openapi | 8e5c1bf336654d059ea87ba2ff7e7aaef33d1262 | [
"MIT"
] | 15 | 2019-03-14T19:42:51.000Z | 2021-12-19T16:14:02.000Z | tests/test_openapierr.py | shyrwinsia/saxo_openapi | 8e5c1bf336654d059ea87ba2ff7e7aaef33d1262 | [
"MIT"
] | 23 | 2019-03-13T13:45:22.000Z | 2022-02-26T21:20:49.000Z | # -*- coding: utf-8 -*-
"""Tests for `saxo_openapi` package."""
from .unittestsetup import ReqMockTest
from saxo_openapi.exceptions import OpenAPIError
class TestSaxo_Exceptions(ReqMockTest):
"""Tests for exceptions."""
def setUp(self):
super(TestSaxo_Exceptions, self).setUp()
def test_openapi... | 25.428571 | 54 | 0.621723 |
4a1211654182603e43a3e149ba8c49c5aec61ca7 | 4,213 | py | Python | snappy_wrappers/wrappers/salmon/wrapper.py | PotatoThrone/snappy-pipeline | 31200eba84bff8e459e9e210d6d95e2984627f5c | [
"MIT"
] | 5 | 2021-02-26T10:39:56.000Z | 2021-12-23T07:53:26.000Z | snappy_wrappers/wrappers/salmon/wrapper.py | PotatoThrone/snappy-pipeline | 31200eba84bff8e459e9e210d6d95e2984627f5c | [
"MIT"
] | 93 | 2021-02-22T11:23:59.000Z | 2022-03-31T09:58:39.000Z | snappy_wrappers/wrappers/salmon/wrapper.py | PotatoThrone/snappy-pipeline | 31200eba84bff8e459e9e210d6d95e2984627f5c | [
"MIT"
] | 3 | 2021-02-22T11:44:59.000Z | 2021-06-21T19:33:53.000Z | # -*- coding: utf-8 -*-
"""CUBI+Snakemake wrapper code for STAR: Snakemake wrapper.py
"""
from snakemake import shell
__author__ = "Manuel Holtgrewe <manuel.holtgrewe@bihealth.de>"
shell.executable("/bin/bash")
# Input fastqs are passed through snakemake.params.
# snakemake.input is a .done file touched after linki... | 32.658915 | 102 | 0.694517 |
4a121258e732fad4dc75218ada4915b9079b0d56 | 24,148 | py | Python | defi/defi_tools.py | jko0401/defi | 812c827ac96c195df746284d2431674dd08f8f66 | [
"MIT"
] | null | null | null | defi/defi_tools.py | jko0401/defi | 812c827ac96c195df746284d2431674dd08f8f66 | [
"MIT"
] | null | null | null | defi/defi_tools.py | jko0401/defi | 812c827ac96c195df746284d2431674dd08f8f66 | [
"MIT"
] | null | null | null | """Tools for use in DeFi
"""
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import datetime, requests
from scipy import interpolate
import matplotlib.cm as cm
from matplotlib.gridspec import GridSpec
from pandas.plotting import register_matplotlib_converters
register_matplotlib_converters()
... | 35.881129 | 117 | 0.576984 |
4a12137c783bd7e75143bd4c541929054911094e | 1,329 | py | Python | grow/pods/document_cache.py | davidwtbuxton/grow | 3fcc201ec5802381a8273bd767450be755e1251b | [
"MIT"
] | 1 | 2019-01-25T17:00:42.000Z | 2019-01-25T17:00:42.000Z | grow/pods/document_cache.py | davidwtbuxton/grow | 3fcc201ec5802381a8273bd767450be755e1251b | [
"MIT"
] | null | null | null | grow/pods/document_cache.py | davidwtbuxton/grow | 3fcc201ec5802381a8273bd767450be755e1251b | [
"MIT"
] | 1 | 2019-04-23T19:38:19.000Z | 2019-04-23T19:38:19.000Z | """
Cache for storing and retrieving data specific to a document.
Supports caching specific to the pod_path of a document.
The contents of the cache should be raw and not internationalized as it will
be shared between locales with the same pod_path.
"""
class DocumentCache(object):
def __init__(self):
s... | 26.58 | 76 | 0.64936 |
4a12139d1e158d661f84279cc6cdffd4178edd86 | 4,011 | py | Python | vkwave/bots/core/dispatching/dp/dp.py | deleteduser0206/vkwave | 8e641bcdd9bec5c30818c82f34662fbd14053e88 | [
"MIT"
] | 222 | 2020-03-30T18:09:20.000Z | 2022-03-27T18:25:04.000Z | vkwave/bots/core/dispatching/dp/dp.py | deleteduser0206/vkwave | 8e641bcdd9bec5c30818c82f34662fbd14053e88 | [
"MIT"
] | 62 | 2020-03-30T18:31:25.000Z | 2021-12-21T17:00:44.000Z | vkwave/bots/core/dispatching/dp/dp.py | deleteduser0206/vkwave | 8e641bcdd9bec5c30818c82f34662fbd14053e88 | [
"MIT"
] | 91 | 2020-03-30T18:34:49.000Z | 2022-03-23T12:58:49.000Z | import logging
from typing import List, NewType, Optional, cast, Union
from vkwave.api.methods import API
from vkwave.api.token.token import AnyABCToken
from vkwave.bots.core.dispatching.events.base import BaseEvent, BotEvent, UserEvent
from vkwave.bots.core.dispatching.events.raw import ExtensionEvent
from vkwave.bot... | 41.350515 | 93 | 0.68711 |
4a1213ce6c39e923dbd6e1c456583adc00c56c39 | 12,988 | py | Python | zerver/tornado/socket.py | yakkl/yakkl | 89ecf4ee8998554a0634667067e16f428e4c480c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | zerver/tornado/socket.py | yakkl/yakkl | 89ecf4ee8998554a0634667067e16f428e4c480c | [
"ECL-2.0",
"Apache-2.0"
] | 4 | 2020-06-06T00:51:42.000Z | 2022-02-10T21:38:40.000Z | zerver/tornado/socket.py | yakkl/yakkl | 89ecf4ee8998554a0634667067e16f428e4c480c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # See https://yakkl.readthedocs.io/en/latest/subsystems/sending-messages.html#websockets
# for high-level documentation on this subsystem.
from typing import Any, Dict, Mapping, Optional, Union
from django.conf import settings
from django.utils.timezone import now as timezone_now
from django.utils.translation import ... | 46.056738 | 102 | 0.618032 |
4a1213f82d9716c937a88720a425630db61d1bf1 | 1,036 | py | Python | tutorials/tensorflow2/infeed_outfeed/test/test_mnist_with_feeds.py | LRVerkin/tutorials | 365757b0dee90f63a53851e40bfad790aca3cf8d | [
"MIT"
] | null | null | null | tutorials/tensorflow2/infeed_outfeed/test/test_mnist_with_feeds.py | LRVerkin/tutorials | 365757b0dee90f63a53851e40bfad790aca3cf8d | [
"MIT"
] | null | null | null | tutorials/tensorflow2/infeed_outfeed/test/test_mnist_with_feeds.py | LRVerkin/tutorials | 365757b0dee90f63a53851e40bfad790aca3cf8d | [
"MIT"
] | 1 | 2022-02-25T12:07:16.000Z | 2022-02-25T12:07:16.000Z | # Copyright (c) 2021 Graphcore Ltd. 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 ... | 33.419355 | 74 | 0.72973 |
4a121495a8d36ac0cf2d0ffd560bebbf467108dc | 644 | py | Python | reverse-string/rev-string.py | purveshpatel511/rust-integrated-python | ce4ba1dd23d8d7f7077b9e6a4b9a1989808a505b | [
"MIT"
] | null | null | null | reverse-string/rev-string.py | purveshpatel511/rust-integrated-python | ce4ba1dd23d8d7f7077b9e6a4b9a1989808a505b | [
"MIT"
] | null | null | null | reverse-string/rev-string.py | purveshpatel511/rust-integrated-python | ce4ba1dd23d8d7f7077b9e6a4b9a1989808a505b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2021-04-11 21:47:53
# @Author : Your Name (you@example.org)
# @Link : link
# @Version : 1.0.0
import os, string, random
import revstring # rust lib
def reverse_string_python(value):
return value[::-1]
# Benchmark Code
iters = 1000000
value = "".join(... | 25.76 | 74 | 0.726708 |
4a12156f05c7e4a1c705dfe7a6004e572d0fcd78 | 618 | py | Python | domino_conf.py | hashnfv/hashnfv-domino | eb2fbb1315e6489dd159c8227030d035bdeb1864 | [
"Apache-2.0"
] | null | null | null | domino_conf.py | hashnfv/hashnfv-domino | eb2fbb1315e6489dd159c8227030d035bdeb1864 | [
"Apache-2.0"
] | null | null | null | domino_conf.py | hashnfv/hashnfv-domino | eb2fbb1315e6489dd159c8227030d035bdeb1864 | [
"Apache-2.0"
] | null | null | null | logfile = None
LOGLEVEL = 'WARNING' #'WARNING' #ERROR, DEBUG, INFO
#Client Parameters
DOMINO_CLIENT_PORT = 9091
INTERACTIVE = 'FALSE'
CLIENT_SEQNO = 0
DOMINO_SERVER_IP = 'localhost'
DOMINO_CLI_PORT = 9100
UDID_DESIRED = '12345678123456781234567812345678'
LIST_SUPPORTED_TEMPLATES = ['tosca-nfv-v1.0']
DEFAULT_TOSCA_P... | 24.72 | 69 | 0.791262 |
4a1217e5a8c66f1f56a1b93d8b5df6473fee7bfb | 3,196 | py | Python | ext/Outros/moduloteste.py | brunoalmeidamartins/pox | 2c9f13ef53f7cf15c369d15ba4b1051036d74e00 | [
"Apache-2.0"
] | null | null | null | ext/Outros/moduloteste.py | brunoalmeidamartins/pox | 2c9f13ef53f7cf15c369d15ba4b1051036d74e00 | [
"Apache-2.0"
] | null | null | null | ext/Outros/moduloteste.py | brunoalmeidamartins/pox | 2c9f13ef53f7cf15c369d15ba4b1051036d74e00 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 James McCauley
#
# 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 writi... | 31.96 | 74 | 0.720901 |
4a1218950007dccab74e1f1e5b5ad32f1e76590a | 470 | py | Python | data/scripts/templates/object/draft_schematic/space/capacitor/shared_extended_life_battery_mk3.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/draft_schematic/space/capacitor/shared_extended_life_battery_mk3.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/draft_schematic/space/capacitor/shared_extended_life_battery_mk3.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Intangible()
result.template = "object/draft_schematic/space/capacitor/shared_extended_life_battery_mk3.iff"
resu... | 27.647059 | 96 | 0.738298 |
4a12196b72b7bee98747ed4d128c858fa624613d | 6,497 | py | Python | XFouth course/7th semester/Discrete modeling/lab6/main.py | tekcellat/University | 9a0196a45c9cf33ac58018d636c3e4857eba0330 | [
"MIT"
] | null | null | null | XFouth course/7th semester/Discrete modeling/lab6/main.py | tekcellat/University | 9a0196a45c9cf33ac58018d636c3e4857eba0330 | [
"MIT"
] | null | null | null | XFouth course/7th semester/Discrete modeling/lab6/main.py | tekcellat/University | 9a0196a45c9cf33ac58018d636c3e4857eba0330 | [
"MIT"
] | 7 | 2020-12-04T07:26:46.000Z | 2022-03-08T17:47:47.000Z | import sys
from PyQt5 import uic
from PyQt5.QtCore import pyqtSlot
from PyQt5.QtWidgets import QApplication, QWidget
from generator import ConstGenerator, UniformGenerator, nr
from modeller import RequestGenerator, RequestProcessor, event_based_modelling
class MainWindow(QWidget):
def __init__(self, parent=None... | 47.07971 | 97 | 0.567647 |
4a1219ee2b5e60e04a47677449f3160d4435b474 | 62,157 | py | Python | TimeWrapper_JE/venv/Lib/site-packages/pygments/lexers/_mapping.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | TimeWrapper_JE/venv/Lib/site-packages/pygments/lexers/_mapping.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | TimeWrapper_JE/venv/Lib/site-packages/pygments/lexers/_mapping.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | """
pygments.lexers._mapping
~~~~~~~~~~~~~~~~~~~~~~~~
Lexer mapping definitions. This file is generated by itself. Everytime
you change something on a builtin lexer definition, run this script from
the lexers folder to update it.
Do not alter the LEXERS dictionary by hand.
:copy... | 110.403197 | 352 | 0.572325 |
4a121a4d5b285c13c37d05cc2c85b8f37f9c84c9 | 4,351 | py | Python | python_modules/dagster/dagster_tests/core_tests/host_representation_tests/test_external_data.py | makotonium/dagster | f5d56514b7e7c5bca28ea14060316d242f51b71b | [
"Apache-2.0"
] | 4,606 | 2018-06-21T17:45:20.000Z | 2022-03-31T23:39:42.000Z | python_modules/dagster/dagster_tests/core_tests/host_representation_tests/test_external_data.py | makotonium/dagster | f5d56514b7e7c5bca28ea14060316d242f51b71b | [
"Apache-2.0"
] | 6,221 | 2018-06-12T04:36:01.000Z | 2022-03-31T21:43:05.000Z | python_modules/dagster/dagster_tests/core_tests/host_representation_tests/test_external_data.py | makotonium/dagster | f5d56514b7e7c5bca28ea14060316d242f51b71b | [
"Apache-2.0"
] | 619 | 2018-08-22T22:43:09.000Z | 2022-03-31T22:48:06.000Z | from typing import Dict
from dagster import AssetKey, In, Out, pipeline
from dagster.core.decorator_utils import get_function_params
from dagster.core.definitions.decorators.op import _Op
from dagster.core.host_representation.external_data import (
ExternalAssetDependency,
ExternalAssetNode,
ExternalSensor... | 26.530488 | 209 | 0.633188 |
4a121b361d3a0b6952d9d12cba5d2c22bf74226f | 16,190 | py | Python | egs/heroico/asr/simple_v1/ctc_train.py | johnjosephmorgan/snowfall | 604d789c0aed035626d6745e6d7a427168063cae | [
"Apache-2.0"
] | null | null | null | egs/heroico/asr/simple_v1/ctc_train.py | johnjosephmorgan/snowfall | 604d789c0aed035626d6745e6d7a427168063cae | [
"Apache-2.0"
] | null | null | null | egs/heroico/asr/simple_v1/ctc_train.py | johnjosephmorgan/snowfall | 604d789c0aed035626d6745e6d7a427168063cae | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2020 Xiaomi Corporation (authors: Daniel Povey, Haowen Qiu)
# Apache 2.0
import k2
import logging
import math
import numpy as np
import os
import sys
import torch
import torch.optim as optim
from datetime import datetime
from pathlib import Path
from torch.nn.utils import clip... | 40.576441 | 113 | 0.591044 |
4a121b4b8cf061919e3db4dbe358c35d25c05437 | 43 | py | Python | orkestra/exceptions.py | knowsuchagency/composer | b422ed4048b4d421e5100ea1770cbed37c4fb158 | [
"MIT"
] | 37 | 2021-05-24T22:34:59.000Z | 2022-02-22T04:47:06.000Z | orkestra/exceptions.py | knowsuchagency/composer | b422ed4048b4d421e5100ea1770cbed37c4fb158 | [
"MIT"
] | 21 | 2021-05-26T09:14:05.000Z | 2021-06-15T08:08:55.000Z | orkestra/exceptions.py | knowsuchagency/composer | b422ed4048b4d421e5100ea1770cbed37c4fb158 | [
"MIT"
] | 2 | 2021-06-22T09:51:39.000Z | 2022-01-28T20:00:30.000Z | class CompositionError(Exception):
...
| 14.333333 | 34 | 0.697674 |
4a121b6ea2717513f0dc4d6acf29b62b5f5d0099 | 30,405 | py | Python | tensorlayer/cost.py | IAmSuyogJadhav/tensorlayer | b9115e027f8a47f5b8c3c92ade30603560c5e987 | [
"Apache-2.0"
] | 7 | 2019-09-04T07:24:03.000Z | 2021-04-24T19:55:32.000Z | tensorlayer/cost.py | IAmSuyogJadhav/tensorlayer | b9115e027f8a47f5b8c3c92ade30603560c5e987 | [
"Apache-2.0"
] | null | null | null | tensorlayer/cost.py | IAmSuyogJadhav/tensorlayer | b9115e027f8a47f5b8c3c92ade30603560c5e987 | [
"Apache-2.0"
] | 1 | 2018-08-12T20:06:21.000Z | 2018-08-12T20:06:21.000Z | # -*- coding: utf-8 -*-
import logging
import tensorflow as tf
__all__ = [
'cross_entropy',
'sigmoid_cross_entropy',
'binary_cross_entropy',
'mean_squared_error',
'normalized_mean_square_error',
'absolute_difference_error',
'dice_coe',
'dice_hard_coe',
'iou_coe',
'cross_entrop... | 41.032389 | 273 | 0.63779 |
4a121b7646482586436886ba5d751ade670f1803 | 36,741 | py | Python | tests/client_test.py | trygveaa/matrix-nio | 8208a61674e383279c063225fd5512ecd02acce9 | [
"Apache-2.0"
] | null | null | null | tests/client_test.py | trygveaa/matrix-nio | 8208a61674e383279c063225fd5512ecd02acce9 | [
"Apache-2.0"
] | null | null | null | tests/client_test.py | trygveaa/matrix-nio | 8208a61674e383279c063225fd5512ecd02acce9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import json
from uuid import uuid4
import pytest
from helpers import FrameFactory, ephemeral, ephemeral_dir, faker
from nio import (Client, DeviceList, DeviceOneTimeKeyCount, DownloadResponse,
EncryptionError,
HttpClient, JoinedMembersResponse, KeysQueryRespon... | 31.673276 | 79 | 0.628508 |
4a121cc206cbe7548d1dbe678641d7b099413430 | 61,861 | py | Python | python/ccxt/async_support/qtrade.py | jspenc72/ccxt | 5eb43754ddb85aa24fb16860ce80d18790c288be | [
"MIT"
] | null | null | null | python/ccxt/async_support/qtrade.py | jspenc72/ccxt | 5eb43754ddb85aa24fb16860ce80d18790c288be | [
"MIT"
] | 1 | 2022-01-27T19:54:13.000Z | 2022-01-27T19:54:13.000Z | python/ccxt/async_support/qtrade.py | jspenc72/ccxt | 5eb43754ddb85aa24fb16860ce80d18790c288be | [
"MIT"
] | 1 | 2022-03-15T22:51:08.000Z | 2022-03-15T22:51:08.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
# -----------------------------------------------------------------------------
try... | 42.574673 | 279 | 0.441247 |
4a121cdb0570f7facfedecfc7d4d6953bdfdbdb1 | 156 | py | Python | pick_three/main.py | matthewdeanmartin/pick_three | 9551cf89c55974ec51eec1daeacad1a5e4c7d8c3 | [
"MIT"
] | null | null | null | pick_three/main.py | matthewdeanmartin/pick_three | 9551cf89c55974ec51eec1daeacad1a5e4c7d8c3 | [
"MIT"
] | 1 | 2018-11-09T10:16:39.000Z | 2018-11-09T10:16:39.000Z | pick_three/main.py | matthewdeanmartin/pick_three | 9551cf89c55974ec51eec1daeacad1a5e4c7d8c3 | [
"MIT"
] | null | null | null | # coding=utf-8
"""
What if you played pick 3 with friends?
"""
from pick_three.game import Game
if __name__ == "__main__":
game = Game()
game.go()
| 15.6 | 39 | 0.647436 |
4a121d4f24090a4b53db813974de78554b37aba5 | 5,937 | py | Python | examples/3_mnist_training.py | filemaster/aihwkit | 473eda8c3c89f49acdfc2da9bd03b27e22e13b1a | [
"Apache-2.0"
] | null | null | null | examples/3_mnist_training.py | filemaster/aihwkit | 473eda8c3c89f49acdfc2da9bd03b27e22e13b1a | [
"Apache-2.0"
] | null | null | null | examples/3_mnist_training.py | filemaster/aihwkit | 473eda8c3c89f49acdfc2da9bd03b27e22e13b1a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# (C) Copyright 2020 IBM. All Rights Reserved.
#
# 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 modifications or ... | 30.603093 | 81 | 0.667846 |
4a121fa97ebc11d836592ad1a12d2a636cf49291 | 10,358 | py | Python | adaptnlp/file_utils.py | DinaraN/adaptnlp | 71a83793965769cef5c7e478f82335a90faa024b | [
"Apache-2.0"
] | 5 | 2020-03-30T12:50:56.000Z | 2022-01-20T22:45:29.000Z | adaptnlp/file_utils.py | DinaraN/adaptnlp | 71a83793965769cef5c7e478f82335a90faa024b | [
"Apache-2.0"
] | 9 | 2020-11-13T18:41:44.000Z | 2022-02-10T01:58:28.000Z | adaptnlp/file_utils.py | DinaraN/adaptnlp | 71a83793965769cef5c7e478f82335a90faa024b | [
"Apache-2.0"
] | 1 | 2020-03-30T17:29:05.000Z | 2020-03-30T17:29:05.000Z | """
Utilities for working with the local dataset cache. Adapted from AllenNLP.
"""
import os
import logging
import shutil
import tempfile
import json
from urllib.parse import urlparse
from pathlib import Path
from typing import Optional, Tuple, Union, IO, Callable, Set
from hashlib import sha256
from functools import... | 33.198718 | 106 | 0.65476 |
4a12204dc6e24ec4a4105bca957c91ed0b72033f | 4,448 | py | Python | openstack_dashboard/api/trove.py | aristanetworks/horizon | 6b4ba5194d46360bf1a436b6f9531facfbf5084a | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/api/trove.py | aristanetworks/horizon | 6b4ba5194d46360bf1a436b6f9531facfbf5084a | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/api/trove.py | aristanetworks/horizon | 6b4ba5194d46360bf1a436b6f9531facfbf5084a | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Rackspace Hosting.
#
# 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... | 31.104895 | 78 | 0.716277 |
4a122081f0b79eea5dd7091b4381f27e406f9ef6 | 13,200 | py | Python | pdil/tool/fossil/rigging/dogFrontLeg.py | patcorwin/fossil | 8e471c5233e4a2d81dc66bd8e2a3d6387e71ef61 | [
"BSD-3-Clause"
] | 41 | 2017-04-24T09:43:24.000Z | 2021-10-06T04:11:43.000Z | pdil/tool/fossil/rigging/dogFrontLeg.py | patcorwin/fossil | 8e471c5233e4a2d81dc66bd8e2a3d6387e71ef61 | [
"BSD-3-Clause"
] | 22 | 2018-04-18T21:56:01.000Z | 2021-08-05T20:57:45.000Z | pdil/tool/fossil/rigging/dogFrontLeg.py | patcorwin/fossil | 8e471c5233e4a2d81dc66bd8e2a3d6387e71ef61 | [
"BSD-3-Clause"
] | 9 | 2017-04-24T09:43:27.000Z | 2021-05-14T05:38:33.000Z | '''
reload(pdil.tool.fossil.rigging.dogFrontLeg)
c = PyNode('asdf_card')
c.removeRig()
c.removeBones()
pdil.tool.fossil.main.RigTool.buildBones([c])
pdil.tool.fossil.main.RigTool.buildRig([c])
c.outputCenter.fk.IkSwitch.set(1)
c.outputCenter.ik.display.set(0)
pointConstraint('asdf02', 'locator5', mo=0)
pointConstraint(... | 35.869565 | 177 | 0.629848 |
4a12208acbdafa2247fc2a27452b0e54d30cb63a | 10,241 | py | Python | models/pytorch-image-models/timm/models/densenet.py | crutcher/stylelens | 8df3704f56fe6a30395eadcb1aee2e11563dfabb | [
"MIT"
] | null | null | null | models/pytorch-image-models/timm/models/densenet.py | crutcher/stylelens | 8df3704f56fe6a30395eadcb1aee2e11563dfabb | [
"MIT"
] | null | null | null | models/pytorch-image-models/timm/models/densenet.py | crutcher/stylelens | 8df3704f56fe6a30395eadcb1aee2e11563dfabb | [
"MIT"
] | null | null | null | """Pytorch Densenet implementation w/ tweaks
This file is a copy of https://github.com/pytorch/vision 'densenet.py' (BSD-3-Clause) with
fixed kwargs passthrough and addition of dynamic global avg/max pool.
"""
import re
from collections import OrderedDict
import torch
import torch.nn as nn
import torch.nn.functional a... | 31.903427 | 104 | 0.590567 |
4a1220a9db59bf1f46ea38fb93d43dec0d73818a | 1,591 | py | Python | test/cli/test_output.py | mnalband/schemathesis | 42b351589fae3f407a1de248750bc82d6b5796d1 | [
"MIT"
] | null | null | null | test/cli/test_output.py | mnalband/schemathesis | 42b351589fae3f407a1de248750bc82d6b5796d1 | [
"MIT"
] | null | null | null | test/cli/test_output.py | mnalband/schemathesis | 42b351589fae3f407a1de248750bc82d6b5796d1 | [
"MIT"
] | null | null | null | import pytest
from schemathesis import runner, utils
from schemathesis.cli import output
@pytest.mark.parametrize(
"title,separator,printed,expected",
[
("TEST", "-", "data in section", "------- TEST -------\ndata in section\n--------------------\n"),
("TEST", "*", "data in section", "*******... | 31.196078 | 106 | 0.577624 |
4a1220b1c14c945c19909758da855bb0085e78bc | 7,671 | py | Python | tests/integration-tests/benchmarks/common/metrics_reporter.py | Takuya-Miyazaki/aws-parallelcluster | ef3393fe6430f9a6232cf0368b1d3177f1304b82 | [
"Apache-2.0"
] | 1 | 2020-10-15T16:33:20.000Z | 2020-10-15T16:33:20.000Z | tests/integration-tests/benchmarks/common/metrics_reporter.py | QPC-database/aws-parallelcluster | 8c2e9595ca171340df21695c27d85dc00f19d3e4 | [
"Apache-2.0"
] | 109 | 2020-05-29T08:20:29.000Z | 2022-02-21T09:32:47.000Z | tests/integration-tests/benchmarks/common/metrics_reporter.py | demartinofra/aws-parallelcluster | 6f8e978b9ef2cea8855a80112b26b9968543a7e5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "LICENSE.txt" file acc... | 39.541237 | 119 | 0.626124 |
4a1221d1880b3c7718a059fe2b4c4cc207001c83 | 13,225 | py | Python | openquake.hazardlib/openquake/hazardlib/tests/acceptance/peer_test.py | rainzhop/ConvNetQuake | a3e6de3f7992eac72f1b9883fec36b8c7fdefd48 | [
"MIT"
] | null | null | null | openquake.hazardlib/openquake/hazardlib/tests/acceptance/peer_test.py | rainzhop/ConvNetQuake | a3e6de3f7992eac72f1b9883fec36b8c7fdefd48 | [
"MIT"
] | null | null | null | openquake.hazardlib/openquake/hazardlib/tests/acceptance/peer_test.py | rainzhop/ConvNetQuake | a3e6de3f7992eac72f1b9883fec36b8c7fdefd48 | [
"MIT"
] | null | null | null | # The Hazard Library
# Copyright (C) 2012-2016 GEM Foundation
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#... | 48.800738 | 97 | 0.644083 |
4a12223b6b6acb85c5fda2392783a963497b7090 | 21,439 | py | Python | NYUSH_solution_no_violation_hpc.py | AlisonYao/Stnet-Star-Shuttle-Opt | 9ac6235c7460ba87f0b4b8f07a0d5d06ae8e992a | [
"Apache-2.0"
] | null | null | null | NYUSH_solution_no_violation_hpc.py | AlisonYao/Stnet-Star-Shuttle-Opt | 9ac6235c7460ba87f0b4b8f07a0d5d06ae8e992a | [
"Apache-2.0"
] | null | null | null | NYUSH_solution_no_violation_hpc.py | AlisonYao/Stnet-Star-Shuttle-Opt | 9ac6235c7460ba87f0b4b8f07a0d5d06ae8e992a | [
"Apache-2.0"
] | null | null | null | """
Author: Yuhan Yao (yy2564@nyu.edu)
Date: Feb 5, 2022
I am having trouble getting a feasible solution. I have done more than 60 experiments, but still have not obtain a solution that doesn't violate any constraint.
Therefore, I made this version so that it only stops when there is a feasible solution.
WARINING: i... | 43.753061 | 280 | 0.629833 |
4a122243112af2d5f17197cf8c56d1844a74b986 | 5,314 | py | Python | imcsdk/mometa/storage/StorageSasExpander.py | vadimkuznetsov/imcsdk | ed038ce1dbc8031f99d2dfb3ccee3bf0b48309d8 | [
"Apache-2.0"
] | null | null | null | imcsdk/mometa/storage/StorageSasExpander.py | vadimkuznetsov/imcsdk | ed038ce1dbc8031f99d2dfb3ccee3bf0b48309d8 | [
"Apache-2.0"
] | null | null | null | imcsdk/mometa/storage/StorageSasExpander.py | vadimkuznetsov/imcsdk | ed038ce1dbc8031f99d2dfb3ccee3bf0b48309d8 | [
"Apache-2.0"
] | 1 | 2019-11-10T18:42:04.000Z | 2019-11-10T18:42:04.000Z | """This module contains the general information for StorageSasExpander ManagedObject."""
from ...imcmo import ManagedObject
from ...imccoremeta import MoPropertyMeta, MoMeta
from ...imcmeta import VersionMeta
class StorageSasExpanderConsts:
MIXED6_G12_GDRIVE_SUPPORT_DISABLED = "Disabled"
MIXED6_G12_GDRIVE_SU... | 55.354167 | 252 | 0.627776 |
4a1222db0b241ede92b654b3b73c7214eb33bc82 | 324 | py | Python | django_vue_chat/asgi.py | borisliu/django-vue-chat | 40ee07579ac55411965c06761000941e7e36f1dd | [
"MIT"
] | 1 | 2019-06-11T20:21:10.000Z | 2019-06-11T20:21:10.000Z | django_vue_chat/asgi.py | borisliu/django-vue-chat | 40ee07579ac55411965c06761000941e7e36f1dd | [
"MIT"
] | null | null | null | django_vue_chat/asgi.py | borisliu/django-vue-chat | 40ee07579ac55411965c06761000941e7e36f1dd | [
"MIT"
] | 2 | 2019-02-14T04:25:05.000Z | 2020-03-10T07:21:20.000Z | """
ASGI entrypoint. Configures Django and then runs the application
defined in the ASGI_APPLICATION setting.
"""
import os
import django
from channels.routing import get_default_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_vue_chat.settings")
django.setup()
application = get_default_applicatio... | 24.923077 | 75 | 0.824074 |
4a1222e2b22afb1bfb4d49dc2703d2199de37bfb | 3,943 | py | Python | nlp_architect/data/cdc_resources/data_types/wiki/wikipedia_pages.py | ikuyamada/nlp-architect | 2769bbf948b2509b4ac7dc287fddf907046bf283 | [
"Apache-2.0"
] | 1 | 2020-07-18T08:35:52.000Z | 2020-07-18T08:35:52.000Z | nlp_architect/data/cdc_resources/data_types/wiki/wikipedia_pages.py | SIVASHANKAR-S/nlp-architect | b9d7df0afde39b62b2c23e24211e368b82623abc | [
"Apache-2.0"
] | null | null | null | nlp_architect/data/cdc_resources/data_types/wiki/wikipedia_pages.py | SIVASHANKAR-S/nlp-architect | b9d7df0afde39b62b2c23e24211e368b82623abc | [
"Apache-2.0"
] | 1 | 2020-09-30T17:29:26.000Z | 2020-09-30T17:29:26.000Z | # ******************************************************************************
# Copyright 2017-2018 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apa... | 37.552381 | 84 | 0.62034 |
4a1222ff06136c6f4684620519857cb42d6e4c28 | 23,378 | py | Python | intersight/models/iam_session.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 21 | 2018-03-29T14:20:35.000Z | 2021-10-13T05:11:41.000Z | intersight/models/iam_session.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 14 | 2018-01-30T15:45:46.000Z | 2022-02-23T14:23:21.000Z | intersight/models/iam_session.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 18 | 2018-01-03T15:09:56.000Z | 2021-07-16T02:21:54.000Z | # coding: utf-8
"""
Cisco Intersight OpenAPI specification.
The Cisco Intersight OpenAPI specification.
OpenAPI spec version: 1.0.9-1461
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class IamSession(object... | 34.078717 | 738 | 0.645436 |
4a122330dc354757e3c6319dcf86a7a27b7abdde | 30,216 | py | Python | socialsent/evaluate_methods.py | olgasilyutina/socialsent | 8e7895db769aa4386d28301431de1819bee443bd | [
"Apache-2.0"
] | null | null | null | socialsent/evaluate_methods.py | olgasilyutina/socialsent | 8e7895db769aa4386d28301431de1819bee443bd | [
"Apache-2.0"
] | null | null | null | socialsent/evaluate_methods.py | olgasilyutina/socialsent | 8e7895db769aa4386d28301431de1819bee443bd | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python
from socialsent import constants
from socialsent import util
from socialsent import polarity_induction_methods
from socialsent import seeds
from socialsent import lexicons
import sys
import random
import numpy as np
import scipy as sp
from . import embedding_transformer
from operator import item... | 43.982533 | 142 | 0.65366 |
4a1223b15bf477a8bce670985366586d8e7839b1 | 6,158 | py | Python | mak/libs/ircc/ir_grammar/ir_metadata.py | motor-dev/Motor | 98cb099fe1c2d31e455ed868cc2a25eae51e79f0 | [
"BSD-3-Clause"
] | null | null | null | mak/libs/ircc/ir_grammar/ir_metadata.py | motor-dev/Motor | 98cb099fe1c2d31e455ed868cc2a25eae51e79f0 | [
"BSD-3-Clause"
] | null | null | null | mak/libs/ircc/ir_grammar/ir_metadata.py | motor-dev/Motor | 98cb099fe1c2d31e455ed868cc2a25eae51e79f0 | [
"BSD-3-Clause"
] | null | null | null | from ..ir_ast import IrTypeMetadata, IrMetadataDeclaration, IrMetadataString, IrMetadataInteger, IrMetadataLink, IrMetadataNode, IrSpecializedMetadata, IrMetadataNull, IrMetadataFlagList, IrReference
from motor_typing import TYPE_CHECKING
def p_ir_metadata_list_opt(p):
# type: (YaccProduction) -> None
"""
... | 25.983122 | 199 | 0.586229 |
4a12249aceeedaf5dbbff7116e066727dbc59b0c | 1,041 | py | Python | notes/30 - dictionaries/dictionaries_ex6.py | Drv4MC/ICS3-Python-Notes | 3614a5adfb4199bfc67dad8bbeb3bfee45401a5d | [
"MIT"
] | 3 | 2022-02-10T19:06:28.000Z | 2022-03-25T17:55:56.000Z | notes/30 - dictionaries/dictionaries_ex6.py | Drv4MC/ICS3-Python-Notes | 3614a5adfb4199bfc67dad8bbeb3bfee45401a5d | [
"MIT"
] | null | null | null | notes/30 - dictionaries/dictionaries_ex6.py | Drv4MC/ICS3-Python-Notes | 3614a5adfb4199bfc67dad8bbeb3bfee45401a5d | [
"MIT"
] | 17 | 2020-09-15T16:40:23.000Z | 2022-03-22T17:52:32.000Z | #-----------------------------------------------------------------------------
# Name: Dictionaries Example 6 - Ordering a List (kinda!)
# Purpose: And Example file demoing actors
#
# Author: Mr. Brooks
# Created: 11-Nov-2020
# Updated: 11-Nov-2020
#----------------------------------------------... | 43.375 | 105 | 0.602305 |
4a1225d9eb23f5a4d58962bf35d8fbb9d39b0496 | 28,061 | py | Python | python/resnetMultiLabel.py | cdaube/sharedFunctionalFeatures | 3b7e8b17973a7fef195626a34bed54517cfd3915 | [
"MIT"
] | 1 | 2021-11-18T18:13:39.000Z | 2021-11-18T18:13:39.000Z | python/resnetMultiLabel.py | cdaube/sharedFunctionalFeatures | 3b7e8b17973a7fef195626a34bed54517cfd3915 | [
"MIT"
] | null | null | null | python/resnetMultiLabel.py | cdaube/sharedFunctionalFeatures | 3b7e8b17973a7fef195626a34bed54517cfd3915 | [
"MIT"
] | null | null | null |
from __future__ import print_function
from __future__ import absolute_import
import warnings
from keras.layers import merge, Input, Add
from keras.layers import Dense, Activation, Flatten
from keras.layers import Convolution2D, MaxPooling2D, ZeroPadding2D, AveragePooling2D
from keras.layers import BatchNormalization... | 36.585398 | 140 | 0.606928 |
4a1226f632a9a6a63b4b9963deadb5a7fc554b3a | 23,426 | py | Python | model_raisim/DRMPC/SaTiZ_3D/test.py | Stylite-Y/XArm-Simulation | 654dca390e635b6294a8b5066727d0f4d6736eb1 | [
"MIT"
] | null | null | null | model_raisim/DRMPC/SaTiZ_3D/test.py | Stylite-Y/XArm-Simulation | 654dca390e635b6294a8b5066727d0f4d6736eb1 | [
"MIT"
] | null | null | null | model_raisim/DRMPC/SaTiZ_3D/test.py | Stylite-Y/XArm-Simulation | 654dca390e635b6294a8b5066727d0f4d6736eb1 | [
"MIT"
] | null | null | null | import numpy as np
import sys
import do_mpc
from casadi import * # symbolic library CasADi
import datetime
import raisimpy as raisim
import yaml
import time
from mpl_toolkits.mplot3d import axes3d
def tanh_sig(x):
return 0.5 + 0.5 * np.tanh(1000 * x)
import matplotlib.pyplot as plt
import matplotlib as mpl
from ... | 90.1 | 9,407 | 0.184453 |
4a1226fbd3990bfc48162d9a66056be0be4f8cf1 | 1,043 | py | Python | python/company/lex_sort.py | hs634/algorithms | e411d747eb27a1c784605e44111de2703f6dde4d | [
"MIT"
] | null | null | null | python/company/lex_sort.py | hs634/algorithms | e411d747eb27a1c784605e44111de2703f6dde4d | [
"MIT"
] | null | null | null | python/company/lex_sort.py | hs634/algorithms | e411d747eb27a1c784605e44111de2703f6dde4d | [
"MIT"
] | null | null | null | __author__ = 'hs634'
class LexSort():
def __init__(self, arr, order):
self.arr = arr
self.order = order
def _custom_cmp(self, a, b):
p1 = 0
p2 = 0
for i in range(min(len(a), len(b))):
if p1 != p2:
break
p1 = self.order.index(a[i]... | 22.673913 | 53 | 0.478428 |
4a122727675c6be850e2755b637f46f65ee8bff7 | 6,519 | py | Python | dso/dso/run.py | brendenpetersen/deep-symbolic-optimization | 8724839dab910022e24d03debdf564236683474b | [
"BSD-3-Clause"
] | 134 | 2021-07-06T06:14:02.000Z | 2022-03-31T18:24:08.000Z | dso/dso/run.py | brendenpetersen/deep-symbolic-optimization | 8724839dab910022e24d03debdf564236683474b | [
"BSD-3-Clause"
] | 15 | 2021-06-10T17:03:09.000Z | 2022-01-21T20:15:35.000Z | dso/dso/run.py | brendenpetersen/deep-symbolic-optimization | 8724839dab910022e24d03debdf564236683474b | [
"BSD-3-Clause"
] | 44 | 2021-06-26T19:11:28.000Z | 2022-03-25T04:07:41.000Z | """Parallelized, single-point launch script to run DSO on a set of benchmarks."""
import os
import sys
import time
import multiprocessing
from copy import deepcopy
from datetime import datetime
import click
from dso import DeepSymbolicOptimizer
from dso.logeval import LogEval
from dso.config import load_config
from ... | 41.522293 | 142 | 0.625863 |
4a1227824ccd4dc72c824ada305a27088714fec8 | 799 | py | Python | cron_validator/scheduler.py | skyxie/cron-validator | a61bb3113aed92b7da960015f81ac78a7187b48f | [
"MIT"
] | null | null | null | cron_validator/scheduler.py | skyxie/cron-validator | a61bb3113aed92b7da960015f81ac78a7187b48f | [
"MIT"
] | null | null | null | cron_validator/scheduler.py | skyxie/cron-validator | a61bb3113aed92b7da960015f81ac78a7187b48f | [
"MIT"
] | null | null | null | import datetime
from cron_validator.validator import CronValidator
class CronScheduler(CronValidator):
def __init__(self, expression):
super().__init__()
self.gen = self.get_execution_time(expression, None, None)
self.next_execution_time = next(self.gen)
def time_for_execution(self):... | 31.96 | 109 | 0.717146 |
4a12280b74f4f6413e75e47d037197855f20335d | 3,410 | py | Python | ITP1/ITP1_11_B.py | yu8ikmnbgt6y/MyAOJ | 474b21a2a0c25e1c1f3d6d66d2a2ea52aecaa39b | [
"Unlicense"
] | 1 | 2020-01-08T16:33:46.000Z | 2020-01-08T16:33:46.000Z | ITP1/ITP1_11_B.py | yu8ikmnbgt6y/MyAOJ | 474b21a2a0c25e1c1f3d6d66d2a2ea52aecaa39b | [
"Unlicense"
] | null | null | null | ITP1/ITP1_11_B.py | yu8ikmnbgt6y/MyAOJ | 474b21a2a0c25e1c1f3d6d66d2a2ea52aecaa39b | [
"Unlicense"
] | null | null | null | import sys
import io
import time
import pprint
input_txt = """
1 2 3 4 5 6
3
6 5
1 3
3 2
"""
sys.stdin = io.StringIO(input_txt);input()
#sys.stdin = open('ITP2_1_C_in9.test')
#sys.stdout = open('out.test','w')
start = time.time()
# copy the below part and paste to the submission form.
# ---------fun... | 31 | 123 | 0.531965 |
4a122833371f0fc65abeee644d4c1e87ea187370 | 11,314 | py | Python | tests/test_interface.py | alliedtelesis/py-networking | 6c5d4bdafabfb4feef235a02344432e1f0336e48 | [
"Apache-2.0"
] | 4 | 2015-04-24T20:36:56.000Z | 2021-05-03T20:21:54.000Z | tests/test_interface.py | alliedtelesis/py-networking | 6c5d4bdafabfb4feef235a02344432e1f0336e48 | [
"Apache-2.0"
] | 1 | 2019-07-14T07:07:21.000Z | 2019-07-14T07:07:21.000Z | tests/test_interface.py | alliedtelesis/py-networking | 6c5d4bdafabfb4feef235a02344432e1f0336e48 | [
"Apache-2.0"
] | 3 | 2015-04-24T20:37:04.000Z | 2017-03-02T15:14:46.000Z | # -*- coding: utf-8 -*-
import pytest
from pynetworking.Device import Device
from jinja2 import Template
show_interface_template = Template("""
Interface {{ interface }}
Scope: both
Link is {{ link }}, administrative state is {{ state }}
Thrash-limiting
Status Not Detected, Action learn-disable, Timeout 1(s... | 39.421603 | 157 | 0.607654 |
4a1228c4a01f90dd7e37db178d18e7d835ad1dda | 2,174 | py | Python | three-column/load.py | hansonrobotics/hr-solr | 568289aafe70f7f3091aa72ee6d2ddcce7a9dcc5 | [
"BSD-3-Clause"
] | 3 | 2018-03-17T21:33:57.000Z | 2021-12-13T07:03:27.000Z | three-column/load.py | hansonrobotics/hr-solr | 568289aafe70f7f3091aa72ee6d2ddcce7a9dcc5 | [
"BSD-3-Clause"
] | 3 | 2018-09-06T18:40:18.000Z | 2019-01-15T20:37:10.000Z | three-column/load.py | hansonrobotics/hr-solr | 568289aafe70f7f3091aa72ee6d2ddcce7a9dcc5 | [
"BSD-3-Clause"
] | 7 | 2016-03-12T01:33:04.000Z | 2021-10-15T06:29:25.000Z | # Copyright (c) 2016 Hanson Robotics, Ltd.
from sys import argv
import csv
import http.client, urllib.parse
import re, string
import hashlib
import unicodedata
import io
#pattern = re.compile('[\W_]+')
script, conv = argv
conn = http.client.HTTPConnection('localhost', 8983)
# Utility function to update SOLR
def up... | 28.986667 | 79 | 0.619135 |
4a1229256f0751149b70aa31104d0129a68fbaad | 1,545 | py | Python | setup.py | Vamporelol/pydoro | d6be687ec3e5ef9839ece4bcd5b576aadfc03532 | [
"MIT"
] | 403 | 2019-06-15T08:33:22.000Z | 2022-03-30T12:04:17.000Z | setup.py | Vamporelol/pydoro | d6be687ec3e5ef9839ece4bcd5b576aadfc03532 | [
"MIT"
] | 142 | 2019-06-17T19:49:16.000Z | 2022-02-11T19:01:12.000Z | setup.py | Vamporelol/pydoro | d6be687ec3e5ef9839ece4bcd5b576aadfc03532 | [
"MIT"
] | 56 | 2019-06-15T09:20:58.000Z | 2022-03-13T18:33:36.000Z | from codecs import open
from inspect import getsource
from os.path import abspath, dirname, join
from setuptools import setup, find_packages
here = abspath(dirname(getsource(lambda: 0)))
with open(join(here, "README.rst"), encoding="utf-8") as f:
long_description = f.read()
setup(
name="pydoro",
version... | 33.586957 | 83 | 0.636246 |
4a122a2c11c5fe77a5a9b1f33fd1a672866d72d1 | 1,528 | py | Python | test/matrix/test_matrix.py | bedlaj/BitSwanPump | 5fb9f31d0aec0ff6d32c97a45c6a53abd41ab2cf | [
"BSD-3-Clause"
] | null | null | null | test/matrix/test_matrix.py | bedlaj/BitSwanPump | 5fb9f31d0aec0ff6d32c97a45c6a53abd41ab2cf | [
"BSD-3-Clause"
] | null | null | null | test/matrix/test_matrix.py | bedlaj/BitSwanPump | 5fb9f31d0aec0ff6d32c97a45c6a53abd41ab2cf | [
"BSD-3-Clause"
] | null | null | null | import unittest
import time
import bspump
import bspump.matrix
import bspump.unittest
class TestMatrix(bspump.unittest.TestCase):
def test_matrix(self):
matrix = bspump.Matrix(
app = self.App,
dtype = [
('f1', 'i8'),
('f2', 'i8'),
('f3', 'i8'),
]
)
for i in range(100):
n = matrix.add_... | 17.976471 | 53 | 0.626963 |
4a122d176ac717b6367bceef485869e7330a49a6 | 315 | py | Python | flask/app/views.py | joedots1/dots-app | 035a2239666edcd646d4d08c2ef944b3d52018c6 | [
"MIT"
] | null | null | null | flask/app/views.py | joedots1/dots-app | 035a2239666edcd646d4d08c2ef944b3d52018c6 | [
"MIT"
] | null | null | null | flask/app/views.py | joedots1/dots-app | 035a2239666edcd646d4d08c2ef944b3d52018c6 | [
"MIT"
] | null | null | null | from flask import render_template
from app import app
import os
@app.route("/")
def index():
app_name = os.getenv("APP_NAME")
if app_name:
return f"Hello from {app_name} running in Docker"
return "hello from flask!"
@app.route("/home")
def home():
return render_template('index.html') | 18.529412 | 57 | 0.673016 |
4a122e08ef79a4e33c0869fd2c7b8d6fd3c63de7 | 1,729 | py | Python | src/python/pants/engine/internals/options_parsing.py | silverguo/pants | 141510d03fbf2b7e1a0b54f66b54088697f6fa51 | [
"Apache-2.0"
] | null | null | null | src/python/pants/engine/internals/options_parsing.py | silverguo/pants | 141510d03fbf2b7e1a0b54f66b54088697f6fa51 | [
"Apache-2.0"
] | null | null | null | src/python/pants/engine/internals/options_parsing.py | silverguo/pants | 141510d03fbf2b7e1a0b54f66b54088697f6fa51 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from dataclasses import dataclass
from pants.engine.rules import RootRule, rule, subsystem_rule
from pants.init.options_initializer import BuildConfigInitializer, OptionsInitializer
from ... | 32.622642 | 102 | 0.770388 |
4a122f8a431fb9fb51800895f46f14c18314470a | 250 | py | Python | testapps/PY/doctor.py | EyelynSu/pinpoint-c-agent | 35cab594fe69c8de3ddb13625590d76a75bf8381 | [
"Apache-2.0"
] | 44 | 2020-10-27T07:15:50.000Z | 2022-03-26T13:37:23.000Z | testapps/PY/doctor.py | EyelynSu/pinpoint-c-agent | 35cab594fe69c8de3ddb13625590d76a75bf8381 | [
"Apache-2.0"
] | 120 | 2020-10-19T17:33:24.000Z | 2022-03-23T06:31:14.000Z | testapps/PY/doctor.py | EyelynSu/pinpoint-c-agent | 35cab594fe69c8de3ddb13625590d76a75bf8381 | [
"Apache-2.0"
] | 23 | 2020-10-22T06:47:40.000Z | 2022-03-17T08:15:09.000Z | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from person import Person
from pinpoint.common import PinpointCommonPlugin
class Doctor(Person):
@PinpointCommonPlugin("Doctor"+ __name__)
def other(self):
return "Doctor not eating!"
| 19.230769 | 48 | 0.7 |
4a12310d8c672cdf4c75faa10b25e32aafa72551 | 3,744 | py | Python | dpfinder/logging/logger.py | barryZZJ/dp-finder | ddf8e3589110b4b35920b437d605b45dd56291da | [
"MIT"
] | null | null | null | dpfinder/logging/logger.py | barryZZJ/dp-finder | ddf8e3589110b4b35920b437d605b45dd56291da | [
"MIT"
] | null | null | null | dpfinder/logging/logger.py | barryZZJ/dp-finder | ddf8e3589110b4b35920b437d605b45dd56291da | [
"MIT"
] | null | null | null | # ==BEGIN LICENSE==
#
# MIT License
#
# Copyright (c) 2018 SRI Lab, ETH Zurich
#
# 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 right... | 24 | 97 | 0.676816 |
4a1233387a672c29427acf6d181679b3c92cc82c | 583 | py | Python | pinakes/main/catalog/exceptions.py | Alex-Izquierdo/pinakes | dfeb855662b47d29a6e976e87fd7c090a262cf3f | [
"Apache-2.0"
] | 2 | 2022-03-17T18:53:58.000Z | 2022-03-17T22:04:22.000Z | pinakes/main/catalog/exceptions.py | Alex-Izquierdo/pinakes | dfeb855662b47d29a6e976e87fd7c090a262cf3f | [
"Apache-2.0"
] | 9 | 2022-03-18T08:22:57.000Z | 2022-03-30T17:14:49.000Z | pinakes/main/catalog/exceptions.py | Alex-Izquierdo/pinakes | dfeb855662b47d29a6e976e87fd7c090a262cf3f | [
"Apache-2.0"
] | 7 | 2022-03-17T22:03:08.000Z | 2022-03-28T21:28:34.000Z | """Application specific exception classes"""
from rest_framework import exceptions, status
from django.utils.translation import gettext_lazy as _
class BadParamsException(exceptions.APIException):
status_code = status.HTTP_400_BAD_REQUEST
default_detail = _("Bad query parameters")
class InvalidSurveyExcepti... | 30.684211 | 54 | 0.802744 |
4a1233b5af633d53b4a53ffaa0c7873cb436baba | 853 | py | Python | examples/optimization_techniques/decision_tree_optimization.py | stjordanis/Hyperactive | 5acf247d8023ff6761593b9d0954bdd912d20aed | [
"MIT"
] | 382 | 2019-07-16T13:30:15.000Z | 2022-03-30T22:29:07.000Z | examples/optimization_techniques/decision_tree_optimization.py | stjordanis/Hyperactive | 5acf247d8023ff6761593b9d0954bdd912d20aed | [
"MIT"
] | 46 | 2019-08-27T18:07:47.000Z | 2022-03-16T16:28:10.000Z | examples/optimization_techniques/decision_tree_optimization.py | stjordanis/Hyperactive | 5acf247d8023ff6761593b9d0954bdd912d20aed | [
"MIT"
] | 35 | 2019-08-03T00:51:09.000Z | 2021-12-03T19:06:07.000Z | from sklearn.datasets import load_iris
from sklearn.neighbors import KNeighborsClassifier
from sklearn.model_selection import cross_val_score
from hyperactive import Hyperactive, DecisionTreeOptimizer
data = load_iris()
X, y = data.data, data.target
def model(opt):
knr = KNeighborsClassifier(n_neighbors=opt["n_... | 21.871795 | 70 | 0.751465 |
4a12341fef016142bf30ced94ae41aad9413a72b | 24,786 | py | Python | lib/MotifUtils/MotifUtilsServer.py | arwyer/MotifUtils | 6568303b0894e44fa6fd7cc0de1022a9c4356555 | [
"MIT"
] | 1 | 2019-07-20T05:53:21.000Z | 2019-07-20T05:53:21.000Z | lib/MotifUtils/MotifUtilsServer.py | man4ish/MotifUtils | 96ab9d99588a46ffe786c735fd74e1c51801762a | [
"MIT"
] | null | null | null | lib/MotifUtils/MotifUtilsServer.py | man4ish/MotifUtils | 96ab9d99588a46ffe786c735fd74e1c51801762a | [
"MIT"
] | 1 | 2019-05-22T16:35:41.000Z | 2019-05-22T16:35:41.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import json
import os
import random as _random
import sys
import traceback
from getopt import getopt, GetoptError
from multiprocessing import Process
from os import environ
from wsgiref.simple_server import make_server
import requests as _requests
from json... | 37.668693 | 151 | 0.544582 |
4a12347d295e709625414c361c887e3ab7b7f36f | 31 | py | Python | First Course/Week 3/Car fueling/tempCodeRunnerFile.py | Adarsh-Saurabh/Coursera--CoC-San-Diago-Data-Structures | a2488965199cb105db2e381280de00627e154a23 | [
"Apache-2.0"
] | 2 | 2021-09-18T08:25:59.000Z | 2021-09-24T11:41:37.000Z | First Course/Week 3/Car fueling/tempCodeRunnerFile.py | Adarsh-Saurabh/Coursera--CoC-San-Diago-Data-Structures | a2488965199cb105db2e381280de00627e154a23 | [
"Apache-2.0"
] | null | null | null | First Course/Week 3/Car fueling/tempCodeRunnerFile.py | Adarsh-Saurabh/Coursera--CoC-San-Diago-Data-Structures | a2488965199cb105db2e381280de00627e154a23 | [
"Apache-2.0"
] | null | null | null | i-1]:
# refill -= 1 | 15.5 | 25 | 0.290323 |
4a12363294fe4e1d349511ca16d467dd3dbcc15d | 47,746 | py | Python | MultiClient.py | jmabry0163/MultiWorld-Utilities | 130d11c11e2ffab07a7e2a8982bde078d92086c4 | [
"MIT"
] | null | null | null | MultiClient.py | jmabry0163/MultiWorld-Utilities | 130d11c11e2ffab07a7e2a8982bde078d92086c4 | [
"MIT"
] | null | null | null | MultiClient.py | jmabry0163/MultiWorld-Utilities | 130d11c11e2ffab07a7e2a8982bde078d92086c4 | [
"MIT"
] | null | null | null | import argparse
import asyncio
import json
import logging
import urllib.parse
import atexit
from Utils import get_item_name_from_id, get_location_name_from_address, ReceivedItem
exit_func = atexit.register(input, "Press enter to close.")
import ModuleUpdate
ModuleUpdate.update()
import colorama
import websockets
i... | 44.539179 | 158 | 0.567105 |
4a12368c1adcb4426ca2ec30c6e19733fa328fe0 | 1,182 | py | Python | jplib/mouse/mouse.py | jabbalaci/jabbapylib3 | ddc8fe88b89c4379254183b9a7c1405574a3a262 | [
"MIT"
] | 6 | 2017-03-31T16:58:52.000Z | 2019-05-11T20:12:07.000Z | jplib/mouse/mouse.py | jabbalaci/jabbapylib3 | ddc8fe88b89c4379254183b9a7c1405574a3a262 | [
"MIT"
] | null | null | null | jplib/mouse/mouse.py | jabbalaci/jabbapylib3 | ddc8fe88b89c4379254183b9a7c1405574a3a262 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Mouse actions.
What we need is:
* move the mouse pointer to a given position
* perform a simple left click
# from jplib.mouse import mouse
"""
import time
import autopy3 as ap
from autopy3.mouse import LEFT_BUTTON
#def left_down():
# ap.mouse.toggle(True, LEFT_BUTTON)
# time.slee... | 16.885714 | 77 | 0.586294 |
4a1236979572a179e90b8e1f1bff1532e650c172 | 3,843 | py | Python | sdk/python/pulumi_azure_nextgen/web/v20190801/list_web_app_azure_storage_accounts_slot.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/web/v20190801/list_web_app_azure_storage_accounts_slot.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/web/v20190801/list_web_app_azure_storage_accounts_slot.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... | 35.583333 | 174 | 0.652095 |
4a1236fce096948079417273c5401b0395888371 | 2,824 | py | Python | src/typing_inspect_lib/core/get_typing.py | Peilonrayz/typing_inspect_lib | a94cc2be6b677edb1fa40f12c36f531bc4bef87f | [
"MIT"
] | 7 | 2019-03-07T01:01:24.000Z | 2019-07-24T18:26:36.000Z | src/typing_inspect_lib/core/get_typing.py | Peilonrayz/typing_inspect_lib | a94cc2be6b677edb1fa40f12c36f531bc4bef87f | [
"MIT"
] | null | null | null | src/typing_inspect_lib/core/get_typing.py | Peilonrayz/typing_inspect_lib | a94cc2be6b677edb1fa40f12c36f531bc4bef87f | [
"MIT"
] | null | null | null | import types
import typing
from .get_origins import _get_last_origin
from .helpers import (
LITERAL_TYPES, PY_OLD, TYPING_OBJECTS, get_special_wrapped,
safe_dict_get, safe_dict_get_both, typing_,
)
if PY_OLD:
def _get_typing(type_):
"""
Returns the typing type and class type of a wrapped ... | 32.090909 | 83 | 0.671388 |
4a1237db0ec97960089e3c1ab6c6235ce4326d06 | 15,388 | py | Python | sdc11073/pysoap/soapclient.py | deichmab-draeger/sdc11073-1 | 2cbd4daaa32dc8a52723ecb8209f39a7d19b3c1b | [
"MIT"
] | 18 | 2020-07-19T19:38:15.000Z | 2022-03-21T11:51:04.000Z | sdc11073/pysoap/soapclient.py | deichmab-draeger/sdc11073-1 | 2cbd4daaa32dc8a52723ecb8209f39a7d19b3c1b | [
"MIT"
] | 10 | 2020-09-25T12:00:36.000Z | 2021-11-26T10:49:29.000Z | sdc11073/pysoap/soapclient.py | deichmab-draeger/sdc11073-1 | 2cbd4daaa32dc8a52723ecb8209f39a7d19b3c1b | [
"MIT"
] | 10 | 2020-08-31T17:44:51.000Z | 2021-07-13T12:58:18.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Pythonic simple SOAP Client implementation
Using lxml based SoapEnvelope."""
import sys
import traceback
from threading import Lock
import socket
import time
import http.client as httplib
from lxml.etree import XMLSyntaxError
from .. import observableproperties
... | 46.489426 | 161 | 0.599883 |
4a12381dfd5aa39359c827f9caa3376ed41479d9 | 1,141 | py | Python | app/main/models/payments.py | mukul-mehta/Syphus | 572d47b6b8dcdd13bd3a956b2a116a8fa3641087 | [
"MIT"
] | 4 | 2019-08-15T02:12:52.000Z | 2020-01-05T17:48:46.000Z | app/main/models/payments.py | mukul-mehta/Syphus | 572d47b6b8dcdd13bd3a956b2a116a8fa3641087 | [
"MIT"
] | 74 | 2019-08-14T20:34:33.000Z | 2020-04-29T20:29:38.000Z | app/main/models/payments.py | mukul-mehta/Syphus | 572d47b6b8dcdd13bd3a956b2a116a8fa3641087 | [
"MIT"
] | 10 | 2019-08-14T19:35:14.000Z | 2020-01-25T19:04:57.000Z | """DB model for payments"""
from flask import current_app
from app.main import db
from app.main.util.sendgrid import async_send_mail
class Payment(db.Model):
"""
Description of Payment Model.
Rows
-----------
:id: int [pk]
:username: varchar [ref: > users.username, not null]
:amount: flo... | 27.829268 | 69 | 0.614373 |
4a12387a45c5e7eeeb4f29aebb955c6e28cd6c05 | 11,965 | py | Python | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/config/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 64 | 2016-10-20T15:47:18.000Z | 2021-11-11T11:57:32.000Z | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/config/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 126 | 2016-10-05T10:36:14.000Z | 2019-05-15T08:43:23.000Z | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/config/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 63 | 2016-11-07T15:23:08.000Z | 2021-09-22T14:41:16.000Z | # -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | 37.984127 | 369 | 0.60443 |
4a1238e40bcb0b52dafd53062e8f06e14ca5e577 | 830 | py | Python | update_secrets.py | fmaj7/tennis-tracker | 998cfab411f40fb05398759d42fdb73f8f2a2a15 | [
"MIT"
] | null | null | null | update_secrets.py | fmaj7/tennis-tracker | 998cfab411f40fb05398759d42fdb73f8f2a2a15 | [
"MIT"
] | 1 | 2017-04-23T20:26:22.000Z | 2017-04-23T20:26:22.000Z | update_secrets.py | fmaj7/tennis-button | 998cfab411f40fb05398759d42fdb73f8f2a2a15 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import boto3
import json
bucket = boto3.resource('s3').Bucket('fmaj7-tennis-button')
secret_key = 'poppyseed.json'
def get_secrets():
for obj in bucket.objects.all():
if secret_key == obj.key:
return json.loads(obj.get()['Body'].read())
if __name__ == '__main__':
se... | 29.642857 | 103 | 0.640964 |
4a1238ed31f34943ed052be149f01948f2ac714f | 3,404 | py | Python | models/migrations/0005_auto_20200410_2229.py | netvigator/auctions | f88bcce800b60083a5d1a6f272c51bb540b8342a | [
"MIT"
] | null | null | null | models/migrations/0005_auto_20200410_2229.py | netvigator/auctions | f88bcce800b60083a5d1a6f272c51bb540b8342a | [
"MIT"
] | 13 | 2019-12-12T03:07:55.000Z | 2022-03-07T12:59:27.000Z | models/migrations/0005_auto_20200410_2229.py | netvigator/auctions | f88bcce800b60083a5d1a6f272c51bb540b8342a | [
"MIT"
] | null | null | null | # Generated by Django 2.2.10 on 2020-04-10 22:29
import core.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('models', '0004_auto_20191226_2118'),
]
operations = [
migrations.AlterField(
model_name='model',
... | 97.257143 | 741 | 0.665687 |
4a123cfa86cafb5af022aebe9b3cc497d1050c5c | 269 | py | Python | bionic/utils/gcp_auth.py | IDl0T/bionic | 8eaa868a2e7af81bb561492c045feb414f7c6326 | [
"Apache-2.0"
] | 98 | 2019-08-29T21:38:44.000Z | 2022-01-26T04:59:57.000Z | bionic/utils/gcp_auth.py | IDl0T/bionic | 8eaa868a2e7af81bb561492c045feb414f7c6326 | [
"Apache-2.0"
] | 143 | 2019-09-11T15:32:17.000Z | 2021-06-08T21:48:30.000Z | bionic/utils/gcp_auth.py | IDl0T/bionic | 8eaa868a2e7af81bb561492c045feb414f7c6326 | [
"Apache-2.0"
] | 20 | 2019-09-13T18:13:03.000Z | 2021-12-03T19:51:01.000Z | from bionic.deps.optdep import import_optional_dependency
def get_gcp_project_id():
google_auth = import_optional_dependency(
"google.auth", purpose="Get GCP project id from the environment"
)
_, project = google_auth.default()
return project
| 26.9 | 72 | 0.739777 |
4a123d11c2643e84702f5c07aef29fd95288035b | 12,571 | py | Python | classifier/preprocess_MS_dataset_for_classifier.py | googleinterns/smart-content-summary | 595c8e2cb0e160a87cacb954a2a030953fdce6c5 | [
"Apache-2.0"
] | 5 | 2020-05-25T23:27:42.000Z | 2022-01-15T08:57:47.000Z | classifier/preprocess_MS_dataset_for_classifier.py | googleinterns/smart-content-summary | 595c8e2cb0e160a87cacb954a2a030953fdce6c5 | [
"Apache-2.0"
] | 6 | 2020-11-13T18:56:37.000Z | 2022-02-10T02:13:31.000Z | classifier/preprocess_MS_dataset_for_classifier.py | googleinterns/smart-content-summary | 595c8e2cb0e160a87cacb954a2a030953fdce6c5 | [
"Apache-2.0"
] | 2 | 2020-09-02T08:06:18.000Z | 2021-10-31T16:56:16.000Z | # 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 39.284375 | 120 | 0.718081 |
4a123d45326de64c3bceeec79e38d3beb6c3b4b7 | 5,651 | py | Python | bg_biz/pay/weixinpay.py | sluggard6/bgirl | 3c9fa895189ef16442694830d0c05cf60ee5187b | [
"Apache-2.0"
] | null | null | null | bg_biz/pay/weixinpay.py | sluggard6/bgirl | 3c9fa895189ef16442694830d0c05cf60ee5187b | [
"Apache-2.0"
] | null | null | null | bg_biz/pay/weixinpay.py | sluggard6/bgirl | 3c9fa895189ef16442694830d0c05cf60ee5187b | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
import uuid
from bg_biz.service.config_service import ConfigService
from sharper.flaskapp.helper import get_client_ip
import xml.etree.ElementTree as ET
import time
import random
import urllib2
import hashlib
from urllib import quote
from bg_biz.pay.callback.charge import ChargeExecutor
__author... | 33.046784 | 114 | 0.56114 |
4a123e5f8b073efb400b425743d7c7e5d73de8ff | 2,661 | py | Python | serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/constants.py | FANsZL/hive | a0f0fc82d538d117b222b0f696f33e40d8cc023f | [
"Apache-2.0"
] | 4,140 | 2015-01-07T11:57:35.000Z | 2022-03-31T06:26:22.000Z | serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/constants.py | FANsZL/hive | a0f0fc82d538d117b222b0f696f33e40d8cc023f | [
"Apache-2.0"
] | 1,779 | 2015-05-27T04:32:42.000Z | 2022-03-31T18:53:19.000Z | serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde/constants.py | FANsZL/hive | a0f0fc82d538d117b222b0f696f33e40d8cc023f | [
"Apache-2.0"
] | 3,958 | 2015-01-01T15:14:49.000Z | 2022-03-30T21:08:32.000Z | #
# Autogenerated by Thrift Compiler (0.14.1)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py
#
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
from thrift.protocol.TProtocol import TProtocolException
from thrift.TRecursive impo... | 28.308511 | 93 | 0.759865 |
4a123ef2891ea5919ddc47f7e1abd76b4d92438a | 791 | py | Python | news/migrations/0002_auto_20220216_0751.py | AminAliH47/PicoStyle | 768daccc6f28f08aa848318d633af1a19544e499 | [
"Apache-2.0"
] | 19 | 2022-02-16T20:00:08.000Z | 2022-03-08T17:38:59.000Z | news/migrations/0002_auto_20220216_0751.py | AminAliH47/PicoStyle | 768daccc6f28f08aa848318d633af1a19544e499 | [
"Apache-2.0"
] | 3 | 2022-02-16T20:59:11.000Z | 2022-02-23T20:40:12.000Z | news/migrations/0002_auto_20220216_0751.py | AminAliH47/PicoStyle | 768daccc6f28f08aa848318d633af1a19544e499 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.9 on 2022-02-16 07:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('news', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='categorynews',
name='title',
... | 27.275862 | 87 | 0.584071 |
4a12408d6d20d2b2d9b795fee308f8b46f0a9c06 | 9,266 | py | Python | kubernetes_asyncio/client/models/v1_persistent_volume_claim_spec.py | PidgeyBE/kubernetes_asyncio | 14d15dc309890253c26b6274a022e84441e05217 | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_persistent_volume_claim_spec.py | PidgeyBE/kubernetes_asyncio | 14d15dc309890253c26b6274a022e84441e05217 | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_persistent_volume_claim_spec.py | PidgeyBE/kubernetes_asyncio | 14d15dc309890253c26b6274a022e84441e05217 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: v1.13.5
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1Persiste... | 33.451264 | 180 | 0.644075 |
4a1240b71bbb453d03a9248226cca87534df2206 | 1,681 | py | Python | MNIST_Fashion/convolutional.py | bkchiu0/Deep-Learning-Sandbox | 139acbe0b15e016dcbeb2238df6f8ea55ad8111d | [
"MIT"
] | null | null | null | MNIST_Fashion/convolutional.py | bkchiu0/Deep-Learning-Sandbox | 139acbe0b15e016dcbeb2238df6f8ea55ad8111d | [
"MIT"
] | null | null | null | MNIST_Fashion/convolutional.py | bkchiu0/Deep-Learning-Sandbox | 139acbe0b15e016dcbeb2238df6f8ea55ad8111d | [
"MIT"
] | null | null | null | import tensorflow as tf
from tensorflow.keras import datasets, layers, models
import numpy as np
import matplotlib.pyplot as plt
from prediction_plotter import plot_image, plot_value_array
data = datasets.fashion_mnist
(train_images, train_labels), (test_images, test_labels) = data.load_data()
# Normalize the data
... | 30.017857 | 75 | 0.71743 |
4a124109acad0305ca20f671babb60e36d898cf7 | 655 | py | Python | src/simple-random-dan-app.py | wahur666/DAN-Demo | 0dcf553b3e3b8ea300e828dd2d90688fc2774d0a | [
"Apache-2.0"
] | 4 | 2019-08-18T18:39:37.000Z | 2019-11-24T19:22:15.000Z | src/simple-random-dan-app.py | wahur666/DAN-Demo | 0dcf553b3e3b8ea300e828dd2d90688fc2774d0a | [
"Apache-2.0"
] | null | null | null | src/simple-random-dan-app.py | wahur666/DAN-Demo | 0dcf553b3e3b8ea300e828dd2d90688fc2774d0a | [
"Apache-2.0"
] | null | null | null | import sys
import matplotlib.pyplot as plt
from common import load_configurations, create_demand_matrix_for_configuration, render_everyting
from network import RandomDanNetwork
def main(show=False):
configurations = load_configurations()
active_config = configurations[5]
# active_config = configurations[2... | 29.772727 | 96 | 0.746565 |
4a12410de3d527bbae6eec778dc0dc13fa89b591 | 5,439 | py | Python | docs/source/conf.py | bollwyvl/jupyterlab-metadata-service | 16810a530e4fedf78fc4b348445f360a20984c36 | [
"BSD-3-Clause"
] | null | null | null | docs/source/conf.py | bollwyvl/jupyterlab-metadata-service | 16810a530e4fedf78fc4b348445f360a20984c36 | [
"BSD-3-Clause"
] | null | null | null | docs/source/conf.py | bollwyvl/jupyterlab-metadata-service | 16810a530e4fedf78fc4b348445f360a20984c36 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 30.385475 | 94 | 0.656371 |
4a12423fbac25320cf484bc974743a38a93c772e | 6,098 | py | Python | problem_unittests.py | keyvantaj/Plagiarism | 76ce28fddf01744e7d7bd19ef2c8fba722f6a77f | [
"MIT"
] | null | null | null | problem_unittests.py | keyvantaj/Plagiarism | 76ce28fddf01744e7d7bd19ef2c8fba722f6a77f | [
"MIT"
] | null | null | null | problem_unittests.py | keyvantaj/Plagiarism | 76ce28fddf01744e7d7bd19ef2c8fba722f6a77f | [
"MIT"
] | null | null | null | from unittest.mock import MagicMock, patch
import sklearn.naive_bayes
import numpy as np
import pandas as pd
import re
# test csv file
TEST_CSV = 'data/test_info.csv'
class AssertTest(object):
'''Defines general test behavior.'''
def __init__(self, params):
self.assert_param_message = '\n'.join([str(k... | 40.653333 | 119 | 0.658085 |
4a12426e93ffa9bbcdf747c5e9e81c4748b4a61e | 3,314 | py | Python | tests/fields/test_logical_types.py | slawak/dataclasses-avroschema | 04e69a176b3e72bfa0acd3edbd044ecd161b1a68 | [
"MIT"
] | null | null | null | tests/fields/test_logical_types.py | slawak/dataclasses-avroschema | 04e69a176b3e72bfa0acd3edbd044ecd161b1a68 | [
"MIT"
] | null | null | null | tests/fields/test_logical_types.py | slawak/dataclasses-avroschema | 04e69a176b3e72bfa0acd3edbd044ecd161b1a68 | [
"MIT"
] | null | null | null | import datetime
import uuid
import pytest
from dataclasses_avroschema import fields
from . import consts
@pytest.mark.parametrize(
"python_type,avro_type,logical_type", consts.LOGICAL_TYPES_AND_DEFAULTS
)
def test_logical_types(python_type, avro_type, logical_type):
name = "a logical type"
python_type ... | 26.725806 | 87 | 0.661738 |
4a1243c52355a4c845e7235701309e2c58d147e3 | 17,291 | py | Python | bzt/modules/locustio.py | 3dgiordano/taurus | 77cb31b6f0e5c27545094f600ac2b595fa76d992 | [
"Apache-2.0"
] | 1 | 2018-02-17T16:00:34.000Z | 2018-02-17T16:00:34.000Z | bzt/modules/locustio.py | 3dgiordano/taurus | 77cb31b6f0e5c27545094f600ac2b595fa76d992 | [
"Apache-2.0"
] | 5 | 2018-03-10T20:50:24.000Z | 2021-08-20T15:07:32.000Z | bzt/modules/locustio.py | 3dgiordano/taurus | 77cb31b6f0e5c27545094f600ac2b595fa76d992 | [
"Apache-2.0"
] | 1 | 2018-05-04T23:06:15.000Z | 2018-05-04T23:06:15.000Z | """
Module holds all stuff regarding Locust tool usage
Copyright 2015 BlazeMeter Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required... | 39.208617 | 113 | 0.618646 |
4a1244ad8144c58cdd10dab426988123a0b9fa9f | 2,291 | py | Python | project-obj/project_obj - Copy.py | HakkaTjakka/earth-reverse-engineering_github | 6c52e69fcb33c5c06f634db874785d2454fa32a6 | [
"Unlicense"
] | null | null | null | project-obj/project_obj - Copy.py | HakkaTjakka/earth-reverse-engineering_github | 6c52e69fcb33c5c06f634db874785d2454fa32a6 | [
"Unlicense"
] | null | null | null | project-obj/project_obj - Copy.py | HakkaTjakka/earth-reverse-engineering_github | 6c52e69fcb33c5c06f634db874785d2454fa32a6 | [
"Unlicense"
] | null | null | null | import numpy as np
import sys
from projection import projection
EARTH_RADIUS = 6371000
if len(sys.argv)==2:
print (str(len(sys.argv)))
print ('arg[1]='+sys.argv[1])
with open(sys.argv[1]) as fd:
lines = fd.read().splitlines()
elif len(sys.argv)==1:
with open("in.obj") as fd:
lines = fd... | 26.952941 | 104 | 0.633348 |
4a1244bece0414494a040235cd473377a065903d | 5,246 | py | Python | applications/generate/philadelphia/repository.py | reaster/philadelphia | 977460abab8403f5efca7da8b12599633e6fd915 | [
"Apache-2.0"
] | null | null | null | applications/generate/philadelphia/repository.py | reaster/philadelphia | 977460abab8403f5efca7da8b12599633e6fd915 | [
"Apache-2.0"
] | null | null | null | applications/generate/philadelphia/repository.py | reaster/philadelphia | 977460abab8403f5efca7da8b12599633e6fd915 | [
"Apache-2.0"
] | null | null | null | import collections
import itertools
import os
import re
import xml.etree.ElementTree
from . import model
def read_dialect(dirname):
version = _read_version(dirname)
class_name_prefix = _class_name_prefix(version)
package_name = _package_name(class_name_prefix)
name = _name(version)
return model.D... | 27.465969 | 96 | 0.654975 |
4a1245b7431e1166d0fc58a519a2ec23c53c10dc | 994 | py | Python | aiotdlib/api/functions/resend_authentication_code.py | jraylan/aiotdlib | 4528fcfca7c5c69b54a878ce6ce60e934a2dcc73 | [
"MIT"
] | 37 | 2021-05-04T10:41:41.000Z | 2022-03-30T13:48:05.000Z | aiotdlib/api/functions/resend_authentication_code.py | jraylan/aiotdlib | 4528fcfca7c5c69b54a878ce6ce60e934a2dcc73 | [
"MIT"
] | 13 | 2021-07-17T19:54:51.000Z | 2022-02-26T06:50:00.000Z | aiotdlib/api/functions/resend_authentication_code.py | jraylan/aiotdlib | 4528fcfca7c5c69b54a878ce6ce60e934a2dcc73 | [
"MIT"
] | 7 | 2021-09-22T21:27:11.000Z | 2022-02-20T02:33:19.000Z | # =============================================================================== #
# #
# This file has been generated automatically!! Do not change this manually! #
# ... | 41.416667 | 216 | 0.496982 |
4a1248c2a1441d8c074b44da75adbd9bc0307756 | 778 | py | Python | djstripe/management/commands/djstripe_sync_customers.py | TigerDX/dj-stripe | 2fd4897abaedf2d9faa3dd5af86402dae3ab86a3 | [
"BSD-3-Clause"
] | null | null | null | djstripe/management/commands/djstripe_sync_customers.py | TigerDX/dj-stripe | 2fd4897abaedf2d9faa3dd5af86402dae3ab86a3 | [
"BSD-3-Clause"
] | null | null | null | djstripe/management/commands/djstripe_sync_customers.py | TigerDX/dj-stripe | 2fd4897abaedf2d9faa3dd5af86402dae3ab86a3 | [
"BSD-3-Clause"
] | 1 | 2021-08-30T10:51:49.000Z | 2021-08-30T10:51:49.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
from ...settings import get_subscriber_model
from ...sync import sync_subscriber
class Command(BaseCommand):
help = "Sync subscriber data with stripe"
def handle(self, *args, **options):
... | 28.814815 | 73 | 0.587404 |
4a1248d2cefac98b1c47e06e7433a8cf414ec7c0 | 529 | py | Python | Domain_Generalization/models/model_factory.py | GuardSkill/IntraClassInfoMax | ddf71318575f9a2183c2bcad7a0cb48972212fe4 | [
"BSD-2-Clause",
"MIT"
] | 139 | 2020-07-17T09:51:23.000Z | 2022-03-29T07:46:31.000Z | Domain_Generalization/models/model_factory.py | GuardSkill/IntraClassInfoMax | ddf71318575f9a2183c2bcad7a0cb48972212fe4 | [
"BSD-2-Clause",
"MIT"
] | 22 | 2020-08-30T02:50:27.000Z | 2022-03-05T14:02:13.000Z | Domain_Generalization/models/model_factory.py | GuardSkill/IntraClassInfoMax | ddf71318575f9a2183c2bcad7a0cb48972212fe4 | [
"BSD-2-Clause",
"MIT"
] | 22 | 2020-07-22T06:39:17.000Z | 2021-11-24T03:19:04.000Z | from models import caffenet
from models import mnist
from models import patch_based
from models import alexnet
from models import resnet
nets_map = {
'caffenet': caffenet.caffenet,
'alexnet': alexnet.alexnet,
'resnet18': resnet.resnet18,
'resnet50': resnet.resnet50,
'lenet': mnist.lenet
}
def get... | 22.041667 | 61 | 0.705104 |
4a12498f997f000c823209884fe728a44e02bb47 | 11,792 | py | Python | inicheck/output.py | micahjohnson150/inicheck | bad39cc54e0ce53cc700d4d3ca1b55bc0c4336e9 | [
"CC0-1.0"
] | 1 | 2018-08-10T20:41:20.000Z | 2018-08-10T20:41:20.000Z | inicheck/output.py | micahjohnson150/inicheck | bad39cc54e0ce53cc700d4d3ca1b55bc0c4336e9 | [
"CC0-1.0"
] | 64 | 2018-05-09T15:20:02.000Z | 2022-01-03T17:46:05.000Z | inicheck/output.py | USDA-ARS-NWRC/inicheck | 283c4cb5e49cbc0301dbcba8e622d1ad7537d7bb | [
"CC0-1.0"
] | 5 | 2020-01-03T02:47:16.000Z | 2020-09-23T03:02:41.000Z | import os
import sys
from datetime import date
from .utilities import mk_lst
def generate_config(config_obj, fname, cli=False):
"""
Generates a list of strings using the config data then its written to an
.ini file
Args:
config_obj: config object containing data to be outputted
fname... | 30.549223 | 79 | 0.516367 |
4a1249b1f5cb1ef608af51f3c95b3594d89f4f34 | 2,714 | py | Python | pytorch_neat/standardise_eval.py | archit120/PyTorch-NEAT | efd0f20c807e88b73e93eaad6cc8564b0c95676b | [
"Apache-2.0"
] | null | null | null | pytorch_neat/standardise_eval.py | archit120/PyTorch-NEAT | efd0f20c807e88b73e93eaad6cc8564b0c95676b | [
"Apache-2.0"
] | null | null | null | pytorch_neat/standardise_eval.py | archit120/PyTorch-NEAT | efd0f20c807e88b73e93eaad6cc8564b0c95676b | [
"Apache-2.0"
] | 2 | 2020-06-06T15:24:34.000Z | 2020-06-07T14:23:54.000Z | # Copyright (c) 2020 Archit Rungta
#
# 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... | 37.178082 | 130 | 0.609801 |
4a124b393d25a9fdf07e57b1b34e222c40363008 | 17,778 | py | Python | resqpy/olio/dataframe.py | berland/resqpy | 91d6f809cf84100c49459588f756618144f7deeb | [
"MIT"
] | null | null | null | resqpy/olio/dataframe.py | berland/resqpy | 91d6f809cf84100c49459588f756618144f7deeb | [
"MIT"
] | null | null | null | resqpy/olio/dataframe.py | berland/resqpy | 91d6f809cf84100c49459588f756618144f7deeb | [
"MIT"
] | null | null | null | """dataframe.py: classes for storing and retrieving dataframes as RESQML objects.
note that this module uses the obj_Grid2dRepresentation class in a way that was not envisaged
when the RESQML standard was defined; software that does not use resqpy is unlikely to be
able to do much with data stored in this way... | 50.362606 | 126 | 0.668242 |
4a124b8d646ff31ee0b9e136b68c8185181227d8 | 2,300 | py | Python | Software/Python/grove_encoder_read.py | TheVinhLuong102/GrovePi | cc5511129b98b02c13e260eeea1c70ee23368cc9 | [
"MIT"
] | 482 | 2015-01-09T03:06:14.000Z | 2022-03-24T10:05:07.000Z | Software/Python/grove_encoder_read.py | TheVinhLuong102/GrovePi | cc5511129b98b02c13e260eeea1c70ee23368cc9 | [
"MIT"
] | 257 | 2015-01-13T14:08:17.000Z | 2022-01-20T08:43:50.000Z | Software/Python/grove_encoder_read.py | TheVinhLuong102/GrovePi | cc5511129b98b02c13e260eeea1c70ee23368cc9 | [
"MIT"
] | 510 | 2015-01-27T17:15:44.000Z | 2022-03-29T01:27:13.000Z | #!/usr/bin/env python
#
# GrovePi Example for using the Grove Encoder(http://www.seeedstudio.com/depot/Grove-Encoder-p-1352.html) with the GrovePi
#
# The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi
#
# Have a question about this ... | 36.507937 | 139 | 0.774783 |
4a124c9ec386ae3f4e6e40b1d4285fcf67c07dad | 3,930 | py | Python | garageofcode/highdim/main.py | tpi12jwe/garageofcode | 3cfaf01f6d77130bb354887e6ed9921c791db849 | [
"MIT"
] | 2 | 2020-02-11T10:32:06.000Z | 2020-02-11T17:00:47.000Z | garageofcode/highdim/main.py | jonatanwestholm/garageofcode | 630e99c6fb4c42875beadb6adf8dc958501c5ab8 | [
"MIT"
] | null | null | null | garageofcode/highdim/main.py | jonatanwestholm/garageofcode | 630e99c6fb4c42875beadb6adf8dc958501c5ab8 | [
"MIT"
] | null | null | null | import time
from itertools import chain, combinations
from collections import deque
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Polygon
from matplotlib.collections import PatchCollection
import networkx as nx
from garageofcode.mip.convex_hull import in_hull
def powerset(s):
... | 25.855263 | 86 | 0.534606 |
4a124d4d2ab90105e60925bca8909ccc5a039357 | 7,592 | py | Python | examples/table_variants.py | iwob/evoplotter | 816f1b19bf6656c1ac35bc9dbe8c090a6325f5a1 | [
"MIT"
] | 1 | 2020-06-03T07:44:06.000Z | 2020-06-03T07:44:06.000Z | examples/table_variants.py | iwob/evoplotter | 816f1b19bf6656c1ac35bc9dbe8c090a6325f5a1 | [
"MIT"
] | null | null | null | examples/table_variants.py | iwob/evoplotter | 816f1b19bf6656c1ac35bc9dbe8c090a6325f5a1 | [
"MIT"
] | null | null | null | from evoplotter import printer
from evoplotter import reporting
from evoplotter.dims import *
tableBody = r"""
P0 (3) & 0.70 & 0.54 & 0.34 & 0.42 & 0.88 & 0.94 & 1.00 & 1.00 & 0.58 & 0.66 & 0.40 & 0.58 & 0.72 & 0.82 & 1.00 & 1.00 & 0.00 & 0.00 & 0.72 \\
P1 (3) & 0.18 & ... | 58.852713 | 179 | 0.524236 |
4a124df741b7d80d59f024cc4707d50a94875eb1 | 1,127 | py | Python | bgpvpn_dashboard/test/helpers.py | mail2nsrajesh/networking-bgpvpn | 6b57aed6e8c6a9ff7a987a7a03d6a83ecd0f875e | [
"Apache-2.0"
] | null | null | null | bgpvpn_dashboard/test/helpers.py | mail2nsrajesh/networking-bgpvpn | 6b57aed6e8c6a9ff7a987a7a03d6a83ecd0f875e | [
"Apache-2.0"
] | null | null | null | bgpvpn_dashboard/test/helpers.py | mail2nsrajesh/networking-bgpvpn | 6b57aed6e8c6a9ff7a987a7a03d6a83ecd0f875e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 Orange.
# 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 a... | 30.459459 | 78 | 0.736469 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.