hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7c441827b430daed75ca72935bdf19c67906797b | 2,151 | py | Python | killerbee/openear/capture.py | tmcmil/killerbee | a4284af6c93557c1588d8d4608e04fe66ab47b2c | [
"BSD-3-Clause"
] | 1 | 2021-06-05T16:00:49.000Z | 2021-06-05T16:00:49.000Z | killerbee/openear/capture.py | mingqian/killerbee | cb04e169a635ad4bc0772b631e1b332320f7a8da | [
"BSD-3-Clause"
] | null | null | null | killerbee/openear/capture.py | mingqian/killerbee | cb04e169a635ad4bc0772b631e1b332320f7a8da | [
"BSD-3-Clause"
] | null | null | null | import sys
from datetime import datetime
import threading, signal
from killerbee import *
# Globals
triggers = []
# startCapture
# Given a database and a key into the database's networks table,
# initiate a pcap and online database capture.
def startCapture(dev, capChan):
timeLabel = datetime.utcnow().strftime('... | 37.736842 | 95 | 0.661553 |
6ca38e0a745b0ee4c0d6998216cd4c7ae038aa39 | 1,064 | py | Python | bidiutils/context_processors.py | MeirKriheli/django-bidi-utils | 48a8c481fe728fbccf486582999e79454195036e | [
"MIT"
] | 3 | 2016-05-09T00:48:19.000Z | 2021-03-28T07:40:31.000Z | bidiutils/context_processors.py | MeirKriheli/django-bidi-utils | 48a8c481fe728fbccf486582999e79454195036e | [
"MIT"
] | null | null | null | bidiutils/context_processors.py | MeirKriheli/django-bidi-utils | 48a8c481fe728fbccf486582999e79454195036e | [
"MIT"
] | null | null | null | """Context processors for BiDi"""
def bidi(request):
"""Adds to the context BiDi related variables
LANGUAGE_DIRECTION -- Direction of current language ('ltr' or 'rtl')
LANGUAGE_START -- Start of language layout ('right' for rtl, 'left'
for 'ltr')
LANGUAGE_END -- End of language l... | 31.294118 | 72 | 0.567669 |
c36a5cf9409001144eaf02cf8a99071e56ca4856 | 1,947 | py | Python | src/reynir_correct/__init__.py | thorunna/GreynirCorrect | f704ff8d32fd02ef1a979905e5e1766ffdaeecb0 | [
"MIT"
] | null | null | null | src/reynir_correct/__init__.py | thorunna/GreynirCorrect | f704ff8d32fd02ef1a979905e5e1766ffdaeecb0 | [
"MIT"
] | null | null | null | src/reynir_correct/__init__.py | thorunna/GreynirCorrect | f704ff8d32fd02ef1a979905e5e1766ffdaeecb0 | [
"MIT"
] | null | null | null | """
Greynir: Natural language processing for Icelandic
Copyright (C) 2020 Miðeind ehf.
This software is licensed under the MIT License:
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"... | 30.904762 | 78 | 0.724191 |
f600c332ee974e6f764c0dfbae854a929d289cdf | 2,496 | py | Python | examples/DimReduction/pacmap_Age.py | s2812135/Data_Challenges_WiSe2122 | a55372f444e7344af4e2e1f04e4244fb8cefeefe | [
"MIT"
] | null | null | null | examples/DimReduction/pacmap_Age.py | s2812135/Data_Challenges_WiSe2122 | a55372f444e7344af4e2e1f04e4244fb8cefeefe | [
"MIT"
] | null | null | null | examples/DimReduction/pacmap_Age.py | s2812135/Data_Challenges_WiSe2122 | a55372f444e7344af4e2e1f04e4244fb8cefeefe | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Feb 14 14:21:56 2022
@author: dariu
"""
import numpy as np
import pandas as pd
import os
from tqdm import tqdm
import pacmap
import matplotlib.pyplot as plt
from sklearn.manifold import TSNE
import umap
path = ""
directorys = [
['../training_setA/training/', 'p0'],
... | 23.54717 | 96 | 0.589744 |
5c2d343ad2a1bb731ac84472e1a5f03236dbb8db | 2,702 | py | Python | tests/test_constant.py | hfsf/sloth | 1e9ab7cdff149c39f676adb595de28c21a012a9c | [
"MIT"
] | 2 | 2019-06-03T13:18:16.000Z | 2019-07-08T11:38:02.000Z | tests/test_constant.py | hfsf/capybara | 1e9ab7cdff149c39f676adb595de28c21a012a9c | [
"MIT"
] | 4 | 2018-10-19T12:14:28.000Z | 2018-10-19T12:29:43.000Z | tests/test_constant.py | hfsf/capybara | 1e9ab7cdff149c39f676adb595de28c21a012a9c | [
"MIT"
] | 2 | 2018-10-24T18:19:39.000Z | 2021-12-17T18:54:06.000Z | # test_constant.py
from pathlib import Path
import sys
root_dir = Path(Path.cwd()).parent
sys.path.append(str(root_dir))#+'/src/')
import pytest
from src.sloth.core import constant
from src.sloth.core import template_units
import copy
@pytest.fixture
def const():
"""
Create a generic Constant object wit... | 23.495652 | 116 | 0.621762 |
09d33ee44653fab440df37c6296fbe37c9400e64 | 3,049 | py | Python | Gamle scripts/systematic/drop_0_45.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | 2 | 2018-10-10T09:32:34.000Z | 2019-03-28T08:42:31.000Z | Gamle scripts/systematic/drop_0_45.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | null | null | null | Gamle scripts/systematic/drop_0_45.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Nov 13 12:31:46 2018
@author: Simon
"""
import os
from createLargerFeatureMatrix import simpleLargeMatrix
import pickle
from keras.models import Sequential
from keras.layers import Dense, Dropout
from keras import regularizers
import numpy as np
path ... | 23.274809 | 137 | 0.762545 |
321cfa87c2e576e23937b7c165a2b12baf1619cf | 7,148 | py | Python | tests/unit/utils/test_project.py | Dithn/warehouse | 953b77ecfc7dade203db423307539ea9d6115657 | [
"Apache-2.0"
] | 2 | 2021-10-11T21:45:06.000Z | 2021-11-17T10:29:15.000Z | tests/unit/utils/test_project.py | Dithn/warehouse | 953b77ecfc7dade203db423307539ea9d6115657 | [
"Apache-2.0"
] | 1 | 2020-02-15T10:37:48.000Z | 2020-02-15T10:42:04.000Z | tests/unit/utils/test_project.py | Dithn/warehouse | 953b77ecfc7dade203db423307539ea9d6115657 | [
"Apache-2.0"
] | 1 | 2020-07-31T17:19:53.000Z | 2020-07-31T17:19:53.000Z | # 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
# distributed under the Li... | 32.788991 | 88 | 0.681729 |
9fdd2c3de09075d8746590225b5bfb8f05d13182 | 32,269 | py | Python | linespacer_ratiox.py | AllTheLonelyPeople/Chips-Circuits | 55e97579f97e63f6219c14fe5c59ae761729248c | [
"MIT"
] | null | null | null | linespacer_ratiox.py | AllTheLonelyPeople/Chips-Circuits | 55e97579f97e63f6219c14fe5c59ae761729248c | [
"MIT"
] | null | null | null | linespacer_ratiox.py | AllTheLonelyPeople/Chips-Circuits | 55e97579f97e63f6219c14fe5c59ae761729248c | [
"MIT"
] | null | null | null | """
path.py
Tom Kamstra, Izhar Hamer, Julia Linde
Finds the optimal paths between the chips based on ratio between distance in x direction and total distance between chips.
"""
from mpl_toolkits import mplot3d
import numpy as np
import matplotlib.pyplot as plt
from code.classes import classes as classs
from code.func... | 53.871452 | 230 | 0.642784 |
827f1e33a62a3e3cde0a1c43f872feb5b9230842 | 6,534 | py | Python | simpa_tests/manual_tests/acoustic_forward_models/MinimalKWaveTest.py | IMSY-DKFZ/simpa | b8bddcf43a4bff2564f0ec208dc511b82e49bfb4 | [
"MIT"
] | 3 | 2022-03-14T15:40:09.000Z | 2022-03-20T02:34:25.000Z | simpa_tests/manual_tests/acoustic_forward_models/MinimalKWaveTest.py | jgroehl/simpa | e56f0802e5a8555ee8bb139dd4f776025e7e9267 | [
"MIT"
] | 3 | 2022-03-18T07:19:12.000Z | 2022-03-30T12:15:19.000Z | simpa_tests/manual_tests/acoustic_forward_models/MinimalKWaveTest.py | IMSY-DKFZ/simpa | b8bddcf43a4bff2564f0ec208dc511b82e49bfb4 | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2021 Division of Intelligent Medical Systems, DKFZ
# SPDX-FileCopyrightText: 2021 Janek Groehl
# SPDX-License-Identifier: MIT
from simpa.core.simulation import simulate
from simpa.utils import Tags, generate_dict_path
from simpa.utils.settings import Settings
from simpa.utils.path_manager imp... | 45.692308 | 113 | 0.644475 |
5812eed59c78c31b89464656f64f3f0018cfc019 | 864 | py | Python | app/console/admin.py | zigellsn/JWConfStage | 684060562a971b2dc33fe44b7f223babd4094786 | [
"Apache-2.0"
] | null | null | null | app/console/admin.py | zigellsn/JWConfStage | 684060562a971b2dc33fe44b7f223babd4094786 | [
"Apache-2.0"
] | 1 | 2019-02-20T21:15:08.000Z | 2019-02-20T21:15:08.000Z | app/console/admin.py | zigellsn/JWConfStage | 684060562a971b2dc33fe44b7f223babd4094786 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-2022 Simon Zigelli
#
# 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... | 32 | 75 | 0.77662 |
7c6e11d3cf6ead7af06a96e6e8fcfaa0df46ff15 | 296 | py | Python | querio/queryobject.py | Quer-io/Quer.io | 381f4bf3fd505d35d0f10817322ff9072d453a18 | [
"MIT"
] | null | null | null | querio/queryobject.py | Quer-io/Quer.io | 381f4bf3fd505d35d0f10817322ff9072d453a18 | [
"MIT"
] | 1 | 2018-10-31T18:29:36.000Z | 2018-10-31T18:29:36.000Z | querio/queryobject.py | Quer-io/Quer.io | 381f4bf3fd505d35d0f10817322ff9072d453a18 | [
"MIT"
] | 1 | 2018-09-05T05:57:17.000Z | 2018-09-05T05:57:17.000Z |
class QueryObject:
def __init__(self, target):
self.target = target
self.expression = None
def add(self, expression):
if self.expression is None:
self.expression = expression
else:
self.expression = self.expression & expression
| 21.142857 | 58 | 0.60473 |
ea29c7121c5070aa44985339527e1c1fa1c1eba8 | 112 | py | Python | elasticsearch_backup/__init__.py | Aplopio/elasticsearch_backup | 9b650b1e19a2ed30f217647d45201c1039fd7ff7 | [
"BSD-3-Clause"
] | null | null | null | elasticsearch_backup/__init__.py | Aplopio/elasticsearch_backup | 9b650b1e19a2ed30f217647d45201c1039fd7ff7 | [
"BSD-3-Clause"
] | null | null | null | elasticsearch_backup/__init__.py | Aplopio/elasticsearch_backup | 9b650b1e19a2ed30f217647d45201c1039fd7ff7 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
__author__ = 'Vedarth Kulkarni'
__email__ = 'vedarth@aplopio.com'
__version__ = '0.1.0' | 22.4 | 33 | 0.669643 |
84ff54a3b21eddbd95a5ccfa7ce29b6725452d78 | 2,704 | py | Python | tests/python/relay/test_pass_eta_expand.py | 0xreza/tvm | f08d5d78ee000b2c113ac451f8d73817960eafd5 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 3 | 2020-04-14T07:49:54.000Z | 2021-05-28T14:01:34.000Z | tests/python/relay/test_pass_eta_expand.py | 0xreza/tvm | f08d5d78ee000b2c113ac451f8d73817960eafd5 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 1 | 2020-07-29T00:21:19.000Z | 2020-07-29T00:21:19.000Z | tests/python/relay/test_pass_eta_expand.py | 0xreza/tvm | f08d5d78ee000b2c113ac451f8d73817960eafd5 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 2 | 2019-08-24T00:06:36.000Z | 2022-03-03T02:07:27.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 31.08046 | 80 | 0.570266 |
96a68c3f7bd7689a05dcf0b694a033d66e5ed4d1 | 3,418 | py | Python | last_time/ns_simulator.py | abdelabdalla/deepmind-research | 4b7e0379ca5ba85e27f6f246fa2b0c060bd86879 | [
"Apache-2.0"
] | null | null | null | last_time/ns_simulator.py | abdelabdalla/deepmind-research | 4b7e0379ca5ba85e27f6f246fa2b0c060bd86879 | [
"Apache-2.0"
] | null | null | null | last_time/ns_simulator.py | abdelabdalla/deepmind-research | 4b7e0379ca5ba85e27f6f246fa2b0c060bd86879 | [
"Apache-2.0"
] | null | null | null | import graph_nets as gn
import sonnet as snt
import tensorflow as tf
from last_time import connectivity_utils
from last_time import graph_network
class NSSimulator(snt.AbstractModule):
def __init__(
self,
graph_network_kwargs,
name='NSSimulator'):
super().__init__(nam... | 37.152174 | 114 | 0.706846 |
e72659491f50189f056021f2e885633eddde40bb | 5,218 | py | Python | ResultsDocument.py | luzpaz/SearchBar | 80316615dd1a7f9681f043fe51b09faabd8ad933 | [
"CC0-1.0"
] | 2 | 2022-01-19T04:11:45.000Z | 2022-01-28T01:40:27.000Z | ResultsDocument.py | luzpaz/SearchBar | 80316615dd1a7f9681f043fe51b09faabd8ad933 | [
"CC0-1.0"
] | 11 | 2021-12-26T21:02:34.000Z | 2022-03-13T23:31:50.000Z | ResultsDocument.py | luzpaz/SearchBar | 80316615dd1a7f9681f043fe51b09faabd8ad933 | [
"CC0-1.0"
] | 2 | 2022-01-25T18:22:57.000Z | 2022-03-07T12:16:56.000Z | from PySide import QtGui
from PySide import QtCore
import FreeCAD as App
import FreeCADGui
import SafeViewer
import SearchBox
def documentAction(nfo):
act = nfo['action']
# Todo: this should also select the document in the tree view
print('switch to document ' + act['document'])
App.setActiveDocument(act['do... | 44.598291 | 225 | 0.698352 |
ae37c9cd61c3d94b954367b6889af756c5a77bca | 2,651 | py | Python | tests/modules/emails/test_email.py | WildMeOrg/houston | 8102229421388e44234c07ee6cb73bf705b6fba0 | [
"Apache-2.0"
] | 6 | 2021-04-06T19:50:52.000Z | 2022-01-19T17:42:33.000Z | tests/modules/emails/test_email.py | WildMeOrg/houston | 8102229421388e44234c07ee6cb73bf705b6fba0 | [
"Apache-2.0"
] | 491 | 2021-01-20T01:10:00.000Z | 2022-03-31T19:30:48.000Z | tests/modules/emails/test_email.py | WildMeOrg/houston | 8102229421388e44234c07ee6cb73bf705b6fba0 | [
"Apache-2.0"
] | 2 | 2021-03-12T02:33:55.000Z | 2021-03-16T20:18:43.000Z | # -*- coding: utf-8 -*-
# pylint: disable=missing-docstring
from app.modules.emails.models import RecordedEmail, EmailTypes, EmailRecord
from app.extensions.email import Email
from app.modules.site_settings.models import SiteSetting
import uuid
test_recipient = str(uuid.uuid4()) + '-test@example.com'
def _prep_send... | 31.188235 | 84 | 0.689551 |
c5cf3ec8dddc8a982aef45bfb8712a2ad154fc63 | 1,780 | py | Python | app/tests/util/client.py | didx-xyz/aries-cloudapi-python | 0c8004265c4bfd88f313a152f2757ec0441740a7 | [
"Apache-2.0"
] | 7 | 2021-05-19T17:50:31.000Z | 2022-01-16T13:52:34.000Z | app/tests/util/client.py | didx-xyz/aries-cloudapi-python | 0c8004265c4bfd88f313a152f2757ec0441740a7 | [
"Apache-2.0"
] | 181 | 2021-05-25T14:55:14.000Z | 2022-03-30T11:37:34.000Z | app/tests/util/client.py | didx-xyz/aries-cloudapi-python | 0c8004265c4bfd88f313a152f2757ec0441740a7 | [
"Apache-2.0"
] | 5 | 2021-06-02T06:57:52.000Z | 2022-03-23T10:23:07.000Z | from typing import Any, Optional
from aries_cloudcontroller.acapy_client import AcaPyClient
from httpx import AsyncClient, AsyncHTTPTransport
from .constants import (
YOMA_FASTAPI_ENDPOINT,
YOMA_ACAPY_API_KEY,
MEMBER_FASTAPI_ENDPOINT,
MEMBER_ACAPY_API_KEY,
)
from app.constants import YOMA_AGENT_URL, ME... | 22.820513 | 81 | 0.646629 |
12bf99c8f6a74a0a3c14a30e408b277a2374fcd8 | 22,933 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/oneandone_load_balancer.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/oneandone_load_balancer.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/oneandone_load_balancer.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... | 33.874446 | 118 | 0.631971 |
e607261fe95832a23a77be467f4e6bd16ce68cfd | 107 | py | Python | src/circulation_import/__main__.py | vbessonov/circulation-import | f9e2a9112133d5bdcee2d937c70f511c8979702b | [
"MIT"
] | null | null | null | src/circulation_import/__main__.py | vbessonov/circulation-import | f9e2a9112133d5bdcee2d937c70f511c8979702b | [
"MIT"
] | null | null | null | src/circulation_import/__main__.py | vbessonov/circulation-import | f9e2a9112133d5bdcee2d937c70f511c8979702b | [
"MIT"
] | null | null | null | from circulation_import.cli import cli
if __name__ == "__main__":
cli(prog_name="circulation-import")
| 21.4 | 39 | 0.757009 |
086b995c0d3999db8f69acd301055f20a5ed87d0 | 2,789 | py | Python | lib/python - Copy/gw_utility/logging.py | GabeStah/Airbrake.io | df324d9feda42dee41b4aede6000960ba99c28ea | [
"MIT"
] | 1 | 2019-11-26T20:40:56.000Z | 2019-11-26T20:40:56.000Z | lib/python/gw_utility/logging.py | GabeStah/Airbrake.io | df324d9feda42dee41b4aede6000960ba99c28ea | [
"MIT"
] | 18 | 2020-02-28T20:35:27.000Z | 2022-02-26T03:34:27.000Z | lib/python/gw_utility/logging.py | GabeStah/Airbrake.io | df324d9feda42dee41b4aede6000960ba99c28ea | [
"MIT"
] | 1 | 2019-12-26T19:33:30.000Z | 2019-12-26T19:33:30.000Z | # logging.py
import math
import sys
import traceback
class Logging:
separator_character_default = '-'
separator_length_default = 40
@classmethod
def __output(cls, *args, sep: str = ' ', end: str = '\n', file=None):
"""Prints the passed value(s) to the console.
:param args: Values to ... | 37.689189 | 116 | 0.610613 |
bf10ae701adcc5812b4206bbc8deb2275ee29f52 | 1,567 | py | Python | tests/conftest.py | captainger/voicekit_client_python | 8aba58c3e7a1453fae36fd954748456f076a9272 | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | captainger/voicekit_client_python | 8aba58c3e7a1453fae36fd954748456f076a9272 | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | captainger/voicekit_client_python | 8aba58c3e7a1453fae36fd954748456f076a9272 | [
"Apache-2.0"
] | null | null | null | import os
import pytest
from tinkoff_voicekit_client import ClientSTT, ClientTTS, ClientOperations, aio_voicekit
class ClientParams:
API_KEY: str = os.getenv("VOICEKIT_API_KEY")
SECRET_KEY: str = os.getenv("VOICEKIT_SECRET_KEY")
@pytest.fixture
def params():
if ClientParams.API_KEY is None:
ra... | 22.070423 | 88 | 0.73261 |
51ec4629df8ef82d1587b2362c0d0c60e71d0c92 | 350 | py | Python | accounts/views.py | aucoeur/makewiki_v2 | e8b995048306652284892f4049b5b4b0b4e2b9b9 | [
"MIT"
] | null | null | null | accounts/views.py | aucoeur/makewiki_v2 | e8b995048306652284892f4049b5b4b0b4e2b9b9 | [
"MIT"
] | 3 | 2021-06-04T23:10:20.000Z | 2021-06-10T19:23:28.000Z | accounts/views.py | aucoeur/makewiki_v2 | e8b995048306652284892f4049b5b4b0b4e2b9b9 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.contrib.auth.forms import UserCreationForm
from django.urls import reverse_lazy
from django.views.generic import CreateView
# Create your views here.
class SignUpView(CreateView):
form_class = UserCreationForm
success_url = reverse_lazy('login')
template_nam... | 31.818182 | 54 | 0.805714 |
34afe9ff59ee5128b284e75a8d34c1fd307335ea | 1,707 | py | Python | setup.py | bytepl/tracardi | e8fa4684fa6bd3d05165fe48aa925fc6c1e74923 | [
"MIT"
] | null | null | null | setup.py | bytepl/tracardi | e8fa4684fa6bd3d05165fe48aa925fc6c1e74923 | [
"MIT"
] | null | null | null | setup.py | bytepl/tracardi | e8fa4684fa6bd3d05165fe48aa925fc6c1e74923 | [
"MIT"
] | null | null | null | from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='tracardi',
version='0.6.27',
description='Tracardi Customer Data Platform backend',
long_description=long_description,
long_description_content_type="text/markdown",
author='Risto Kow... | 25.102941 | 58 | 0.529584 |
03b04fdc8bc657672bbc71ebf59acbe3db3b9441 | 217 | py | Python | baoming/baoming/test/local_variable.py | hanxiaoshun/RegistrationSystem | 2f7310508fc1725e96fe941b1062ce7f26f265a4 | [
"Apache-2.0"
] | null | null | null | baoming/baoming/test/local_variable.py | hanxiaoshun/RegistrationSystem | 2f7310508fc1725e96fe941b1062ce7f26f265a4 | [
"Apache-2.0"
] | 14 | 2020-06-06T01:24:24.000Z | 2022-03-12T00:17:22.000Z | baoming/baoming/test/local_variable.py | hanxiaoshun/RegistrationSystem | 2f7310508fc1725e96fe941b1062ce7f26f265a4 | [
"Apache-2.0"
] | null | null | null |
# if 1 == 1:
# a = 'a'
# print(a)
# if 2 == 2:
# a = 'b'
# print(a)
# print(a)
def love():
if 1 == 1:
a = 'a'
girl = {'a':a}
return girl
def you():
print(love())
you() | 10.333333 | 18 | 0.354839 |
9c52dcfeea807d1b6973c857e58ade297ac84659 | 907 | py | Python | src/rated_films_reducer1.py | canek13/Recomendation-system-for-film-ranking | 1c414ff222c3e795407ac927b262e05df708fcef | [
"MIT"
] | null | null | null | src/rated_films_reducer1.py | canek13/Recomendation-system-for-film-ranking | 1c414ff222c3e795407ac927b262e05df708fcef | [
"MIT"
] | null | null | null | src/rated_films_reducer1.py | canek13/Recomendation-system-for-film-ranking | 1c414ff222c3e795407ac927b262e05df708fcef | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""
rated_films_reducer1
"""
import sys
previous_film = None
film_users = []
film_users_rating = []
average_users = []
for line in sys.stdin:
movie, user, rating, average_user = line.strip().split('\t')
if movie != previous_film:
if previous_film: # check if not None
p... | 25.914286 | 64 | 0.592062 |
0e5286cf21aed513902d229267f0a9a9f78b090b | 1,826 | py | Python | hwtLib/handshaked/reg_test.py | optical-o/hwtLib | edad621f5ad4cdbea20a5751ff4468979afe2f77 | [
"MIT"
] | null | null | null | hwtLib/handshaked/reg_test.py | optical-o/hwtLib | edad621f5ad4cdbea20a5751ff4468979afe2f77 | [
"MIT"
] | null | null | null | hwtLib/handshaked/reg_test.py | optical-o/hwtLib | edad621f5ad4cdbea20a5751ff4468979afe2f77 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from hwt.interfaces.std import Handshaked
from hwt.simulator.simTestCase import SingleUnitSimTestCase
from hwtLib.handshaked.reg import HandshakedReg
from hwtSimApi.constants import CLK_PERIOD
class HandshakedRegL1D0TC(SingleUnitSimTestCase):
LATENCY = 1
DELAY =... | 26.852941 | 91 | 0.681818 |
aa25818174313603973862d357976d00c6f33064 | 13,472 | py | Python | fairmodels/plotnine/geoms/geom.py | Locust2520/python-fairmodels | 0572f7c205b67c148bdc83b8dc4eaf70c06468a5 | [
"MIT"
] | null | null | null | fairmodels/plotnine/geoms/geom.py | Locust2520/python-fairmodels | 0572f7c205b67c148bdc83b8dc4eaf70c06468a5 | [
"MIT"
] | 1 | 2020-10-02T21:43:06.000Z | 2020-10-15T22:52:39.000Z | fairmodels/plotnine/geoms/geom.py | Locust2520/python-fairmodels | 0572f7c205b67c148bdc83b8dc4eaf70c06468a5 | [
"MIT"
] | null | null | null | from copy import deepcopy
from ..stats.stat import stat
from ..aes import rename_aesthetics, is_valid_aesthetic
from ..layer import layer
from ..positions.position import position
from ..utils import data_mapping_as_kwargs, remove_missing
from ..utils import copy_keys, is_string, Registry
from ..exceptions import Plot... | 32.619855 | 77 | 0.559382 |
b33393095b90e48d69fc93b101fbc821eef09470 | 6,107 | py | Python | greedy.py | annekes/greedy | 3994377f4e45ce3e5df94a70ea54010f3a216b05 | [
"MIT"
] | null | null | null | greedy.py | annekes/greedy | 3994377f4e45ce3e5df94a70ea54010f3a216b05 | [
"MIT"
] | null | null | null | greedy.py | annekes/greedy | 3994377f4e45ce3e5df94a70ea54010f3a216b05 | [
"MIT"
] | null | null | null | #!/usr/bin/python
"""greedy.py supplies tools to run a greedy match and merge
algorithm on a simplified fractured list
"""
__author__ = "Anneke Smitheram"
from enum import Enum, auto
class Position(Enum):
"""Identify where overlap occurs."""
IN_FRAGMENT_1 = auto()
IN_FRAGMENT_2 = auto()
FRONT_FRAG... | 28.671362 | 66 | 0.703619 |
626693a2d26f8e40a5c9fb57c04b28778fdd919c | 1,545 | py | Python | dbbackup/tests/test_connectors/test_sqlite.py | madhavi2491/django-dbbackup | e0d3eafbc0a6ebbad658cdd5e81acf6f57747d4a | [
"BSD-3-Clause"
] | 1 | 2020-04-28T17:08:26.000Z | 2020-04-28T17:08:26.000Z | dbbackup/tests/test_connectors/test_sqlite.py | madhavi2491/django-dbbackup | e0d3eafbc0a6ebbad658cdd5e81acf6f57747d4a | [
"BSD-3-Clause"
] | null | null | null | dbbackup/tests/test_connectors/test_sqlite.py | madhavi2491/django-dbbackup | e0d3eafbc0a6ebbad658cdd5e81acf6f57747d4a | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
from mock import patch, mock_open
from django.test import TestCase
from six import BytesIO
from dbbackup.db.sqlite import SqliteConnector, SqliteCPConnector
from dbbackup.tests.testapp.models import CharModel
class SqliteConnectorTest(TestCase):
def test_write_dump(self)... | 30.294118 | 75 | 0.691262 |
2aa4ce4e91f8fda25bee61fb8b2f9177a9a60276 | 174 | py | Python | StudentWork/Nader/python/multiplicationOf19.py | mickknutson/SITE_BOOTCAMP_QA | adbd8014bcbbd5363e61eaad80b8eea002dd42ee | [
"MIT"
] | 12 | 2020-02-25T07:49:49.000Z | 2021-11-16T12:20:17.000Z | StudentWork/Nader/python/multiplicationOf19.py | mickknutson/SITE_BOOTCAMP_QA | adbd8014bcbbd5363e61eaad80b8eea002dd42ee | [
"MIT"
] | null | null | null | StudentWork/Nader/python/multiplicationOf19.py | mickknutson/SITE_BOOTCAMP_QA | adbd8014bcbbd5363e61eaad80b8eea002dd42ee | [
"MIT"
] | 11 | 2020-02-25T08:34:28.000Z | 2021-07-05T20:56:16.000Z |
#Nader is here
val = 19
print("Multiplication Table of 19")
for i in range(val):
print(val, "X", i, "=", val * i)
print("End of multiplication table of the number 19")
| 19.333333 | 53 | 0.655172 |
8147ba04560b86438b511e60fc7484b2bdf6e5ed | 1,404 | py | Python | rlbench/tasks/take_shoes_out_of_box.py | guhur/RLBench | e267f9eb036390109b24d9ace0b032407ac7f29d | [
"BSD-3-Clause"
] | null | null | null | rlbench/tasks/take_shoes_out_of_box.py | guhur/RLBench | e267f9eb036390109b24d9ace0b032407ac7f29d | [
"BSD-3-Clause"
] | null | null | null | rlbench/tasks/take_shoes_out_of_box.py | guhur/RLBench | e267f9eb036390109b24d9ace0b032407ac7f29d | [
"BSD-3-Clause"
] | null | null | null | from typing import List, Tuple
import numpy as np
from pyrep.objects.proximity_sensor import ProximitySensor
from pyrep.objects.shape import Shape
from rlbench.backend.task import Task
from rlbench.backend.conditions import DetectedCondition, NothingGrasped
class TakeShoesOutOfBox(Task):
def init_task(self) -> N... | 40.114286 | 80 | 0.646011 |
721bb0ed0792c66e370cd401dd43462ca17c63e9 | 15,186 | py | Python | codeowners/test_codeowners.py | jirislav/codeowners | 528c1e7efa9cb028e565328af8089c75fbd6e402 | [
"MIT"
] | null | null | null | codeowners/test_codeowners.py | jirislav/codeowners | 528c1e7efa9cb028e565328af8089c75fbd6e402 | [
"MIT"
] | null | null | null | codeowners/test_codeowners.py | jirislav/codeowners | 528c1e7efa9cb028e565328af8089c75fbd6e402 | [
"MIT"
] | null | null | null | import subprocess
import tempfile
from pathlib import Path
from typing import Dict, Iterable, List, NamedTuple, Tuple
import pytest
from typing_extensions import Literal
from codeowners import CodeOwners
# via https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-... | 30.372 | 119 | 0.519031 |
27f8e73cabf66fb42c1371e5428e816568d59882 | 718 | py | Python | src/dispatch/alembic/versions/a769ea6bad64_.py | BuildJet/dispatch | d9fcaabefecfb24bbf3bbed1ed942084b7bdbea2 | [
"Apache-2.0"
] | 1 | 2021-06-16T17:02:35.000Z | 2021-06-16T17:02:35.000Z | src/dispatch/alembic/versions/a769ea6bad64_.py | dilbwagsingh/dispatch | ca7c9730dea64e196c6653321552d570dfdad069 | [
"Apache-2.0"
] | null | null | null | src/dispatch/alembic/versions/a769ea6bad64_.py | dilbwagsingh/dispatch | ca7c9730dea64e196c6653321552d570dfdad069 | [
"Apache-2.0"
] | null | null | null | """Adds an external ID column to individual model.
Revision ID: a769ea6bad64
Revises: 7c98af096101
Create Date: 2021-03-18 10:06:20.030586
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "a769ea6bad64"
down_revision = "7c98af096101"
branch_labels = None
depends_... | 25.642857 | 93 | 0.710306 |
f6ef514ddcf4fb1661a2ecfb7cc6afba602c6eec | 15,767 | py | Python | dosagelib/plugins/c.py | Null000/dosage | 391313972cf6feda7db27c1a411e543af44581cd | [
"MIT"
] | null | null | null | dosagelib/plugins/c.py | Null000/dosage | 391313972cf6feda7db27c1a411e543af44581cd | [
"MIT"
] | null | null | null | dosagelib/plugins/c.py | Null000/dosage | 391313972cf6feda7db27c1a411e543af44581cd | [
"MIT"
] | null | null | null | # -*- coding: iso-8859-1 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam
from re import compile, escape
from ..scraper import _BasicScraper
from ..helpers import bounceStarter, indirectStarter
from ..util import tagre
class Caggage(_BasicScraper):
... | 38.739558 | 158 | 0.600368 |
ae5bc2dd75087203fcecb5796d2afba4ee06bf25 | 783 | py | Python | src/runMonitor.py | j-shattuck/didactic-robot | 7c74e8ef291104ff9050de4c14e5c3935d7fd0c9 | [
"MIT"
] | null | null | null | src/runMonitor.py | j-shattuck/didactic-robot | 7c74e8ef291104ff9050de4c14e5c3935d7fd0c9 | [
"MIT"
] | null | null | null | src/runMonitor.py | j-shattuck/didactic-robot | 7c74e8ef291104ff9050de4c14e5c3935d7fd0c9 | [
"MIT"
] | null | null | null | # Basic PoC effort to play with python
import argparse
import pika
def main():
print('hello')
exchange = ''
routeKey = 'testqueue'
message = 'Hellow World'
connection = pika.BlockingConnection(pika.ConnectionParameters('localhost'))
channel = connection.channel()
channel.confirm_delivery()
... | 29 | 104 | 0.624521 |
c7bd97f83311691512dbfd3e132dbef95fc2c9e4 | 27,546 | py | Python | armi/mpiActions.py | bsculac/armi | 22399244a88e67fc09996981081f7d5aab7032b4 | [
"Apache-2.0"
] | null | null | null | armi/mpiActions.py | bsculac/armi | 22399244a88e67fc09996981081f7d5aab7032b4 | [
"Apache-2.0"
] | null | null | null | armi/mpiActions.py | bsculac/armi | 22399244a88e67fc09996981081f7d5aab7032b4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 TerraPower, 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 writi... | 39.127841 | 120 | 0.616278 |
c77b45dd70c8ba540b2316b417870406349ae3e3 | 22,679 | py | Python | chances/hypercube/subset.py | bjtho08/chances | ec713de1e11f7c2d9997507b07658df9f3369555 | [
"MIT"
] | 5 | 2018-10-09T11:00:39.000Z | 2021-07-19T06:21:29.000Z | chances/hypercube/subset.py | bjtho08/chances | ec713de1e11f7c2d9997507b07658df9f3369555 | [
"MIT"
] | 13 | 2019-02-09T10:53:06.000Z | 2019-09-26T21:37:05.000Z | chances/hypercube/subset.py | bjtho08/chances | ec713de1e11f7c2d9997507b07658df9f3369555 | [
"MIT"
] | 2 | 2019-03-07T10:05:01.000Z | 2019-09-25T12:29:07.000Z | # This Python file uses the following encoding: utf-8
"""
This module contains algorithms for the task of subset selection: suppose
you have a set of points in :math:`\\mathbb{R}^n` and want to select a sample
of them distributed as uniform as possible. This problem is related to
clustering, with the difference that wh... | 41.309654 | 105 | 0.660743 |
cb299a4f568f2004eb17531a015a33d499eef0fa | 658 | py | Python | examples/send_ether.py | sambacha/blocksec2go-ethereum | 66e3dced116984d87975d81760df5d550a7cc83e | [
"ISC"
] | 12 | 2020-02-29T13:54:18.000Z | 2022-03-10T21:45:51.000Z | examples/send_ether.py | sambacha/blocksec2go-ethereum | 66e3dced116984d87975d81760df5d550a7cc83e | [
"ISC"
] | 3 | 2021-03-18T05:58:52.000Z | 2021-03-18T06:00:28.000Z | examples/send_ether.py | sambacha/blocksec2go-ethereum | 66e3dced116984d87975d81760df5d550a7cc83e | [
"ISC"
] | 4 | 2020-08-02T04:02:30.000Z | 2021-05-10T12:51:09.000Z | from blocksec2go_ethereum import Blocksec2GoSigner
from web3 import Web3
WEB3_ENDPOINT = 'YOUR_ENDPOINT_HERE'
web3 = Web3(Web3.HTTPProvider(WEB3_ENDPOINT))
chain_id = web3.eth.chainId
signer = Blocksec2GoSigner(chain_id=chain_id, key_id=1)
address = signer.get_address()
nonce = web3.eth.getTransactionCount(address)... | 27.416667 | 55 | 0.75228 |
5597aa320f2a79c1fcad8f98cc72be355a293af3 | 1,260 | py | Python | src/test.py | subzjee/splicecopy | b5e33941b24ce37d1bf22e2eb7fddb16d86d9cba | [
"MIT"
] | null | null | null | src/test.py | subzjee/splicecopy | b5e33941b24ce37d1bf22e2eb7fddb16d86d9cba | [
"MIT"
] | null | null | null | src/test.py | subzjee/splicecopy | b5e33941b24ce37d1bf22e2eb7fddb16d86d9cba | [
"MIT"
] | null | null | null | import unittest
import random
import string
import hashlib
import os
import shutil
from splicecopy import copy
def generate_random_binary_file(size):
with open(f'tests/src_file_{size}kb', 'wb') as fout:
fout.write(os.urandom(size))
def md5hash(filename):
with open(filename,'rb') as fin:
cont... | 28.636364 | 108 | 0.665873 |
3d6279a4e728546cb56eb13a016d3062c507b6b7 | 528 | py | Python | backend/budget/errors.py | sebaskun/budget_app | 08d67be17a512d91ee49a4e9088c32392410be46 | [
"Unlicense"
] | null | null | null | backend/budget/errors.py | sebaskun/budget_app | 08d67be17a512d91ee49a4e9088c32392410be46 | [
"Unlicense"
] | null | null | null | backend/budget/errors.py | sebaskun/budget_app | 08d67be17a512d91ee49a4e9088c32392410be46 | [
"Unlicense"
] | null | null | null | # errors.py
class Error(Exception):
pass
# class ExceedsLimit(Error):
# pass
# class InvalidAmount(Error):
# def __init__(self, amount):
# self.amount = amount
# def __str__(str):
# return 'Invalid Amount: {}'.format(amount)
# class InsufficientFunds(Error):
# def __init__(self, bala... | 29.333333 | 59 | 0.600379 |
d4cd72319e1f218d975ebc367416aee6d2429e2f | 20,201 | py | Python | seleniumbase/translate/spanish.py | gourav-iquanti/SeleniumBase | 420b6cc7b843f85e6efdc3eb90943b356e11b355 | [
"MIT"
] | null | null | null | seleniumbase/translate/spanish.py | gourav-iquanti/SeleniumBase | 420b6cc7b843f85e6efdc3eb90943b356e11b355 | [
"MIT"
] | null | null | null | seleniumbase/translate/spanish.py | gourav-iquanti/SeleniumBase | 420b6cc7b843f85e6efdc3eb90943b356e11b355 | [
"MIT"
] | null | null | null | # Spanish / Español - Translations - Python 3 Only!
from seleniumbase import BaseCase
from seleniumbase import MasterQA
class CasoDePrueba(BaseCase):
def __init__(self, *args, **kwargs):
super(CasoDePrueba, self).__init__(*args, **kwargs)
self._language = "Spanish"
def abrir(self, *args, **k... | 37.900563 | 79 | 0.654324 |
756ee45a775dd3de905503996e30e91c8303be0b | 928 | py | Python | contracts/Fees.py | tz1and/tezland-contracts | aee2336dd79c37dcd0eb249361ed3ebc9f1f9f20 | [
"MIT"
] | 5 | 2022-03-22T16:54:21.000Z | 2022-03-26T09:43:03.000Z | contracts/Fees.py | tz1and/tezland-contracts | aee2336dd79c37dcd0eb249361ed3ebc9f1f9f20 | [
"MIT"
] | null | null | null | contracts/Fees.py | tz1and/tezland-contracts | aee2336dd79c37dcd0eb249361ed3ebc9f1f9f20 | [
"MIT"
] | null | null | null | import smartpy as sp
admin_mixin = sp.io.import_script_from_url("file:contracts/Administrable.py")
class Fees(admin_mixin.Administrable):
def __init__(self, administrator):
self.update_initial_storage(
fees = sp.nat(25),
fees_to = administrator
)
admin_mixin.Admini... | 29 | 79 | 0.632543 |
badbc8f66348ff3f133cc9f8e36a61a6759d6aaa | 1,530 | py | Python | generated-libraries/python/netapp/job/job_private_soft_pause_iter_key_td.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | 2 | 2017-03-28T15:31:26.000Z | 2018-08-16T22:15:18.000Z | generated-libraries/python/netapp/job/job_private_soft_pause_iter_key_td.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | null | null | null | generated-libraries/python/netapp/job/job_private_soft_pause_iter_key_td.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | null | null | null | from netapp.netapp_object import NetAppObject
class JobPrivateSoftPauseIterKeyTd(NetAppObject):
"""
Key typedef for table jm_local_jobs_table_softpause
"""
_key_2 = None
@property
def key_2(self):
"""
Field vserver
"""
return self._key_2
@key_2.setter
... | 23.538462 | 87 | 0.51634 |
fb4ec02990605afda127a6f8cbe823a821aa1426 | 13,026 | py | Python | keystoneclient/openstack/common/apiclient/client.py | Sazzadmasud/keystoneclient_hash_token | dc84781eeaa042c43665ce16df20086aee502f57 | [
"Apache-1.1"
] | null | null | null | keystoneclient/openstack/common/apiclient/client.py | Sazzadmasud/keystoneclient_hash_token | dc84781eeaa042c43665ce16df20086aee502f57 | [
"Apache-1.1"
] | null | null | null | keystoneclient/openstack/common/apiclient/client.py | Sazzadmasud/keystoneclient_hash_token | dc84781eeaa042c43665ce16df20086aee502f57 | [
"Apache-1.1"
] | null | null | null | # Copyright 2010 Jacob Kaplan-Moss
# Copyright 2011 OpenStack Foundation
# Copyright 2011 Piston Cloud Computing, Inc.
# Copyright 2013 Alessio Ababilov
# Copyright 2013 Grid Dynamics
# Copyright 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you ... | 35.493188 | 78 | 0.603025 |
dd4091e21ebfa9a5eec0638ab14029a9b764a821 | 13,352 | py | Python | agsconfig/services/image_server.py | christopherblanchfield/agsconfig | 71efbea61122ab9de35db2d4d20faa47a6a18fac | [
"BSD-3-Clause"
] | null | null | null | agsconfig/services/image_server.py | christopherblanchfield/agsconfig | 71efbea61122ab9de35db2d4d20faa47a6a18fac | [
"BSD-3-Clause"
] | null | null | null | agsconfig/services/image_server.py | christopherblanchfield/agsconfig | 71efbea61122ab9de35db2d4d20faa47a6a18fac | [
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
"""This module contains the MapServer class for editing MapServer configuration pre or post publish"""
# Python 2/3 compatibility
# pylint: disable=wildcard-import,unused-wildcard-import,wrong-import-order,wrong-import-position
from __future__ import (absolute_import, division, print_function, unicode_l... | 34.412371 | 180 | 0.405857 |
5a1a65c76b623c27c7680f0aaa70eefe3ceb90fc | 5,082 | py | Python | mycroft/skills/padatious_service.py | RiverCollins/mycroft-coreZ | a0f27cfb93afe1dcc8a984a29b50553b396f997f | [
"Apache-2.0"
] | 2 | 2019-05-04T23:38:07.000Z | 2019-07-14T15:25:25.000Z | mycroft/skills/padatious_service.py | RiverCollins/mycroft-coreZ | a0f27cfb93afe1dcc8a984a29b50553b396f997f | [
"Apache-2.0"
] | 3 | 2021-06-08T21:06:32.000Z | 2022-01-13T02:22:38.000Z | mycroft/skills/padatious_service.py | RiverCollins/mycroft-coreZ | a0f27cfb93afe1dcc8a984a29b50553b396f997f | [
"Apache-2.0"
] | 1 | 2020-08-13T12:21:58.000Z | 2020-08-13T12:21:58.000Z | # Copyright 2017 Mycroft AI 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 writin... | 34.571429 | 76 | 0.667651 |
7e4fdaa0e9c148727e45e0dd33e3ba4a1011433b | 731 | py | Python | Examples/Example_5/run.py | mrslezak/Engine | c46ff278a2c5f4162db91a7ab500a0bb8cef7657 | [
"BSD-3-Clause"
] | 335 | 2016-10-07T16:31:10.000Z | 2022-03-02T07:12:03.000Z | Examples/Example_5/run.py | mrslezak/Engine | c46ff278a2c5f4162db91a7ab500a0bb8cef7657 | [
"BSD-3-Clause"
] | 59 | 2016-10-31T04:20:24.000Z | 2022-01-03T16:39:57.000Z | Examples/Example_5/run.py | mrslezak/Engine | c46ff278a2c5f4162db91a7ab500a0bb8cef7657 | [
"BSD-3-Clause"
] | 180 | 2016-10-08T14:23:50.000Z | 2022-03-28T10:43:05.000Z | #!/usr/bin/env python
import sys
sys.path.append('../')
from ore_examples_helper import OreExample
oreex = OreExample(sys.argv[1] if len(sys.argv)>1 else False)
oreex.print_headline("Run ORE to produce NPV cube and exposures, without collateral")
oreex.run("Input/ore.xml")
oreex.get_times("Output/log.txt")
oreex.pr... | 33.227273 | 85 | 0.74829 |
66d3a1079447d395551e89b1756edd69366893fe | 2,359 | py | Python | attack-adgraph-pipeline/script/split_ds.py | seclab-ucr/A4 | 1cb3fec31d9e5e9eb2fb448e28b11ce3641b72cc | [
"MIT"
] | 3 | 2021-12-25T02:29:24.000Z | 2022-02-22T02:12:30.000Z | attack-adgraph-pipeline/script/split_ds.py | seclab-ucr/A4 | 1cb3fec31d9e5e9eb2fb448e28b11ce3641b72cc | [
"MIT"
] | null | null | null | attack-adgraph-pipeline/script/split_ds.py | seclab-ucr/A4 | 1cb3fec31d9e5e9eb2fb448e28b11ce3641b72cc | [
"MIT"
] | 1 | 2022-02-01T07:12:57.000Z | 2022-02-01T07:12:57.000Z | import random
import argparse
DATA_DIR = '../data/'
def replace_letter_label_with_number(row):
label = row.split(',')[-1]
if 'NONAD' in label:
label = label.replace('NONAD', '0')
else:
label = label.replace('AD', '1')
fields = row.split(',')
fields[-1] = label
return ','.join... | 28.421687 | 81 | 0.600678 |
d61023e9270bf62f4d4cec61765db041085e2245 | 25,394 | py | Python | cinder/tests/unit/volume/drivers/netapp/eseries/test_driver.py | EdwinZzy/cinder | 3cb5123efe756f9a5418784b9f46d19511a17ebe | [
"Apache-2.0"
] | 2 | 2019-05-24T14:13:50.000Z | 2019-05-24T14:21:13.000Z | cinder/tests/unit/volume/drivers/netapp/eseries/test_driver.py | vexata/cinder | 7b84c0842b685de7ee012acec40fb4064edde5e9 | [
"Apache-2.0"
] | null | null | null | cinder/tests/unit/volume/drivers/netapp/eseries/test_driver.py | vexata/cinder | 7b84c0842b685de7ee012acec40fb4064edde5e9 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2015 Alex Meade. All rights reserved.
# Copyright (c) 2015 Michael Price. All rights reserved.
# 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 a... | 46.680147 | 79 | 0.665433 |
2a273b61bac7f29bfd5a47a8aa84f80c5ed9c0e5 | 7,201 | py | Python | sentiment.py | eads/twittersentiment | 03615b2219b61bc5c0efa959b38d4b05b509fd8e | [
"MIT"
] | 7 | 2017-11-29T15:05:41.000Z | 2020-05-30T00:02:53.000Z | sentiment.py | eads/twittersentiment | 03615b2219b61bc5c0efa959b38d4b05b509fd8e | [
"MIT"
] | null | null | null | sentiment.py | eads/twittersentiment | 03615b2219b61bc5c0efa959b38d4b05b509fd8e | [
"MIT"
] | 1 | 2018-06-04T00:50:37.000Z | 2018-06-04T00:50:37.000Z | #!/usr/bin/env python
import csv
import math
import json
import os
import requests
import sys
import time
import twitter
from afinn import Afinn
from collections import Counter
from datetime import datetime, timedelta
from io import StringIO
from pprint import pprint
from statistics import mean, median
from urllib.pa... | 32.147321 | 134 | 0.663797 |
f33d3a5f762b3357cade6202d1507e43dc7fe754 | 8,605 | py | Python | scipy/stats/tests/test_multivariate.py | ogrisel/scipy | e356524e69eebb2135d64724073f71138c15dc9e | [
"BSD-3-Clause"
] | 1 | 2020-05-20T08:20:53.000Z | 2020-05-20T08:20:53.000Z | scipy/stats/tests/test_multivariate.py | ogrisel/scipy | e356524e69eebb2135d64724073f71138c15dc9e | [
"BSD-3-Clause"
] | null | null | null | scipy/stats/tests/test_multivariate.py | ogrisel/scipy | e356524e69eebb2135d64724073f71138c15dc9e | [
"BSD-3-Clause"
] | null | null | null | """
Test functions for multivariate normal distributions.
"""
from __future__ import division, print_function, absolute_import
from numpy.testing import (assert_almost_equal,
run_module_suite, assert_allclose, assert_equal, assert_raises)
import numpy
import numpy as np
import scipy.linalg
import scipy.stat... | 31.177536 | 80 | 0.651249 |
f62163b0af9c470af2c128123f468ae660e72e78 | 1,957 | py | Python | minigrid_and_pd_experiments/bc_then_ppo.py | allenai/advisor | 6849755042c6dab1488f64cf21bde2322add3cc1 | [
"Apache-2.0"
] | 5 | 2021-12-13T18:21:35.000Z | 2022-03-27T17:18:09.000Z | minigrid_and_pd_experiments/bc_then_ppo.py | allenai/advisor | 6849755042c6dab1488f64cf21bde2322add3cc1 | [
"Apache-2.0"
] | null | null | null | minigrid_and_pd_experiments/bc_then_ppo.py | allenai/advisor | 6849755042c6dab1488f64cf21bde2322add3cc1 | [
"Apache-2.0"
] | null | null | null | from allenact.utils.experiment_utils import PipelineStage
from projects.advisor.minigrid_and_pd_experiments.base import BaseExperimentConfig
class MgPdBCThenPPO(BaseExperimentConfig):
"""Training with behavior cloning and then PPO."""
def __init__(self, task_name: str, **kwargs):
super().__init__(tas... | 37.634615 | 82 | 0.582524 |
04d48a4d05a47b1022f6c5b77921039181408867 | 4,086 | py | Python | mutualfollow/settings.py | parislimdev/mutualfollow | c42b0af2d705df695296b4232baa08d8fdfeeeec | [
"MIT"
] | null | null | null | mutualfollow/settings.py | parislimdev/mutualfollow | c42b0af2d705df695296b4232baa08d8fdfeeeec | [
"MIT"
] | null | null | null | mutualfollow/settings.py | parislimdev/mutualfollow | c42b0af2d705df695296b4232baa08d8fdfeeeec | [
"MIT"
] | null | null | null | """
Django settings for mutualfollow project on Heroku. For more info, see:
https://github.com/heroku/heroku-django-template
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/set... | 30.492537 | 91 | 0.715859 |
380cb1ac759a939ab51e94c02ece825d92334634 | 5,300 | py | Python | tweets_process/3_get_all_entities_from_tweets_threading.py | SDM-TIB/PINYON | 9cc7e4520a47bc66438de96f48a212c147d7e835 | [
"MIT"
] | 1 | 2022-01-15T19:14:50.000Z | 2022-01-15T19:14:50.000Z | tweets_process/3_get_all_entities_from_tweets_threading.py | SDM-TIB/PINYON | 9cc7e4520a47bc66438de96f48a212c147d7e835 | [
"MIT"
] | null | null | null | tweets_process/3_get_all_entities_from_tweets_threading.py | SDM-TIB/PINYON | 9cc7e4520a47bc66438de96f48a212c147d7e835 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import csv
import requests
from tqdm import tqdm
from multiprocessing.pool import ThreadPool
headers = {'content-type': 'application/json', 'Accept-Charset': 'UTF-8'}
def falcon_call_wikidata(text,mode='short'):
try:
text=text.replace('"','')
text=text.replace("'",""... | 31.547619 | 116 | 0.58566 |
fc26ba1d307cc166711fe1b65aed42501c406eb2 | 5,881 | py | Python | recommendations.py | penglee87/lpython | 3a53322ccdebf83d6b358386518cf81712433c9e | [
"bzip2-1.0.6"
] | null | null | null | recommendations.py | penglee87/lpython | 3a53322ccdebf83d6b358386518cf81712433c9e | [
"bzip2-1.0.6"
] | null | null | null | recommendations.py | penglee87/lpython | 3a53322ccdebf83d6b358386518cf81712433c9e | [
"bzip2-1.0.6"
] | null | null | null | # A dictionary of movie critics and their ratings of a small
# set of movies
critics={'Lisa Rose': {'Lady in the Water': 2.5, 'Snakes on a Plane': 3.5,
'Just My Luck': 3.0, 'Superman Returns': 3.5, 'You, Me and Dupree': 2.5,
'The Night Listener': 3.0},
'Gene Seymour': {'Lady in the Water': 3.0, 'Snakes on a Plane': ... | 31.281915 | 82 | 0.669954 |
d3a6573520d9faa970da79ee2331e81abbe980be | 17,680 | py | Python | .venv/Lib/site-packages/adal/token_request.py | basavarajamogi/Azure_Irrigation_UAV | 0b06e7be54f4e31a05f13c4968ac29c16fe554fc | [
"MIT"
] | null | null | null | .venv/Lib/site-packages/adal/token_request.py | basavarajamogi/Azure_Irrigation_UAV | 0b06e7be54f4e31a05f13c4968ac29c16fe554fc | [
"MIT"
] | null | null | null | .venv/Lib/site-packages/adal/token_request.py | basavarajamogi/Azure_Irrigation_UAV | 0b06e7be54f4e31a05f13c4968ac29c16fe554fc | [
"MIT"
] | null | null | null | #------------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation.
# All rights reserved.
#
# This code is licensed under the MIT License.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated document... | 44.089776 | 130 | 0.683937 |
74f5a73067ddf99694565855064decf681c3076f | 1,217 | py | Python | sortedm2m_tests/migrations_tests/django17_migrations/0001_initial.py | Seleznev-nvkz/django-sortedm2m | 2fb4c98269855d709d38e96756ee797db7866104 | [
"BSD-3-Clause"
] | null | null | null | sortedm2m_tests/migrations_tests/django17_migrations/0001_initial.py | Seleznev-nvkz/django-sortedm2m | 2fb4c98269855d709d38e96756ee797db7866104 | [
"BSD-3-Clause"
] | null | null | null | sortedm2m_tests/migrations_tests/django17_migrations/0001_initial.py | Seleznev-nvkz/django-sortedm2m | 2fb4c98269855d709d38e96756ee797db7866104 | [
"BSD-3-Clause"
] | null | null | null | from django.db import models, migrations
import sortedm2m.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Gallery',
fields=[
('id', models.AutoField(verbose_name='ID', serial... | 28.97619 | 114 | 0.522597 |
17e12e97bead4f2977b59361a4de7672f0e9b75f | 10,627 | py | Python | mpmath/visualization.py | dimpase/mpmath | 1bb25a42cb162faed87040c4cb86c256e4f5f535 | [
"BSD-3-Clause"
] | 625 | 2015-01-07T04:56:25.000Z | 2022-03-28T16:30:27.000Z | Library/lib/python3.7/site-packages/mpmath/visualization.py | gengyong/Carnets | 8930a14f69360d4db115a85ff9e0f6efa80fa2e7 | [
"BSD-3-Clause"
] | 322 | 2015-01-01T15:19:37.000Z | 2022-03-27T05:07:51.000Z | Library/lib/python3.7/site-packages/mpmath/visualization.py | gengyong/Carnets | 8930a14f69360d4db115a85ff9e0f6efa80fa2e7 | [
"BSD-3-Clause"
] | 160 | 2015-01-25T01:16:52.000Z | 2022-03-21T14:44:20.000Z | """
Plotting (requires matplotlib)
"""
from colorsys import hsv_to_rgb, hls_to_rgb
from .libmp import NoConvergence
from .libmp.backend import xrange
class VisualizationMethods(object):
plot_ignore = (ValueError, ArithmeticError, ZeroDivisionError, NoConvergence)
def plot(ctx, f, xlim=[-5,5], ylim=None, points=2... | 33.843949 | 81 | 0.523854 |
303b0ce2173b8b00d310897f35c7f917ffad5b3d | 1,371 | py | Python | setup.py | Abuton/featureeng | 62aae3c162b9c42a0c428113a56d6fb2ef95258b | [
"BSD-3-Clause"
] | 1 | 2022-01-10T21:56:41.000Z | 2022-01-10T21:56:41.000Z | setup.py | Abuton/featureeng | 62aae3c162b9c42a0c428113a56d6fb2ef95258b | [
"BSD-3-Clause"
] | null | null | null | setup.py | Abuton/featureeng | 62aae3c162b9c42a0c428113a56d6fb2ef95258b | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements_dev = ['pandas>=1.1.0', 'numpy>=1.19.0', ]
test_requirements = ... | 30.466667 | 104 | 0.655726 |
4e3c7322145fb5e1d37a244189f3bbacae4397fc | 629 | py | Python | manage.py | dan-jugz/instaglam | 96929b68498f88de019d496c6d2750cba5b749b0 | [
"MIT"
] | null | null | null | manage.py | dan-jugz/instaglam | 96929b68498f88de019d496c6d2750cba5b749b0 | [
"MIT"
] | 9 | 2020-02-12T03:22:30.000Z | 2022-02-10T12:49:52.000Z | manage.py | dan-jugz/instaglam | 96929b68498f88de019d496c6d2750cba5b749b0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'instaclam.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Impo... | 28.590909 | 73 | 0.683625 |
98c274a6a1868beba98e729e449cf2666038da9d | 3,159 | py | Python | app/modules/sub_graphql/registration_graphql.py | NTUT-108-SE/CMS-Backend | 1daa37960ba61f935da5174516f0a2e411b68706 | [
"MIT"
] | null | null | null | app/modules/sub_graphql/registration_graphql.py | NTUT-108-SE/CMS-Backend | 1daa37960ba61f935da5174516f0a2e411b68706 | [
"MIT"
] | null | null | null | app/modules/sub_graphql/registration_graphql.py | NTUT-108-SE/CMS-Backend | 1daa37960ba61f935da5174516f0a2e411b68706 | [
"MIT"
] | 1 | 2019-10-12T02:48:16.000Z | 2019-10-12T02:48:16.000Z | import graphene
from graphene_mongo import MongoengineObjectType
from ..domain.registration import Registration
from ..database import RegistrationModel
class RegistrationMeta(graphene.ObjectType):
id = graphene.String()
name = graphene.String()
identifier = graphene.String()
registration_date = graph... | 31.59 | 88 | 0.659386 |
42e5497fc2d8a7847636933aa8572ad0c662e993 | 1,831 | py | Python | covid/wallet/key_val_store.py | pinksheetscrypto/covid-blockchain | 6360f93be99129898d349a3ad8414069c567988c | [
"Apache-2.0"
] | 14 | 2021-07-28T09:56:07.000Z | 2022-02-09T04:28:14.000Z | covid/wallet/key_val_store.py | pinksheetscrypto/covid-blockchain | 6360f93be99129898d349a3ad8414069c567988c | [
"Apache-2.0"
] | 23 | 2021-07-28T10:16:56.000Z | 2022-03-26T10:43:53.000Z | covid/wallet/key_val_store.py | pinksheetscrypto/covid-blockchain | 6360f93be99129898d349a3ad8414069c567988c | [
"Apache-2.0"
] | 9 | 2021-07-28T02:41:24.000Z | 2022-03-15T08:32:49.000Z | from typing import Any
import aiosqlite
from covid.util.byte_types import hexstr_to_bytes
from covid.util.db_wrapper import DBWrapper
from covid.util.streamable import Streamable
class KeyValStore:
"""
Multipurpose persistent key-value store
"""
db_connection: aiosqlite.Connection
db_wrapper: D... | 29.532258 | 100 | 0.633534 |
15cb458c39d7e17bcbb49e31b39a1d61318f640f | 299 | py | Python | music/urls.py | JonnyFunFun/pyParty | 972690881c88d27139b076d2acb50b69275759b8 | [
"MIT"
] | 1 | 2017-03-23T18:07:33.000Z | 2017-03-23T18:07:33.000Z | music/urls.py | JonnyFunFun/pyParty | 972690881c88d27139b076d2acb50b69275759b8 | [
"MIT"
] | null | null | null | music/urls.py | JonnyFunFun/pyParty | 972690881c88d27139b076d2acb50b69275759b8 | [
"MIT"
] | null | null | null | from django.conf.urls import patterns, url
urlpatterns = patterns('',
url(r'^stream/?', 'music.views.stream'),
url(r'^search/?', 'music.views.search'),
url(r'^request/?', 'music.views.request_song'),
url(r'^current/?', 'music.views.current'),
url(r'^$', 'music.views.index'),
)
| 29.9 | 51 | 0.622074 |
1989209b19a47242a54b1b3e45845d78e04cef86 | 3,753 | py | Python | placidity/scenario_tester.py | bebraw/Placidity | 944b69dadb613fc8c2f7e10c0b84facd6363b404 | [
"MIT"
] | 2 | 2017-01-02T14:03:58.000Z | 2017-11-29T01:24:06.000Z | placidity/scenario_tester.py | bebraw/Placidity | 944b69dadb613fc8c2f7e10c0b84facd6363b404 | [
"MIT"
] | null | null | null | placidity/scenario_tester.py | bebraw/Placidity | 944b69dadb613fc8c2f7e10c0b84facd6363b404 | [
"MIT"
] | null | null | null | import types
from collections import deque
class InputError(Exception):
pass
class NotRunningError(Exception):
pass
class MatchError(Exception):
pass
class OutputError(Exception):
pass
class RunningError(Exception):
pass
class Line:
def __init__(self, line):
self.content = line
... | 25.02 | 77 | 0.587264 |
7d4ff4386c59867e9b5e0a676d3a2bd38915ca1d | 4,837 | py | Python | SCRAPE/Lib/site-packages/twisted/internet/test/test_udp_internals.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 4,612 | 2015-01-01T12:57:23.000Z | 2022-03-30T01:08:23.000Z | SCRAPE/Lib/site-packages/twisted/internet/test/test_udp_internals.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,243 | 2015-01-23T17:23:59.000Z | 2022-03-28T13:46:17.000Z | SCRAPE/Lib/site-packages/twisted/internet/test/test_udp_internals.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,236 | 2015-01-13T14:41:26.000Z | 2022-03-17T07:12:36.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for the internal implementation details of L{twisted.internet.udp}.
"""
import socket
from twisted.internet import udp
from twisted.internet.protocol import DatagramProtocol
from twisted.python.runtime import platformType
from twisted... | 30.613924 | 81 | 0.628282 |
d3aa7479996a04646465e1045bb76fedcf60e32f | 3,555 | py | Python | votrfront/cron.py | itmat0/votr | 626b3b1bf1f21d2891b0cc71bbbb1c8f52cd4909 | [
"Apache-2.0"
] | 8 | 2015-01-13T23:15:18.000Z | 2021-08-19T12:35:00.000Z | votrfront/cron.py | itmat0/votr | 626b3b1bf1f21d2891b0cc71bbbb1c8f52cd4909 | [
"Apache-2.0"
] | 99 | 2015-01-14T22:09:50.000Z | 2021-05-20T19:07:07.000Z | votrfront/cron.py | itmat0/votr | 626b3b1bf1f21d2891b0cc71bbbb1c8f52cd4909 | [
"Apache-2.0"
] | 12 | 2016-02-10T21:35:42.000Z | 2021-08-19T12:35:50.000Z |
import datetime
import gzip
import json
import lzma
import os
import shutil
import subprocess
import tarfile
import time
from . import logutil
from . import sessions
def create_archive(app, prefix):
wip = app.var_path('logarchive', 'wip.tar.xz')
sources = [filename for filename in os.listdir(app.var_path('ol... | 33.537736 | 76 | 0.581997 |
4774795d0f855fff38d7898414f72e172d2c9b96 | 1,697 | py | Python | conekt/models/relationships/cluster_go.py | legumeinfo/CoNekT | 709a4980cfa255cafd456b268e274db2b4b1f5fb | [
"MIT"
] | 14 | 2018-08-20T03:07:21.000Z | 2021-11-04T11:15:31.000Z | conekt/models/relationships/cluster_go.py | mutwil/CoNekT | f4a4496a87d14b15bcf587975b31a2edc24c6bf7 | [
"MIT"
] | 9 | 2018-07-17T15:30:47.000Z | 2021-07-05T13:11:54.000Z | conekt/models/relationships/cluster_go.py | mutwil/CoNekT | f4a4496a87d14b15bcf587975b31a2edc24c6bf7 | [
"MIT"
] | 3 | 2019-08-05T09:16:34.000Z | 2019-12-04T23:59:28.000Z | from conekt import db
class ClusterGOEnrichment(db.Model):
__tablename__ = 'cluster_go_enrichment'
__table_args__ = {'extend_existing': True}
id = db.Column(db.Integer, primary_key=True)
cluster_id = db.Column(db.Integer, db.ForeignKey('coexpression_clusters.id', ondelete='CASCADE'))
go_id = db.C... | 37.711111 | 106 | 0.58515 |
3d79a2b4702e00b33add7ede939a74927e66ac34 | 612 | py | Python | app/deployments/migrations/0017_auto_20190107_2156.py | gulfofmaine/buoy_barn | f04047fe17a45dbb58a3aac7703edd16616a6dfd | [
"MIT"
] | 1 | 2021-08-06T19:26:06.000Z | 2021-08-06T19:26:06.000Z | app/deployments/migrations/0017_auto_20190107_2156.py | gulfofmaine/buoy_barn | f04047fe17a45dbb58a3aac7703edd16616a6dfd | [
"MIT"
] | 152 | 2019-09-20T11:56:58.000Z | 2022-03-25T10:01:12.000Z | app/deployments/migrations/0017_auto_20190107_2156.py | gulfofmaine/buoy_barn | f04047fe17a45dbb58a3aac7703edd16616a6dfd | [
"MIT"
] | null | null | null | # Generated by Django 2.1.2 on 2019-01-07 21:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('deployments', '0016_forecast_variable'),
]
operations = [
migrations.AlterField(
model_name='forecast',
name='foreca... | 32.210526 | 264 | 0.633987 |
9dc5463093e905edb81d9b009f9193c64ade5a24 | 6,107 | py | Python | Tests/modules/system_related/test_time.py | pxl9588/ironpython3 | 3417b2d29f4116b8f44af31defb9a098686cd566 | [
"Apache-2.0"
] | 1 | 2019-06-27T13:04:33.000Z | 2019-06-27T13:04:33.000Z | Tests/modules/system_related/test_time.py | pxl9588/ironpython3 | 3417b2d29f4116b8f44af31defb9a098686cd566 | [
"Apache-2.0"
] | null | null | null | Tests/modules/system_related/test_time.py | pxl9588/ironpython3 | 3417b2d29f4116b8f44af31defb9a098686cd566 | [
"Apache-2.0"
] | null | null | null | # Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information.
import time
import unittest
from iptest import is_cli, run_test, skipUnlessIronPython
class TimeTest(unittest.... | 42.706294 | 141 | 0.523334 |
65f734fc09c773b407eaa30dd27a7bf664fb8330 | 3,178 | py | Python | DeepLearningExamples/TensorFlow2/Recommendation/DLRM/preproc/parquet_to_binary.py | puririshi98/benchmark | 79f554f1e1cf36f62994c78e0e6e5b360f554022 | [
"BSD-3-Clause"
] | 1 | 2021-04-20T21:43:46.000Z | 2021-04-20T21:43:46.000Z | preproc/parquet_to_binary.py | SpringWave1/DLRM-TEST | a6572655053bbca0461af87c5ce30042950282bc | [
"Apache-2.0"
] | null | null | null | preproc/parquet_to_binary.py | SpringWave1/DLRM-TEST | a6572655053bbca0461af87c5ce30042950282bc | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 NVIDIA CORPORATION. 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 appli... | 34.923077 | 125 | 0.721208 |
03d58cfd9416a35694a7e34d7ef796c3312b9f96 | 4,478 | py | Python | arjuna/tpi/data/record.py | StefanIGit/arjuna | 6c7d9099e0d766e7b30936ef25d32c1414133b96 | [
"Apache-2.0"
] | null | null | null | arjuna/tpi/data/record.py | StefanIGit/arjuna | 6c7d9099e0d766e7b30936ef25d32c1414133b96 | [
"Apache-2.0"
] | null | null | null | arjuna/tpi/data/record.py | StefanIGit/arjuna | 6c7d9099e0d766e7b30936ef25d32c1414133b96 | [
"Apache-2.0"
] | null | null | null | # This file is a part of Arjuna
# Copyright 2015-2021 Rahul Verma
# Website: www.RahulVerma.net
# 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... | 31.535211 | 260 | 0.593122 |
33011210e7f0ead67dee182ea650f0117edea8bc | 3,293 | py | Python | subcmds/abandon.py | marado/git-repo | f040d282c683285519dce80e946072117a4dd6b4 | [
"Apache-2.0"
] | 83 | 2017-10-18T09:18:22.000Z | 2022-02-09T11:29:30.000Z | subcmds/abandon.py | marado/git-repo | f040d282c683285519dce80e946072117a4dd6b4 | [
"Apache-2.0"
] | 2 | 2020-04-09T12:06:12.000Z | 2020-04-23T11:08:19.000Z | subcmds/abandon.py | marado/git-repo | f040d282c683285519dce80e946072117a4dd6b4 | [
"Apache-2.0"
] | 47 | 2015-01-08T09:17:51.000Z | 2017-10-07T15:20:38.000Z | # -*- coding:utf-8 -*-
#
# Copyright (C) 2008 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... | 29.936364 | 79 | 0.615852 |
b5a53bf7871059082eb0992ef90810778b616b17 | 1,501 | py | Python | meerk40t/gui/toolwidgets/toolrelocate.py | joerlane/meerk40t | a75d78848ff1682640e112111fb6ac4e23e08616 | [
"MIT"
] | null | null | null | meerk40t/gui/toolwidgets/toolrelocate.py | joerlane/meerk40t | a75d78848ff1682640e112111fb6ac4e23e08616 | [
"MIT"
] | null | null | null | meerk40t/gui/toolwidgets/toolrelocate.py | joerlane/meerk40t | a75d78848ff1682640e112111fb6ac4e23e08616 | [
"MIT"
] | null | null | null | import wx
from meerk40t.gui.scene.sceneconst import RESPONSE_CHAIN, RESPONSE_CONSUME
from meerk40t.gui.toolwidgets.toolwidget import ToolWidget
from ...core.units import UNITS_PER_MM
class RelocateTool(ToolWidget):
"""
Relocate laser Tool.
Adds Circle with click and drag.
"""
def __init__(self... | 29.431373 | 78 | 0.577615 |
40c323267f948e78c5dcf2fc8ca4a19cd4ca5967 | 27 | py | Python | ebde6cf7-7b8f-476d-9c37-27ebb2cd1d52/0092efda-4dd0-4769-b6cf-c66b63eca08f.py | copyleftdev/top_contrib_lol | 362a5849b04dc2b52a9b0da138d4e9a32eade207 | [
"Apache-2.0"
] | null | null | null | ebde6cf7-7b8f-476d-9c37-27ebb2cd1d52/0092efda-4dd0-4769-b6cf-c66b63eca08f.py | copyleftdev/top_contrib_lol | 362a5849b04dc2b52a9b0da138d4e9a32eade207 | [
"Apache-2.0"
] | null | null | null | ebde6cf7-7b8f-476d-9c37-27ebb2cd1d52/0092efda-4dd0-4769-b6cf-c66b63eca08f.py | copyleftdev/top_contrib_lol | 362a5849b04dc2b52a9b0da138d4e9a32eade207 | [
"Apache-2.0"
] | null | null | null | CALL ENDMSG('HELLO WORLD'); | 27 | 27 | 0.740741 |
1cfcb4a2d3abb26b4cedf95cc7290144f4b31369 | 4,735 | py | Python | monitors/jenkins_monitor.py | jasaw/build-lights | 99c30d317a701c20e0a86fa65dbf88260c912bfa | [
"MIT"
] | null | null | null | monitors/jenkins_monitor.py | jasaw/build-lights | 99c30d317a701c20e0a86fa65dbf88260c912bfa | [
"MIT"
] | null | null | null | monitors/jenkins_monitor.py | jasaw/build-lights | 99c30d317a701c20e0a86fa65dbf88260c912bfa | [
"MIT"
] | null | null | null | """ jenkins monitor """
import os
current_dir = os.path.dirname(os.path.realpath(__file__))
parent_dir = os.path.join(current_dir, "..")
import sys
sys.path.append(parent_dir)
try:
import json
except ImportError:
import simplejson as json
from lib import logger
from lib import list_utils
from lib import json_... | 44.669811 | 110 | 0.659768 |
1967cb56c3517de380373350a3e7bcd359c29603 | 2,366 | py | Python | chatutils/channel.py | sachio222/encryptochat | b9c552ddd00f79151c3e9d8bed35c3e42f3a3547 | [
"MIT"
] | 2 | 2020-08-10T02:08:28.000Z | 2020-08-14T18:46:56.000Z | chatutils/channel.py | sachio222/socketchat_v3 | cd62b892842f6708055359fa2384269038f425dc | [
"MIT"
] | 25 | 2020-08-12T05:15:48.000Z | 2020-09-06T06:14:13.000Z | chatutils/channel.py | sachio222/socketchat_v3 | cd62b892842f6708055359fa2384269038f425dc | [
"MIT"
] | null | null | null | #!/usr/bin/ python3
import sys
class Channel():
"""Returns channel details"""
def __init__(self):
pass
def get_status(self, addresses):
"""Returns people in the room when called, and outputs to channel"""
people = []
for user in addresses.keys():
person = us... | 22.11215 | 76 | 0.460693 |
51de470bb3964042f4a8478b80c8fa3e9ac37f05 | 1,251 | py | Python | numba/typesystem/tests/test_typeof.py | liuzhenhai/numba | 855a2b262ae3d82bd6ac1c3e1c0acb36ee2e2acf | [
"BSD-2-Clause"
] | null | null | null | numba/typesystem/tests/test_typeof.py | liuzhenhai/numba | 855a2b262ae3d82bd6ac1c3e1c0acb36ee2e2acf | [
"BSD-2-Clause"
] | null | null | null | numba/typesystem/tests/test_typeof.py | liuzhenhai/numba | 855a2b262ae3d82bd6ac1c3e1c0acb36ee2e2acf | [
"BSD-2-Clause"
] | null | null | null | import numpy as np
import numba
from numba import *
from numba.testing.test_support import autojit_py3doc
@jit
class Foo(object):
def __init__(self, arg):
self.arg = double(arg)
def test_typeof_pure(arg):
"""
>>> test_typeof_pure(10)
int
>>> test_typeof_pure(10.0)
float64
>>> print... | 19.857143 | 53 | 0.605116 |
027b35f7bda00abe6467d5c282fdf54bd62b70ed | 409 | py | Python | agents/agent.py | jasonjewik/snape | 678361468c07bee78ad7e77522dedb10c02e6f18 | [
"MIT"
] | 8 | 2022-01-03T19:01:09.000Z | 2022-03-13T17:17:49.000Z | agents/agent.py | jasonjewik/snape | 678361468c07bee78ad7e77522dedb10c02e6f18 | [
"MIT"
] | 3 | 2022-01-17T06:41:56.000Z | 2022-01-19T19:52:11.000Z | agents/agent.py | jasonjewik/snape | 678361468c07bee78ad7e77522dedb10c02e6f18 | [
"MIT"
] | 1 | 2022-02-25T08:40:00.000Z | 2022-02-25T08:40:00.000Z | # Standard library imports
from abc import ABC, abstractmethod
# Local application imports
from gym_snape import Snape
class Agent(ABC):
"""Base class for all agents."""
def __init__(self, env: Snape, *args, **kwargs):
self._env = env
@abstractmethod
def select_action(self, *args, **kwargs)... | 22.722222 | 52 | 0.667482 |
a64db6eb0d6c2876329970bd72bf9c4bd5b6cddc | 1,751 | py | Python | twitchy.py | ronald-d-rogers/twitchy | 8fbca0fa062949d77ab628a3f636a21a8a909607 | [
"BSD-2-Clause"
] | 3 | 2015-03-09T13:38:31.000Z | 2016-11-09T18:46:02.000Z | twitchy.py | ronald-d-rogers/twitchy | 8fbca0fa062949d77ab628a3f636a21a8a909607 | [
"BSD-2-Clause"
] | null | null | null | twitchy.py | ronald-d-rogers/twitchy | 8fbca0fa062949d77ab628a3f636a21a8a909607 | [
"BSD-2-Clause"
] | null | null | null | """A pluggable Twitch chat-interaction UI.
"""
from twisted.internet import _threadedselect
_threadedselect.install()
from twisted.internet import reactor
import wx
from pubsub import pub
import gui
import config
import chat
import plugins
__appname__ = 'twitchy'
__description__ = 'An extensible GUI designed to impro... | 24.319444 | 93 | 0.647059 |
7c457c9a4cab057238cbaaf9bf4deedd4f158e74 | 1,712 | py | Python | examples/classifier/classifier_eng_vs_ta.py | aathi2002/open-tamil | 84161b622b7cb5d369b4ab4e8025dcf432e867e8 | [
"MIT"
] | 218 | 2016-03-19T20:59:17.000Z | 2022-03-31T03:35:32.000Z | examples/classifier/classifier_eng_vs_ta.py | aathi2002/open-tamil | 84161b622b7cb5d369b4ab4e8025dcf432e867e8 | [
"MIT"
] | 132 | 2016-02-23T06:16:32.000Z | 2022-02-17T05:16:43.000Z | examples/classifier/classifier_eng_vs_ta.py | aathi2002/open-tamil | 84161b622b7cb5d369b4ab4e8025dcf432e867e8 | [
"MIT"
] | 62 | 2016-03-19T20:59:26.000Z | 2022-03-01T11:34:48.000Z | ## This Python file uses the following encoding: utf-8
## (C) 2017 Muthiah Annamalai <ezhillang@gmail.com>
## This code is released under public domain
import codecs
from tamil import utf8
from transliterate import azhagi, jaffna, combinational, algorithm
def demo_classify():
for l in utf8.get_letters_iterable(u... | 29.016949 | 79 | 0.674065 |
09a8e660d11c158a1742c7a8d0fddf5c4fbc086a | 2,708 | py | Python | models/res_partner_id_category.py | itgeopanama/partner_identification | 4170ea5b0f746b683322207287b09b1b46b8ce97 | [
"CNRI-Python"
] | null | null | null | models/res_partner_id_category.py | itgeopanama/partner_identification | 4170ea5b0f746b683322207287b09b1b46b8ce97 | [
"CNRI-Python"
] | null | null | null | models/res_partner_id_category.py | itgeopanama/partner_identification | 4170ea5b0f746b683322207287b09b1b46b8ce97 | [
"CNRI-Python"
] | null | null | null | # -*- coding: utf-8 -*-
#
# © 2004-2010 Tiny SPRL http://tiny.be
# © 2010-2012 ChriCar Beteiligungs- und Beratungs- GmbH
# http://www.camptocamp.at
# © 2015 Antiun Ingenieria, SL (Madrid, Spain)
# http://www.antiun.com
# Antonio Espinosa <antonioea@antiun.com>
# © 2016 ACSONE SA/NV (<http://a... | 37.09589 | 78 | 0.596012 |
5d7960829ba6012c05f3dbef7e21555abfb0b8a8 | 1,752 | py | Python | icebreaker/perbitoe/singlebitoe.py | TomKeddie/prj-litex | cc79c041d22ad552a12b49f531d007491b536521 | [
"MIT"
] | 2 | 2019-08-26T13:49:22.000Z | 2019-11-11T18:43:29.000Z | icebreaker/perbitoe/singlebitoe.py | TomKeddie/prj-litex | cc79c041d22ad552a12b49f531d007491b536521 | [
"MIT"
] | null | null | null | icebreaker/perbitoe/singlebitoe.py | TomKeddie/prj-litex | cc79c041d22ad552a12b49f531d007491b536521 | [
"MIT"
] | null | null | null | import sys
if len(sys.argv) != 3:
print("Usage: {} <migenpath> <builddir>".format(sys.argv[0]))
sys.exit(-1)
sys.path.append(sys.argv[1])
build_dir=sys.argv[2]
from migen import *
from migen.build.generic_platform import Pins
from migen.build.platforms import icebreaker, arty_a7, papilio_pro, versaecp55g
... | 28.721311 | 103 | 0.708333 |
64b21c9a6a5fa851107108da63a16f6408940093 | 2,351 | py | Python | lib/surface/auth/activate_refresh_token.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/surface/auth/activate_refresh_token.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/surface/auth/activate_refresh_token.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*- #
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 35.089552 | 78 | 0.742663 |
a0509c08cf7c82345690087aa235d544da1a91ca | 28,829 | py | Python | corehq/apps/app_manager/suite_xml/xml_models.py | akashkj/commcare-hq | b00a62336ec26cea1477dfb8c048c548cc462831 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/app_manager/suite_xml/xml_models.py | akashkj/commcare-hq | b00a62336ec26cea1477dfb8c048c548cc462831 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/app_manager/suite_xml/xml_models.py | akashkj/commcare-hq | b00a62336ec26cea1477dfb8c048c548cc462831 | [
"BSD-3-Clause"
] | null | null | null | from eulxml.xmlmap import (
IntegerField,
NodeField,
NodeListField,
SimpleBooleanField,
StringField,
XmlObject,
load_xmlobject_from_string,
)
from lxml import etree
from corehq.apps.app_manager.exceptions import UnknownInstanceError
class XPathField(StringField):
"""
A string fiel... | 29.628983 | 194 | 0.615838 |
fa3fb8bddea8d165456cde697c3ac3f1040fff8e | 5,092 | py | Python | myprojectenv/lib/python3.5/site-packages/ansible/plugins/action/ios.py | lancerenteria/doFlask | 2d4e242469b108c6c8316ee18a540307497bfb53 | [
"MIT"
] | null | null | null | myprojectenv/lib/python3.5/site-packages/ansible/plugins/action/ios.py | lancerenteria/doFlask | 2d4e242469b108c6c8316ee18a540307497bfb53 | [
"MIT"
] | null | null | null | myprojectenv/lib/python3.5/site-packages/ansible/plugins/action/ios.py | lancerenteria/doFlask | 2d4e242469b108c6c8316ee18a540307497bfb53 | [
"MIT"
] | null | null | null | #
# (c) 2016 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is d... | 39.169231 | 122 | 0.646308 |
1883afed38c40808d844cad56392ad3cebfbfabe | 45,680 | py | Python | pyemma/msm/api.py | trendelkampschroer/PyEMMA | ee5784d5c1c5bc070fe2e9e6ad4f24b36185dc20 | [
"BSD-2-Clause"
] | null | null | null | pyemma/msm/api.py | trendelkampschroer/PyEMMA | ee5784d5c1c5bc070fe2e9e6ad4f24b36185dc20 | [
"BSD-2-Clause"
] | null | null | null | pyemma/msm/api.py | trendelkampschroer/PyEMMA | ee5784d5c1c5bc070fe2e9e6ad4f24b36185dc20 | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2015, 2014 Computational Molecular Biology Group, Free University
# Berlin, 14195 Berlin, Germany.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source ... | 39.721739 | 119 | 0.671322 |
2b6b58cdaba2889f8dbf3978037f5530295960fc | 623 | py | Python | LineNotify.py | NickLin910221/Triangular-Arbitrage | 6d9187cd95ac9fe146267fd7667eaa560d4cfbe8 | [
"MIT"
] | null | null | null | LineNotify.py | NickLin910221/Triangular-Arbitrage | 6d9187cd95ac9fe146267fd7667eaa560d4cfbe8 | [
"MIT"
] | 1 | 2021-06-30T15:12:14.000Z | 2021-07-01T03:22:45.000Z | LineNotify.py | NickLin910221/Triangular-Arbitrage | 6d9187cd95ac9fe146267fd7667eaa560d4cfbe8 | [
"MIT"
] | null | null | null | import requests
def SendMessageToLineNotify(message,Token):
Token = Token
url = "https://notify-api.line.me/api/notify"
payload = {'message':message,
}
header = {'Content-Type':'application/x-www-form-urlencoded',
'Authorization':'B... | 29.666667 | 69 | 0.53451 |
daa213ce3a7c350c4e4597246b3b7d4eeff15350 | 9,064 | py | Python | project4-gan-face-generation/problem_unittests.py | onomatopeia/deep-learning | a8c67e11e25a5210d6787155f4050ef43e806756 | [
"MIT"
] | 1 | 2020-03-23T15:41:50.000Z | 2020-03-23T15:41:50.000Z | project4-gan-face-generation/problem_unittests.py | Test00DezWebSite/deep-learning | a8c67e11e25a5210d6787155f4050ef43e806756 | [
"MIT"
] | null | null | null | project4-gan-face-generation/problem_unittests.py | Test00DezWebSite/deep-learning | a8c67e11e25a5210d6787155f4050ef43e806756 | [
"MIT"
] | 1 | 2020-03-23T15:41:54.000Z | 2020-03-23T15:41:54.000Z | <!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>problem_unittests.py (editing)</title>
<link id="favicon" rel="shortcut icon" type="image/x-icon" href="/static/base/images/favicon-file.ico?v=e2776a7f45692c839d6eea7d7ff6f3b2">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<lin... | 33.57037 | 153 | 0.562224 |
b8bcb120f0acc6fdab92f16830658f7c3bb8e53f | 2,054 | py | Python | Probability-of-the-Loan-Defaulters/code.py | SanjayLadhe/ga-learner-dsmp-repo | cc25e69c6bc4649dded822cb93f9b2a0472b0e06 | [
"MIT"
] | null | null | null | Probability-of-the-Loan-Defaulters/code.py | SanjayLadhe/ga-learner-dsmp-repo | cc25e69c6bc4649dded822cb93f9b2a0472b0e06 | [
"MIT"
] | null | null | null | Probability-of-the-Loan-Defaulters/code.py | SanjayLadhe/ga-learner-dsmp-repo | cc25e69c6bc4649dded822cb93f9b2a0472b0e06 | [
"MIT"
] | null | null | null | # --------------
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# Load the dataframe
df = pd.read_csv(path)
# probability of fico score greater than 700
p_a = df[df['fico'].astype(float) >700].shape[0]/df.shape[0]
print(p_a)
# probability of purpose == debt_consolidation
p_b = df[df['purpo... | 23.340909 | 80 | 0.684031 |
0980a004599f54e7a2efebce55f12e6310b99903 | 1,341 | py | Python | test/test_image_request.py | ariadnext/IDCheckIO | 62804f78e02b9ef42e10f1fe7b4b4f3abbf703fd | [
"Apache-2.0"
] | 3 | 2016-03-24T11:08:57.000Z | 2016-10-05T13:32:45.000Z | test/test_image_request.py | ariadnext/IDCheckIO | 62804f78e02b9ef42e10f1fe7b4b4f3abbf703fd | [
"Apache-2.0"
] | null | null | null | test/test_image_request.py | ariadnext/IDCheckIO | 62804f78e02b9ef42e10f1fe7b4b4f3abbf703fd | [
"Apache-2.0"
] | 2 | 2019-10-18T14:25:08.000Z | 2020-12-12T17:07:07.000Z | # coding: utf-8
"""
IdCheck.IO API
Check identity documents
OpenAPI spec version: 0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You... | 24.833333 | 76 | 0.719612 |
1f967d082979527b19033fce0e07125b4f7d93b6 | 3,253 | py | Python | scripts/python/lane_detection/image_util_transform.py | bsantanna/ai-pilot | 86a9b7b50ad797b73e505265db670de3f878acdf | [
"MIT"
] | null | null | null | scripts/python/lane_detection/image_util_transform.py | bsantanna/ai-pilot | 86a9b7b50ad797b73e505265db670de3f878acdf | [
"MIT"
] | 1 | 2020-06-15T20:48:27.000Z | 2020-06-15T20:48:27.000Z | scripts/python/lane_detection/image_util_transform.py | bsantanna/ai-pilot | 86a9b7b50ad797b73e505265db670de3f878acdf | [
"MIT"
] | null | null | null | import cv2
import numpy as np
# Utility function which applies distortion to image
def apply_distortion(input_image):
image_size = (input_image.shape[1], input_image.shape[0])
input_vertices = get_undistorted_perspective_vertices(input_image)
output_vertices = get_distorted_perspective_vertices(input_imag... | 36.550562 | 91 | 0.708884 |
e1ea5bb69169eeaee58bf78f15af3da4976e69d7 | 76,363 | py | Python | hydrus/client/ClientController.py | sttollgrin/hydrus | dab05074dacdbd1f9574c4afa6b35bf31f1ee36b | [
"WTFPL"
] | null | null | null | hydrus/client/ClientController.py | sttollgrin/hydrus | dab05074dacdbd1f9574c4afa6b35bf31f1ee36b | [
"WTFPL"
] | null | null | null | hydrus/client/ClientController.py | sttollgrin/hydrus | dab05074dacdbd1f9574c4afa6b35bf31f1ee36b | [
"WTFPL"
] | null | null | null | import hashlib
import os
import psutil
import signal
import sys
import threading
import time
import traceback
from qtpy import QtCore as QC
from qtpy import QtWidgets as QW
from qtpy import QtGui as QG
from hydrus.core import HydrusConstants as HC
from hydrus.core import HydrusController
from hydrus.core import Hydru... | 33.924034 | 361 | 0.520435 |
9a589d0146ae9ea54da33beb2a55367688bf58e3 | 549 | py | Python | tests/root_chain/contracts/data_structures/test_priority_queue.py | rcallan/plasma-mvp | 48ec5a35cb4c0c15ef4737d94bd1ff112de9d149 | [
"Apache-2.0"
] | null | null | null | tests/root_chain/contracts/data_structures/test_priority_queue.py | rcallan/plasma-mvp | 48ec5a35cb4c0c15ef4737d94bd1ff112de9d149 | [
"Apache-2.0"
] | null | null | null | tests/root_chain/contracts/data_structures/test_priority_queue.py | rcallan/plasma-mvp | 48ec5a35cb4c0c15ef4737d94bd1ff112de9d149 | [
"Apache-2.0"
] | null | null | null | import pytest
@pytest.fixture
def priority_queue(get_contract):
return get_contract('PriorityQueue')
def test_priority_queue(t, priority_queue):
priority_queue.insert(2)
priority_queue.insert(5)
priority_queue.insert(3)
assert priority_queue.getMin() == 2
priority_queue.insert(1)
assert ... | 26.142857 | 43 | 0.71949 |
67bf614d7452104a06ef73eda738d071854f8367 | 1,311 | py | Python | loss.py | robertklee/KITTI-LaneSeg | da2cc0f9df08ed9f3ccf2d77065af6429c1e0801 | [
"MIT"
] | 14 | 2020-09-13T19:12:37.000Z | 2022-02-21T05:30:35.000Z | loss.py | robertklee/KITTI-LaneSeg | da2cc0f9df08ed9f3ccf2d77065af6429c1e0801 | [
"MIT"
] | 7 | 2020-11-13T19:04:37.000Z | 2022-02-10T02:20:32.000Z | loss.py | robertklee/KITTI-RoadSeg | da2cc0f9df08ed9f3ccf2d77065af6429c1e0801 | [
"MIT"
] | 7 | 2021-06-20T21:20:39.000Z | 2022-02-21T06:40:59.000Z | import keras
import keras.backend as K
import tensorflow as tf
smooth = 1.
def dice_coef(y_true, y_pred):
y_true_f = K.flatten(y_true)
y_pred_f = K.flatten(y_pred)
intersection = K.sum(y_true_f * y_pred_f)
return (2. * intersection + smooth) / (K.sum(y_true_f) + K.sum(y_pred_f) + smooth)
def dice_co... | 28.5 | 86 | 0.60717 |
fadc303472ae4d184c55654f3d1dd3490dbdb511 | 4,121 | py | Python | recolor.py | victorvde/dota2_nohats | 803ff1d6501359ac5d7c7685d96ebf871e98f8f9 | [
"MIT"
] | 20 | 2015-04-16T10:46:44.000Z | 2021-12-31T04:21:05.000Z | recolor.py | victorvde/dota2_nohats | 803ff1d6501359ac5d7c7685d96ebf871e98f8f9 | [
"MIT"
] | 9 | 2015-01-17T04:58:20.000Z | 2015-10-24T18:37:15.000Z | recolor.py | victorvde/dota2_nohats | 803ff1d6501359ac5d7c7685d96ebf871e98f8f9 | [
"MIT"
] | 2 | 2015-02-12T13:31:11.000Z | 2019-08-14T16:21:06.000Z | from pcf import PCF, Attribute
new_color = None
def get_key(d, name, value):
l = [x for x in d if name in x and x[name].data == value]
if len(l) == 1:
return l[0]
else:
return None
def clamp(x):
return min(255, max(0, round(x)))
def fix_colors(psd):
modify = False
initialize... | 34.630252 | 118 | 0.525115 |
1448a0774c638bb8ede0384d40ad7840e3cb8fe6 | 15,003 | py | Python | ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/results_1c1d3ae4bbabf5d1fa604da0fbec8169.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 20 | 2019-05-07T01:59:14.000Z | 2022-02-11T05:24:47.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/results_1c1d3ae4bbabf5d1fa604da0fbec8169.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 60 | 2019-04-03T18:59:35.000Z | 2022-02-22T12:05:05.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/results_1c1d3ae4bbabf5d1fa604da0fbec8169.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 13 | 2019-05-20T10:48:31.000Z | 2021-10-06T07:45:44.000Z | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify,... | 42.381356 | 729 | 0.628074 |
01a599270e4e85855ec68302cbf7bc51178c2531 | 28,381 | py | Python | lib/nets/network.py | robtu328/Player_Number | 800d73374fff0dc4546930a795ca043c62f121ce | [
"MIT"
] | null | null | null | lib/nets/network.py | robtu328/Player_Number | 800d73374fff0dc4546930a795ca043c62f121ce | [
"MIT"
] | null | null | null | lib/nets/network.py | robtu328/Player_Number | 800d73374fff0dc4546930a795ca043c62f121ce | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Tensorflow Faster R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by Xinlei Chen
# --------------------------------------------------------
from __future__ import absolute_import
from __future__ import division
from __future__ impor... | 43.001515 | 151 | 0.587576 |
6c48ad2e80e8f8940a0bf56e061587999511d735 | 992 | py | Python | atlas/foundations_spec/src/foundations_spec/helpers/quarantine.py | DeepLearnI/atlas | 8aca652d7e647b4e88530b93e265b536de7055ed | [
"Apache-2.0"
] | 296 | 2020-03-16T19:55:00.000Z | 2022-01-10T19:46:05.000Z | atlas/foundations_spec/src/foundations_spec/helpers/quarantine.py | DeepLearnI/atlas | 8aca652d7e647b4e88530b93e265b536de7055ed | [
"Apache-2.0"
] | 57 | 2020-03-17T11:15:57.000Z | 2021-07-10T14:42:27.000Z | atlas/foundations_spec/src/foundations_spec/helpers/quarantine.py | DeepLearnI/atlas | 8aca652d7e647b4e88530b93e265b536de7055ed | [
"Apache-2.0"
] | 38 | 2020-03-17T21:06:05.000Z | 2022-02-08T03:19:34.000Z |
_WARNINGS = []
def quarantine(callback):
import atexit
global _WARNINGS
if not _WARNINGS:
atexit.register(_warning, _WARNINGS)
_WARNINGS.append(callback.__qualname__)
def _do_nothing(*args, **kwargs):
pass
_do_nothing.__unittest_skip__ = True
_do_nothing.__name__ = cal... | 22.044444 | 84 | 0.703629 |
b80cb62a01ad1d99232d653801eb83700d060ddb | 3,383 | py | Python | write_to_minechat.py | antauren/anonymous-chat-client | acf4437a0bc7c96f2f6129fe62eabc113906badf | [
"MIT"
] | null | null | null | write_to_minechat.py | antauren/anonymous-chat-client | acf4437a0bc7c96f2f6129fe62eabc113906badf | [
"MIT"
] | null | null | null | write_to_minechat.py | antauren/anonymous-chat-client | acf4437a0bc7c96f2f6129fe62eabc113906badf | [
"MIT"
] | null | null | null | import argparse
from dotenv import dotenv_values
import asyncio
import json
from connection import open_asyncio_connection
from config import HOST, WRITE_PORT
import logging
logger = logging.getLogger(__name__)
class InvalidToken(Exception):
pass
async def write_to_chat(host, port, account_hash, message):
... | 25.43609 | 99 | 0.652084 |
35634092cf83da3b53bf5094405f285cba4a17e4 | 16,278 | py | Python | lib/matplotlib/textpath.py | pierre-haessig/matplotlib | 0d945044ca3fbf98cad55912584ef80911f330c6 | [
"MIT",
"PSF-2.0",
"BSD-3-Clause"
] | 1 | 2019-09-21T02:39:06.000Z | 2019-09-21T02:39:06.000Z | lib/matplotlib/textpath.py | pierre-haessig/matplotlib | 0d945044ca3fbf98cad55912584ef80911f330c6 | [
"MIT",
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | lib/matplotlib/textpath.py | pierre-haessig/matplotlib | 0d945044ca3fbf98cad55912584ef80911f330c6 | [
"MIT",
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function
import warnings
import urllib
import numpy as np
from matplotlib.path import Path
from matplotlib import rcParams
import matplotlib.font_manager as font_manager
from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, LOAD_NO_HINTING
from matplotlib.ft2fo... | 31.124283 | 79 | 0.538395 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.