hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e981f830e6d4f3138d746b175e50e505260d6ad9 | 788 | py | Python | DatabaseControlWrapper_JE/venv/Scripts/rst2html4.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | 5 | 2020-10-12T09:41:33.000Z | 2020-12-30T07:27:56.000Z | DatabaseControlWrapper_JE/venv/Scripts/rst2html4.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | DatabaseControlWrapper_JE/venv/Scripts/rst2html4.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | #!D:\WorkSpaces\Program WorkSpace\Python\Project\Python_DataBase_JE\venv\Scripts\python.exe
# $Id: rst2html4.py 7994 2016-12-10 17:41:45Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing (X... | 29.185185 | 92 | 0.753807 |
9b5785c9a73f22d6e23d140d32c92f40ff5e3ef2 | 35,254 | py | Python | lib/spack/spack/util/environment.py | klevzoff/spack | 396936d24173254ecf4148bc460702185e4c99e5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2020-12-28T14:38:41.000Z | 2020-12-28T14:38:41.000Z | lib/spack/spack/util/environment.py | klevzoff/spack | 396936d24173254ecf4148bc460702185e4c99e5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 17 | 2019-03-21T15:54:00.000Z | 2022-03-29T19:34:28.000Z | lib/spack/spack/util/environment.py | klevzoff/spack | 396936d24173254ecf4148bc460702185e4c99e5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2021-09-27T23:21:42.000Z | 2021-09-27T23:21:42.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""Utilities for setting and modifying environment variables."""
import collections
import contextlib
import inspect
impor... | 35.043738 | 80 | 0.606967 |
4f622644cefc1c7fc09a02a609b66598141125e4 | 8,728 | py | Python | python/Crawler/pyquotes/quotery/quotery.py | Joaxin/GitComments | 7aa862f0ee892cbbc94b037395a6273b2654cbea | [
"MIT"
] | 8 | 2019-05-02T19:30:11.000Z | 2020-11-17T03:43:22.000Z | python/Crawler/pyquotes/quotery/quotery.py | Joaxin/GitComments | 7aa862f0ee892cbbc94b037395a6273b2654cbea | [
"MIT"
] | 88 | 2019-10-31T12:30:02.000Z | 2020-08-14T12:17:12.000Z | python/Crawler/pyquotes/quotery/quotery.py | Joaxin/GitComments | 7aa862f0ee892cbbc94b037395a6273b2654cbea | [
"MIT"
] | 37 | 2019-05-02T17:07:03.000Z | 2019-10-07T10:03:31.000Z | from fuzzywuzzy import fuzz, process
from bs4 import BeautifulSoup
import requests
import random
sleep_counter = 0
# Currently the API will have three functions.
# More functions to be added later.
# 1. Get the quote based on certain category and person
# 2. Get the quote of the day
def get_quotes(person: (None, st... | 39.493213 | 169 | 0.53231 |
06d7af0b5c09b610e23ddc7cae99b22e1be4a704 | 50,363 | py | Python | integration_files/lm_run.py | najeebafzal/lm_riscv_dv | 435b944937926a06fbe38036f5add3d166604366 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | integration_files/lm_run.py | najeebafzal/lm_riscv_dv | 435b944937926a06fbe38036f5add3d166604366 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | integration_files/lm_run.py | najeebafzal/lm_riscv_dv | 435b944937926a06fbe38036f5add3d166604366 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | """
Copyright 2019 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, software
di... | 44.062117 | 197 | 0.627028 |
b921c411fd792120fdc9649d1198e0ddbb21bbd7 | 7,090 | py | Python | importer/importer/importer.py | AustralianBioCommons/umccr-dictionary | 0e66f3eff86bfd818ab8955b477270cd12e9f9ed | [
"Apache-2.0"
] | null | null | null | importer/importer/importer.py | AustralianBioCommons/umccr-dictionary | 0e66f3eff86bfd818ab8955b477270cd12e9f9ed | [
"Apache-2.0"
] | null | null | null | importer/importer/importer.py | AustralianBioCommons/umccr-dictionary | 0e66f3eff86bfd818ab8955b477270cd12e9f9ed | [
"Apache-2.0"
] | null | null | null | """Utility, creates projects and nodes. Deletes existing nodes of input type by default."""
import uuid
import os
import json
from datetime import datetime
import click
from importer.ioutils import reader
from importer.gen3 import generate_edge_tablename, get_class_tablename_from_id
PROJECT_ID = None
PROGRAM_ID = N... | 39.388889 | 260 | 0.624683 |
27ed3c861f32ae8e7d42de7d732a480c4832df9c | 5,248 | py | Python | tensorflow/python/keras/saving/saved_model/save.py | orivej/tensorflow | 5ed2fc046a9e59d7fcffc1bc7202465805618aca | [
"Apache-2.0"
] | 4 | 2016-07-14T15:15:05.000Z | 2017-03-02T15:17:22.000Z | tensorflow/python/keras/saving/saved_model/save.py | orivej/tensorflow | 5ed2fc046a9e59d7fcffc1bc7202465805618aca | [
"Apache-2.0"
] | 1 | 2020-07-23T11:39:09.000Z | 2020-07-23T11:40:08.000Z | tensorflow/python/keras/saving/saved_model/save.py | orivej/tensorflow | 5ed2fc046a9e59d7fcffc1bc7202465805618aca | [
"Apache-2.0"
] | 5 | 2016-11-07T21:17:45.000Z | 2020-05-31T00:16:59.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41 | 81 | 0.741616 |
f5e3906e73ddaf7e3bd95447cd0b76c6662165fa | 13,627 | py | Python | elevenclock/lang/lang_nl.py | Lacoi/ElevenClock | 77e05136c74340266f93650bd1c14cdda07c64d2 | [
"Apache-2.0"
] | null | null | null | elevenclock/lang/lang_nl.py | Lacoi/ElevenClock | 77e05136c74340266f93650bd1c14cdda07c64d2 | [
"Apache-2.0"
] | null | null | null | elevenclock/lang/lang_nl.py | Lacoi/ElevenClock | 77e05136c74340266f93650bd1c14cdda07c64d2 | [
"Apache-2.0"
] | null | null | null | # INSTRUCTIONS
# Translate the text and write it between the "
# EXAMPLE: original -> "This text is in english: value {0}"
# translation -> "Aquest text està en anglès: valor {0}"
# If you see sth like {0}, {1}, maintain it on the translated sentence
# Meke special attention to elements like "... | 67.79602 | 290 | 0.64497 |
d1ac959cd356a4b09ae5dad600a51aaacb124188 | 9,299 | py | Python | lib/export_import.py | dduda2015/ask-jira | 1cf65d2b88095c916127891e4bcd0e87b3532683 | [
"MIT"
] | null | null | null | lib/export_import.py | dduda2015/ask-jira | 1cf65d2b88095c916127891e4bcd0e87b3532683 | [
"MIT"
] | null | null | null | lib/export_import.py | dduda2015/ask-jira | 1cf65d2b88095c916127891e4bcd0e87b3532683 | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import unicode_literals
import unicodedata
from io import BytesIO
from jira.client import JIRA
from jira.exceptions import JIRAError
def export_import_issues(source_jira, conf, query):
target_jira = JIRA({'server': conf.JIRA['server']},
... | 40.430435 | 120 | 0.610388 |
59d6f9a51ed435d09fee91d54645c708fd4569b5 | 19,626 | py | Python | pandas/core/dtypes/missing.py | juliansmidek/pandas | 8945a4267588ec2608bec7be6745f6beff0373da | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/dtypes/missing.py | juliansmidek/pandas | 8945a4267588ec2608bec7be6745f6beff0373da | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/dtypes/missing.py | juliansmidek/pandas | 8945a4267588ec2608bec7be6745f6beff0373da | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | """
missing types & inference
"""
from decimal import Decimal
from functools import partial
import numpy as np
from pandas._config import get_option
from pandas._libs import lib
import pandas._libs.missing as libmissing
from pandas._libs.tslibs import (
NaT,
Period,
iNaT,
)
from pandas._typing import (
... | 29.161961 | 88 | 0.618465 |
4fc29356f88281612a8d5b6e4094a74f500db8bd | 1,860 | py | Python | test/test_user.py | Open-IoT-Service-Platform/iotkit-lib-python | ba865af7182422cdaf598f354f6bf9676af713c3 | [
"BSD-3-Clause"
] | 3 | 2018-03-08T09:03:33.000Z | 2020-01-10T16:21:59.000Z | test/test_user.py | Open-IoT-Service-Platform/iotkit-lib-python | ba865af7182422cdaf598f354f6bf9676af713c3 | [
"BSD-3-Clause"
] | 17 | 2018-03-15T12:10:11.000Z | 2021-11-29T08:43:18.000Z | test/test_user.py | Open-IoT-Service-Platform/iotkit-lib-python | ba865af7182422cdaf598f354f6bf9676af713c3 | [
"BSD-3-Clause"
] | 5 | 2018-03-08T09:03:41.000Z | 2019-04-12T12:48:10.000Z | # Copyright (c) 2017, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following ... | 47.692308 | 79 | 0.770968 |
ff967df37c03821c8a8ff300d94711dd45e18402 | 5,949 | py | Python | designer_family/policy.py | guishaowu/designer_family | c89e16c6649c181f3262aa65fa97a457abdc2eb2 | [
"Apache-2.0"
] | null | null | null | designer_family/policy.py | guishaowu/designer_family | c89e16c6649c181f3262aa65fa97a457abdc2eb2 | [
"Apache-2.0"
] | null | null | null | designer_family/policy.py | guishaowu/designer_family | c89e16c6649c181f3262aa65fa97a457abdc2eb2 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 46.84252 | 85 | 0.680282 |
194354d1500e9043afb77813f266840e8e1eb288 | 5,482 | py | Python | webApp/models/realStream.py | Yunxiai88/mask_face_detection_covid19 | a4a8d7e3d94ffb84850237321530d69647f67428 | [
"Apache-2.0"
] | null | null | null | webApp/models/realStream.py | Yunxiai88/mask_face_detection_covid19 | a4a8d7e3d94ffb84850237321530d69647f67428 | [
"Apache-2.0"
] | null | null | null | webApp/models/realStream.py | Yunxiai88/mask_face_detection_covid19 | a4a8d7e3d94ffb84850237321530d69647f67428 | [
"Apache-2.0"
] | null | null | null | import os
import time
import cv2
import threading
import datetime
import imutils
from imutils.video import FPS
from models.webcamVideoStream import WebcamVideoStream
from models.util import utils
from models.facenet import FaceNet
# initialize the output frame and a lock used to ensure thread-safe
# exchanges of the... | 30.120879 | 81 | 0.572236 |
eeea77341573ca6cdac54744159d2880770fc8f3 | 32,350 | py | Python | selfdrive/controls/controlsd.py | CRDCX/openpilot | 3ef65b2e01b49dc8cfbdb07eb28bcca1e7db927c | [
"MIT"
] | null | null | null | selfdrive/controls/controlsd.py | CRDCX/openpilot | 3ef65b2e01b49dc8cfbdb07eb28bcca1e7db927c | [
"MIT"
] | null | null | null | selfdrive/controls/controlsd.py | CRDCX/openpilot | 3ef65b2e01b49dc8cfbdb07eb28bcca1e7db927c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import math
from numbers import Number
from cereal import car, log
from common.numpy_fast import clip
from common.realtime import sec_since_boot, config_realtime_process, Priority, Ratekeeper, DT_CTRL
from common.profiler import Profiler
from common.params import Params, put_nonblockin... | 42.621871 | 154 | 0.704853 |
33a6fd1bd45f0bdfe35b638334ed0182fd716c45 | 3,624 | py | Python | multimodelity/datasets/base_dataset.py | hahaxun/mmf | 6d32c3925ed9bf938e19a071aaa5e72a5cf01ee1 | [
"BSD-3-Clause"
] | null | null | null | multimodelity/datasets/base_dataset.py | hahaxun/mmf | 6d32c3925ed9bf938e19a071aaa5e72a5cf01ee1 | [
"BSD-3-Clause"
] | null | null | null | multimodelity/datasets/base_dataset.py | hahaxun/mmf | 6d32c3925ed9bf938e19a071aaa5e72a5cf01ee1 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
from multimodelity.common.registry import registry
from multimodelity.common.sample import SampleList
from multimodelity.utils.general import get_current_device
from torch.utils.data.dataset import Dataset
class BaseDataset(Dataset):
"""Base class for implementin... | 31.789474 | 84 | 0.646799 |
7ae05a63c042e79655e3a885bdeda340ae8c21f8 | 36,420 | py | Python | albert/run_classifier_sp.py | DavidNemeskey/google-research | bcb495c084a623d0e9c4a3f851afb2442cebc480 | [
"Apache-2.0"
] | null | null | null | albert/run_classifier_sp.py | DavidNemeskey/google-research | bcb495c084a623d0e9c4a3f851afb2442cebc480 | [
"Apache-2.0"
] | null | null | null | albert/run_classifier_sp.py | DavidNemeskey/google-research | bcb495c084a623d0e9c4a3f851afb2442cebc480 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2019 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 35.566406 | 82 | 0.682427 |
d2569122e117469ad2b166dc32f3bbf0ae2079eb | 3,845 | py | Python | Source/TailwindTraders.Mobile/Resources/AR/guide/generate_tfrecord.py | JAMMY10/TailwindTraders_t5hwqv86 | 892124195ba639567a9a7e098ada52257a4b9483 | [
"MIT"
] | 169 | 2019-05-12T18:50:59.000Z | 2022-02-21T06:24:14.000Z | Source/TailwindTraders.Mobile/Resources/AR/guide/generate_tfrecord.py | JAMMY10/TailwindTraders_t5hwqv86 | 892124195ba639567a9a7e098ada52257a4b9483 | [
"MIT"
] | 18 | 2018-12-04T19:32:28.000Z | 2019-05-05T15:34:53.000Z | Source/TailwindTraders.Mobile/Resources/AR/guide/generate_tfrecord.py | JAMMY10/TailwindTraders_t5hwqv86 | 892124195ba639567a9a7e098ada52257a4b9483 | [
"MIT"
] | 158 | 2019-05-08T04:47:21.000Z | 2022-03-11T16:48:46.000Z | from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
import os
import io
import os.path
import pandas as pd
import tensorflow as tf
from string import Template
from PIL import Image
from collections import namedtuple, OrderedDict
def int64_feature(value):
ret... | 30.515873 | 96 | 0.664239 |
b156e3916711dc8db01f9d3e8dcf95bc291c2be1 | 8,611 | py | Python | InvenTree/InvenTree/serializers.py | Guusggg/InvenTree | fa163b88665b69de93fafd822faf1c1953cf4d87 | [
"MIT"
] | null | null | null | InvenTree/InvenTree/serializers.py | Guusggg/InvenTree | fa163b88665b69de93fafd822faf1c1953cf4d87 | [
"MIT"
] | null | null | null | InvenTree/InvenTree/serializers.py | Guusggg/InvenTree | fa163b88665b69de93fafd822faf1c1953cf4d87 | [
"MIT"
] | null | null | null | """
Serializers used in various InvenTree apps
"""
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from decimal import Decimal
from django.conf import settings
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError as DjangoValidationError
from djan... | 30.427562 | 113 | 0.62304 |
56014093b24e3ed45b4e8d4872043cce266a8f70 | 3,637 | py | Python | fixture/group.py | MMashaM/python_training | 6d1f3e964437d2ff5f717ebaface931c44807be8 | [
"Apache-2.0"
] | null | null | null | fixture/group.py | MMashaM/python_training | 6d1f3e964437d2ff5f717ebaface931c44807be8 | [
"Apache-2.0"
] | null | null | null | fixture/group.py | MMashaM/python_training | 6d1f3e964437d2ff5f717ebaface931c44807be8 | [
"Apache-2.0"
] | null | null | null | from model.group import Group
class GroupHelper:
def __init__(self, app):
self.app = app
def open_groups_page(self):
wd = self.app.wd
if not (wd.current_url.endswith("/group.php") and len(wd.find_elements_by_name("new")) > 0):
wd.find_element_by_link_text("groups").click(... | 33.990654 | 100 | 0.636514 |
eb9dfb41cc6fe6408559d98d7d1fce8b7f995a6e | 919 | py | Python | src/convclasses/__init__.py | zeburek/cattrs | c1aea4cf3a74cc42c90bf4e8a1e79390a323d774 | [
"MIT"
] | 3 | 2019-12-13T23:54:38.000Z | 2021-06-08T18:29:51.000Z | src/convclasses/__init__.py | zeburek/cattrs | c1aea4cf3a74cc42c90bf4e8a1e79390a323d774 | [
"MIT"
] | null | null | null | src/convclasses/__init__.py | zeburek/cattrs | c1aea4cf3a74cc42c90bf4e8a1e79390a323d774 | [
"MIT"
] | null | null | null | from .converters import Converter, UnstructureStrategy
from .modifiers import mod
__all__ = (
"global_converter",
"unstructure",
"structure",
"structure_dataclass_fromtuple",
"structure_dataclass_fromdict",
"UnstructureStrategy",
"Converter",
"mod",
)
__author__ = "Parviz Khavari"
__em... | 29.645161 | 78 | 0.829162 |
eac0dda71496de950f847d7100bd1bc4d9011a4b | 754 | py | Python | src/vendorxmlxxwriter.py | 211tbc/synthesis | 55b4dcb85b7a2ed5fbc46b1740c8ca0ab80248a4 | [
"Unlicense"
] | null | null | null | src/vendorxmlxxwriter.py | 211tbc/synthesis | 55b4dcb85b7a2ed5fbc46b1740c8ca0ab80248a4 | [
"Unlicense"
] | 7 | 2016-08-12T15:12:43.000Z | 2020-06-07T03:19:13.000Z | src/vendorxmlxxwriter.py | 211tbc/synthesis | 55b4dcb85b7a2ed5fbc46b1740c8ca0ab80248a4 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
import os.path
from . import interpretpicklist
from datetime import timedelta, date, datetime
from time import strptime, time
from .xmlutilities import IDGeneration
# Alchemy Libraries
from sqlalchemy import create_engine, Table, Column, Numeric, Integer, String, Boolean, MetaData, ForeignKey, Se... | 25.133333 | 118 | 0.786472 |
136a54fbf5cfb0420ac6da71e4020d0a7eb67500 | 14,945 | py | Python | tests/_server_test.py | bmwiedemann/restkit | 1af7d69838428acfb97271d5444992872b71e70c | [
"MIT"
] | 102 | 2015-01-07T22:25:48.000Z | 2021-09-29T02:13:50.000Z | tests/_server_test.py | bmwiedemann/restkit | 1af7d69838428acfb97271d5444992872b71e70c | [
"MIT"
] | 10 | 2015-03-12T14:34:19.000Z | 2021-06-05T21:28:09.000Z | tests/_server_test.py | bmwiedemann/restkit | 1af7d69838428acfb97271d5444992872b71e70c | [
"MIT"
] | 32 | 2015-02-19T21:53:09.000Z | 2021-07-22T20:21:31.000Z | # -*- coding: utf-8 -
#
# Copyright (c) 2008 (c) Benoit Chesneau <benoitc@e-engura.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE... | 40.722071 | 86 | 0.548009 |
d210f1acc5e4cfff65be62dfe3e7d01e694e29a0 | 2,248 | py | Python | profile.py | CSC467-WCU/csc467cloud | 4a13b30ad43debcb02b4247837089ba1c4352a50 | [
"MIT"
] | null | null | null | profile.py | CSC467-WCU/csc467cloud | 4a13b30ad43debcb02b4247837089ba1c4352a50 | [
"MIT"
] | null | null | null | profile.py | CSC467-WCU/csc467cloud | 4a13b30ad43debcb02b4247837089ba1c4352a50 | [
"MIT"
] | null | null | null | import geni.portal as portal
import geni.rspec.pg as RSpec
import geni.rspec.igext
pc = portal.Context()
pc.defineParameter( "n", "Number of nodes",
portal.ParameterType.INTEGER, 3 )
pc.defineParameter( "raw", "Use physical nodes",
portal.ParameterType.BOOLEAN, False )
pc.defineParameter( ... | 38.101695 | 301 | 0.69395 |
5e9c433b2fcf1cfbc15c8c62f9e6a4887a4d824e | 115 | py | Python | bitmovin_api_sdk/encoding/configurations/audio/dts_passthrough/customdata/__init__.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 11 | 2019-07-03T10:41:16.000Z | 2022-02-25T21:48:06.000Z | bitmovin_api_sdk/encoding/configurations/audio/dts_passthrough/customdata/__init__.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 8 | 2019-11-23T00:01:25.000Z | 2021-04-29T12:30:31.000Z | bitmovin_api_sdk/encoding/configurations/audio/dts_passthrough/customdata/__init__.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 13 | 2020-01-02T14:58:18.000Z | 2022-03-26T12:10:30.000Z | from bitmovin_api_sdk.encoding.configurations.audio.dts_passthrough.customdata.customdata_api import CustomdataApi
| 57.5 | 114 | 0.913043 |
253c620a2d69a03760466f1e33f4ecd19c47a91e | 9,242 | py | Python | paddlex/cv/nets/shufflenet_v2.py | ZHUI/PaddleX | 27f21b7a1e4a209cf7cd9bb558410278e49e2806 | [
"Apache-2.0"
] | 1 | 2020-05-06T13:07:18.000Z | 2020-05-06T13:07:18.000Z | paddlex/cv/nets/shufflenet_v2.py | ZHUI/PaddleX | 27f21b7a1e4a209cf7cd9bb558410278e49e2806 | [
"Apache-2.0"
] | null | null | null | paddlex/cv/nets/shufflenet_v2.py | ZHUI/PaddleX | 27f21b7a1e4a209cf7cd9bb558410278e49e2806 | [
"Apache-2.0"
] | null | null | null | #copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
#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 l... | 33.85348 | 81 | 0.48918 |
7ec326417761abff0ee71fdf6fafe9b7c0ced076 | 5,363 | py | Python | build/lib/piedpy/packages/special/dbcommands.py | scalabli/piedpy | e55d7bc546491f69de85846738b93b0a625f4e59 | [
"MIT"
] | null | null | null | build/lib/piedpy/packages/special/dbcommands.py | scalabli/piedpy | e55d7bc546491f69de85846738b93b0a625f4e59 | [
"MIT"
] | null | null | null | build/lib/piedpy/packages/special/dbcommands.py | scalabli/piedpy | e55d7bc546491f69de85846738b93b0a625f4e59 | [
"MIT"
] | null | null | null | import logging
import os
import platform
from piedpy import __version__
from piedpy.packages.special import iocommands
from piedpy.packages.special.utils import format_uptime
from .main import special_command, RAW_QUERY, PARSED_QUERY
from pymysql import ProgrammingError
log = logging.getLogger(__name__)
@special_com... | 33.943038 | 90 | 0.623345 |
ff5d5a2b2f8e7cffc3346165895968db49e720f2 | 9,232 | py | Python | tensorflow/python/ops/session_ops.py | Dashhh/tensorflow | 1708b92bb923e420d746a56baafc7d4ddcd5e05e | [
"Apache-2.0"
] | 44 | 2017-01-26T11:39:36.000Z | 2019-06-28T10:03:19.000Z | tensorflow/python/ops/session_ops.py | amineferchichi/tensorflow | 4ac9c09d5ca57a03b8daa5fb9e295947b1619854 | [
"Apache-2.0"
] | 5 | 2017-01-31T00:32:02.000Z | 2017-12-17T14:34:17.000Z | tensorflow/python/ops/session_ops.py | amineferchichi/tensorflow | 4ac9c09d5ca57a03b8daa5fb9e295947b1619854 | [
"Apache-2.0"
] | 10 | 2017-03-27T04:15:07.000Z | 2018-07-09T15:03:03.000Z | # Copyright 2015 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... | 32.854093 | 80 | 0.717504 |
90497bd3ad61cdece638d509f411a446be155c19 | 1,478 | py | Python | share/rpcauth/rpcauth.py | 34ro/tapyrus-core | 52175cd1994fde3cec1bc506ebacd3fd99523103 | [
"MIT"
] | 40 | 2019-10-07T04:30:45.000Z | 2022-02-23T16:24:10.000Z | share/rpcauth/rpcauth.py | 34ro/tapyrus-core | 52175cd1994fde3cec1bc506ebacd3fd99523103 | [
"MIT"
] | 78 | 2019-10-09T07:21:19.000Z | 2022-03-01T06:32:23.000Z | share/rpcauth/rpcauth.py | 34ro/tapyrus-core | 52175cd1994fde3cec1bc506ebacd3fd99523103 | [
"MIT"
] | 11 | 2019-11-14T08:08:42.000Z | 2021-09-15T12:31:36.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Bitcoin Core developers
# Copyright (c) 2019 Chaintope Inc.
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import sys
import os
from random import SystemRandom
import base64
im... | 30.163265 | 131 | 0.685386 |
77ce85e60fbccc3bbf25b8d684a4e0f228342e78 | 414 | py | Python | twofa/migrations/0008_twofauser_country_code.py | cherylkw/beamwallet | 6bc80e3f4e4653e79afb8f105c2f65856c9eb457 | [
"MIT"
] | null | null | null | twofa/migrations/0008_twofauser_country_code.py | cherylkw/beamwallet | 6bc80e3f4e4653e79afb8f105c2f65856c9eb457 | [
"MIT"
] | null | null | null | twofa/migrations/0008_twofauser_country_code.py | cherylkw/beamwallet | 6bc80e3f4e4653e79afb8f105c2f65856c9eb457 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.10 on 2020-04-25 08:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('twofa', '0007_wallet_private_key'),
]
operations = [
migrations.AddField(
model_name='twofauser',
name='country_cod... | 21.789474 | 72 | 0.611111 |
aa6245c0d00aafac3688c843b5c6ed960ffb518d | 241 | py | Python | main.py | jeremy886/crossword2019 | e7fd5b8a79a3834b2d3c7fd51da336b23f9cfc8f | [
"MIT"
] | null | null | null | main.py | jeremy886/crossword2019 | e7fd5b8a79a3834b2d3c7fd51da336b23f9cfc8f | [
"MIT"
] | null | null | null | main.py | jeremy886/crossword2019 | e7fd5b8a79a3834b2d3c7fd51da336b23f9cfc8f | [
"MIT"
] | null | null | null | import tex_printable
"""
Step 1:
- Create a new word list in words.txt
- Run crosswords.py to generate crosswords_out.txt
Step 2:
- Run this program to call text_printable.py to generate crossword_puzzle.text
"""
tex_printable.print_tex() | 20.083333 | 78 | 0.775934 |
90e4212182ef0c0d16fb390c362d0d541bbeb502 | 1,384 | py | Python | tests/importer/onnx/basic/test_relu.py | FusionBolt/nncase | 61e41170faed249303295d184f611f27cfefce9d | [
"Apache-2.0"
] | 1 | 2022-03-31T09:53:44.000Z | 2022-03-31T09:53:44.000Z | tests/importer/onnx/basic/test_relu.py | 13129176346/nncase | 61e41170faed249303295d184f611f27cfefce9d | [
"Apache-2.0"
] | null | null | null | tests/importer/onnx/basic/test_relu.py | 13129176346/nncase | 61e41170faed249303295d184f611f27cfefce9d | [
"Apache-2.0"
] | 2 | 2021-04-21T01:27:37.000Z | 2022-03-31T09:48:53.000Z | # Copyright 2019-2021 Canaan Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 28.244898 | 74 | 0.688584 |
d8dd4f145e578fa1b50827382740e5155acc5717 | 68,986 | py | Python | python/fledge/services/core/scheduler/scheduler.py | aliozgur/fledge | 51d197d98c5ea3276f085c463ee643726075d043 | [
"Apache-2.0"
] | 69 | 2019-12-03T17:54:33.000Z | 2022-03-13T07:05:23.000Z | python/fledge/services/core/scheduler/scheduler.py | ashish-jabble/fledge | f6cb05a9324675019972270326d8ed7375b7c151 | [
"Apache-2.0"
] | 125 | 2020-02-13T15:11:28.000Z | 2022-03-29T14:42:36.000Z | python/fledge/services/core/scheduler/scheduler.py | ashish-jabble/fledge | f6cb05a9324675019972270326d8ed7375b7c151 | [
"Apache-2.0"
] | 24 | 2019-12-27T07:48:45.000Z | 2022-03-13T07:05:28.000Z | # -*- coding: utf-8 -*-
# FLEDGE_BEGIN
# See: http://fledge-iot.readthedocs.io/
# FLEDGE_END
"""Fledge Scheduler module"""
import asyncio
import collections
import datetime
import logging
import math
import time
import uuid
import os
import subprocess
import signal
from typing import List
from fledge.common import ... | 42.219094 | 146 | 0.606369 |
0cc66c2b9ba2c1ed1c82466aede1e8db545b999b | 2,886 | py | Python | tests/test_sw360_clearingrequests.py | sw360/sw360python | bb0a249561016fb8637c3a8fdf0b1d00ecfbf345 | [
"MIT"
] | 3 | 2021-06-16T22:36:03.000Z | 2022-02-11T11:13:14.000Z | tests/test_sw360_clearingrequests.py | sw360/sw360python | bb0a249561016fb8637c3a8fdf0b1d00ecfbf345 | [
"MIT"
] | 6 | 2021-06-23T15:10:10.000Z | 2022-03-09T08:36:55.000Z | tests/test_sw360_clearingrequests.py | sw360/sw360python | bb0a249561016fb8637c3a8fdf0b1d00ecfbf345 | [
"MIT"
] | 1 | 2022-03-07T06:57:52.000Z | 2022-03-07T06:57:52.000Z | # -------------------------------------------------------------------------------
# (c) 2021 Siemens AG
# All Rights Reserved.
# Author: thomas.graf@siemens.com
#
# Licensed under the MIT license.
# SPDX-License-Identifier: MIT
# -------------------------------------------------------------------------------
import s... | 31.032258 | 82 | 0.561331 |
661abdb15b3d42adea0264c9fef67dd9a5a2cf74 | 5,882 | py | Python | grpclib/health/v1/health_pb2.py | SupperSpiderMan/grpclib | 89fbfd514f1f377a16d64c5a9732cf71090e0a7a | [
"BSD-3-Clause"
] | 1 | 2020-03-26T00:13:33.000Z | 2020-03-26T00:13:33.000Z | grpclib/health/v1/health_pb2.py | SupperSpiderMan/grpclib | 89fbfd514f1f377a16d64c5a9732cf71090e0a7a | [
"BSD-3-Clause"
] | null | null | null | grpclib/health/v1/health_pb2.py | SupperSpiderMan/grpclib | 89fbfd514f1f377a16d64c5a9732cf71090e0a7a | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: grpclib/health/v1/health.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_data... | 33.611429 | 778 | 0.766406 |
cfa56de8d3402439e220d62134ca31c51ed54887 | 3,877 | py | Python | prepare_data/make_vocab_for_bert.py | Ermlab/bert | 73a7d19e364fcb793d2f0dd2880747c595652408 | [
"Apache-2.0"
] | null | null | null | prepare_data/make_vocab_for_bert.py | Ermlab/bert | 73a7d19e364fcb793d2f0dd2880747c595652408 | [
"Apache-2.0"
] | null | null | null | prepare_data/make_vocab_for_bert.py | Ermlab/bert | 73a7d19e364fcb793d2f0dd2880747c595652408 | [
"Apache-2.0"
] | null | null | null | import argparse
import os
import sys
import sentencepiece as sp
if __name__ == '__main__':
parser = argparse.ArgumentParser(prog=os.path.basename(sys.argv[0]),
formatter_class=argparse.RawDescriptionHelpFormatter,
description=__doc__)
p... | 43.077778 | 217 | 0.54243 |
9d37564d50f91ee9ef7a6b34af0e6e17a8dbf4f6 | 185 | py | Python | blueprints/pages/__init__.py | Syhofrukt/course-work | 6130062976b56e53ecaa373cbfd346495faa8d7b | [
"MIT"
] | null | null | null | blueprints/pages/__init__.py | Syhofrukt/course-work | 6130062976b56e53ecaa373cbfd346495faa8d7b | [
"MIT"
] | null | null | null | blueprints/pages/__init__.py | Syhofrukt/course-work | 6130062976b56e53ecaa373cbfd346495faa8d7b | [
"MIT"
] | null | null | null | from flask import Blueprint
from .main_page import main_page_blueprint
pages_blueprint = Blueprint("pages_blueprint", __name__)
pages_blueprint.register_blueprint(main_page_blueprint)
| 30.833333 | 56 | 0.87027 |
7b1c618de606fa08562f08ca7d850f463409ef26 | 4,955 | py | Python | surfstat/tests/test_SurfStatCoord2Ind.py | rudimeier/BrainStat | a5ef474ffd70300ecf5fa464fff4a41e71f4b7a1 | [
"BSD-3-Clause"
] | null | null | null | surfstat/tests/test_SurfStatCoord2Ind.py | rudimeier/BrainStat | a5ef474ffd70300ecf5fa464fff4a41e71f4b7a1 | [
"BSD-3-Clause"
] | null | null | null | surfstat/tests/test_SurfStatCoord2Ind.py | rudimeier/BrainStat | a5ef474ffd70300ecf5fa464fff4a41e71f4b7a1 | [
"BSD-3-Clause"
] | null | null | null | import sys
sys.path.append("python/need_not_convert")
from SurfStatCoord2Ind import *
import surfstat_wrap as sw
import numpy as np
import pytest
sw.matlab_init_surfstat()
def dummy_test(coord, surf):
try:
# wrap matlab functions
Wrapped_ind = sw.matlab_SurfStatCoord2Ind(coord, surf)
except:... | 28.314286 | 80 | 0.602825 |
ca92e49aa68ee317d4511f4efbc92385f7dcac97 | 5,992 | py | Python | tests/test_authentication.py | Hatell/django-rest-framework-simplejwt | 26fe43287acd04bfbe55c9f7e761eac0315bbf1f | [
"MIT"
] | 1 | 2019-01-30T21:41:45.000Z | 2019-01-30T21:41:45.000Z | tests/test_authentication.py | Hatell/django-rest-framework-simplejwt | 26fe43287acd04bfbe55c9f7e761eac0315bbf1f | [
"MIT"
] | null | null | null | tests/test_authentication.py | Hatell/django-rest-framework-simplejwt | 26fe43287acd04bfbe55c9f7e761eac0315bbf1f | [
"MIT"
] | 1 | 2019-01-30T21:41:55.000Z | 2019-01-30T21:41:55.000Z | from __future__ import unicode_literals
from datetime import timedelta
from django.contrib.auth import get_user_model
from django.test import TestCase
from django.utils.six.moves import reload_module
from rest_framework.test import APIRequestFactory
from rest_framework_simplejwt import authentication
from rest_framew... | 37.217391 | 101 | 0.683077 |
8de4d4b5ebc6ba6fc3f357345a6201b976bd157d | 3,365 | py | Python | strandtest_neopixellib.py | nobreak/digi_dot_booster | 70cb58f6fbdd84c6ff3c8346cc0f8b5c05d4c138 | [
"MIT"
] | 1 | 2019-01-07T13:56:34.000Z | 2019-01-07T13:56:34.000Z | strandtest_neopixellib.py | nobreak/digi_dot_booster | 70cb58f6fbdd84c6ff3c8346cc0f8b5c05d4c138 | [
"MIT"
] | null | null | null | strandtest_neopixellib.py | nobreak/digi_dot_booster | 70cb58f6fbdd84c6ff3c8346cc0f8b5c05d4c138 | [
"MIT"
] | null | null | null | # rainbow.py
import spidev
import time
from digiDotBooster import *
LED_COUNT = 60
DELAY = 0.00003 * float(LED_COUNT)
def colorWipe(strip, color, wait_ms=50):
"""Wipe color across display a pixel at a time."""
for i in range(strip.numPixels()):
strip.setPixelColor(i, color)
... | 37.808989 | 99 | 0.509955 |
3281edb957514eeb708cf858bcc464feb3dc17db | 1,064 | py | Python | apis/apis.py | CalebAtHeadstorm/nightingale | de8fceec55a49fbbc715ddb56378bd5c501a9fb2 | [
"Apache-2.0"
] | null | null | null | apis/apis.py | CalebAtHeadstorm/nightingale | de8fceec55a49fbbc715ddb56378bd5c501a9fb2 | [
"Apache-2.0"
] | null | null | null | apis/apis.py | CalebAtHeadstorm/nightingale | de8fceec55a49fbbc715ddb56378bd5c501a9fb2 | [
"Apache-2.0"
] | null | null | null | import requests
from us import states
def get_data_for_state(locale_name):
"""
A crude first API to get Covid case data for US states based on a name,
abbreviation, or FIPS code. Made modular because I hope to swap out the
data source for a more general one soon.
"""
abbr = get_state_a... | 28.756757 | 79 | 0.677632 |
4bae61e78a425db130b5efde909fedd2b526dead | 2,508 | py | Python | data/p4VQE/R4/benchmark/startQiskit_QC204.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startQiskit_QC204.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startQiskit_QC204.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=11
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
import networkx as nx
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collectio... | 27.26087 | 118 | 0.63437 |
e5c3df24c97739bfe2134193af54e6f273267562 | 978 | py | Python | KG/DuEL_Baseline/ernie/utils/cards.py | pkulzb/Research | 88da4910a356f1e95e1e1e05316500055533683d | [
"Apache-2.0"
] | 1,319 | 2020-02-14T10:42:07.000Z | 2022-03-31T15:42:18.000Z | KG/DuEL_Baseline/ernie/utils/cards.py | pkulzb/Research | 88da4910a356f1e95e1e1e05316500055533683d | [
"Apache-2.0"
] | 192 | 2020-02-14T02:53:34.000Z | 2022-03-31T02:25:48.000Z | KG/DuEL_Baseline/ernie/utils/cards.py | pkulzb/Research | 88da4910a356f1e95e1e1e05316500055533683d | [
"Apache-2.0"
] | 720 | 2020-02-14T02:12:38.000Z | 2022-03-31T12:21:15.000Z | """
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 29.636364 | 74 | 0.724949 |
2a755acba31096357c1f9cd18c1e71a369799539 | 1,083 | py | Python | docs/source/reference-core/channels-mpmc-broken.py | guilledk/trio | d09c21df3ffe401ee4314d869d82a886bd776e3c | [
"Apache-2.0",
"MIT"
] | 4 | 2017-03-01T22:14:46.000Z | 2020-07-31T07:18:18.000Z | docs/source/reference-core/channels-mpmc-broken.py | guilledk/trio | d09c21df3ffe401ee4314d869d82a886bd776e3c | [
"Apache-2.0",
"MIT"
] | 81 | 2017-01-22T11:58:29.000Z | 2017-05-27T22:17:49.000Z | docs/source/reference-core/channels-mpmc-broken.py | guilledk/trio | d09c21df3ffe401ee4314d869d82a886bd776e3c | [
"Apache-2.0",
"MIT"
] | 1 | 2020-05-28T19:38:09.000Z | 2020-05-28T19:38:09.000Z | # This example usually crashes!
import trio
import random
async def main():
async with trio.open_nursery() as nursery:
send_channel, receive_channel = trio.open_memory_channel(0)
# Start two producers
nursery.start_soon(producer, "A", send_channel)
nursery.start_soon(producer, "B",... | 34.935484 | 74 | 0.666667 |
53a25a01efb8e07a8ddc65eea406a980cfeb2866 | 1,438 | py | Python | service_http/src/service_http_welcome/system.py | hivesolutions/colony_plugins | cfd8fb2ac58037e01002966704b8a642feb37895 | [
"Apache-1.1"
] | 1 | 2016-10-30T09:51:06.000Z | 2016-10-30T09:51:06.000Z | service_http/src/service_http_welcome/system.py | hivesolutions/colony_plugins | cfd8fb2ac58037e01002966704b8a642feb37895 | [
"Apache-1.1"
] | 1 | 2015-12-29T18:51:07.000Z | 2015-12-29T18:51:07.000Z | service_http/src/service_http_welcome/system.py | hivesolutions/colony_plugins | cfd8fb2ac58037e01002966704b8a642feb37895 | [
"Apache-1.1"
] | 1 | 2018-01-26T12:54:13.000Z | 2018-01-26T12:54:13.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Hive Colony Framework
# Copyright (c) 2008-2020 Hive Solutions Lda.
#
# This file is part of Hive Colony Framework.
#
# Hive Colony Framework is free software: you can redistribute it and/or modify
# it under the terms of the Apache License as published by the Apach... | 29.958333 | 80 | 0.694715 |
de27de81e0aefaf8d391c1f25363c46611021150 | 556 | py | Python | scripts/natural_sort.py | meramsey/python-scripts-collection | bb7aefb6f97909e9d807753541107293eec37dd7 | [
"MIT"
] | 2 | 2022-03-05T18:02:13.000Z | 2022-03-06T14:34:10.000Z | scripts/natural_sort.py | meramsey/python-scripts-collection | bb7aefb6f97909e9d807753541107293eec37dd7 | [
"MIT"
] | null | null | null | scripts/natural_sort.py | meramsey/python-scripts-collection | bb7aefb6f97909e9d807753541107293eec37dd7 | [
"MIT"
] | 1 | 2022-03-10T05:02:34.000Z | 2022-03-10T05:02:34.000Z | def natural_key(string_):
import re
"""See https://blog.codinghorror.com/sorting-for-humans-natural-sort-order/"""
return [int(s) if s.isdigit() else s for s in re.split(r'(\d+)', string_)]
matching_tags = ['v2.8.10', 'v2.8.9', 'v2.8.8', 'v2.8.7', 'v2.8.6', 'v2.8.5', 'v2.8.4', 'v2.8.3', 'v2.8.2', 'v2.8.1'... | 39.714286 | 117 | 0.633094 |
e3e2112e82d7f60ba2dcab09dfc61f9036f24826 | 1,222 | py | Python | aws_scheduler/__init__.py | da-huin/aws_scheduler | 2f30dfb4945f1607527436b6cae0926b755664ea | [
"MIT"
] | 1 | 2020-08-08T13:32:36.000Z | 2020-08-08T13:32:36.000Z | aws_scheduler/__init__.py | da-huin/aws_scheduler | 2f30dfb4945f1607527436b6cae0926b755664ea | [
"MIT"
] | null | null | null | aws_scheduler/__init__.py | da-huin/aws_scheduler | 2f30dfb4945f1607527436b6cae0926b755664ea | [
"MIT"
] | null | null | null |
from .kernel import scheduler
def deploy(template_dir="template/",
aws_access_key_id=None,
aws_secret_access_key=None,
region_name=None,
no_cache=False,
delete_unmanaged=False):
"""
This package makes it easy to manage AWS Glue C... | 35.941176 | 112 | 0.675941 |
74600031464d1ea214daffa8d4b6c9ee5d12d0d9 | 1,829 | py | Python | test.py | mounir4023/MSA_POS_Tagger | d34cace777504a4121b675048ddbaa12297cc20b | [
"MIT"
] | 3 | 2020-02-04T19:01:30.000Z | 2021-07-05T18:09:36.000Z | test.py | mounir4023/MSA_POS_Tagger | d34cace777504a4121b675048ddbaa12297cc20b | [
"MIT"
] | null | null | null | test.py | mounir4023/MSA_POS_Tagger | d34cace777504a4121b675048ddbaa12297cc20b | [
"MIT"
] | null | null | null | from corpus import *
from hmm import *
from viterbi import *
import os
import re
import random
def tokenize( sentence ):
os.chdir('api')
source = open('source.txt','w',encoding='windows_1256')
source.write(sentence)
source.close()
os.system('perl splitaffixfirstSol.pl < source.txt > output.tx... | 25.054795 | 69 | 0.673592 |
3ae680561cf6b61f357ea4ccf5057592d57ba4ca | 1,000 | py | Python | hackernews/users/admin.py | olacodes/hackernews | a616dd6b938e79e6bb5233cb9482f3615b50d875 | [
"MIT"
] | null | null | null | hackernews/users/admin.py | olacodes/hackernews | a616dd6b938e79e6bb5233cb9482f3615b50d875 | [
"MIT"
] | 11 | 2022-02-11T13:34:46.000Z | 2022-03-31T12:26:41.000Z | hackernews/users/admin.py | olacodes/hackernews | a616dd6b938e79e6bb5233cb9482f3615b50d875 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth import admin as auth_admin
from django.contrib.auth import get_user_model
from django.utils.translation import gettext_lazy as _
from hackernews.users.forms import UserChangeForm, UserCreationForm
User = get_user_model()
@admin.register(User)
class UserAdmin... | 28.571429 | 74 | 0.557 |
08aa31a437893ca2959a2e51578cc6f05eb53ce6 | 435 | py | Python | products/migrations/0003_product_image.py | Hernandes-Silva/virtual_store | 08d764063c6bac9b6f67f445236a6ad59b547f26 | [
"MIT"
] | 1 | 2021-06-17T05:15:42.000Z | 2021-06-17T05:15:42.000Z | products/migrations/0003_product_image.py | Hernandes-Silva/virtual_store | 08d764063c6bac9b6f67f445236a6ad59b547f26 | [
"MIT"
] | null | null | null | products/migrations/0003_product_image.py | Hernandes-Silva/virtual_store | 08d764063c6bac9b6f67f445236a6ad59b547f26 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.2 on 2021-05-30 19:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0002_rename_stock_product_quantity'),
]
operations = [
migrations.AddField(
model_name='product',
name='... | 22.894737 | 89 | 0.62069 |
fbaadfd5fe059e0c609b2b649392d1ad1d1980d2 | 856 | py | Python | BMS/apps/nav/admin.py | wjs1152283574/python-DRF | 179d1cb38aeabd958ea2183339cd40b0a641f744 | [
"0BSD"
] | null | null | null | BMS/apps/nav/admin.py | wjs1152283574/python-DRF | 179d1cb38aeabd958ea2183339cd40b0a641f744 | [
"0BSD"
] | null | null | null | BMS/apps/nav/admin.py | wjs1152283574/python-DRF | 179d1cb38aeabd958ea2183339cd40b0a641f744 | [
"0BSD"
] | null | null | null | from django.contrib import admin
from .models import BaseNav,Icons,SecondNav,ThirtNav
# Register your models here.
@admin.register(BaseNav)
class BaseNavAdmin(admin.ModelAdmin):
list_display = [
'pk',
'nav_name',
'nav_icon',
'add_time',
'add_user'
]
@admin.register(Icons... | 21.4 | 52 | 0.579439 |
f1e78358e24ddfd524413ba94ea9a6361753eec5 | 4,983 | py | Python | services/web/server/tests/unit/with_dbs/03/meta_modeling/test_meta_modeling_results.py | elisabettai/osparc-simcore | ad7b6e05111b50fe95e49306a992170490a7247f | [
"MIT"
] | null | null | null | services/web/server/tests/unit/with_dbs/03/meta_modeling/test_meta_modeling_results.py | elisabettai/osparc-simcore | ad7b6e05111b50fe95e49306a992170490a7247f | [
"MIT"
] | 1 | 2021-11-29T13:38:09.000Z | 2021-11-29T13:38:09.000Z | services/web/server/tests/unit/with_dbs/03/meta_modeling/test_meta_modeling_results.py | mrnicegyu11/osparc-simcore | b6fa6c245dbfbc18cc74a387111a52de9b05d1f4 | [
"MIT"
] | null | null | null | # pylint: disable=redefined-outer-name
# pylint: disable=unused-argument
# pylint: disable=unused-variable
import json
from typing import Any, Dict, Type
import pytest
from pydantic import BaseModel
from simcore_service_webserver.meta_modeling_results import (
ExtractedResults,
extract_project_results,
)
@... | 35.848921 | 122 | 0.552278 |
7c6d4c5a8d8bed7bf166bb8787071d96bcf03aa2 | 649 | py | Python | module/other.py | Saroniii/yonosumi_official_bot | ef09ff8e9c089c0df8d191fe5db665f0f7322fd3 | [
"MIT"
] | 5 | 2020-09-23T01:06:00.000Z | 2020-11-24T04:39:58.000Z | module/other.py | Saroniii/yonosumi_official_bot | ef09ff8e9c089c0df8d191fe5db665f0f7322fd3 | [
"MIT"
] | 13 | 2020-10-10T16:00:16.000Z | 2020-11-26T02:02:57.000Z | module/other.py | YonosumiProject/yonosumi_official_bot | f8e3d2c0f7c0320cdb9247917d6d21f208ec7a77 | [
"MIT"
] | 2 | 2021-04-19T21:46:00.000Z | 2021-08-16T07:23:11.000Z | import discord
from discord.ext import commands, tasks
class Other(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command()
async def genbotinvite(self, ctx, user: discord.User):
bot = False
if user.bot:
bot = True
if bot == False... | 29.5 | 178 | 0.608629 |
1b03bf3d8c4a7f2613a0c9f3a4392a82f9cf1cf6 | 1,876 | py | Python | mipengine/node_exceptions.py | ThanKarab/MIP-Engine | 41ae237f4e5c35c0d3ad94bf741ade08b695dd8e | [
"MIT"
] | null | null | null | mipengine/node_exceptions.py | ThanKarab/MIP-Engine | 41ae237f4e5c35c0d3ad94bf741ade08b695dd8e | [
"MIT"
] | 2 | 2021-05-21T07:07:54.000Z | 2021-05-21T13:19:11.000Z | mipengine/node_exceptions.py | ThanKarab/MIP-Engine | 41ae237f4e5c35c0d3ad94bf741ade08b695dd8e | [
"MIT"
] | null | null | null | from typing import List
class TablesNotFound(Exception):
"""
Exception raised for errors while retrieving a table from a database.
Attributes:
tables -- tables which caused the error
message -- explanation of the error
"""
def __init__(self, tables: List[str]):
self.table... | 30.754098 | 103 | 0.665245 |
f119620407bd07867fdeea43c7c566214c9fef79 | 3,513 | py | Python | spug_api/apps/monitor/views.py | laashub/spug | 85f1389747c9bb368e5e9bffec214e80a9632c0f | [
"MIT"
] | 3 | 2019-06-07T03:26:33.000Z | 2021-12-28T01:51:30.000Z | spug_api/apps/monitor/views.py | cool-ops/spug | 0b870654d1aed80f40db5b4d9a0452f454afca05 | [
"MIT"
] | 10 | 2021-03-19T10:59:00.000Z | 2022-02-27T05:10:31.000Z | spug_api/apps/monitor/views.py | lgq9220/spug | 83098fbd1d5780f827a4aca41eb87321f3d2ab21 | [
"MIT"
] | 1 | 2021-03-24T07:49:31.000Z | 2021-03-24T07:49:31.000Z | # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
# Copyright: (c) <spug.dev@gmail.com>
# Released under the MIT License.
from django.views.generic import View
from libs import json_response, JsonParser, Argument, human_datetime
from apps.monitor.models import Detection
from django_redis import g... | 43.37037 | 91 | 0.575861 |
d9b1f72158590a4519b15f7757ef8572cfdebb08 | 2,509 | py | Python | bank_ddd_es_cqrs/accounts/model/amount.py | Hyaxia/Bank-DDD-CQRS-ES | 116e3eb3e93d549c1da53e6d506ab47667d77445 | [
"MIT"
] | 8 | 2020-10-27T09:46:20.000Z | 2022-01-27T12:16:48.000Z | bank_ddd_es_cqrs/accounts/model/amount.py | Hyaxia/Bank-DDD-CQRS-ES | 116e3eb3e93d549c1da53e6d506ab47667d77445 | [
"MIT"
] | null | null | null | bank_ddd_es_cqrs/accounts/model/amount.py | Hyaxia/Bank-DDD-CQRS-ES | 116e3eb3e93d549c1da53e6d506ab47667d77445 | [
"MIT"
] | 2 | 2021-05-29T08:11:48.000Z | 2021-07-26T04:44:53.000Z | import math
from typing import Tuple
from dataclasses import dataclass
@dataclass(frozen=True)
class Amount:
dollars: int
cents: int = 0
def __post_init__(self) -> None:
dollars, cents = self._convert_cents_to_dollars_if_possible()
self.__dict__['dollars'] = dollars + self.dollars
... | 34.369863 | 81 | 0.639299 |
4a05e53bf4ea41ea3099120b9e36a93fab5e0658 | 447 | py | Python | product/migrations/0005_review_date.py | MW982/Django-shop | da28348f93fbe4c545495b7ce43bca7db8f2308b | [
"MIT"
] | null | null | null | product/migrations/0005_review_date.py | MW982/Django-shop | da28348f93fbe4c545495b7ce43bca7db8f2308b | [
"MIT"
] | 7 | 2020-06-06T01:07:24.000Z | 2022-02-10T11:36:55.000Z | product/migrations/0005_review_date.py | MW982/Django-shop | da28348f93fbe4c545495b7ce43bca7db8f2308b | [
"MIT"
] | null | null | null | # Generated by Django 2.2.4 on 2019-09-10 11:37
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
("product", "0004_auto_20190910_1318"),
]
operations = [
migrations.AddField(
model_name="review",
... | 22.35 | 86 | 0.630872 |
6bdbb5c0be72fae3bc7d109bf20ce10ac219b191 | 1,043 | py | Python | tests/conftest.py | Vanillan-MellonDrop/tsct-portal | 3047cf494d5d9a8843b2165b210c626ad19613a5 | [
"MIT"
] | null | null | null | tests/conftest.py | Vanillan-MellonDrop/tsct-portal | 3047cf494d5d9a8843b2165b210c626ad19613a5 | [
"MIT"
] | null | null | null | tests/conftest.py | Vanillan-MellonDrop/tsct-portal | 3047cf494d5d9a8843b2165b210c626ad19613a5 | [
"MIT"
] | null | null | null | import os
import pytest
from portal import create_app
from portal import db
@pytest.fixture
def app():
"""Create an app configured for tests."""
app = create_app({
'TESTING': True,
'DB_URL': "postgresql://portal_user@localhost/portal_test"
})
with app.app_context():
db.init... | 18.963636 | 75 | 0.630872 |
41d99cdf94a89c7b8060f9e5b7d5991d47e1717f | 2,191 | py | Python | code/lib/modules/user_tools.py | 1dustindavis/IT-CPE | bf7c097cb0c3749a533799e1ceeb60eebc658f10 | [
"BSD-3-Clause"
] | null | null | null | code/lib/modules/user_tools.py | 1dustindavis/IT-CPE | bf7c097cb0c3749a533799e1ceeb60eebc658f10 | [
"BSD-3-Clause"
] | null | null | null | code/lib/modules/user_tools.py | 1dustindavis/IT-CPE | bf7c097cb0c3749a533799e1ceeb60eebc658f10 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2015-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
"""Functions for in... | 34.234375 | 78 | 0.611593 |
e5bbbe605af6b23a8a92330593019c41cd10f742 | 4,111 | py | Python | tests/saml/metadata/federations/test_loader.py | NYPL-Simplified/circulation | 1ea3eb81d9c8e3121b0fc0e1a40ac42956c29084 | [
"Apache-2.0"
] | 16 | 2016-06-27T18:09:37.000Z | 2021-12-07T15:20:52.000Z | tests/saml/metadata/federations/test_loader.py | NYPL-Simplified/circulation | 1ea3eb81d9c8e3121b0fc0e1a40ac42956c29084 | [
"Apache-2.0"
] | 809 | 2016-01-25T15:41:05.000Z | 2022-03-29T16:12:38.000Z | tests/saml/metadata/federations/test_loader.py | NYPL-Simplified/circulation | 1ea3eb81d9c8e3121b0fc0e1a40ac42956c29084 | [
"Apache-2.0"
] | 19 | 2016-05-06T16:18:50.000Z | 2021-05-01T06:33:18.000Z | import pytest
from mock import MagicMock, create_autospec, patch
from api.saml.metadata.federations import incommon
from api.saml.metadata.federations.loader import (
SAMLFederatedIdentityProviderLoader,
SAMLMetadataLoader,
SAMLMetadataLoadingError,
)
from api.saml.metadata.federations.model import SAMLFed... | 39.912621 | 88 | 0.739723 |
fb24ef66d7b2e6ec06f0d116d4c2ff6adb759c41 | 954 | py | Python | exams/second/src/database/manage/user.py | JoelHernandez343/networking-administration | 65de814cde6fc08c47e989027a95a328ba9950df | [
"MIT"
] | null | null | null | exams/second/src/database/manage/user.py | JoelHernandez343/networking-administration | 65de814cde6fc08c47e989027a95a328ba9950df | [
"MIT"
] | null | null | null | exams/second/src/database/manage/user.py | JoelHernandez343/networking-administration | 65de814cde6fc08c47e989027a95a328ba9950df | [
"MIT"
] | 1 | 2022-03-02T16:19:34.000Z | 2022-03-02T16:19:34.000Z | from database import models
def create_multiple(router_id, users):
new_users = []
for user in users:
new_users.append(models.User(router_id=router_id, name=user["name"]))
return new_users
def get_all(db):
users = db.query(models.User).all()
return [u.to_dict() for u in users]
def add... | 17.035714 | 77 | 0.626834 |
809f230fe6a31172b4329303ec857bb08458f8ae | 4,249 | py | Python | breeze/backend/appointments/views.py | fmdzimin13/Breeze | 10603b3828ce196eb6b97d63e386e06bd33029a4 | [
"MIT"
] | null | null | null | breeze/backend/appointments/views.py | fmdzimin13/Breeze | 10603b3828ce196eb6b97d63e386e06bd33029a4 | [
"MIT"
] | null | null | null | breeze/backend/appointments/views.py | fmdzimin13/Breeze | 10603b3828ce196eb6b97d63e386e06bd33029a4 | [
"MIT"
] | null | null | null | from os import stat
from django.shortcuts import get_list_or_404, get_object_or_404
from django.contrib.auth import get_user_model
from .serializers import AppointmentSerializer, AppointmentplaceSerializer, ParticipantSerializer
from .models import Appointment, Appointmentplace, Participant
from accounts.utils import c... | 33.992 | 97 | 0.6771 |
56229245eb2c9bf9e8fd0fe90249c9b17112424f | 19,870 | py | Python | lib/rdflib/plugins/parsers/pyRdfa/termorcurie.py | DmPo/Schemaorg_CivicOS | 289b669d592a2b429402b19a7661b13631940daa | [
"Apache-2.0"
] | 46 | 2015-05-01T21:35:35.000Z | 2022-03-27T03:06:57.000Z | lib/rdflib/plugins/parsers/pyRdfa/termorcurie.py | jesman/schemaorg | 6649c41e56a9724eaeed25dedf67736258f922bf | [
"Apache-2.0"
] | 21 | 2015-04-24T03:37:05.000Z | 2022-03-29T13:24:04.000Z | lib/rdflib/plugins/parsers/pyRdfa/termorcurie.py | jesman/schemaorg | 6649c41e56a9724eaeed25dedf67736258f922bf | [
"Apache-2.0"
] | 13 | 2015-04-23T03:42:00.000Z | 2022-03-22T12:45:15.000Z | # -*- coding: utf-8 -*-
"""
Management of vocabularies, terms, and their mapping to URI-s. The main class of this module (L{TermOrCurie}) is,
conceptually, part of the overall state of processing at a node (L{state.ExecutionContext}) but putting it into a separate
module makes it easider to maintain.
@summary: Managem... | 39.74 | 158 | 0.688676 |
87393bbf403989c9067bf609743c47c0203b865a | 1,012 | py | Python | playground/bridge/integrator.py | murlokito/playground | 405a7091bbfd6705db967e872ed6c4591bd892e6 | [
"MIT"
] | null | null | null | playground/bridge/integrator.py | murlokito/playground | 405a7091bbfd6705db967e872ed6c4591bd892e6 | [
"MIT"
] | null | null | null | playground/bridge/integrator.py | murlokito/playground | 405a7091bbfd6705db967e872ed6c4591bd892e6 | [
"MIT"
] | null | null | null | __title__ = "playground"
__author__ = "murlux"
__copyright__ = "Copyright 2019, " + __author__
__credits__ = (__author__, )
__license__ = "MIT"
__email__ = "murlux@protonmail.com"
from playground.abstract.integrator import Integrator
from playground.enums import State
from playground.bridge.config import BridgeConfig... | 24.682927 | 78 | 0.673913 |
61d482c7fe18f84e17d4949350fd2d8e0488e783 | 326 | py | Python | xmpt/migrations/0004_remove_ustown_county_id.py | anzrz/djangoapp | 85b4f73754af53ddf33ec281a04a70415af02eb6 | [
"MIT"
] | null | null | null | xmpt/migrations/0004_remove_ustown_county_id.py | anzrz/djangoapp | 85b4f73754af53ddf33ec281a04a70415af02eb6 | [
"MIT"
] | null | null | null | xmpt/migrations/0004_remove_ustown_county_id.py | anzrz/djangoapp | 85b4f73754af53ddf33ec281a04a70415af02eb6 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-03-24 23:10
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('xmpt', '0003_ustown_county_id'),
]
operations = [
migrations.RemoveField(
model_name='ustown',
name='county_id',
),
... | 18.111111 | 47 | 0.588957 |
b3f988dbcefc09e8a130a75599394aec79038a45 | 232 | py | Python | examples/suppression_list/create_suppression_entry.py | Ometria/python-sparkpost | b7eb2e30effc0d35cf25d7acaa4a5c304c25c9e5 | [
"Apache-2.0"
] | 100 | 2015-02-11T20:07:23.000Z | 2021-10-18T10:27:35.000Z | examples/suppression_list/create_suppression_entry.py | Ometria/python-sparkpost | b7eb2e30effc0d35cf25d7acaa4a5c304c25c9e5 | [
"Apache-2.0"
] | 152 | 2015-02-09T01:34:02.000Z | 2021-11-08T17:32:30.000Z | examples/suppression_list/create_suppression_entry.py | Ometria/python-sparkpost | b7eb2e30effc0d35cf25d7acaa4a5c304c25c9e5 | [
"Apache-2.0"
] | 79 | 2015-02-14T07:42:17.000Z | 2022-02-25T00:52:28.000Z | from sparkpost import SparkPost
sp = SparkPost()
result = sp.suppression_list.create({
'email': 'test@test.com',
'transactional': False,
'non_transactional': True,
'description': 'Test description'
})
print(result)
| 21.090909 | 37 | 0.693966 |
f0226db803773458fddc8a8105839550de65bcb9 | 924 | py | Python | gibbon/utility/toolbox.py | Huxx0804/gibbon_lib | b1f4e565f336f6ce7399f6e5e8e10392d5712dea | [
"MIT"
] | null | null | null | gibbon/utility/toolbox.py | Huxx0804/gibbon_lib | b1f4e565f336f6ce7399f6e5e8e10392d5712dea | [
"MIT"
] | null | null | null | gibbon/utility/toolbox.py | Huxx0804/gibbon_lib | b1f4e565f336f6ce7399f6e5e8e10392d5712dea | [
"MIT"
] | 1 | 2021-10-20T06:14:08.000Z | 2021-10-20T06:14:08.000Z | import time
import sys
def timeit(func):
def wrapper(*args, **kwargs):
print('➜➜➜➜➜➜ %30s ➜➜➜➜➜➜ start...' % func.__name__)
start = time.time()
result = func(*args, **kwargs)
end = time.time()
print('░░░░░░ %30s ░░░░░░ used time -> %6.6f s' % (func.__name__, end - start))
... | 21.488372 | 87 | 0.532468 |
5f67e7d57ca174804c23ef624784d921273a7df2 | 65 | py | Python | tests/__init__.py | pbranson/dembuilder | 988250c9da5d98b19b447f180d8bb53d925b3bc7 | [
"MIT"
] | 1 | 2021-08-03T02:22:47.000Z | 2021-08-03T02:22:47.000Z | tests/__init__.py | pbranson/dembuilder | 988250c9da5d98b19b447f180d8bb53d925b3bc7 | [
"MIT"
] | 2 | 2019-05-27T03:26:04.000Z | 2021-07-29T14:59:29.000Z | tests/__init__.py | pbranson/dembuilder | 988250c9da5d98b19b447f180d8bb53d925b3bc7 | [
"MIT"
] | 4 | 2019-05-23T01:23:40.000Z | 2021-08-03T02:23:04.000Z | # -*- coding: utf-8 -*-
"""Unit test package for dembuilder."""
| 16.25 | 39 | 0.584615 |
7f2659fd474950525d117a7bc3d485d62f2a963e | 42 | py | Python | testapp/models/__init__.py | jrice128/permission_manager | 02d415a5f6bc0b4fb2cf40fa6431c813fabe38ba | [
"MIT"
] | null | null | null | testapp/models/__init__.py | jrice128/permission_manager | 02d415a5f6bc0b4fb2cf40fa6431c813fabe38ba | [
"MIT"
] | null | null | null | testapp/models/__init__.py | jrice128/permission_manager | 02d415a5f6bc0b4fb2cf40fa6431c813fabe38ba | [
"MIT"
] | 1 | 2020-04-28T09:18:14.000Z | 2020-04-28T09:18:14.000Z | from .models import User, Role, Permission | 42 | 42 | 0.809524 |
dfc1099bab2684f431591161a80189a46aa022b9 | 4,180 | py | Python | s3-Lambda/trainingupload-lambda.py | antennix/rust-detection | 752a99f74cd4de03010a5db90c8b64990492f5ec | [
"MIT",
"MIT-0"
] | 4 | 2021-04-06T11:48:03.000Z | 2022-01-31T12:47:16.000Z | s3-Lambda/trainingupload-lambda.py | antennix/rust-detection | 752a99f74cd4de03010a5db90c8b64990492f5ec | [
"MIT",
"MIT-0"
] | 1 | 2022-01-19T04:31:03.000Z | 2022-01-21T00:07:47.000Z | s3-Lambda/trainingupload-lambda.py | antennix/rust-detection | 752a99f74cd4de03010a5db90c8b64990492f5ec | [
"MIT",
"MIT-0"
] | 4 | 2021-06-10T18:54:06.000Z | 2022-01-27T00:18:56.000Z | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
import json
import zipfile
import boto3
import uuid
import os
from datetime import datetime
s3_client = boto3.client('s3')
ssm_client = boto3.client('ssm')
dynamodb = boto3.resource('dynamodb')
def lambda_handler(ev... | 37.657658 | 124 | 0.539234 |
bd5b9d63c2927658f0738577f7f15c2e5c07e39c | 14,716 | py | Python | kuryr_kubernetes/controller/handlers/kuryrnetworkpolicy.py | AghaSaad04/kuryr-kubernetes | 9067b45a06aca07861a226f41cfb1b1b59934eed | [
"Apache-2.0"
] | null | null | null | kuryr_kubernetes/controller/handlers/kuryrnetworkpolicy.py | AghaSaad04/kuryr-kubernetes | 9067b45a06aca07861a226f41cfb1b1b59934eed | [
"Apache-2.0"
] | null | null | null | kuryr_kubernetes/controller/handlers/kuryrnetworkpolicy.py | AghaSaad04/kuryr-kubernetes | 9067b45a06aca07861a226f41cfb1b1b59934eed | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 45.28 | 79 | 0.599619 |
618d027d9b506c97e998c6601eb1eec91a3b36b1 | 2,032 | py | Python | webtool/server/models/time_base.py | wodo/WebTool3 | 1582a03d619434d8a6139f705a1b5860e9b5b8b8 | [
"BSD-2-Clause"
] | 13 | 2018-12-16T21:01:24.000Z | 2019-07-03T06:23:41.000Z | webtool/server/models/time_base.py | dav-kempten/WebTool3 | 859f39df67cb0f853c7fe33cb5d08b999d8692fc | [
"BSD-2-Clause"
] | 26 | 2019-07-07T06:44:06.000Z | 2021-09-07T07:28:34.000Z | webtool/server/models/time_base.py | dav-kempten/WebTool3 | 859f39df67cb0f853c7fe33cb5d08b999d8692fc | [
"BSD-2-Clause"
] | 3 | 2017-06-18T06:22:52.000Z | 2019-07-03T06:21:05.000Z | # -*- coding: utf-8 -*-
import hashlib
from datetime import datetime
from django.db.models.signals import post_save
from django.apps import apps
from django.core.cache import cache
from django.db import models
CACHE_KEY = 'wt3.object'
class ChangesManager(models.Manager):
def changed_since(self, d=None):
... | 26.38961 | 101 | 0.652559 |
e9a23171aedbb251616cb4ea3dc21b79a0117bee | 1,511 | py | Python | make_eval_references.py | won2lee/summ_fast_abs_rl | 6aeb0fe760ed0bc693ba3194f2813ef9cccc07bf | [
"MIT"
] | null | null | null | make_eval_references.py | won2lee/summ_fast_abs_rl | 6aeb0fe760ed0bc693ba3194f2813ef9cccc07bf | [
"MIT"
] | null | null | null | make_eval_references.py | won2lee/summ_fast_abs_rl | 6aeb0fe760ed0bc693ba3194f2813ef9cccc07bf | [
"MIT"
] | null | null | null | """ make reference text files needed for ROUGE evaluation """
import json
import os
from os.path import join, exists
from time import time
from datetime import timedelta
from utils import count_data
from decoding import make_html_safe
from decode_full_model import for_cnn
try:
DATA_DIR = os.environ['DATA']
except... | 32.148936 | 83 | 0.635341 |
61ccb652eb7cc13d444b051cff57e47d4bc75e01 | 4,064 | py | Python | projeto-tcc-daylight/core/urls.py | vinicius-silvestre/portfolio | 5288a889b8d1ae9479a00dfb0c050bdbe33ee608 | [
"MIT"
] | null | null | null | projeto-tcc-daylight/core/urls.py | vinicius-silvestre/portfolio | 5288a889b8d1ae9479a00dfb0c050bdbe33ee608 | [
"MIT"
] | null | null | null | projeto-tcc-daylight/core/urls.py | vinicius-silvestre/portfolio | 5288a889b8d1ae9479a00dfb0c050bdbe33ee608 | [
"MIT"
] | null | null | null | from django.contrib.auth import login, logout
from django.urls import path
from . import views
#ciclo do projeto
# request > urls> views > model > response
urlpatterns = [
path('', views.index, name='home'),
path('entrar/', views.login, name='login'),
path('sair/', views.logout, {'next_page': '/account/lo... | 60.656716 | 102 | 0.746555 |
ed4849297f4655a0c079d3fa7de382b2712d5473 | 1,837 | py | Python | TFIDF/tf_idf.py | HerbertHu/Simple-Search-Engine | 7b8a4c4a1b204762afbe657adc328b29c599f3be | [
"MIT"
] | 1 | 2021-10-02T10:05:34.000Z | 2021-10-02T10:05:34.000Z | TFIDF/tf_idf.py | HerbertHu/Simple-Search-Engine | 7b8a4c4a1b204762afbe657adc328b29c599f3be | [
"MIT"
] | null | null | null | TFIDF/tf_idf.py | HerbertHu/Simple-Search-Engine | 7b8a4c4a1b204762afbe657adc328b29c599f3be | [
"MIT"
] | 2 | 2020-03-26T02:24:11.000Z | 2021-10-02T10:05:35.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Apr 12 18:11:30 2018
@author: Herbert
"""
import sys
import os
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.feature_extraction.text import CountVectorizer
sys.path.append(os.path.dirname(__file__))
import word_list
# 得到文件夹下面的文件目录
def get_file_na... | 31.672414 | 85 | 0.66957 |
b4aa8e29d178d79b4a9a34e986cee67e9c8c84b0 | 1,997 | py | Python | Albufera/Funz_Water.py | hastamax/Arg | b3384a6a59c66da28a6caeb9054e08b208cbff25 | [
"BSD-4-Clause-UC"
] | null | null | null | Albufera/Funz_Water.py | hastamax/Arg | b3384a6a59c66da28a6caeb9054e08b208cbff25 | [
"BSD-4-Clause-UC"
] | null | null | null | Albufera/Funz_Water.py | hastamax/Arg | b3384a6a59c66da28a6caeb9054e08b208cbff25 | [
"BSD-4-Clause-UC"
] | null | null | null |
from __future__ import print_function
import sys
import os
import numpy as np
import theano
import theano.tensor as T
import lasagne
import gdal
from scipy.misc import imresize
def load_input(path,num,dim):
dir_list = os.listdir(path)
dir_list.sort()
r = dim
dataset = gdal.Open('/home2/mass.gargi... | 36.981481 | 143 | 0.621933 |
17eafe2515824c74251b97d2af5f28d001908e20 | 12,234 | py | Python | qa/rpc-tests/segwit.py | bitmammoth/kekcoin-segwit | ac5ed108fbe3221a68826108bdc5bef725f98849 | [
"MIT"
] | 7 | 2018-01-29T18:47:19.000Z | 2019-06-24T13:48:10.000Z | qa/rpc-tests/segwit.py | bitmammoth/kekcoin-segwit | ac5ed108fbe3221a68826108bdc5bef725f98849 | [
"MIT"
] | null | null | null | qa/rpc-tests/segwit.py | bitmammoth/kekcoin-segwit | ac5ed108fbe3221a68826108bdc5bef725f98849 | [
"MIT"
] | 17 | 2017-11-20T21:20:03.000Z | 2021-01-31T12:43:54.000Z | #!/usr/bin/env python3
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test the SegWit changeover logic
#
from test_framework.test_framework import KekCoinTestFramework
from te... | 49.330645 | 198 | 0.654569 |
0e8880093fc40b732ae51e99cd8fa4bfaf257940 | 1,961 | py | Python | pytest_mockservers/http_server.py | maxleonov/pytest-mockservers | dac65092765651776792fe90e9623ea960ceb8be | [
"MIT"
] | null | null | null | pytest_mockservers/http_server.py | maxleonov/pytest-mockservers | dac65092765651776792fe90e9623ea960ceb8be | [
"MIT"
] | null | null | null | pytest_mockservers/http_server.py | maxleonov/pytest-mockservers | dac65092765651776792fe90e9623ea960ceb8be | [
"MIT"
] | null | null | null | import contextlib
import socket
from typing import Type
import pytest
from aiohttp import web, web_urldispatcher
class Server:
__slots__ = "_host", "_port", "_shutdown_timeout", "_app", "_app_runner"
@property
def host(self):
return self._host
@property
def port(self):
return se... | 21.788889 | 86 | 0.63641 |
0bd37fac3a95045dea557d5c035782130f90e6ee | 1,220 | py | Python | evaluate/evaluate_detrac_coco_api/Mobilenetv2_yolov3_config_detrac_test.py | yuanliangxie/YOLOv3_simple_baseline | 325e2963ae770e6f45912f3142941d3bddaf9d6e | [
"Apache-2.0"
] | 1 | 2022-02-26T10:13:08.000Z | 2022-02-26T10:13:08.000Z | evaluate/evaluate_detrac_coco_api/Mobilenetv2_yolov3_config_detrac_test.py | yuanliangxie/YOLOv3_simple_baseline | 325e2963ae770e6f45912f3142941d3bddaf9d6e | [
"Apache-2.0"
] | null | null | null | evaluate/evaluate_detrac_coco_api/Mobilenetv2_yolov3_config_detrac_test.py | yuanliangxie/YOLOv3_simple_baseline | 325e2963ae770e6f45912f3142941d3bddaf9d6e | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# project
# test
TEST = {
"device_id": 0,
"PROJECT_PATH": "/home/xyl/PycharmProjects/YOLOV3_SUPER",
"test_path": "../../data/detrac/test.txt",
"test_ignore_region": "../../data/detrac/test_ignore_region.txt",
"test_labels_path": "../../data/detrac/labels_test",
'DATA':{"CLASSES":['car'],#['car', 'b... | 32.105263 | 197 | 0.706557 |
fb517e0c304e17693125f20107447e628b0b800d | 1,218 | py | Python | cert.py | ashbytech/interactive-tutorials | 047052de0f49c4f9a78e02f627fc5182002213b6 | [
"Apache-2.0"
] | 2 | 2018-09-15T22:53:06.000Z | 2021-06-29T03:52:21.000Z | cert.py | ashbytech/interactive-tutorials | 047052de0f49c4f9a78e02f627fc5182002213b6 | [
"Apache-2.0"
] | 1 | 2022-03-30T16:45:37.000Z | 2022-03-30T16:45:37.000Z | cert.py | ashbytech/interactive-tutorials | 047052de0f49c4f9a78e02f627fc5182002213b6 | [
"Apache-2.0"
] | 1 | 2019-01-14T14:36:49.000Z | 2019-01-14T14:36:49.000Z | from reportlab.lib.pagesizes import A4, landscape
from reportlab.pdfgen import canvas
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
from reportlab.lib.units import inch
import StringIO
def create_cert(filename, name, course_name, date, logo_loc):
c = canvas.Canvas(filename,... | 33.833333 | 137 | 0.699507 |
119cbfa60977f2f6722b4093ea561ca86fdf4f3f | 279 | py | Python | awi_als_toolbox/utils.py | nhutter/awi-als-toolbox | 5498ef342514e82888c19c6cfa84163b60922148 | [
"MIT"
] | 2 | 2019-06-14T14:00:56.000Z | 2020-08-07T02:49:21.000Z | awi_als_toolbox/utils.py | nhutter/awi-als-toolbox | 5498ef342514e82888c19c6cfa84163b60922148 | [
"MIT"
] | 7 | 2019-09-18T08:23:30.000Z | 2021-06-08T09:06:42.000Z | awi_als_toolbox/utils.py | nhutter/awi-als-toolbox | 5498ef342514e82888c19c6cfa84163b60922148 | [
"MIT"
] | 2 | 2019-06-14T14:08:21.000Z | 2021-03-02T13:55:22.000Z | # -*- coding: utf-8 -*-
"""
"""
__author__ = "Stefan Hendricks"
from pyproj import Geod
def geo_inverse(lon0, lat0, lon1, lat1):
""" Inverse geodetic projection """
g = Geod(ellps='WGS84')
faz, baz, dist = g.inv(lon1, lat1, lon0, lat0)
return faz, baz, dist
| 17.4375 | 50 | 0.612903 |
1f8ae6a1a411a79c8bfd1ff3aca77134672f8dc5 | 2,701 | py | Python | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/cdn/apis/QueryStatisticsDataRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | null | null | null | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/cdn/apis/QueryStatisticsDataRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | null | null | null | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/cdn/apis/QueryStatisticsDataRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | null | null | null | # coding=utf8
# Copyright 2018 JDCLOUD.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 applicable law or agreed ... | 26.223301 | 102 | 0.608663 |
f726466b10a38e592d89b680d7031e520070c599 | 3,697 | py | Python | packages/pytea/pytest/benchmarks/transformers/missing_idx/src/transformers/convert_xlnet_original_tf_checkpoint_to_pytorch.py | lego0901/pytea | 8ede650def2e68f4610ba816451d8b9e28f09f76 | [
"MIT"
] | 12 | 2021-09-13T18:31:09.000Z | 2022-03-31T12:10:28.000Z | packages/pytea/pytest/benchmarks/transformers/missing_idx/src/transformers/convert_xlnet_original_tf_checkpoint_to_pytorch.py | lego0901/pytea | 8ede650def2e68f4610ba816451d8b9e28f09f76 | [
"MIT"
] | 5 | 2021-12-01T04:34:07.000Z | 2022-01-28T08:28:18.000Z | packages/pytea/pytest/benchmarks/transformers/missing_idx/src/transformers/convert_xlnet_original_tf_checkpoint_to_pytorch.py | lego0901/pytea | 8ede650def2e68f4610ba816451d8b9e28f09f76 | [
"MIT"
] | 3 | 2022-01-18T10:56:05.000Z | 2022-01-28T01:46:43.000Z | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# 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... | 32.147826 | 117 | 0.712199 |
4f11a986b24dda196f853ca6f1cddbbf7587c415 | 2,540 | py | Python | sql/rpg_queries.py | BoWarburton/DS-Unit-3-Sprint-2-SQL-and-Databases | 847fa627f74133e529ac47014167f34915f8df66 | [
"MIT"
] | null | null | null | sql/rpg_queries.py | BoWarburton/DS-Unit-3-Sprint-2-SQL-and-Databases | 847fa627f74133e529ac47014167f34915f8df66 | [
"MIT"
] | null | null | null | sql/rpg_queries.py | BoWarburton/DS-Unit-3-Sprint-2-SQL-and-Databases | 847fa627f74133e529ac47014167f34915f8df66 | [
"MIT"
] | null | null | null | #!/usr/bin/env Python
import sqlite3
# 1st connect to db
conn = sqlite3.connect('rpg_db.sqlite3')
# 2nd make a cursor
cursor = conn.cursor()
# 3rd execute SQL as Python string
# create_statement = "CREATE TABLE pizza (name varchar(30), size int, pepperoni int, pineapple int);"
# cursor.execute(create_statement)
# in... | 50.8 | 116 | 0.774803 |
083dfbed3d92f5fa0705c51e8f536549fe4c91fa | 7,383 | py | Python | src/maze_gitb/core/player.py | Anand1310/Benevolent-Bonobos | 9e7240106cb764261f256f35c230d879668a2e6d | [
"MIT"
] | 6 | 2021-07-17T18:02:43.000Z | 2021-11-20T14:31:16.000Z | src/maze_gitb/core/player.py | Jason11ookJJ/summer-code-jam-2021 | 898180c887024ada7bd611e30305266c1b249cac | [
"MIT"
] | 15 | 2021-07-10T16:03:07.000Z | 2021-07-18T09:20:24.000Z | src/maze_gitb/core/player.py | Jason11ookJJ/summer-code-jam-2021 | 898180c887024ada7bd611e30305266c1b249cac | [
"MIT"
] | 3 | 2021-07-17T18:02:49.000Z | 2021-08-30T18:58:57.000Z | from __future__ import annotations
import time
from copy import copy
from typing import TYPE_CHECKING, Dict
if TYPE_CHECKING:
from maze_gitb.core.maze import Maze
from blessed import Terminal
from blessed.keyboard import Keystroke
from maze_gitb.core.render import Render
from maze_gitb.core.sound import (
p... | 31.686695 | 107 | 0.563592 |
d396d8d8d04db1a67ceddc6c0c1a8e2ac32bc2f0 | 2,599 | py | Python | crawlers/slow_robot.py | StanfordHCI/memescraper | 7486cfcd7b35b1bfd6f431170d40d1c18ef56a57 | [
"MIT"
] | null | null | null | crawlers/slow_robot.py | StanfordHCI/memescraper | 7486cfcd7b35b1bfd6f431170d40d1c18ef56a57 | [
"MIT"
] | null | null | null | crawlers/slow_robot.py | StanfordHCI/memescraper | 7486cfcd7b35b1bfd6f431170d40d1c18ef56a57 | [
"MIT"
] | null | null | null | import time
import requests
from bs4 import BeautifulSoup
from crawlers.generic import BaseCrawler
from settings import BEGIN_CRAWL_SINCE
class SlowRobotCrawler(BaseCrawler):
def __init__(self, *args, **kwargs):
super(SlowRobotCrawler, self).__init__(source='slow_robot', *args, **kwargs)
self.ur... | 35.121622 | 100 | 0.499038 |
9d18fb71f1f3ba5e83ce0085cc4e20ad1b254702 | 3,695 | py | Python | nemo_text_processing/inverse_text_normalization/fr/taggers/telephone.py | lifefeel/NeMo | 85b7d3f0288d42c234e70546179974b6f4d13536 | [
"Apache-2.0"
] | null | null | null | nemo_text_processing/inverse_text_normalization/fr/taggers/telephone.py | lifefeel/NeMo | 85b7d3f0288d42c234e70546179974b6f4d13536 | [
"Apache-2.0"
] | 1 | 2022-03-06T14:09:02.000Z | 2022-03-06T14:09:02.000Z | nemo_text_processing/inverse_text_normalization/fr/taggers/telephone.py | admariner/NeMo | e542d7f9063a40afa4119a3b94de4c2c636a37bb | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021, NVIDIA CORPORATION & 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.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 44.518072 | 143 | 0.717456 |
a2f5b6079c511321df1d4be25237aaae3fce3c06 | 826 | py | Python | api_admin/urls.py | MuhammadSalahAli/django-api-admin | d0665d71f4c8d61f476bbf9250a340b6dffe4519 | [
"MIT"
] | 6 | 2021-08-28T08:24:26.000Z | 2021-10-31T10:33:56.000Z | api_admin/urls.py | MuhammadSalahAli/django-api-admin | d0665d71f4c8d61f476bbf9250a340b6dffe4519 | [
"MIT"
] | null | null | null | api_admin/urls.py | MuhammadSalahAli/django-api-admin | d0665d71f4c8d61f476bbf9250a340b6dffe4519 | [
"MIT"
] | null | null | null | """api_admin URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-bas... | 34.416667 | 77 | 0.713075 |
0e8bf30ae137b75e7b80b9748201e0c18fa2778a | 14,460 | py | Python | homeassistant/components/automation/__init__.py | jantenhove/home-assistant | e175935ffc35990bc26427345ef74c50cfaa56d3 | [
"Apache-2.0"
] | 2 | 2019-12-05T19:44:04.000Z | 2021-08-22T12:40:18.000Z | homeassistant/components/automation/__init__.py | jantenhove/home-assistant | e175935ffc35990bc26427345ef74c50cfaa56d3 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/automation/__init__.py | jantenhove/home-assistant | e175935ffc35990bc26427345ef74c50cfaa56d3 | [
"Apache-2.0"
] | 1 | 2018-04-29T02:14:32.000Z | 2018-04-29T02:14:32.000Z | """Allow to set up simple automation rules via the config file."""
import asyncio
from functools import partial
import importlib
import logging
import voluptuous as vol
from homeassistant.const import (
ATTR_ENTITY_ID, ATTR_NAME, CONF_ID, CONF_PLATFORM,
EVENT_AUTOMATION_TRIGGERED, EVENT_HOMEASSISTANT_START, S... | 31.78022 | 79 | 0.642669 |
9140312bd5d38b84b4d759220227388a9e8f42bd | 5,263 | py | Python | eng_to_ipa/stress.py | md84419/English-to-IPA | 90603266f748cacd19d2d8ce0e140a7ce7d4a91d | [
"MIT"
] | null | null | null | eng_to_ipa/stress.py | md84419/English-to-IPA | 90603266f748cacd19d2d8ce0e140a7ce7d4a91d | [
"MIT"
] | null | null | null | eng_to_ipa/stress.py | md84419/English-to-IPA | 90603266f748cacd19d2d8ce0e140a7ce7d4a91d | [
"MIT"
] | 2 | 2021-08-17T08:26:02.000Z | 2021-08-18T09:18:28.000Z | import os
import re
import json
import eng_to_ipa.syllables as syllables
import logging
def create_phones_json():
"""Creates the phones.json file in the resources directory from the phones.txt source file from CMU"""
phones_dict = {}
with open(os.path.join(os.path.abspath(os.path.dirname(__file__)),
... | 41.769841 | 120 | 0.521186 |
0622061d4b6a8a3cf9c204a78b95393afb286951 | 9,201 | py | Python | pipeline/plot/util.py | ttngu207/Li-2015a | a7a4f78aadc8574284d702bf3474b661bcdd7ef1 | [
"MIT"
] | null | null | null | pipeline/plot/util.py | ttngu207/Li-2015a | a7a4f78aadc8574284d702bf3474b661bcdd7ef1 | [
"MIT"
] | 12 | 2019-11-01T16:09:37.000Z | 2020-01-06T21:13:11.000Z | pipeline/plot/util.py | ttngu207/Li-2015a | a7a4f78aadc8574284d702bf3474b661bcdd7ef1 | [
"MIT"
] | 3 | 2019-09-01T13:18:42.000Z | 2019-10-06T00:15:40.000Z | # -*- mode: python -*-
import inspect
from IPython.core.display import HTML, display
from pygments import highlight
from pygments.lexers import PythonLexer
from pygments.formatters import HtmlFormatter
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns
import itertools... | 33.703297 | 124 | 0.633518 |
a523d6f720a7e8458ecb4435d815db2d75233f47 | 4,651 | py | Python | intera_interface/src/intera_interface/navigator.py | bostoncleek/intera_sdk | 8334bec54d557aa752b3fdbc3d3c6d9645ae3000 | [
"Apache-2.0"
] | null | null | null | intera_interface/src/intera_interface/navigator.py | bostoncleek/intera_sdk | 8334bec54d557aa752b3fdbc3d3c6d9645ae3000 | [
"Apache-2.0"
] | null | null | null | intera_interface/src/intera_interface/navigator.py | bostoncleek/intera_sdk | 8334bec54d557aa752b3fdbc3d3c6d9645ae3000 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2013-2018, Rethink Robotics Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 33.948905 | 85 | 0.637497 |
7844de550f1e248368afc39bc7a1fbc15a4b8f56 | 9,843 | py | Python | venv/lib/python3.8/site-packages/pygments/lexers/d.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 7 | 2022-01-16T12:28:16.000Z | 2022-03-04T15:31:45.000Z | venv/lib/python3.8/site-packages/pygments/lexers/d.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 8 | 2021-09-22T12:47:32.000Z | 2022-01-14T21:30:38.000Z | venv/lib/python3.8/site-packages/pygments/lexers/d.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 2 | 2022-01-17T16:50:08.000Z | 2022-01-17T20:59:27.000Z | """
pygments.lexers.d
~~~~~~~~~~~~~~~~~
Lexers for D languages.
:copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, include, words, bygroups
from pygments.token import Text, Comment, Keyword, Name, S... | 38.299611 | 91 | 0.400488 |
8b9d06de65f63374d128686ddbefb9a6d416045a | 54,953 | py | Python | splus/commands/msgvpn_commands.py | pankajsa/splus | 27676243536243425cc52cec9afaf44dc9fe85ba | [
"MIT"
] | 3 | 2020-06-05T14:17:05.000Z | 2020-06-07T01:24:41.000Z | splus/commands/msgvpn_commands.py | pankajsa/splus | 27676243536243425cc52cec9afaf44dc9fe85ba | [
"MIT"
] | null | null | null | splus/commands/msgvpn_commands.py | pankajsa/splus | 27676243536243425cc52cec9afaf44dc9fe85ba | [
"MIT"
] | 1 | 2020-06-05T15:35:41.000Z | 2020-06-05T15:35:41.000Z | import logging
import click
from common import add_if
from common import send_response
from managers import RestMgr
logger = logging.getLogger(__name__)
suburl = 'msgVpns'
@click.group()
def msgvpn(**kwargs):
'''Manage the Message VPNs'''
pass
@msgvpn.command()
@click.argument("name")
@click.option('--al... | 79.873547 | 404 | 0.726639 |
6b29ee5bfdfb6169d3f26df73e0b56ce7c68e759 | 3,760 | py | Python | example_app/aws_secrets.py | dazza-codes/serverless-fast-api | c4cdce62326a22778157a8555b7cdaafc2519b8d | [
"MIT"
] | 2 | 2021-01-22T12:27:59.000Z | 2021-09-09T14:54:11.000Z | example_app/aws_secrets.py | dazza-codes/serverless-fast-api | c4cdce62326a22778157a8555b7cdaafc2519b8d | [
"MIT"
] | 4 | 2020-05-03T01:54:53.000Z | 2021-01-21T18:20:27.000Z | example_app/aws_secrets.py | dazza-codes/serverless-fast-api | c4cdce62326a22778157a8555b7cdaafc2519b8d | [
"MIT"
] | 1 | 2021-09-09T14:49:54.000Z | 2021-09-09T14:49:54.000Z | """
AWS Secrets Manager
-------------------
.. code-block::
# The default AWS-API client may not use the region where the
# secret was defined, so the following default may not work.
secrets: Dict = get_aws_secret("app-secrets")
# To use a different client in the same region as the secret:
import... | 37.979798 | 96 | 0.676064 |
89bb58da236ae1cd20eeddbb0a20ccf799877ae9 | 4,347 | py | Python | MachineInterface/mproxy/server/slurm_queue.py | KTH-HPC/vestec-system | 8168b90385468ca5e1ed701b5a0090e4423186c7 | [
"BSD-3-Clause"
] | null | null | null | MachineInterface/mproxy/server/slurm_queue.py | KTH-HPC/vestec-system | 8168b90385468ca5e1ed701b5a0090e4423186c7 | [
"BSD-3-Clause"
] | null | null | null | MachineInterface/mproxy/server/slurm_queue.py | KTH-HPC/vestec-system | 8168b90385468ca5e1ed701b5a0090e4423186c7 | [
"BSD-3-Clause"
] | null | null | null | from .job_status import JobStatus
import time
import datetime
from dateutil.parser import parse
class SlurmQueueProcessor:
def getQueueStatusSummaryCommand(self):
return "squeue"
def getQueueCommandForHistoricalStatus(self, start, end):
return "sacct -a -S "+start+" -E "+end+" --format=JobID,R... | 43.039604 | 216 | 0.570968 |
1ea9fb78ef1a6d9a9d02459bb49c3d9bdccbbc0a | 2,284 | py | Python | tests/multipart_test.py | yousefiparsa/filestack-python | e1773e2254d2a451216e13ce8ecb4f69f863ac82 | [
"Apache-2.0"
] | 1 | 2019-04-09T18:49:36.000Z | 2019-04-09T18:49:36.000Z | tests/multipart_test.py | yousefiparsa/filestack-python | e1773e2254d2a451216e13ce8ecb4f69f863ac82 | [
"Apache-2.0"
] | null | null | null | tests/multipart_test.py | yousefiparsa/filestack-python | e1773e2254d2a451216e13ce8ecb4f69f863ac82 | [
"Apache-2.0"
] | null | null | null | import json
from collections import defaultdict
import responses
from httmock import HTTMock, response, urlmatch
from filestack import Client
from filestack.config import MULTIPART_START_URL
from filestack.utils.upload_utils import upload_chunk
APIKEY = 'APIKEY'
HANDLE = 'SOMEHANDLE'
URL = 'https://cdn.filestackconte... | 36.253968 | 113 | 0.672504 |
75229a7941147916a4a5d2158f7cc41002e38d7a | 245 | py | Python | python_Activity_1/activity_1.py | nguyenkevint94/Activities | ad24a4eeba965942564d5653e405c236cd4497d8 | [
"MIT"
] | null | null | null | python_Activity_1/activity_1.py | nguyenkevint94/Activities | ad24a4eeba965942564d5653e405c236cd4497d8 | [
"MIT"
] | null | null | null | python_Activity_1/activity_1.py | nguyenkevint94/Activities | ad24a4eeba965942564d5653e405c236cd4497d8 | [
"MIT"
] | null | null | null | import os
import csv
csvpath = os.path.join('.', 'cereal.csv')
with open(csvpath, newline = '') as csvfile:
csvreader = csv.reader(csvfile, delimiter = ',')
for row in csvreader:
if (float(row[7]) >= 5):
print(row) | 22.272727 | 52 | 0.591837 |
1ca6e8e946cc45b9a1dba22b0e0cd3318bb7bf8a | 255 | py | Python | bin/secret_key.py | chop-dbhi/varify | 5dc721e49ed9bd3582f4b117785fdd1a8b6ba777 | [
"BSD-2-Clause"
] | 6 | 2015-01-16T14:35:29.000Z | 2017-06-18T05:56:15.000Z | bin/secret_key.py | solvebio/varify | 5dc721e49ed9bd3582f4b117785fdd1a8b6ba777 | [
"BSD-2-Clause"
] | null | null | null | bin/secret_key.py | solvebio/varify | 5dc721e49ed9bd3582f4b117785fdd1a8b6ba777 | [
"BSD-2-Clause"
] | 3 | 2015-05-27T15:03:17.000Z | 2020-03-11T08:42:46.000Z | #!/usr/bin/env python
from random import choice
def generate_secret_key():
return ''.join(
choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)')
for i in xrange(50))
if __name__ == '__main__':
print generate_secret_key()
| 21.25 | 68 | 0.658824 |
9334566d2f00aee15a5e8dcba153cd7192dd6249 | 1,180 | py | Python | integration-tests/mysql-client-tests/python/pymysql-test.py | fairhopeweb/dolt | 276b85b7b1287f883640ef3fcacb0bdb112749b2 | [
"Apache-2.0"
] | 2 | 2021-03-09T07:32:40.000Z | 2021-06-11T21:41:30.000Z | integration-tests/mysql-client-tests/python/pymysql-test.py | albertusortiz/dolt | 38fc4fcb0357a56eb97abdb25296f45571a5418f | [
"Apache-2.0"
] | null | null | null | integration-tests/mysql-client-tests/python/pymysql-test.py | albertusortiz/dolt | 38fc4fcb0357a56eb97abdb25296f45571a5418f | [
"Apache-2.0"
] | 1 | 2021-08-06T13:05:57.000Z | 2021-08-06T13:05:57.000Z | import pymysql
import sys
QUERY_RESPONSE = [
{ "create table test (pk int, `value` int, primary key(pk))": () },
{ "describe test": (
('pk', 'int', 'NO', 'PRI', '', ''),
('value', 'int', 'YES', '', '', '')
) },
{ "insert into test (pk, `value`) values (0,0)": () },
{ "select * from ... | 26.818182 | 71 | 0.451695 |
a2926f704bd7d6487b4a2256e906f4ed7bc4b51e | 11,618 | py | Python | courses/machine_learning/deepdive/09_sequence/labs/txtclsmodel/trainer/model.py | memeyankm/training-data-analyst | 33bdca94cb063036f7313a2eaf6e515126d31344 | [
"Apache-2.0"
] | 6,140 | 2016-05-23T16:09:35.000Z | 2022-03-30T19:00:46.000Z | courses/machine_learning/deepdive/09_sequence/labs/txtclsmodel/trainer/model.py | memeyankm/training-data-analyst | 33bdca94cb063036f7313a2eaf6e515126d31344 | [
"Apache-2.0"
] | 1,384 | 2016-07-08T22:26:41.000Z | 2022-03-24T16:39:43.000Z | courses/machine_learning/deepdive/09_sequence/labs/txtclsmodel/trainer/model.py | memeyankm/training-data-analyst | 33bdca94cb063036f7313a2eaf6e515126d31344 | [
"Apache-2.0"
] | 5,110 | 2016-05-27T13:45:18.000Z | 2022-03-31T18:40:42.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import pandas as pd
import numpy as np
import re
import pickle
from tensorflow.python.keras.preprocessing import sequence
from tensorflow.python.keras.preprocessing import text
from ten... | 39.651877 | 111 | 0.683853 |
8cdc843f6800dd6f2b343206094daa60527156c2 | 4,549 | py | Python | homeassistant/components/device_tracker/config_entry.py | AzarinSergey/hassio-fork | 819e6f6fcdea7667ef80163810d5e1e387ad0929 | [
"Apache-2.0"
] | 6 | 2017-08-02T19:26:39.000Z | 2020-03-14T22:47:41.000Z | homeassistant/components/device_tracker/config_entry.py | AzarinSergey/hassio-fork | 819e6f6fcdea7667ef80163810d5e1e387ad0929 | [
"Apache-2.0"
] | 54 | 2020-11-17T07:04:57.000Z | 2022-03-31T06:45:39.000Z | homeassistant/components/device_tracker/config_entry.py | AzarinSergey/hassio-fork | 819e6f6fcdea7667ef80163810d5e1e387ad0929 | [
"Apache-2.0"
] | 14 | 2018-08-19T16:28:26.000Z | 2021-09-02T18:26:53.000Z | """Code to set up a device tracker platform using a config entry."""
from typing import Optional
from homeassistant.components import zone
from homeassistant.const import (
ATTR_BATTERY_LEVEL,
ATTR_GPS_ACCURACY,
ATTR_LATITUDE,
ATTR_LONGITUDE,
STATE_HOME,
STATE_NOT_HOME,
)
from homeassistant.hel... | 27.569697 | 87 | 0.635524 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.