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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d7b45a56aa0481b6e6b51e3210f9a274cb1f81ab | 2,267 | py | Python | src/modules/string.py | StaticallyTypedRice/PodcastDownloader | b2d5bc2a5b22ba5b2dc537fdafc588aedd67bcb5 | [
"MIT"
] | 2 | 2019-08-07T09:23:26.000Z | 2020-02-29T05:06:58.000Z | src/modules/string.py | StaticallyTypedRice/PodcastDownloader | b2d5bc2a5b22ba5b2dc537fdafc588aedd67bcb5 | [
"MIT"
] | null | null | null | src/modules/string.py | StaticallyTypedRice/PodcastDownloader | b2d5bc2a5b22ba5b2dc537fdafc588aedd67bcb5 | [
"MIT"
] | 1 | 2019-03-26T10:00:49.000Z | 2019-03-26T10:00:49.000Z | def str_to_filename(name: str, placeholder: str='') -> str:
'''A rudimentary function for parsing a string into a valid file name.
Removes invalid file name characters.
NOTE: There is no guarantee that the string returned is will always be a valid
file name, but it should be valid in ... | 32.385714 | 85 | 0.533304 |
3078be5943e8324505e23c3c1e1e4b055a1fa512 | 8,759 | py | Python | data_utils.py | TylerCools/thesis | 8195ca3b8658bdd10f4ce38c6b50cd2bbedd3e57 | [
"MIT"
] | null | null | null | data_utils.py | TylerCools/thesis | 8195ca3b8658bdd10f4ce38c6b50cd2bbedd3e57 | [
"MIT"
] | null | null | null | data_utils.py | TylerCools/thesis | 8195ca3b8658bdd10f4ce38c6b50cd2bbedd3e57 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import os
import re
import numpy as np
import tensorflow as tf
stop_words=set(["a","an","the"])
def load_candidates(data_dir, task_id):
assert task_id > 0 and task_id < 7
candidates=[]
candidates_f=None
candid_dic={}
if task_id==6:
candidates_f='d... | 35.176707 | 115 | 0.593675 |
1964d69e2297c10b4fef79191946b508529ed3e0 | 913 | py | Python | freshdesk/v2/tests/test_customer.py | FellipeMendonca/python-freshdesk | d483ffffb593fd597b6e2a8d4b813e1605cbf325 | [
"BSD-2-Clause"
] | null | null | null | freshdesk/v2/tests/test_customer.py | FellipeMendonca/python-freshdesk | d483ffffb593fd597b6e2a8d4b813e1605cbf325 | [
"BSD-2-Clause"
] | null | null | null | freshdesk/v2/tests/test_customer.py | FellipeMendonca/python-freshdesk | d483ffffb593fd597b6e2a8d4b813e1605cbf325 | [
"BSD-2-Clause"
] | null | null | null | import datetime
import pytest
from freshdesk.v2.models import Customer
@pytest.fixture
def customer(api):
return api.customers.get_customer('1')
@pytest.fixture
def contact(api):
return api.contacts.get_contact(1)
def test_customer(customer):
assert isinstance(customer, Customer)
assert customer... | 22.268293 | 63 | 0.75356 |
d5b31f68688aaccaf6abebcb0d7f811fefdd6309 | 6,117 | py | Python | certbot_dns_websupportsk/dns_websupportsk.py | JozefGalbicka/certbot-dns-websupportsk | 1ec2290104348ef8c6abe8b062df44c5f9f5cf0e | [
"MIT"
] | 3 | 2021-07-26T20:20:03.000Z | 2021-11-14T10:04:35.000Z | certbot_dns_websupportsk/dns_websupportsk.py | JozefGalbicka/certbot-dns-websupportsk | 1ec2290104348ef8c6abe8b062df44c5f9f5cf0e | [
"MIT"
] | null | null | null | certbot_dns_websupportsk/dns_websupportsk.py | JozefGalbicka/certbot-dns-websupportsk | 1ec2290104348ef8c6abe8b062df44c5f9f5cf0e | [
"MIT"
] | null | null | null | # imports for WebsupportAPI class
import hmac
import hashlib
import time
import requests
import base64
from datetime import datetime, timezone
import json
# imports for authenticator
import json
import logging
import time
import requests
import zope.interface
from certbot import errors
from certbot import interfaces... | 38.71519 | 117 | 0.646559 |
dceada90f6989de8f9ba0f96b89b3409e0affa92 | 1,442 | py | Python | NER/preprocess.py | armantsh/allnews-am | e7e9ec5f65814851843b95d2c245cf4d6f54f4b8 | [
"MIT"
] | 1 | 2021-11-05T15:05:44.000Z | 2021-11-05T15:05:44.000Z | NER/preprocess.py | armantsh/allnews-am | e7e9ec5f65814851843b95d2c245cf4d6f54f4b8 | [
"MIT"
] | 2 | 2020-01-14T05:15:23.000Z | 2020-01-16T06:28:25.000Z | NER/preprocess.py | armantsh/allnews-am | e7e9ec5f65814851843b95d2c245cf4d6f54f4b8 | [
"MIT"
] | 6 | 2020-01-03T21:02:08.000Z | 2020-01-12T16:35:56.000Z | import sentence
import random
from transformers import AutoTokenizer
def partitionRankings(data, percent):
howManyNumbers = int(round(percent*len(data)))
shuffled = list(data[:])
random.shuffle(shuffled)
return shuffled[howManyNumbers:], shuffled[:howManyNumbers]
def writeInfile(data, filename):
t... | 36.05 | 77 | 0.633842 |
33c900bc33ee0360dcfcabf074b43610ecb3820d | 5,896 | py | Python | utils/metrics.py | yairkit/flowstep3d | d339a8872365ba5a93cce02650ce06b64b41057a | [
"MIT"
] | 13 | 2021-04-20T05:45:58.000Z | 2022-03-30T02:52:56.000Z | utils/metrics.py | lizhiqihhh/flowstep3d | d339a8872365ba5a93cce02650ce06b64b41057a | [
"MIT"
] | 3 | 2021-08-25T07:09:24.000Z | 2021-10-21T02:29:01.000Z | utils/metrics.py | lizhiqihhh/flowstep3d | d339a8872365ba5a93cce02650ce06b64b41057a | [
"MIT"
] | 3 | 2021-12-13T03:56:10.000Z | 2022-03-29T13:03:47.000Z | import torch
from pytorch_lightning.metrics import TensorMetric
from typing import Any, Optional
from losses.supervised_losses import *
from losses.unsupervised_losses import *
from losses.common_losses import *
class EPE3D(TensorMetric):
def forward(self, pc_source: torch.Tensor, pc_target: torch.Tensor, pred_fl... | 49.966102 | 168 | 0.686737 |
00128b39043c4f4a230b61f2fcbfc6aaac1e48db | 404 | py | Python | src/utils/fileio/File.py | danerprog/DataArchiver | aee76318746dcc78a5551ff375860762e68b93ab | [
"Apache-2.0"
] | null | null | null | src/utils/fileio/File.py | danerprog/DataArchiver | aee76318746dcc78a5551ff375860762e68b93ab | [
"Apache-2.0"
] | null | null | null | src/utils/fileio/File.py | danerprog/DataArchiver | aee76318746dcc78a5551ff375860762e68b93ab | [
"Apache-2.0"
] | null | null | null | class File:
def __init__(self, filename, mode="r+") :
self._openedFile = open(filename, mode)
self._filename = filename
def file(self) :
return self._openedFile
def seek(self, index) :
self._openedFile.seek(index)
def name(self) :
r... | 23.764706 | 47 | 0.55198 |
9b9e89509a13d1a444813a7d4921ba0609b5757c | 476 | py | Python | micro_chat/__main__.py | That-Cool-Coder/micro-chat | 66e41f3704f4718f214c8528c8bb90607ff2e4b1 | [
"MIT"
] | null | null | null | micro_chat/__main__.py | That-Cool-Coder/micro-chat | 66e41f3704f4718f214c8528c8bb90607ff2e4b1 | [
"MIT"
] | null | null | null | micro_chat/__main__.py | That-Cool-Coder/micro-chat | 66e41f3704f4718f214c8528c8bb90607ff2e4b1 | [
"MIT"
] | null | null | null | import argparse
from . import config, Server, Client
parser = argparse.ArgumentParser()
parser.add_argument('-s', '--server', help=f'Run a {config.PROGRAM_NAME} server',
action='store_true')
parser.add_argument('-c', '--client', help=f'Run a {config.PROGRAM_NAME} client ' +
'and connect to a server', action=... | 25.052632 | 84 | 0.684874 |
8a5dfb553c2740c7664e92d0e637790797fbf0c0 | 8,295 | py | Python | venv/Lib/site-packages/psychopy/app/pavlovia_ui/_base.py | mintzer/pupillometry-rf-back | cfa86fa984a49dce0123798f8de5b838c02e10d5 | [
"CC-BY-4.0"
] | null | null | null | venv/Lib/site-packages/psychopy/app/pavlovia_ui/_base.py | mintzer/pupillometry-rf-back | cfa86fa984a49dce0123798f8de5b838c02e10d5 | [
"CC-BY-4.0"
] | null | null | null | venv/Lib/site-packages/psychopy/app/pavlovia_ui/_base.py | mintzer/pupillometry-rf-back | cfa86fa984a49dce0123798f8de5b838c02e10d5 | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
import wx
import wx.html2
from psychopy.localization import _translate
from psychopy.proj... | 36.222707 | 105 | 0.602893 |
5575e680c3d407732e2f7bd0167bf6438c3bd2b5 | 2,254 | py | Python | stippling.py | anabrtorres/Trabalho-2021-1-GCC218 | b752e2d8cf6cfe89da59d31e4c288250574d6be5 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | null | null | null | stippling.py | anabrtorres/Trabalho-2021-1-GCC218 | b752e2d8cf6cfe89da59d31e4c288250574d6be5 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | null | null | null | stippling.py | anabrtorres/Trabalho-2021-1-GCC218 | b752e2d8cf6cfe89da59d31e4c288250574d6be5 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | null | null | null | # Copyright Matthew Mack (c) 2020 under CC-BY 4.0: https://creativecommons.org/licenses/by/4.0/
import os
import sys
cmd = sys.executable
# The filename of the image you want to stipple goes here.
ORIGINAL_IMAGE = "images/ufla-logo.png"
# Enables saving of images.
SAVE_IMAGE = True
# Total number of points to stipp... | 33.147059 | 167 | 0.743567 |
085f10c863fe86b8623da37a0be22321fcdc0ec1 | 594 | py | Python | lib/galaxy/tool_shed/galaxy_install/migrate/versions/0002_tools.py | lawrence14701/galaxy | 7eb2fcb708e7b63e17800c87613ddfa5497c0654 | [
"CC-BY-3.0"
] | 4 | 2018-10-29T18:34:38.000Z | 2021-09-29T23:30:42.000Z | lib/galaxy/tool_shed/galaxy_install/migrate/versions/0002_tools.py | lawrence14701/galaxy | 7eb2fcb708e7b63e17800c87613ddfa5497c0654 | [
"CC-BY-3.0"
] | 30 | 2016-10-20T15:35:12.000Z | 2018-10-02T15:59:54.000Z | lib/galaxy/tool_shed/galaxy_install/migrate/versions/0002_tools.py | lawrence14701/galaxy | 7eb2fcb708e7b63e17800c87613ddfa5497c0654 | [
"CC-BY-3.0"
] | 7 | 2016-11-03T19:11:01.000Z | 2020-05-11T14:23:52.000Z | """
The Emboss 5.0.0 tools have been eliminated from the distribution and the Emboss datatypes have been removed from
datatypes_conf.xml.sample. You should remove the Emboss datatypes from your version of datatypes_conf.xml. The
repositories named emboss_5 and emboss_datatypes from the main Galaxy tool shed at http:/... | 37.125 | 115 | 0.80303 |
88fcc84b8533ec8bf24ee1eebf54e9095a1da389 | 937 | py | Python | wavefront/test_binner.py | n1ywb/wavefront | f061f4254916703ae570b03e9669b25a6f8c1ce6 | [
"MIT"
] | null | null | null | wavefront/test_binner.py | n1ywb/wavefront | f061f4254916703ae570b03e9669b25a6f8c1ce6 | [
"MIT"
] | null | null | null | wavefront/test_binner.py | n1ywb/wavefront | f061f4254916703ae570b03e9669b25a6f8c1ce6 | [
"MIT"
] | null | null | null | from wavefront.binner import Binner, Bin
from wavefront.timebuf import TimeBuffer
from unittest import TestCase
from mock import Mock
element_time = 0.25
class Test_Bin(TestCase):
def test_bin(self):
bin = Bin(size=1, timestamp=0)
bin.add((0,1))
class Test_Binner(TestCase):
def setUp(self):
... | 31.233333 | 77 | 0.643543 |
07bfea4dd3c7da31dd35f48cfdf1b8ab0a9d1cb9 | 3,737 | py | Python | geoNet/extract_geoNet_stations.py | ucgmsim/Pre-processing | c4b9ae20a9e5e4f96f930bde29aa15176d9c8b64 | [
"MIT"
] | 1 | 2020-10-01T10:36:09.000Z | 2020-10-01T10:36:09.000Z | geoNet/extract_geoNet_stations.py | ucgmsim/Pre-processing | c4b9ae20a9e5e4f96f930bde29aa15176d9c8b64 | [
"MIT"
] | 38 | 2018-08-01T04:25:24.000Z | 2022-03-08T23:37:53.000Z | geoNet/extract_geoNet_stations.py | ucgmsim/Pre-processing | c4b9ae20a9e5e4f96f930bde29aa15176d9c8b64 | [
"MIT"
] | 1 | 2019-10-17T21:44:14.000Z | 2019-10-17T21:44:14.000Z | """
See networks.csv https://github.com/GeoNet/delta/blob/master/network/networks.csv
for what the codes mean. The relevant codes for QuakeCoRE are (I am guessing here)
NZ (included per Brendon's advice
SM National strong motion network
SC Canterbury regional strong motion network
SB is included in http... | 27.07971 | 87 | 0.596468 |
f6336ff4b355ae2ae80f9a1a340e896556d10abf | 1,385 | py | Python | pygame_gui/core/text/image_layout_rect.py | lionel42/pygame_gui | 27b51f5b811b4569bc463566bc9f2d82ada119f6 | [
"MIT"
] | null | null | null | pygame_gui/core/text/image_layout_rect.py | lionel42/pygame_gui | 27b51f5b811b4569bc463566bc9f2d82ada119f6 | [
"MIT"
] | null | null | null | pygame_gui/core/text/image_layout_rect.py | lionel42/pygame_gui | 27b51f5b811b4569bc463566bc9f2d82ada119f6 | [
"MIT"
] | null | null | null | from typing import Optional
from pygame.surface import Surface
from pygame.rect import Rect
from pygame.image import load
from pygame_gui.core.text.text_layout_rect import TextLayoutRect, Padding
class ImageLayoutRect(TextLayoutRect):
"""
Represents an image that sits in the text.
"""
def __init__(s... | 38.472222 | 94 | 0.644765 |
bfe81991faae2379f1745003a5b1f01b282a6d88 | 2,268 | py | Python | cuml_bench/linear.py | owerbat/scikit-learn_bench | 972efac3779578865424515db2897c4b8c71307a | [
"Apache-2.0"
] | null | null | null | cuml_bench/linear.py | owerbat/scikit-learn_bench | 972efac3779578865424515db2897c4b8c71307a | [
"Apache-2.0"
] | null | null | null | cuml_bench/linear.py | owerbat/scikit-learn_bench | 972efac3779578865424515db2897c4b8c71307a | [
"Apache-2.0"
] | null | null | null | # ===============================================================================
# Copyright 2020-2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.ap... | 40.5 | 84 | 0.636684 |
0742b8fcce563d1d23503cbfd5f49a3476d56a23 | 5,647 | py | Python | aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/ModifySecurityGroupRuleRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/ModifySecurityGroupRuleRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/ModifySecurityGroupRuleRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.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... | 40.625899 | 82 | 0.765362 |
cfe6fbcd360bcc3e35f11bacedeff71eddaaedc5 | 10,161 | py | Python | tests/BlazingSQLTest/EndToEndTests/useLimitTest.py | shaunstoltz/blazingsql | e6459dfd9dff3a2e32ca1fbcd414b9cd193e8730 | [
"Apache-2.0"
] | null | null | null | tests/BlazingSQLTest/EndToEndTests/useLimitTest.py | shaunstoltz/blazingsql | e6459dfd9dff3a2e32ca1fbcd414b9cd193e8730 | [
"Apache-2.0"
] | 1 | 2022-01-21T23:47:01.000Z | 2022-01-21T23:47:01.000Z | tests/BlazingSQLTest/EndToEndTests/useLimitTest.py | shaunstoltz/blazingsql | e6459dfd9dff3a2e32ca1fbcd414b9cd193e8730 | [
"Apache-2.0"
] | 1 | 2020-11-01T12:28:58.000Z | 2020-11-01T12:28:58.000Z | from blazingsql import DataType
from Configuration import ExecutionMode
from Configuration import Settings as Settings
from DataBase import createSchema as cs
from pynvml import nvmlInit
from Runner import runTest
from Utils import Execution, gpuMemory, init_context, skip_test
queryType = "Limit"
def main(dask_clie... | 32.99026 | 80 | 0.456156 |
c71d2b9e872be82c2091906daa5c3ff66e6bf163 | 998 | py | Python | duplyaml/tests/test_serialize.py | peterkmurphy/duplyaml | 7ce59cacb4ea04c6b12c6abb27a3e1eec2cca0cf | [
"MIT"
] | null | null | null | duplyaml/tests/test_serialize.py | peterkmurphy/duplyaml | 7ce59cacb4ea04c6b12c6abb27a3e1eec2cca0cf | [
"MIT"
] | null | null | null | duplyaml/tests/test_serialize.py | peterkmurphy/duplyaml | 7ce59cacb4ea04c6b12c6abb27a3e1eec2cca0cf | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from unittest import TestCase
from duplyaml import *
sn0 = YAMLScalarNode("null", "!!null")
sn1 = YAMLScalarNode("null", "!!null")
sn2 = YAMLScalarNode("", "!!str")
sn3 = YAMLScalarNode("Test", "!!str")
sn4 = YAMLScalarNode("test", "!!str")
sncol = [sn0, sn1, sn2, sn3, ... | 25.589744 | 77 | 0.711423 |
221531c4557306b4959c19f9600dd613750ce1e0 | 632 | py | Python | sdk/python/pulumi_aws/redshift/__init__.py | Otanikotani/pulumi-aws | 00e2b352da42c5b1b0ec7b4760eec5ad2b23ff21 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/redshift/__init__.py | Otanikotani/pulumi-aws | 00e2b352da42c5b1b0ec7b4760eec5ad2b23ff21 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/redshift/__init__.py | Otanikotani/pulumi-aws | 00e2b352da42c5b1b0ec7b4760eec5ad2b23ff21 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
# Export this package's modules as members:
from .cluster import *
from .event_subscription import *
from .get_cluster import *
from .g... | 33.263158 | 87 | 0.77057 |
513a5e49dcc68da44c90ee8bfe47ffe36f64903e | 2,079 | py | Python | setup.py | IceyMint/dumserver | c2f10eb602c9890080d72672872a9255aa508c8f | [
"MIT"
] | 66 | 2018-12-06T05:57:34.000Z | 2022-03-02T15:45:22.000Z | setup.py | IceyMint/dumserver | c2f10eb602c9890080d72672872a9255aa508c8f | [
"MIT"
] | 41 | 2018-12-11T14:50:33.000Z | 2021-11-26T11:18:36.000Z | setup.py | IceyMint/dumserver | c2f10eb602c9890080d72672872a9255aa508c8f | [
"MIT"
] | 16 | 2019-02-08T02:09:27.000Z | 2021-01-26T19:10:21.000Z | __filename__ = "setup.py"
__author__ = "Bartek Radwanski"
__credits__ = "Bartek Radwanski"
__license__ = "MIT"
__version__ = "0.7.1"
__maintainer__ = "Bartek Radwanski"
__email__ = "bartek.radwanski@gmail.com"
__status__ = "Stable"
import os
from requests import get
def yes_or_no(question):
reply = " "
while ... | 34.65 | 196 | 0.669072 |
6051bc13dbdea8431d5d835e2394680c5cadebdb | 683 | py | Python | app/core/migrations/0002_tag.py | largodeivis/recipe-app-api | 95c59cf707099cd82350bfac168a491ac14ecd15 | [
"MIT"
] | null | null | null | app/core/migrations/0002_tag.py | largodeivis/recipe-app-api | 95c59cf707099cd82350bfac168a491ac14ecd15 | [
"MIT"
] | null | null | null | app/core/migrations/0002_tag.py | largodeivis/recipe-app-api | 95c59cf707099cd82350bfac168a491ac14ecd15 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2021-09-25 01:27
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | 28.458333 | 118 | 0.616398 |
c1aa0630a488e9a59fe3c1c27f444dce8e47282c | 3,312 | py | Python | aliyun-python-sdk-iotcc/aliyunsdkiotcc/request/v20210513/ListServiceEntriesRequest.py | leafcoder/aliyun-openapi-python-sdk | 26b441ab37a5cda804de475fd5284bab699443f1 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-iotcc/aliyunsdkiotcc/request/v20210513/ListServiceEntriesRequest.py | leafcoder/aliyun-openapi-python-sdk | 26b441ab37a5cda804de475fd5284bab699443f1 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-iotcc/aliyunsdkiotcc/request/v20210513/ListServiceEntriesRequest.py | leafcoder/aliyun-openapi-python-sdk | 26b441ab37a5cda804de475fd5284bab699443f1 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.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... | 36.8 | 96 | 0.754831 |
3c04b4331ccf489aa4c96d75ed8a6536a18e4bbb | 418 | py | Python | exercise/migrations/0005_auto_20180523_1338.py | jkimbo/phishtray | 089c778f38f96b611d69b7679cb7d4a8f6effb0c | [
"MIT"
] | null | null | null | exercise/migrations/0005_auto_20180523_1338.py | jkimbo/phishtray | 089c778f38f96b611d69b7679cb7d4a8f6effb0c | [
"MIT"
] | null | null | null | exercise/migrations/0005_auto_20180523_1338.py | jkimbo/phishtray | 089c778f38f96b611d69b7679cb7d4a8f6effb0c | [
"MIT"
] | null | null | null | # Generated by Django 2.0.5 on 2018-05-23 13:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('exercise', '0004_exercisekey_exercise'),
]
operations = [
migrations.AlterField(
model_name='exercisekey',
name='typ... | 22 | 76 | 0.590909 |
cd106033c9f593e3b3e6606bdac9795dfb4d7587 | 1,272 | py | Python | blog/migrations/0001_initial.py | hbvj99/blog | e718818b03de5372eebfeb9bff887e3c59e822d7 | [
"Unlicense"
] | null | null | null | blog/migrations/0001_initial.py | hbvj99/blog | e718818b03de5372eebfeb9bff887e3c59e822d7 | [
"Unlicense"
] | 4 | 2021-03-30T14:01:02.000Z | 2022-03-12T00:42:06.000Z | blog/migrations/0001_initial.py | hbvj99/blog | e718818b03de5372eebfeb9bff887e3c59e822d7 | [
"Unlicense"
] | null | null | null | # Generated by Django 3.0.8 on 2020-07-24 15:20
import ckeditor.fields
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER... | 36.342857 | 118 | 0.610849 |
1ad9439a9167ab87c1ed950309e0c760d6025538 | 459 | py | Python | python/sourcing/rss_util.py | supratikchatterjee16/nasty | 3d47b073c80b752d78556968096069d379319f84 | [
"Apache-2.0"
] | 1 | 2019-04-12T04:05:53.000Z | 2019-04-12T04:05:53.000Z | python/sourcing/rss_util.py | supratikchatterjee16/nasty | 3d47b073c80b752d78556968096069d379319f84 | [
"Apache-2.0"
] | null | null | null | python/sourcing/rss_util.py | supratikchatterjee16/nasty | 3d47b073c80b752d78556968096069d379319f84 | [
"Apache-2.0"
] | 1 | 2019-05-06T07:27:53.000Z | 2019-05-06T07:27:53.000Z | import requests
import feedparser
import re
class RSS():
def __init__(self, url):
try:
page = requests.get(url)
content = page.content
rss = feedparser.parse(content)
self.url = url
self.feed = rss["feed"]
self.items = rss["entries"]
self.valid = False
if len(rss["items"]) != 0:
self.val... | 21.857143 | 56 | 0.657952 |
1f805fe41d04c00b283b653907460a9da458b7a5 | 1,372 | py | Python | django_server/olmap/models/base.py | ForumViriumHelsinki/OLMap | f700a8c84b87714af68840a37cfd8667dde6758c | [
"MIT"
] | null | null | null | django_server/olmap/models/base.py | ForumViriumHelsinki/OLMap | f700a8c84b87714af68840a37cfd8667dde6758c | [
"MIT"
] | 39 | 2020-12-30T11:03:49.000Z | 2021-11-10T12:16:29.000Z | django_server/olmap/models/base.py | ForumViriumHelsinki/OLMap | f700a8c84b87714af68840a37cfd8667dde6758c | [
"MIT"
] | 1 | 2020-12-08T13:19:33.000Z | 2020-12-08T13:19:33.000Z | import re
import geocoder
from django.db import models
from django.utils.translation import gettext_lazy as _
class Model(models.Model):
class Meta:
abstract = True
def __str__(self):
return (self.id and f'{self.__class__.__name__}({self.id})') or f'New {self.__class__.__name__}'
class Tim... | 31.906977 | 122 | 0.690962 |
832ebd30fca2fdf58bef4c96dd839e671beab46c | 3,187 | py | Python | bucky/npi.py | marounbs/pa-ocha-bucky | b76bc221bff0cc982bcd23ad6f89789c3204b890 | [
"MIT"
] | 19 | 2020-10-28T14:35:01.000Z | 2022-02-22T14:38:52.000Z | bucky/npi.py | marounbs/pa-ocha-bucky | b76bc221bff0cc982bcd23ad6f89789c3204b890 | [
"MIT"
] | null | null | null | bucky/npi.py | marounbs/pa-ocha-bucky | b76bc221bff0cc982bcd23ad6f89789c3204b890 | [
"MIT"
] | 8 | 2020-10-20T12:34:01.000Z | 2021-05-05T10:54:36.000Z | """Module to parse npi csv files"""
import datetime
import logging
import numpy as np
import pandas as pd
from .util import remove_chars
def read_npi_file(fname, start_date, end_t, adm2_map, disable_npi=False):
"""TODO Description.
Parameters
----------
fname : string
Filename of NPI file
... | 36.215909 | 99 | 0.6492 |
98a6c8ebfdbedc1c3d8138e4b7967634655f19ff | 445 | py | Python | apps/alert/migrations/0002_ding_alias.py | Balro/lark | 35581c766dfa2c959c020bcc9a3d5df9a8d8d58d | [
"Apache-2.0"
] | 1 | 2020-06-18T10:13:29.000Z | 2020-06-18T10:13:29.000Z | apps/alert/migrations/0002_ding_alias.py | Balro/lark | 35581c766dfa2c959c020bcc9a3d5df9a8d8d58d | [
"Apache-2.0"
] | 2 | 2020-06-05T22:08:25.000Z | 2021-06-10T21:43:31.000Z | apps/alert/migrations/0002_ding_alias.py | Balro/lark | 35581c766dfa2c959c020bcc9a3d5df9a8d8d58d | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.1.8 on 2019-07-15 12:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('alert', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='ding',
name='alias',
field=mo... | 22.25 | 91 | 0.593258 |
fefe82951548b4f085a3e7ac500030865638673b | 10,020 | py | Python | apps/markets3/models.py | uktrade/enav-alpha | 8d38f05763367ca6b6747203241f267612fd6e44 | [
"MIT"
] | null | null | null | apps/markets3/models.py | uktrade/enav-alpha | 8d38f05763367ca6b6747203241f267612fd6e44 | [
"MIT"
] | 67 | 2016-07-11T12:57:58.000Z | 2016-08-08T12:59:19.000Z | apps/markets3/models.py | UKTradeInvestment/enav-alpha | 8d38f05763367ca6b6747203241f267612fd6e44 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import base64
import datetime
from django.db import models
from django.utils import timezone
from ckeditor.fields import RichTextField
# SAMPLE DATA
PLATFORM_BRAND_POSITION = (
('0', 'Luxury'),
('1', 'Mid rage'),
('2', 'Discount')
)
LOGISTICS_MODELS = (
('0', ... | 44.140969 | 112 | 0.725749 |
24fa6daee42e83a11bfb3a089f57778b3b32c239 | 815 | py | Python | expression_data/data/__init__.py | davebridges/expression-data-server | 7f70fd5d5a9569a315716c389f828b17a487fdbc | [
"BSD-2-Clause"
] | 1 | 2015-08-25T10:16:31.000Z | 2015-08-25T10:16:31.000Z | expression_data/data/__init__.py | davebridges/expression-data-server | 7f70fd5d5a9569a315716c389f828b17a487fdbc | [
"BSD-2-Clause"
] | null | null | null | expression_data/data/__init__.py | davebridges/expression-data-server | 7f70fd5d5a9569a315716c389f828b17a487fdbc | [
"BSD-2-Clause"
] | null | null | null | """This app contains the views and models for expression data
Expression Objects
------------------
For microarray results (metadata in :class:`~experiments.models.MicroArrayExperiment`) there is only *gene* level data, as specified by the specific probe used.
For RNAseq results (metadata in :class:`~experiments.mode... | 47.941176 | 185 | 0.752147 |
67bf19b76f0ef0fd295ec0734118edb7b1cea705 | 20,188 | py | Python | moldyn/ui/qt/create_model.py | open-molecular-dynamics/moldyn | 95a8be53981a2159a75e82c7321136bebc674bc8 | [
"MIT"
] | 2 | 2019-07-15T08:36:50.000Z | 2019-08-11T11:47:30.000Z | moldyn/ui/qt/create_model.py | open-molecular-dynamics/moldyn | 95a8be53981a2159a75e82c7321136bebc674bc8 | [
"MIT"
] | 1 | 2020-01-13T15:35:35.000Z | 2020-01-13T15:35:35.000Z | moldyn/ui/qt/create_model.py | open-molecular-dynamics/moldyn | 95a8be53981a2159a75e82c7321136bebc674bc8 | [
"MIT"
] | 1 | 2019-07-15T08:34:29.000Z | 2019-07-15T08:34:29.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'create_model.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_CreateModel(object):
def setupUi(self, CreateModel):
C... | 66.847682 | 109 | 0.756885 |
f09277d8ddb4a69d39f65443a78a5a183f45bb07 | 89 | py | Python | pytest_trio/_version.py | Suenweek/pytest-trio | bbae5adfadff16754397bb9d4648fd9f3c8a0ebe | [
"Apache-2.0",
"MIT"
] | null | null | null | pytest_trio/_version.py | Suenweek/pytest-trio | bbae5adfadff16754397bb9d4648fd9f3c8a0ebe | [
"Apache-2.0",
"MIT"
] | null | null | null | pytest_trio/_version.py | Suenweek/pytest-trio | bbae5adfadff16754397bb9d4648fd9f3c8a0ebe | [
"Apache-2.0",
"MIT"
] | null | null | null | # This file is imported from __init__.py and exec'd from setup.py
__version__ = "0.5.1"
| 22.25 | 65 | 0.730337 |
1ef8f3125ab60319d8d191a58d8cce721097f71f | 2,169 | py | Python | hendrics/rebin.py | StingraySoftware/HENDRICS | 551a77fc42b16055da5bfd37701521655394b80b | [
"BSD-3-Clause"
] | 18 | 2017-08-15T17:20:31.000Z | 2021-12-24T13:33:10.000Z | hendrics/rebin.py | StingraySoftware/HENDRICS | 551a77fc42b16055da5bfd37701521655394b80b | [
"BSD-3-Clause"
] | 118 | 2017-08-11T13:48:32.000Z | 2022-03-31T12:30:03.000Z | hendrics/rebin.py | StingraySoftware/HENDRICS | 551a77fc42b16055da5bfd37701521655394b80b | [
"BSD-3-Clause"
] | 11 | 2017-08-11T13:43:12.000Z | 2021-09-18T07:34:10.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Functions to rebin light curves and frequency spectra."""
import numpy as np
from astropy import log
from .io import get_file_type
from .io import save_lcurve, save_pds
from .io import HEN_FILE_EXTENSION, get_file_extension
def rebin_file(filename, r... | 30.549296 | 77 | 0.651913 |
a840f2f4ae5f634c4c8a71fe8fefb9f1d8bf9984 | 1,536 | py | Python | csvkit/utilities/csvpy.py | SpazioDati/csvkit | 96c2ab1fb6fc22eb34a6d8457e3101e9702a5498 | [
"MIT"
] | 3 | 2016-05-16T13:35:03.000Z | 2020-02-13T04:19:14.000Z | csvkit/utilities/csvpy.py | SpazioDati/csvkit | 96c2ab1fb6fc22eb34a6d8457e3101e9702a5498 | [
"MIT"
] | null | null | null | csvkit/utilities/csvpy.py | SpazioDati/csvkit | 96c2ab1fb6fc22eb34a6d8457e3101e9702a5498 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from csvkit import CSVKitReader, CSVKitDictReader
from csvkit.cli import CSVFileType, CSVKitUtility
class CSVPy(CSVKitUtility):
description = 'Load a CSV file into a CSVKitReader object and then drops into a Python shell.'
override_flags = ['l', 'f', 'zero']
def add_arguments(self)... | 34.909091 | 124 | 0.654297 |
c6c9c870398b29ee5bfdd63577a2203537b7f14c | 901 | py | Python | LeetcodeAlgorithms/581. Shortest Unsorted Continuous Subarray/shortest-unsorted-continuous-subarray.py | Fenghuapiao/PyLeetcode | d804a62643fe935eb61808196a2c093ea9583654 | [
"MIT"
] | 3 | 2019-08-20T06:54:38.000Z | 2022-01-07T12:56:46.000Z | LeetcodeAlgorithms/581. Shortest Unsorted Continuous Subarray/shortest-unsorted-continuous-subarray.py | yhangf/PyLeetcode | d804a62643fe935eb61808196a2c093ea9583654 | [
"MIT"
] | null | null | null | LeetcodeAlgorithms/581. Shortest Unsorted Continuous Subarray/shortest-unsorted-continuous-subarray.py | yhangf/PyLeetcode | d804a62643fe935eb61808196a2c093ea9583654 | [
"MIT"
] | 2 | 2018-11-01T16:10:34.000Z | 2020-06-02T03:24:43.000Z | class Solution(object):
def findUnsortedSubarray(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
if len(nums) < 2:
return 0
maxs = [float("inf")] * len(nums)
mins = [float("inf")] * len(nums)
mins[-1] = nums[-1]
ma... | 31.068966 | 49 | 0.406215 |
db20531e827801a95fb57ba05d668b4893400c54 | 272 | py | Python | skp_edu_docker/code/cluster/dataconfig/dataconf_node_text.py | TensorMSA/hoyai_docker | 12f0041e6306d8a6421585a4b51666bad30be442 | [
"MIT"
] | 8 | 2017-06-16T00:19:12.000Z | 2020-08-13T03:15:57.000Z | skp_edu_docker/code/cluster/dataconfig/dataconf_node_text.py | TensorMSA/tensormsa_docker | 12f0041e6306d8a6421585a4b51666bad30be442 | [
"MIT"
] | 21 | 2017-06-09T10:15:14.000Z | 2018-03-29T07:51:02.000Z | skp_edu_docker/code/cluster/dataconfig/dataconf_node_text.py | TensorMSA/hoyai_docker | 12f0041e6306d8a6421585a4b51666bad30be442 | [
"MIT"
] | 4 | 2017-10-25T09:59:53.000Z | 2020-05-07T09:51:11.000Z | from cluster.dataconfig.dataconf_node import DataConfNode
class DataConfNodeText(DataConfNode):
"""
"""
def run(self, conf_data):
return None
def _init_node_parm(self):
return None
def _set_progress_state(self):
return None | 18.133333 | 57 | 0.669118 |
1d25d1ae7cc4cf0e2f5635b97581e55085a8be53 | 10,776 | py | Python | src/python_delta_crdt/base.py | rtibbles/python-delta-crdts | 6a0bce501e387567384c8a0495f3bbca4e605102 | [
"MIT"
] | 2 | 2020-05-13T20:08:41.000Z | 2020-05-14T01:18:40.000Z | src/python_delta_crdt/base.py | rtibbles/python-delta-crdts | 6a0bce501e387567384c8a0495f3bbca4e605102 | [
"MIT"
] | null | null | null | src/python_delta_crdt/base.py | rtibbles/python-delta-crdts | 6a0bce501e387567384c8a0495f3bbca4e605102 | [
"MIT"
] | null | null | null | from abc import ABCMeta
from abc import abstractmethod
import operator
try:
from collections.abc import Iterable
from collections.abc import Mapping
from collections.abc import MutableMapping
from collections.abc import MutableSet
except ImportError:
from collections import Iterable
from colle... | 25.779904 | 98 | 0.630568 |
a9c9722c9d2ddd7dd09cfe10d86cf6c10d186e43 | 67,497 | py | Python | test/dialect/postgresql/test_compiler.py | lelit/sqlalchemy | 55f930ef3d4e60bed02a2dad16e331fe42cfd12b | [
"MIT"
] | null | null | null | test/dialect/postgresql/test_compiler.py | lelit/sqlalchemy | 55f930ef3d4e60bed02a2dad16e331fe42cfd12b | [
"MIT"
] | null | null | null | test/dialect/postgresql/test_compiler.py | lelit/sqlalchemy | 55f930ef3d4e60bed02a2dad16e331fe42cfd12b | [
"MIT"
] | null | null | null | # coding: utf-8
from sqlalchemy import and_
from sqlalchemy import cast
from sqlalchemy import Column
from sqlalchemy import delete
from sqlalchemy import Enum
from sqlalchemy import exc
from sqlalchemy import func
from sqlalchemy import Index
from sqlalchemy import Integer
from sqlalchemy import MetaData
from sqlalch... | 33.765383 | 79 | 0.541802 |
6b9652bbd9321cead43f0cbe1865831192766535 | 843 | py | Python | scripts/data_migration.py | wlhong-allo/whitelistPy | b5add2e8b22b08cdd36a1a3c646afad35ced1c91 | [
"MIT"
] | 1 | 2022-03-15T06:14:42.000Z | 2022-03-15T06:14:42.000Z | scripts/data_migration.py | wlhong-allo/whitelistPy | b5add2e8b22b08cdd36a1a3c646afad35ced1c91 | [
"MIT"
] | null | null | null | scripts/data_migration.py | wlhong-allo/whitelistPy | b5add2e8b22b08cdd36a1a3c646afad35ced1c91 | [
"MIT"
] | 1 | 2022-02-27T03:12:14.000Z | 2022-02-27T03:12:14.000Z | """
This file migrates the old json-format of backend data to the new sqlite format.
This is to not lose old data and maintain consistency in the DB
"""
from ..db import DB
import json
NEW_DB_NAME = "new_data.db"
OLD_JSON_FILE = "data.json"
db = DB(NEW_DB_NAME)
with open(OLD_JSON_FILE, 'r') as in_file:
old_data... | 35.125 | 135 | 0.689205 |
ea33e38be2a0295645abf5636074749b52c902f8 | 824 | py | Python | neutron_dynamic_routing/extensions/bgp_4byte_asn.py | openstack/neutron-dynamic-routing | 8a0ddf6051c81b982187bb062b194284398f5703 | [
"Apache-2.0"
] | 26 | 2016-04-22T10:03:14.000Z | 2021-04-20T12:23:06.000Z | neutron_dynamic_routing/extensions/bgp_4byte_asn.py | openstack/neutron-dynamic-routing | 8a0ddf6051c81b982187bb062b194284398f5703 | [
"Apache-2.0"
] | 1 | 2021-05-09T06:13:46.000Z | 2021-05-09T06:13:47.000Z | neutron_dynamic_routing/extensions/bgp_4byte_asn.py | openstack/neutron-dynamic-routing | 8a0ddf6051c81b982187bb062b194284398f5703 | [
"Apache-2.0"
] | 9 | 2016-05-29T16:50:38.000Z | 2021-09-15T14:19:12.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 th... | 37.454545 | 75 | 0.775485 |
b39b1e05fb24ebeff3823a7f82672413663ed841 | 5,854 | py | Python | chapter_3/chapter3_equations.py | p-giakoumoglou/numerical_analysis | 1f2e23530972baae00e793b30bb66a5aa75df02b | [
"MIT"
] | null | null | null | chapter_3/chapter3_equations.py | p-giakoumoglou/numerical_analysis | 1f2e23530972baae00e793b30bb66a5aa75df02b | [
"MIT"
] | null | null | null | chapter_3/chapter3_equations.py | p-giakoumoglou/numerical_analysis | 1f2e23530972baae00e793b30bb66a5aa75df02b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Author: Paschalis Giakoumoglou
Date: Thu Jun 17 17:25:00 2021
"""
import matplotlib.pyplot as plt
import numpy as np
import math
#add f(a)*f(b) < 0 as a condition
def partition(f, a, b, error):
""" 3.2 Partition (p. 32) """
if f(a)*f(b) < 0:
print(f"f({a}) = {... | 30.489583 | 100 | 0.340109 |
0a2cd3ecf6d88a3869eb79d27c73d74903c84c97 | 70 | py | Python | trimet_freq_vs_ridership/etl.py | hackoregon/transportation-systems-data-science | 758b80eb5e15c7b864409bd0d970360379f42459 | [
"MIT"
] | 4 | 2018-01-24T04:33:31.000Z | 2019-10-31T06:33:11.000Z | trimet_freq_vs_ridership/etl.py | hackoregon/transportation-systems-data-science | 758b80eb5e15c7b864409bd0d970360379f42459 | [
"MIT"
] | 1 | 2018-02-07T04:00:12.000Z | 2018-03-11T06:17:24.000Z | trimet_freq_vs_ridership/etl.py | hackoregon/transportation-systems-data-science | 758b80eb5e15c7b864409bd0d970360379f42459 | [
"MIT"
] | 1 | 2018-03-21T09:22:19.000Z | 2018-03-21T09:22:19.000Z | def trimet():
return ('Trimet Ridership vs. Frequency Analysis.')
| 23.333333 | 55 | 0.7 |
1196ea8042e183eb33f6169da2593b752ac26c66 | 3,459 | py | Python | tools/populate_dotenv.py | open-edge-insights/eii-azure-bridge | 346da9d56be78c6e06a470dfbaf808d568427679 | [
"MIT"
] | null | null | null | tools/populate_dotenv.py | open-edge-insights/eii-azure-bridge | 346da9d56be78c6e06a470dfbaf808d568427679 | [
"MIT"
] | null | null | null | tools/populate_dotenv.py | open-edge-insights/eii-azure-bridge | 346da9d56be78c6e06a470dfbaf808d568427679 | [
"MIT"
] | 2 | 2022-02-07T09:05:54.000Z | 2022-03-17T04:32:50.000Z | # Copyright (c) 2020 Intel Corporation.
#
# 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, merge, publish, ... | 35.295918 | 79 | 0.648453 |
0b0ed46665a1d611ccb387df3307a6fb97296bd9 | 192 | py | Python | Python-Hackerrank/Set .discard(), .remove() & .pop().py | nihalkhan2810/Data-Structures-Algorithms | 3224fba18dcdbb1c6cc3d7f7a16df4ed0e0a321d | [
"MIT"
] | 10 | 2020-05-02T14:42:15.000Z | 2021-01-26T16:51:47.000Z | Python-Hackerrank/Set .discard(), .remove() & .pop().py | nihalkhan2810/Data-Structures-Algorithms | 3224fba18dcdbb1c6cc3d7f7a16df4ed0e0a321d | [
"MIT"
] | null | null | null | Python-Hackerrank/Set .discard(), .remove() & .pop().py | nihalkhan2810/Data-Structures-Algorithms | 3224fba18dcdbb1c6cc3d7f7a16df4ed0e0a321d | [
"MIT"
] | 13 | 2020-03-05T13:31:11.000Z | 2021-01-29T08:14:26.000Z | n = int(input())
s = set(map(int, input().split()))
t = int(input())
for i in range(t):
c, *args = map(str,input().split())
getattr(s,c) (*(int(x) for x in args))
print (sum(s))
| 14.769231 | 42 | 0.536458 |
8e2e1cf6d8ca98a62f778e0f37263e4179368a90 | 4,842 | py | Python | nabs/utils.py | tangkong/nabs | 06d21428cddaa3f2ec6a31150f9d4758f5a7c2c5 | [
"BSD-3-Clause-LBNL"
] | null | null | null | nabs/utils.py | tangkong/nabs | 06d21428cddaa3f2ec6a31150f9d4758f5a7c2c5 | [
"BSD-3-Clause-LBNL"
] | null | null | null | nabs/utils.py | tangkong/nabs | 06d21428cddaa3f2ec6a31150f9d4758f5a7c2c5 | [
"BSD-3-Clause-LBNL"
] | null | null | null | import inspect
import multiprocessing as mp
import numbers
import traceback
from typing import Any, Callable, Dict, Union
import numpy as np
from ophyd.signal import DerivedSignal, SignalRO
class InvertedSignal(DerivedSignal):
"""
Invert another `ophyd` Signal
Parameters
----------
derived_from:... | 26.459016 | 77 | 0.620818 |
e072e9d44ada055d1f7443e09d4c9535b9900b3b | 20,476 | py | Python | test/codes_tests/test_fortran_sockets_implementation.py | egpbos/amuse | 64b3bc5b7fef9496012b023578c4d71cecef92b7 | [
"Apache-2.0"
] | null | null | null | test/codes_tests/test_fortran_sockets_implementation.py | egpbos/amuse | 64b3bc5b7fef9496012b023578c4d71cecef92b7 | [
"Apache-2.0"
] | null | null | null | test/codes_tests/test_fortran_sockets_implementation.py | egpbos/amuse | 64b3bc5b7fef9496012b023578c4d71cecef92b7 | [
"Apache-2.0"
] | null | null | null | from amuse.test.amusetest import TestWithMPI
import subprocess
import os
import time
import shlex
from amuse.units import nbody_system
from amuse.units import units
from amuse import datamodel
from amuse.rfi.tools import create_fortran
from amuse.rfi import channel
from amuse.rfi.core import *
codestring = """
functi... | 32.144427 | 151 | 0.613694 |
f594af1b5c0755ca007d63d71c2307018c4e3b24 | 38,407 | py | Python | Archive/Other tests/Yale pulse frequency analysis.py | JohanWinther/cat-state-encoding | 3fa95c5c9d9d223e4b9fbc38fe5e27a46d0d12ef | [
"MIT"
] | 3 | 2020-02-10T01:53:29.000Z | 2022-01-13T09:23:40.000Z | Archive/Other tests/Yale pulse frequency analysis.py | JohanWinther/cat-state-encoding | 3fa95c5c9d9d223e4b9fbc38fe5e27a46d0d12ef | [
"MIT"
] | null | null | null | Archive/Other tests/Yale pulse frequency analysis.py | JohanWinther/cat-state-encoding | 3fa95c5c9d9d223e4b9fbc38fe5e27a46d0d12ef | [
"MIT"
] | 1 | 2021-07-31T08:55:43.000Z | 2021-07-31T08:55:43.000Z |
# coding: utf-8
# # Fourier analysis of the endocing pulses produced by the [Yale group](https://www.nature.com/articles/nature18949)
# In[1]:
import matplotlib.pyplot as plt
import numpy as np
def normalisePoints(x,y,x_max):
x = x - x[9]
x = x * (x_max/x[-1])
y = y - y[0]
y = y/np.max(y)
ret... | 387.949495 | 4,635 | 0.768089 |
1350d5e999ba62082386ca30a0941213478229cf | 479 | py | Python | validate.py | fgeek/pyfibot | c541cdd18960182b252eeeb184c08e339e8b3e57 | [
"BSD-3-Clause"
] | 28 | 2015-01-15T21:14:41.000Z | 2020-05-19T06:16:44.000Z | validate.py | fgeek/pyfibot | c541cdd18960182b252eeeb184c08e339e8b3e57 | [
"BSD-3-Clause"
] | 214 | 2015-01-17T02:54:37.000Z | 2021-07-25T02:09:30.000Z | validate.py | fgeek/pyfibot | c541cdd18960182b252eeeb184c08e339e8b3e57 | [
"BSD-3-Clause"
] | 20 | 2015-01-16T20:41:59.000Z | 2021-06-04T18:35:33.000Z | #!bin/python
import yaml
import json
import jsonschema
print("Loading config..")
config = yaml.load(file("config.yml"), Loader=yaml.FullLoader)
print("Loading json schema..")
schema = json.load(file("pyfibot/config_schema.json"))
print("Validating configuration")
v = jsonschema.Draft3Validator(schema)
if not v.is_val... | 25.210526 | 62 | 0.724426 |
752f14e8205768382a34cee126b0389200e9ecbf | 455 | py | Python | examples/head_touch.py | MPI-IS/reactive_pepper | 079f9b0627bfd6c9e3f2a4466c95ad662002a600 | [
"BSD-3-Clause"
] | null | null | null | examples/head_touch.py | MPI-IS/reactive_pepper | 079f9b0627bfd6c9e3f2a4466c95ad662002a600 | [
"BSD-3-Clause"
] | null | null | null | examples/head_touch.py | MPI-IS/reactive_pepper | 079f9b0627bfd6c9e3f2a4466c95ad662002a600 | [
"BSD-3-Clause"
] | null | null | null | import math,time,random
import pepper_interface
IP = "192.168.0.147"
PORT = 9559
simulation = False
with pepper_interface.get(IP,PORT,simulation) as pepper:
time_start = time.time()
while time.time()-time_start < 10:
data = pepper.head_touch.get()
if data is not None:
da... | 16.851852 | 69 | 0.589011 |
89c90db5b7d7c130172cc9d12fac59a9e90d2fc9 | 610 | py | Python | aiokraken/tests/test_config.py | asmodehn/aiokraken | b260bd41d5aa091e6a4f1818328426fbe6f625c0 | [
"MIT"
] | null | null | null | aiokraken/tests/test_config.py | asmodehn/aiokraken | b260bd41d5aa091e6a4f1818328426fbe6f625c0 | [
"MIT"
] | 82 | 2019-08-30T09:37:49.000Z | 2022-03-29T14:53:22.000Z | aiokraken/tests/test_config.py | asmodehn/aiokraken | b260bd41d5aa091e6a4f1818328426fbe6f625c0 | [
"MIT"
] | null | null | null | import unittest
import parameterized
if not __package__:
from aiokraken.config import load_api_keyfile
else:
from..config import load_api_keyfile
# This is a kind of integration test for the user environment...
# Need to test user environment (and not CI)
class TestLoadKeyFile(unittest.TestCase):
@unitt... | 25.416667 | 64 | 0.670492 |
d88a9d99ebef6f134db6e0e3a62a0169b8208174 | 287 | py | Python | app/users/urls.py | alirezashahali/recipe-api | 745cb3dd5d2371571a62ce1624bd53828ff4e262 | [
"MIT"
] | null | null | null | app/users/urls.py | alirezashahali/recipe-api | 745cb3dd5d2371571a62ce1624bd53828ff4e262 | [
"MIT"
] | null | null | null | app/users/urls.py | alirezashahali/recipe-api | 745cb3dd5d2371571a62ce1624bd53828ff4e262 | [
"MIT"
] | null | null | null | from django.urls import path
from users import views
app_name = 'users'
urlpatterns= [
path('create/', views.CreateUserView.as_view(), name='create'),
path('token/', views.CreateTokenView.as_view(), name = 'token'),
path('me/', views.ManageUserView.as_view(), name = 'me')
] | 31.888889 | 68 | 0.686411 |
b7adcd82b678603c583f86da175044e4063a0dbb | 1,913 | py | Python | actu psg/cogs/ticket.py | Yuhiro-sama/psg-bot | ba9a63025a3ce1e85bb62625e36c3caaa5c1ef1f | [
"BSD-2-Clause"
] | null | null | null | actu psg/cogs/ticket.py | Yuhiro-sama/psg-bot | ba9a63025a3ce1e85bb62625e36c3caaa5c1ef1f | [
"BSD-2-Clause"
] | null | null | null | actu psg/cogs/ticket.py | Yuhiro-sama/psg-bot | ba9a63025a3ce1e85bb62625e36c3caaa5c1ef1f | [
"BSD-2-Clause"
] | null | null | null | import discord
from discord.ext import commands
from discord.errors import Forbidden
import aiofiles
color = 0xff1100
class Ticket(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.bot.reaction_roles = []
@commands.command()
async def ticket(self, ctx):
... | 36.09434 | 118 | 0.559331 |
e0966602b3012cbcc27a2249c8882c5a3c354898 | 2,462 | py | Python | src/fbsrankings/infrastructure/unit_of_work.py | mikee385/fbsrankings | 2b50e26a302b53c21cd8f5c965943d6fbf0680a1 | [
"MIT"
] | null | null | null | src/fbsrankings/infrastructure/unit_of_work.py | mikee385/fbsrankings | 2b50e26a302b53c21cd8f5c965943d6fbf0680a1 | [
"MIT"
] | null | null | null | src/fbsrankings/infrastructure/unit_of_work.py | mikee385/fbsrankings | 2b50e26a302b53c21cd8f5c965943d6fbf0680a1 | [
"MIT"
] | null | null | null | from types import TracebackType
from typing import ContextManager
from typing import Optional
from typing import Type
from typing_extensions import Literal
from fbsrankings.common import EventBus
from fbsrankings.common import EventRecorder
from fbsrankings.domain import AffiliationRepository
from fbsrankings.domain ... | 29.662651 | 79 | 0.722177 |
4d01712d9a14b136671e84ba240a0baef931ab41 | 858 | py | Python | 20160902_HowManyBananas.py | lemmingapex/TheRiddler | 232d550a1b243970977d785ea7d703daa714435a | [
"MIT"
] | null | null | null | 20160902_HowManyBananas.py | lemmingapex/TheRiddler | 232d550a1b243970977d785ea7d703daa714435a | [
"MIT"
] | null | null | null | 20160902_HowManyBananas.py | lemmingapex/TheRiddler | 232d550a1b243970977d785ea7d703daa714435a | [
"MIT"
] | null | null | null | import math
# inputs
initalNumberOfBananas = 3000
numberOfUnitsToDestination = 1000
cammelCompacity = 1000
bananasPerUnitThatCammelConsumes = 1
distanceToTravel = numberOfUnitsToDestination
numberOfBananasRemainingAtDistanceToTravel = initalNumberOfBananas
while(distanceToTravel > 0):
#print("distanceToTravel", dis... | 40.857143 | 125 | 0.881119 |
b293c4e951eab343a95232f50c197cd3ae253ad6 | 126 | py | Python | database_email_backend/__init__.py | enderlabs/django-database-email-backend | aad6bade66d076b5425f772430adc7e77e60f5ce | [
"MIT"
] | 1 | 2016-01-15T18:54:59.000Z | 2016-01-15T18:54:59.000Z | database_email_backend/__init__.py | enderlabs/django-database-email-backend | aad6bade66d076b5425f772430adc7e77e60f5ce | [
"MIT"
] | 1 | 2015-11-04T22:19:21.000Z | 2015-11-04T22:19:21.000Z | database_email_backend/__init__.py | enderlabs/django-database-email-backend | aad6bade66d076b5425f772430adc7e77e60f5ce | [
"MIT"
] | 4 | 2015-11-04T20:45:16.000Z | 2021-03-03T06:28:20.000Z | # -*- coding: utf-8 -*-
VERSION = (1, 0, 4)
__version__ = "1.0.4"
__authors__ = ["Stefan Foulis <stefan.foulis@gmail.com>", ]
| 25.2 | 59 | 0.611111 |
5d4275bc2f43bd2dd4636b2f8747e163efe084a6 | 8,815 | py | Python | utils/generateCode.py | KingMagic/django-RESTfulAPI | eb7a2234e606bdcc366a642f5731c64313047a0d | [
"MIT"
] | null | null | null | utils/generateCode.py | KingMagic/django-RESTfulAPI | eb7a2234e606bdcc366a642f5731c64313047a0d | [
"MIT"
] | null | null | null | utils/generateCode.py | KingMagic/django-RESTfulAPI | eb7a2234e606bdcc366a642f5731c64313047a0d | [
"MIT"
] | null | null | null | import os
def main(app_list):
try:
for data in app_list:
print('app:',data)
app_name = data.get('name')
models = data.get('models')
print('所有模型:',models)
app_path = os.path.join(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__... | 44.075 | 177 | 0.65207 |
2a5ebe76a1dc7f822819a394ba16103c04d383a3 | 11,942 | py | Python | toolcraft/error/validation.py | SpikingNeurons/_toolcraft_ | 070c79ea9248e4082bd69b5344f7b532e57f7730 | [
"BSD-3-Clause"
] | null | null | null | toolcraft/error/validation.py | SpikingNeurons/_toolcraft_ | 070c79ea9248e4082bd69b5344f7b532e57f7730 | [
"BSD-3-Clause"
] | 1 | 2021-09-20T22:22:05.000Z | 2021-09-20T22:22:05.000Z | toolcraft/error/validation.py | SpikingNeurons/_toolcraft_ | 070c79ea9248e4082bd69b5344f7b532e57f7730 | [
"BSD-3-Clause"
] | null | null | null | """
todo: check validators library
https://validators.readthedocs.io/en/latest/
"""
import typing as t
import inspect
import dataclasses
import numpy as np
from . import CustomException
from ..logger import MESSAGES_TYPE
class ShouldBeOneOf(CustomException):
def __init__(
self, *,
value: t.... | 26.537778 | 79 | 0.448417 |
5880e447bc83bdb6842677fb2975200a030a19da | 2,126 | py | Python | resolwe_bio/tests/processes/test_enrichment.py | HudoGriz/resolwe-bio | 4f7363cfa7d9d5a43f1a70ef36c69be3faed7fea | [
"Apache-2.0"
] | null | null | null | resolwe_bio/tests/processes/test_enrichment.py | HudoGriz/resolwe-bio | 4f7363cfa7d9d5a43f1a70ef36c69be3faed7fea | [
"Apache-2.0"
] | null | null | null | resolwe_bio/tests/processes/test_enrichment.py | HudoGriz/resolwe-bio | 4f7363cfa7d9d5a43f1a70ef36c69be3faed7fea | [
"Apache-2.0"
] | null | null | null | # pylint: disable=missing-docstring
from resolwe.test import tag_process, with_resolwe_host
from resolwe_bio.utils.test import KBBioProcessTestCase
class EnrichmentProcessorTestCase(KBBioProcessTestCase):
@with_resolwe_host
@tag_process('goenrichment')
def test_go_enrichment_dicty(self):
with sel... | 39.37037 | 114 | 0.626529 |
e4b894bf1b40aca3b88e3b9db3fe6390c3009216 | 330 | py | Python | ProjectEuler/problem_5.py | aaditkamat/competitive-programming | d0b8f30d3cb3411d2467b98363c12d75d852e245 | [
"MIT"
] | null | null | null | ProjectEuler/problem_5.py | aaditkamat/competitive-programming | d0b8f30d3cb3411d2467b98363c12d75d852e245 | [
"MIT"
] | 3 | 2019-02-24T11:42:28.000Z | 2019-06-03T14:15:46.000Z | ProjectEuler/problem_5.py | aaditkamat/online-judge-submissions | d0b8f30d3cb3411d2467b98363c12d75d852e245 | [
"MIT"
] | null | null | null | def gcd(x, y):
arr = []
for i in range(1, min(x, y) + 1):
if x % i == 0 and y % i == 0:
arr.append(i)
return arr[-1]
def lcm(x, y):
return (x * y) // gcd(x, y)
def solution(num):
result = 2
for i in range(3, num):
result = lcm(result, i)
return result
print(sol... | 19.411765 | 37 | 0.484848 |
95a613cbb08ffea1b1bf1702b220e4742dfc6195 | 848 | py | Python | test/Keypad.py | tratitude/BridgeMaster | e3916b077d96f3520d0a8ed9bb548d614465aa2e | [
"Apache-2.0"
] | 1 | 2021-01-05T14:40:08.000Z | 2021-01-05T14:40:08.000Z | test/Keypad.py | fdmdkw/BridgeMaster | e3916b077d96f3520d0a8ed9bb548d614465aa2e | [
"Apache-2.0"
] | 1 | 2021-10-19T08:05:06.000Z | 2021-10-19T08:05:06.000Z | test/Keypad.py | fdmdkw/BridgeMaster | e3916b077d96f3520d0a8ed9bb548d614465aa2e | [
"Apache-2.0"
] | 2 | 2019-10-21T15:25:37.000Z | 2021-03-17T06:59:09.000Z | import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
#♣♦♥♠
MATRIX = [
['S','H','D','C'],
['NT', 3, 6, 9],
['X', 2, 5, 8],
[ 0, 1, 4, 7]]
ROW = [ 6, 13, 19, 26]
COL = [12, 16, 20, 21]
for j in range(4):
GPIO.setup(COL[j], GPIO.OUT)
GPIO.output(COL[j], 0)... | 19.272727 | 59 | 0.481132 |
367730f83b8876d266b6f0489a83eaf548c59f28 | 5,826 | py | Python | spintronic/examples/spin_torque/stt_01.py | ddas-04/fantasi | c44dc58d754ecbb12c131f03a4c85d75bb7f6077 | [
"CC0-1.0"
] | null | null | null | spintronic/examples/spin_torque/stt_01.py | ddas-04/fantasi | c44dc58d754ecbb12c131f03a4c85d75bb7f6077 | [
"CC0-1.0"
] | 1 | 2021-12-13T05:06:38.000Z | 2021-12-14T02:17:59.000Z | spintronic/examples/spin_torque/stt_01.py | ddas-04/fantasi | c44dc58d754ecbb12c131f03a4c85d75bb7f6077 | [
"CC0-1.0"
] | 2 | 2021-05-31T03:34:03.000Z | 2021-11-22T06:44:14.000Z | from dolfin import *
from mshr import *
import numpy as np
from matplotlib import cm
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from gryphon import *
from HFields import *
'''
FEniCS controls
'''
parameters["linear_algebra_backend"] = "PETSc"
parameters["mesh_partitioner"] = "ParMETIS"
''... | 31.322581 | 195 | 0.643323 |
0b30c909b4867793d56befbfc478a5cc191be689 | 1,212 | py | Python | src/utils/logger.py | ArielXL/web-scrapping | 5aa24c04ca493ba1aa5b544a585adbedca2afb73 | [
"MIT"
] | null | null | null | src/utils/logger.py | ArielXL/web-scrapping | 5aa24c04ca493ba1aa5b544a585adbedca2afb73 | [
"MIT"
] | null | null | null | src/utils/logger.py | ArielXL/web-scrapping | 5aa24c04ca493ba1aa5b544a585adbedca2afb73 | [
"MIT"
] | null | null | null | import logging
from utils.tools import *
from utils.colors import *
parseLevel = lambda x: getattr(logging, x)
def LoggerFactory(name='root'):
'''
Create a custom logger to use colors in the logs
'''
logging.setLoggerClass(Logger)
logging.basicConfig(format=FORMAT, datefmt=DATE_TIME)
return l... | 31.076923 | 83 | 0.657591 |
c448d8dc1b095968b796b4a330ab1e73141e5550 | 10,192 | py | Python | modules/chanlogs.py | znuxor/casualbotler | faad16a34de8e047f94c4b7e02a4547917990b1a | [
"BSD-3-Clause"
] | 1 | 2019-06-07T16:06:16.000Z | 2019-06-07T16:06:16.000Z | modules/chanlogs.py | znuxor/casualbotler | faad16a34de8e047f94c4b7e02a4547917990b1a | [
"BSD-3-Clause"
] | 18 | 2018-06-08T21:53:10.000Z | 2020-02-24T02:31:38.000Z | modules/chanlogs.py | znuxor/casualbotler | faad16a34de8e047f94c4b7e02a4547917990b1a | [
"BSD-3-Clause"
] | 1 | 2019-05-26T00:19:49.000Z | 2019-05-26T00:19:49.000Z | # coding=utf8
"""
Adapted by Znuxor
Based off:
chanlogs.py - Sopel Channel Logger module
Copyright 2014, David Baumgold <david@davidbaumgold.com>
Licensed under the Eiffel Forum License 2
http://sopel.chat
"""
from __future__ import unicode_literals
import os
import os.path
import re
import threading
from datetime im... | 38.029851 | 96 | 0.691425 |
4e53d2b7ebb662a3f68bfcfd22ea98e1d1633c34 | 2,105 | py | Python | metric_M_diagonal.py | bobchengyang/SDP_RUN | f6976ed24255b026a68438085225293c780b0065 | [
"MIT"
] | null | null | null | metric_M_diagonal.py | bobchengyang/SDP_RUN | f6976ed24255b026a68438085225293c780b0065 | [
"MIT"
] | null | null | null | metric_M_diagonal.py | bobchengyang/SDP_RUN | f6976ed24255b026a68438085225293c780b0065 | [
"MIT"
] | null | null | null | import torch
from graph_construction import graph_construction
def metric_M_diagonal(M_normalizer,feature,\
b_ind,\
label,\
n_feature,\
M_d_in,\
n_train,\
metric_M_step,Q_mask,optimizer_M... | 36.293103 | 83 | 0.621378 |
28943c0b4362b8767c7a24e4e9811046c5d5479d | 6,284 | py | Python | fashion_mnist_gan.py | marshall4471/fashion_mnist_gan | f68c88e01ac6e113758d697957a3d7b0c3583a3d | [
"MIT"
] | null | null | null | fashion_mnist_gan.py | marshall4471/fashion_mnist_gan | f68c88e01ac6e113758d697957a3d7b0c3583a3d | [
"MIT"
] | null | null | null | fashion_mnist_gan.py | marshall4471/fashion_mnist_gan | f68c88e01ac6e113758d697957a3d7b0c3583a3d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""fashion_mnist_gan.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/10iLMRTE0rgTJ4qriv633vIzjr5ppKfIz
"""
import tensorflow as tf
from IPython import display
import PIL
import imageio
(train_images, train_labels), (_, _)... | 37.183432 | 124 | 0.709262 |
c17606a1e3c8d8b22105d5c6bcdf5e6d1a19e5bd | 12,940 | py | Python | plugins/http/cafe/engine/http/client.py | rcbops-qa/opencafe | 4e6d99ce763fd28289cd35cbd56ca5722824f89e | [
"Apache-2.0"
] | null | null | null | plugins/http/cafe/engine/http/client.py | rcbops-qa/opencafe | 4e6d99ce763fd28289cd35cbd56ca5722824f89e | [
"Apache-2.0"
] | null | null | null | plugins/http/cafe/engine/http/client.py | rcbops-qa/opencafe | 4e6d99ce763fd28289cd35cbd56ca5722824f89e | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Rackspace
# 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, sof... | 40.06192 | 79 | 0.613369 |
2a23107049a15dc6eb279ae5f95ad2885d66d6f4 | 640 | py | Python | elements/python/13/8/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 11 | 2019-02-08T06:54:34.000Z | 2021-08-07T18:57:39.000Z | elements/python/13/8/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 1 | 2019-05-21T08:14:10.000Z | 2019-05-21T08:14:10.000Z | elements/python/13/8/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | null | null | null | def closest_repeat(words):
last_position = dict()
d = float('inf')
i, j = None, None
for idx, word in enumerate(words):
last_idx = last_position.get(word, None)
if last_idx is not None and idx - last_idx < d:
i, j, d = last_idx, idx, idx - last_idx
last_position[word]... | 22.857143 | 82 | 0.579688 |
92736148aba4ea5825c65d27bb5b2e0432abe271 | 4,368 | py | Python | IGC/BiFModule/resource_embedder.py | lfelipe/intel-graphics-compiler | da6c84a62d5d499544b2ae5f70ae7d1cb4d78fbd | [
"MIT"
] | null | null | null | IGC/BiFModule/resource_embedder.py | lfelipe/intel-graphics-compiler | da6c84a62d5d499544b2ae5f70ae7d1cb4d78fbd | [
"MIT"
] | null | null | null | IGC/BiFModule/resource_embedder.py | lfelipe/intel-graphics-compiler | da6c84a62d5d499544b2ae5f70ae7d1cb4d78fbd | [
"MIT"
] | null | null | null | #===================== begin_copyright_notice ==================================
#Copyright (c) 2017 Intel Corporation
#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, incl... | 35.512195 | 163 | 0.651786 |
af034edc89b3cf71c5ae087366c4dbf68fef40ae | 80 | py | Python | scripts/class-3/espiral_quadrado.py | GabrielMMelo/python4teens | 287f79ada2f8ded669f6e26210e1407202e8ff80 | [
"CC-BY-4.0"
] | 2 | 2021-04-15T13:23:16.000Z | 2022-02-01T18:31:58.000Z | scripts/class-3/espiral_quadrado.py | GabrielMMelo/python4teens | 287f79ada2f8ded669f6e26210e1407202e8ff80 | [
"CC-BY-4.0"
] | null | null | null | scripts/class-3/espiral_quadrado.py | GabrielMMelo/python4teens | 287f79ada2f8ded669f6e26210e1407202e8ff80 | [
"CC-BY-4.0"
] | null | null | null | import turtle
t = turtle.Pen()
for x in range(100):
t.forward(x)
t.left(90)
| 10 | 20 | 0.65 |
3b89138874b0cb15d79ed69a859b55398e1bb325 | 4,680 | py | Python | hparams.py | wyb330/multi-speaker-tacotron-tensorflow | 4644d0b2bbce5c351a3f8d3af94ff7461b07a6d6 | [
"MIT"
] | null | null | null | hparams.py | wyb330/multi-speaker-tacotron-tensorflow | 4644d0b2bbce5c351a3f8d3af94ff7461b07a6d6 | [
"MIT"
] | null | null | null | hparams.py | wyb330/multi-speaker-tacotron-tensorflow | 4644d0b2bbce5c351a3f8d3af94ff7461b07a6d6 | [
"MIT"
] | null | null | null | import tensorflow as tf
SCALE_FACTOR = 1
def f(num):
return num // SCALE_FACTOR
basic_params = {
# Comma-separated list of cleaners to run on text prior to training and eval. For non-English
# text, you may want to use "basic_cleaners" or "transliteration_cleaners" See TRAINING_DATA.md.
'cleaners':... | 26.145251 | 113 | 0.62906 |
f477fad922daaa31c87be44e449f3b5d4a5e6814 | 1,107 | py | Python | checksumming_io/checksumming_sink.py | HumanCellAtlas/checksum_reader | 1bf28c1f20d420d905955db7e27fe2798bae3545 | [
"Apache-2.0"
] | null | null | null | checksumming_io/checksumming_sink.py | HumanCellAtlas/checksum_reader | 1bf28c1f20d420d905955db7e27fe2798bae3545 | [
"Apache-2.0"
] | null | null | null | checksumming_io/checksumming_sink.py | HumanCellAtlas/checksum_reader | 1bf28c1f20d420d905955db7e27fe2798bae3545 | [
"Apache-2.0"
] | null | null | null | import hashlib
import crcmod
from .s3_etag import S3Etag
"""
A file-like object that computes checksums for the data written to it, discarding the actual data.
"""
class ChecksummingSink:
def __init__(self, hash_functions=('crc32c', 'sha1', 'sha256', 's3_etag')):
self._hashers = dict()
for hashe... | 29.131579 | 98 | 0.591689 |
90c7aedd04ecf5a7428c5b3f3da7eba647e7d50d | 10,865 | py | Python | doc/conf.py | LucaLJ/PyPSA | d69bcdb9eec0c71b485648537c10338c661f906c | [
"MIT"
] | 594 | 2017-10-20T19:02:15.000Z | 2022-03-31T10:16:23.000Z | doc/conf.py | LucaLJ/PyPSA | d69bcdb9eec0c71b485648537c10338c661f906c | [
"MIT"
] | 271 | 2017-10-23T15:12:03.000Z | 2022-03-29T10:20:36.000Z | doc/conf.py | LucaLJ/PyPSA | d69bcdb9eec0c71b485648537c10338c661f906c | [
"MIT"
] | 286 | 2017-10-23T09:45:15.000Z | 2022-03-28T15:23:40.000Z | # -*- coding: utf-8 -*-
#
# PyPSA documentation build configuration file, created by
# sphinx-quickstart on Tue Jan 5 10:04:42 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All... | 32.432836 | 138 | 0.706305 |
d2e283912fcdb020be11b2d7a05554fa38646cff | 7,871 | py | Python | mydialogs.py | zhj12138/ebook-manager | 773974c9da3de1e79af4cfffe06ee1c546ef3e86 | [
"MIT"
] | null | null | null | mydialogs.py | zhj12138/ebook-manager | 773974c9da3de1e79af4cfffe06ee1c546ef3e86 | [
"MIT"
] | 1 | 2020-10-05T10:47:04.000Z | 2020-10-05T10:47:04.000Z | mydialogs.py | zhj12138/ebook-manager | 773974c9da3de1e79af4cfffe06ee1c546ef3e86 | [
"MIT"
] | null | null | null | import time
from PyQt5.QtGui import QIntValidator
from PyQt5.QtWidgets import *
from PyQt5.QtCore import QDate, pyqtSignal
from basic import strListToString
from classes import Book
from mydatabase import MyDb
from mythreads import convertThread
from fileMethods import *
class EditDataDialog(QDialog):
changeSigna... | 38.773399 | 111 | 0.645407 |
529a98b870c146b2ee8b907314f0caa66749243b | 2,778 | py | Python | utils/spectral_norm.py | loayghawji/CPM | 8d1c1d0e15bba04c0ef06997411a09765f736cfa | [
"Apache-2.0"
] | 182 | 2021-04-20T04:53:07.000Z | 2022-03-30T02:54:24.000Z | utils/spectral_norm.py | loayghawji/CPM | 8d1c1d0e15bba04c0ef06997411a09765f736cfa | [
"Apache-2.0"
] | 16 | 2021-04-21T10:59:57.000Z | 2022-03-10T05:27:55.000Z | utils/spectral_norm.py | loayghawji/CPM | 8d1c1d0e15bba04c0ef06997411a09765f736cfa | [
"Apache-2.0"
] | 30 | 2021-04-26T03:55:41.000Z | 2022-03-20T02:00:34.000Z | import torch
from torch.nn import Parameter
def l2normalize(v, eps=1e-12):
return v / (v.norm() + eps)
class SpectralNorm(object):
def __init__(self):
self.name = "weight"
# print(self.name)
self.power_iterations = 1
def compute_weight(self, module):
u = getattr(module, ... | 31.931034 | 84 | 0.601512 |
89cb8e63d4caf0ab21b5cfb9fbbc5e9793d171fc | 2,045 | py | Python | test/test_brand_search_query.py | Inch4Tk/amparex_python_api | f372c15a1e67293329bdd8bee8ad66624ed1341f | [
"Apache-2.0"
] | null | null | null | test/test_brand_search_query.py | Inch4Tk/amparex_python_api | f372c15a1e67293329bdd8bee8ad66624ed1341f | [
"Apache-2.0"
] | null | null | null | test/test_brand_search_query.py | Inch4Tk/amparex_python_api | f372c15a1e67293329bdd8bee8ad66624ed1341f | [
"Apache-2.0"
] | null | null | null | """
AMPAREX Rest API Documentation
This is the description of the AMPAREX Rest API. All REST calls plus the corresponding data model are described in this documentation. Direct calls to the server are possible over this page.<br/>Following steps are needed to use the API:<br/><br/>1. Get the ... | 53.815789 | 1,241 | 0.733985 |
7949e11430f9258dd2a181a66625fa88cfe610ac | 1,892 | py | Python | url_tldr.py | AmanKishore/GPT3-Experiments | ea661b66d6cab843e406c65f7a1db1de41c62a57 | [
"MIT"
] | null | null | null | url_tldr.py | AmanKishore/GPT3-Experiments | ea661b66d6cab843e406c65f7a1db1de41c62a57 | [
"MIT"
] | null | null | null | url_tldr.py | AmanKishore/GPT3-Experiments | ea661b66d6cab843e406c65f7a1db1de41c62a57 | [
"MIT"
] | null | null | null | import os
import openai
import re
from collections import OrderedDict
import requests, PyPDF2
from io import BytesIO
from WebScraper import scraper
openai.api_key = os.environ["OPENAI_API_KEY"]
def getTLDRfromURL():
# creating a pdf file object
url = input("Enter the pdf url: ")
response = requests.ge... | 30.031746 | 83 | 0.534355 |
ff2a8fad372895590ec41336c96cbdcd720ea613 | 3,083 | py | Python | tax_data_test_task/tax_data/settings.py | saibottrenham/online_pajak | d123e421a6c629bb0ebdfb1582391eae600cb905 | [
"MIT"
] | 1 | 2021-11-03T00:11:01.000Z | 2021-11-03T00:11:01.000Z | tax_data_test_task/tax_data/settings.py | saibottrenham/online_pajak | d123e421a6c629bb0ebdfb1582391eae600cb905 | [
"MIT"
] | null | null | null | tax_data_test_task/tax_data/settings.py | saibottrenham/online_pajak | d123e421a6c629bb0ebdfb1582391eae600cb905 | [
"MIT"
] | null | null | null | """
Django settings for tax_data project.
Generated by 'django-admin startproject' using Django 3.1.7.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pathli... | 25.270492 | 91 | 0.695751 |
f295c70e4efe272e5d8c262a8d6576a790e1f840 | 2,122 | py | Python | tests/test_blob.py | Atipriya/cle | e0de9fbfde45a446656873e406340b146c401381 | [
"BSD-2-Clause"
] | 317 | 2015-05-27T10:10:32.000Z | 2022-03-13T02:56:31.000Z | tests/test_blob.py | Atipriya/cle | e0de9fbfde45a446656873e406340b146c401381 | [
"BSD-2-Clause"
] | 238 | 2015-05-27T17:50:18.000Z | 2022-03-24T23:47:27.000Z | tests/test_blob.py | Atipriya/cle | e0de9fbfde45a446656873e406340b146c401381 | [
"BSD-2-Clause"
] | 134 | 2015-05-29T03:45:11.000Z | 2022-03-13T02:56:34.000Z |
import nose
import os
import pickle
import cle
TEST_BASE = os.path.join(os.path.dirname(os.path.realpath(__file__)),
os.path.join('..', '..', 'binaries'))
def test_blob_0():
BASE_ADDR = 0x8000000
ENTRYPOINT = 0x8001337
blob_file = os.path.join(TEST_BASE, 'test... | 31.671642 | 102 | 0.690386 |
43c5463313b4fe7d348f9083ad8c51eb72775390 | 728 | py | Python | tcp-client.py | pedrohenri15/Arquivos-IOT-comentados | 2406f1a0c6f73e545c1c4b5ee1306e89a2c2f404 | [
"BSD-2-Clause"
] | null | null | null | tcp-client.py | pedrohenri15/Arquivos-IOT-comentados | 2406f1a0c6f73e545c1c4b5ee1306e89a2c2f404 | [
"BSD-2-Clause"
] | null | null | null | tcp-client.py | pedrohenri15/Arquivos-IOT-comentados | 2406f1a0c6f73e545c1c4b5ee1306e89a2c2f404 | [
"BSD-2-Clause"
] | null | null | null | # importamos o socket para realizar a conexao e tranferencia dos dados
import socket
# determinamos o destino e a porta de acesso
HOST = 'localhost'
PORT = 5000
# criamos uma varialvel que irá armazenar dos argumentos de soccket, que linka o IPv4 e TCP
tcp = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
... | 29.12 | 107 | 0.723901 |
9301135f43a200a793061030f624db47790760e1 | 15,112 | py | Python | agents/navigation/autonomous_agent.py | neetmehta/Autonomous-turning-of-vehicle-and-overtaking-in-CARLA | afda62dbf6b75343afaaf4cd49753cfc1e90ac84 | [
"MIT"
] | 2 | 2021-07-08T07:32:16.000Z | 2021-07-16T08:45:55.000Z | agents/navigation/autonomous_agent.py | neetmehta/Autonomous-turning-of-vehicle-and-overtaking-in-CARLA | afda62dbf6b75343afaaf4cd49753cfc1e90ac84 | [
"MIT"
] | 1 | 2021-05-14T05:10:15.000Z | 2021-07-08T09:05:22.000Z | agents/navigation/autonomous_agent.py | neetmehta/Autonomous-turning-of-vehicle-and-overtaking-in-CARLA | afda62dbf6b75343afaaf4cd49753cfc1e90ac84 | [
"MIT"
] | 2 | 2021-07-08T09:16:52.000Z | 2021-09-08T18:10:48.000Z | #!/usr/bin/env python
import pygame
import carla
import math
import numpy as np
from agents.navigation.agent import Agent, AgentState
from agents.navigation.local_planner import LocalPlanner, RoadOption
from agents.navigation.global_route_planner import GlobalRoutePlanner
from agents.navigation.global_route_planner_d... | 39.873351 | 107 | 0.601707 |
9bd5a7a00c7dbbc617851109e37292f934ebf73f | 1,344 | py | Python | Operator/UVIsland_HardEdges.py | BreakPointOo/Stitches_BlenderAddon | a7d7e200d92ed35225c3b61f82062d6a20a2b6d7 | [
"Xnet",
"X11"
] | null | null | null | Operator/UVIsland_HardEdges.py | BreakPointOo/Stitches_BlenderAddon | a7d7e200d92ed35225c3b61f82062d6a20a2b6d7 | [
"Xnet",
"X11"
] | null | null | null | Operator/UVIsland_HardEdges.py | BreakPointOo/Stitches_BlenderAddon | a7d7e200d92ed35225c3b61f82062d6a20a2b6d7 | [
"Xnet",
"X11"
] | null | null | null |
'''bl_info = {
"name": "UVs_to_Hard_Edges",
"author": "Ferran M.Clar, 2.80 update NecroFriedChicken",
"version": (0, 1),
"blender": (2, 80, 0),
"location": "3D View -> Tools Panel",
"description": "Sets the object UV islands borders' edges to hard edges and an Edge Split modifier",
"catego... | 24.888889 | 105 | 0.582589 |
30832d0ff617f11963fe33ee5f31df066fb1907d | 828 | py | Python | common/pyredis.py | Allen-lang/FXTest | ccbc5e986f4d0f9d3145a857674529380d873719 | [
"MIT"
] | 1 | 2019-12-31T01:53:04.000Z | 2019-12-31T01:53:04.000Z | common/pyredis.py | fuyang123/FXTest | ccbc5e986f4d0f9d3145a857674529380d873719 | [
"MIT"
] | null | null | null | common/pyredis.py | fuyang123/FXTest | ccbc5e986f4d0f9d3145a857674529380d873719 | [
"MIT"
] | null | null | null | '''
@author: lileilei
@file: pyredis.py
@time: 2018/9/19 10:49
'''
import redis
from config import redis_password,max_connec_redis
class ConRedisOper(object):
def __init__(self,host,port,db):
self.host=host
self.port=port
self.db=db
def connect(self):
pool = redis.C... | 31.846154 | 105 | 0.596618 |
cbbb0a67f971529e10df9a0666033b70de32f01a | 16,253 | py | Python | docs/conf_common.py | genichin/esp-idf_for_ebell | 117bb7805aac9384f6b55d839871c5933882824c | [
"Apache-2.0"
] | 1 | 2022-01-05T13:22:24.000Z | 2022-01-05T13:22:24.000Z | docs/conf_common.py | AnishChristo96/SmartPocket | cef048e31b9d9c14cc9ece6e1cfb37c06ab47b0d | [
"Apache-2.0"
] | 2 | 2020-01-03T10:29:38.000Z | 2020-04-20T10:39:40.000Z | docs/conf_common.py | BadrBouaddi/esp-idf | 3b59d9c71042d2e4ee2058c142fa1cc1959091df | [
"Apache-2.0"
] | 1 | 2022-01-17T07:07:05.000Z | 2022-01-17T07:07:05.000Z | # -*- coding: utf-8 -*-
#
# Common (non-language-specific) configuration for Read The Docs & Sphinx
#
# Based on a Read the Docs Template documentation build configuration file,
# created by sphinx-quickstart on Tue Aug 26 14:19:49 2014.
#
# This file is imported from a language-specific conf.py (ie en/conf.py or
# zh_... | 36.688488 | 124 | 0.701409 |
3742745d8c02070937e3f9eed8c5cd4fce9b9e16 | 5,351 | py | Python | tests/test_serializer.py | AbsaOSS/py2k | 4e28810dd0a370bb5eb31c8cb34f63b888b9c450 | [
"Apache-2.0"
] | 10 | 2021-03-12T09:01:50.000Z | 2021-09-08T12:33:46.000Z | tests/test_serializer.py | AbsaOSS/py2k | 4e28810dd0a370bb5eb31c8cb34f63b888b9c450 | [
"Apache-2.0"
] | 91 | 2021-03-12T08:08:06.000Z | 2022-03-28T00:16:41.000Z | tests/test_serializer.py | AbsaOSS/py2k | 4e28810dd0a370bb5eb31c8cb34f63b888b9c450 | [
"Apache-2.0"
] | 1 | 2021-04-26T02:42:12.000Z | 2021-04-26T02:42:12.000Z | # Copyright 2021 ABSA Group Limited
# 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... | 29.893855 | 79 | 0.681555 |
0f4e5e728dc36ee6fa2cf6ac7a1350bb8a43a0a8 | 1,740 | py | Python | home/Gareth/NoseMoov_butane_sensorMQ2_speech_voice_control.py | sola1993/inmoov | 34e7bb6e214bd9bf3eee808c19f0ab09ec79345f | [
"Apache-2.0"
] | 1 | 2021-02-24T17:05:52.000Z | 2021-02-24T17:05:52.000Z | home/Gareth/NoseMoov_butane_sensorMQ2_speech_voice_control.py | sola1993/inmoov | 34e7bb6e214bd9bf3eee808c19f0ab09ec79345f | [
"Apache-2.0"
] | null | null | null | home/Gareth/NoseMoov_butane_sensorMQ2_speech_voice_control.py | sola1993/inmoov | 34e7bb6e214bd9bf3eee808c19f0ab09ec79345f | [
"Apache-2.0"
] | 1 | 2020-06-03T20:48:47.000Z | 2020-06-03T20:48:47.000Z | # Gas sensor MQ2
# reads a butane sensor on analog 5
# waits for voice control from user before speaking back the butane level measured
from java.lang import String
from org.myrobotlab.service import Speech
from org.myrobotlab.service import Sphinx
from org.myrobotlab.service import Runtime
ear = Runtime.createAndSt... | 32.222222 | 84 | 0.690805 |
46998ba68af57803e3abfd950dea19ea7cd8650d | 9,132 | py | Python | test/unittest_base.py | CAVED123/Tensorforce | 823177f77f9047b1e71eccfffc08315ed1636878 | [
"Apache-2.0"
] | null | null | null | test/unittest_base.py | CAVED123/Tensorforce | 823177f77f9047b1e71eccfffc08315ed1636878 | [
"Apache-2.0"
] | null | null | null | test/unittest_base.py | CAVED123/Tensorforce | 823177f77f9047b1e71eccfffc08315ed1636878 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Tensorforce Team. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 36.38247 | 98 | 0.645313 |
2430c474bf6877abdd2418cf04308406a9bad79f | 16 | py | Python | sonnenblume/inventory/models.py | Sylver11/sonnenblume | a214bc68e110eb04d2505807e8d468b0d747d534 | [
"MIT"
] | null | null | null | sonnenblume/inventory/models.py | Sylver11/sonnenblume | a214bc68e110eb04d2505807e8d468b0d747d534 | [
"MIT"
] | null | null | null | sonnenblume/inventory/models.py | Sylver11/sonnenblume | a214bc68e110eb04d2505807e8d468b0d747d534 | [
"MIT"
] | null | null | null | # product model
| 8 | 15 | 0.75 |
1f443cb8b4a6b7f087da825d43f83e1da173de51 | 1,903 | py | Python | igvc_ws/src/igvc_ekf/src/ekf_sensor_spoof.py | SoonerRobotics/igvc_software_2022 | 906e6a4fca22d2b0c06ef1b8a4a3a9df7f1d17dd | [
"MIT"
] | 4 | 2020-07-07T14:56:56.000Z | 2021-08-13T23:31:07.000Z | igvc_ws/src/igvc_ekf/src/ekf_sensor_spoof.py | pradumn203/igvc-winners-2021 | 658233609054eafac59603a77b2a092dc002e145 | [
"MIT"
] | 13 | 2019-11-12T02:57:54.000Z | 2020-03-17T17:04:22.000Z | igvc_ws/src/igvc_ekf/src/ekf_sensor_spoof.py | pradumn203/igvc-winners-2021 | 658233609054eafac59603a77b2a092dc002e145 | [
"MIT"
] | 3 | 2021-06-29T05:21:18.000Z | 2021-08-23T05:03:27.000Z | #!/usr/bin/env python
from numpy import genfromtxt, savetxt, vectorize
from math import degrees
from os.path import expanduser
import rospy
from std_msgs.msg import Float64
from geometry_msgs.msg import Vector3
if __name__ == "__main__":
# Get home directory
home = expanduser("~")
# Load data
gps_... | 27.185714 | 77 | 0.622701 |
7331854c5471e45cafae98d99241b8013c85e04f | 6,824 | py | Python | pysnmp-with-texts/CDR-DS2-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/CDR-DS2-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/CDR-DS2-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module CDR-DS2-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CDR-DS2-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:47:29 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 0... | 111.868852 | 597 | 0.771688 |
02afa94dbb1df16096d58279a18cef27d17c9435 | 2,093 | py | Python | backend/edw/models/sql/datastructures.py | MMotionMan/django-edw | 0f686429d29e0f40409a3b2318664973b2844c08 | [
"BSD-3-Clause"
] | 4 | 2019-09-18T05:51:12.000Z | 2020-10-23T08:50:00.000Z | backend/edw/models/sql/datastructures.py | Vvvnukova/django-edw | 18397c2e6e2d7ddebad4d83ffee16425e7ac4e9f | [
"BSD-3-Clause"
] | 10 | 2020-04-29T11:46:44.000Z | 2022-03-11T23:38:27.000Z | backend/edw/models/sql/datastructures.py | Vvvnukova/django-edw | 18397c2e6e2d7ddebad4d83ffee16425e7ac4e9f | [
"BSD-3-Clause"
] | 13 | 2020-04-09T07:49:48.000Z | 2022-03-02T07:06:28.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db.models.sql.datastructures import Join
class CustomJoin(Join):
def __init__(self, subquery, subquery_params, parent_alias, table_alias, join_type, join_field, nullable):
self.subquery_params = subquery_params
super(Cust... | 41.86 | 110 | 0.627329 |
fd60c2c4387e372223bb0c91645d10c11a66b155 | 3,774 | py | Python | sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/cluster_health_policy_py3.py | vchske/azure-sdk-for-python | 6383ed3676b7355af7be394562b126209961ec13 | [
"MIT"
] | null | null | null | sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/cluster_health_policy_py3.py | vchske/azure-sdk-for-python | 6383ed3676b7355af7be394562b126209961ec13 | [
"MIT"
] | 1 | 2019-06-04T18:12:16.000Z | 2019-06-04T18:12:16.000Z | sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/cluster_health_policy_py3.py | vchske/azure-sdk-for-python | 6383ed3676b7355af7be394562b126209961ec13 | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 51.69863 | 157 | 0.720191 |
11b8d3a4fd054a75dda0a62c82cba8e23af77861 | 11,584 | py | Python | src/main/python/rlbot/training/training.py | ericmburgess/RLBot | a4ce061bae1a773adf60d99f232f2a228de820a2 | [
"MIT"
] | 1 | 2019-08-24T11:53:35.000Z | 2019-08-24T11:53:35.000Z | src/main/python/rlbot/training/training.py | Acidburn0zzz/RLBot | b6365e0c92183563fb7ff67d4ba81b58a31b1ff5 | [
"MIT"
] | null | null | null | src/main/python/rlbot/training/training.py | Acidburn0zzz/RLBot | b6365e0c92183563fb7ff67d4ba81b58a31b1ff5 | [
"MIT"
] | null | null | null | from typing import Union, Optional, Iterator, Iterable, Callable
import random
import time
import traceback
from contextlib import contextmanager
from rlbot.training.status_rendering import training_status_renderer_context, Row
from rlbot.matchconfig.match_config import MatchConfig
from rlbot.setup_manager import Setu... | 39.267797 | 113 | 0.668767 |
df1b0914141fb8c564347696098dd1d2a23570ef | 356 | py | Python | scriptable/api/ast.py | c7nw3r/scriptable | b285d865da41774c8321ebf51f5a468ef1c92402 | [
"Apache-2.0"
] | null | null | null | scriptable/api/ast.py | c7nw3r/scriptable | b285d865da41774c8321ebf51f5a468ef1c92402 | [
"Apache-2.0"
] | null | null | null | scriptable/api/ast.py | c7nw3r/scriptable | b285d865da41774c8321ebf51f5a468ef1c92402 | [
"Apache-2.0"
] | null | null | null | from abc import ABC, abstractmethod
from typing import TypeVar, Generic
from scriptable.api.ast_binding import ASTBinding
T = TypeVar("T")
class AST(ABC, Generic[T]):
@abstractmethod
def execute(self, context: ASTBinding) -> T:
pass
class EmptyAST(AST[None]):
def execute(self, context: ASTBi... | 17.8 | 51 | 0.69382 |
d2afc456846368f66b9f3e5a202d96749fa1c833 | 2,079 | py | Python | ww/settings.py | hbradleyiii/ww | 5a537ab6865fcfb43a253cdb8cf2397a53d940a7 | [
"MIT"
] | null | null | null | ww/settings.py | hbradleyiii/ww | 5a537ab6865fcfb43a253cdb8cf2397a53d940a7 | [
"MIT"
] | null | null | null | ww/settings.py | hbradleyiii/ww | 5a537ab6865fcfb43a253cdb8cf2397a53d940a7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# name: settings.py
# author: Harold Bradley III
# email: harold@bradleystudio.net
# created on: 01/23/2016
#
# description: The settings file for ww
#
from __future__ import absolute_import, print_function
import os
import ti... | 28.479452 | 103 | 0.71621 |
39c75d6da777d1bafc4673f875ec9200a461af16 | 9,017 | py | Python | photutils/psf/groupstars.py | Onoddil/photutils | 433f3e54d3f53282ae04eadde9e1ddf657944590 | [
"BSD-3-Clause"
] | null | null | null | photutils/psf/groupstars.py | Onoddil/photutils | 433f3e54d3f53282ae04eadde9e1ddf657944590 | [
"BSD-3-Clause"
] | null | null | null | photutils/psf/groupstars.py | Onoddil/photutils | 433f3e54d3f53282ae04eadde9e1ddf657944590 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides classes to perform grouping of stars.
"""
import abc
from astropy.table import Column
import numpy as np
__all__ = ['DAOGroup', 'DBSCANGroup', 'GroupStarsBase']
class GroupStarsBase(metaclass=abc.ABCMeta):
"""
This bas... | 36.358871 | 111 | 0.594211 |
5ad5e17120d64e87ca54b8756c0198116d57959d | 6,857 | py | Python | scripts/stateful_utils.py | triton-inference-server/stateful_backend | d07ead0dfcfb3af78f3f93f7f28d78ac00c49829 | [
"MIT"
] | 4 | 2021-12-04T17:19:42.000Z | 2022-01-05T23:14:57.000Z | scripts/stateful_utils.py | triton-inference-server/stateful_backend | d07ead0dfcfb3af78f3f93f7f28d78ac00c49829 | [
"MIT"
] | null | null | null | scripts/stateful_utils.py | triton-inference-server/stateful_backend | d07ead0dfcfb3af78f3f93f7f28d78ac00c49829 | [
"MIT"
] | 3 | 2021-10-12T22:39:30.000Z | 2022-03-15T04:48:49.000Z | # The MIT License (MIT)
#
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation ... | 34.114428 | 83 | 0.72189 |
5a99abd7727c56508aade2aa1c185afd12fbaa0f | 1,031 | py | Python | suzieq/sqobjects/network.py | zxiiro/suzieq | eca92820201c05bc80081599f69e41cd6b991107 | [
"Apache-2.0"
] | null | null | null | suzieq/sqobjects/network.py | zxiiro/suzieq | eca92820201c05bc80081599f69e41cd6b991107 | [
"Apache-2.0"
] | null | null | null | suzieq/sqobjects/network.py | zxiiro/suzieq | eca92820201c05bc80081599f69e41cd6b991107 | [
"Apache-2.0"
] | null | null | null | from pandas import DataFrame
from suzieq.sqobjects.basicobj import SqObject
class NetworkObj(SqObject):
def __init__(self, **kwargs):
super().__init__(table='network', **kwargs)
self._valid_get_args = ['namespace', 'hostname', 'version',
'os', 'model', 'vendor', 'co... | 33.258065 | 80 | 0.5742 |
863259e789e6f153f78d2104c792274ac7f61889 | 490 | py | Python | ex016.py | ErosMLima/python-server-connection | a15706a007a95eff64597fa02e64d95b6b2da6a5 | [
"MIT"
] | 2 | 2020-07-27T06:33:59.000Z | 2021-02-02T15:17:56.000Z | ex016.py | ErosMLima/python-server-connection | a15706a007a95eff64597fa02e64d95b6b2da6a5 | [
"MIT"
] | null | null | null | ex016.py | ErosMLima/python-server-connection | a15706a007a95eff64597fa02e64d95b6b2da6a5 | [
"MIT"
] | null | null | null | #Exercicio 16 python guanabara
#Crie um programa que leia um número real qualquer pelo teclado e mostre na tela sua porção inteira.
#Ex: digite um número> 6.127
#O número 6.127 tem a parte inteira 6.
'''from math import trunc
num = float(input('Digite um valor: '))
print('O valor digitado foi {} e a sua porção ... | 40.833333 | 101 | 0.693878 |
f6a9d6e6ca69536bd166cd1a295fb0e8dad08994 | 4,933 | py | Python | SC101_Projects/Babynames/babynames.py | Yu-Hsuan-Lin/SC101-Projects | d8c3cca313996e0c7e21acf02a31ed8faf335e20 | [
"MIT"
] | null | null | null | SC101_Projects/Babynames/babynames.py | Yu-Hsuan-Lin/SC101-Projects | d8c3cca313996e0c7e21acf02a31ed8faf335e20 | [
"MIT"
] | null | null | null | SC101_Projects/Babynames/babynames.py | Yu-Hsuan-Lin/SC101-Projects | d8c3cca313996e0c7e21acf02a31ed8faf335e20 | [
"MIT"
] | null | null | null | """
SC101 Baby Names Project
Adapted from Nick Parlante's Baby Names assignment by
Jerry Liao.
YOUR DESCRIPTION HERE
"""
import sys
def add_data_for_name(name_data, year, rank, name):
"""
Adds the given year and rank to the associated name in the name_data dict.
Input:
name_data (dict): dict ho... | 29.538922 | 84 | 0.631056 |
a5185978683785d561191953d442d35cffca17be | 2,957 | py | Python | tests/python/pants_test/backend/graph_info/tasks/test_cloc.py | GoingTharn/pants | d3f2005dcae0745f3e3bf525fc46e7d28f04f073 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/backend/graph_info/tasks/test_cloc.py | GoingTharn/pants | d3f2005dcae0745f3e3bf525fc46e7d28f04f073 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/backend/graph_info/tasks/test_cloc.py | GoingTharn/pants | d3f2005dcae0745f3e3bf525fc46e7d28f04f073 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
from builtins import filter
from pants.backend.graph_info.tasks.cloc import CountLinesOf... | 39.959459 | 99 | 0.668583 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.