hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
794c7cbc7fcf3114024f3eb810617fb6f4785168 | 15,921 | py | Python | talon_one/models/update_campaign.py | talon-one/talon_one.py | f863bb3c2cc5ddc94d9227adcf14947b2ea7db41 | [
"MIT"
] | 1 | 2021-03-05T06:41:26.000Z | 2021-03-05T06:41:26.000Z | talon_one/models/update_campaign.py | talon-one/talon_one.py | f863bb3c2cc5ddc94d9227adcf14947b2ea7db41 | [
"MIT"
] | 1 | 2021-09-07T08:56:58.000Z | 2021-09-07T08:56:58.000Z | talon_one/models/update_campaign.py | talon-one/talon_one.py | f863bb3c2cc5ddc94d9227adcf14947b2ea7db41 | [
"MIT"
] | 1 | 2019-05-21T10:27:54.000Z | 2019-05-21T10:27:54.000Z | # coding: utf-8
"""
Talon.One API
The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. #... | 33.447479 | 647 | 0.62025 |
794c7e79fe2ec69b920fbd038f346532e687b1b5 | 3,119 | py | Python | src/wi/urls/user/farm.py | cc1-cloud/cc1 | 8113673fa13b6fe195cea99dedab9616aeca3ae8 | [
"Apache-2.0"
] | 11 | 2015-05-06T14:16:54.000Z | 2022-02-08T23:21:31.000Z | src/wi/urls/user/farm.py | fortress-shell/cc1 | 8113673fa13b6fe195cea99dedab9616aeca3ae8 | [
"Apache-2.0"
] | 1 | 2015-10-30T21:08:11.000Z | 2015-10-30T21:08:11.000Z | src/wi/urls/user/farm.py | fortress-shell/cc1 | 8113673fa13b6fe195cea99dedab9616aeca3ae8 | [
"Apache-2.0"
] | 5 | 2016-02-12T22:01:38.000Z | 2021-12-06T16:56:54.000Z | # -*- coding: utf-8 -*-
# @COPYRIGHT_begin
#
# Copyright [2010-2014] Institute of Nuclear Physics PAN, Krakow, Poland
#
# 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.apac... | 44.557143 | 135 | 0.672331 |
794c7fb34ccecd56e5b44cd54ea057d7663c1ba2 | 1,429 | py | Python | user.py | 3xistentialcrisis/Password | dda6343302d7048c90c34c36a0b1a3e240cd95de | [
"MIT"
] | null | null | null | user.py | 3xistentialcrisis/Password | dda6343302d7048c90c34c36a0b1a3e240cd95de | [
"MIT"
] | null | null | null | user.py | 3xistentialcrisis/Password | dda6343302d7048c90c34c36a0b1a3e240cd95de | [
"MIT"
] | null | null | null | from credentials import Credential
#User Class
class User:
"""
Class that shall generate new instances of user accounts.
"""
#User Details Array
user_details = []
def __init__(self,fname,username,password):
"""
This __init__ method defines the properties of the User object
... | 26.462963 | 85 | 0.601819 |
794c7fd617a64c75674c71b5eb7ef6f50a2c1058 | 806 | py | Python | flask_file_system/errors.py | quaxsze/flask-file-system | 5ab2cb5c4b5f2b91b53153574d035a924eb6d74c | [
"MIT"
] | null | null | null | flask_file_system/errors.py | quaxsze/flask-file-system | 5ab2cb5c4b5f2b91b53153574d035a924eb6d74c | [
"MIT"
] | null | null | null | flask_file_system/errors.py | quaxsze/flask-file-system | 5ab2cb5c4b5f2b91b53153574d035a924eb6d74c | [
"MIT"
] | null | null | null | __all__ = (
'FSError',
'FileExists',
'FileNotFound',
'UnauthorizedFileType',
'UploadNotAllowed',
'OperationNotSupported',
)
class FSError(Exception):
"""Base class for all Flask-FS Exceptions"""
pass
class UnauthorizedFileType(FSError):
"""Raised when trying to upload an unauthor... | 20.666667 | 87 | 0.694789 |
794c80216371ce8b19b37f387fddf34ec38fdc1f | 2,852 | py | Python | mimesis/data/int/business.py | aprasanna/mimesis | 71b89fb36d6bf6d5b52b6719138d50a6565c0c75 | [
"MIT"
] | 1 | 2019-03-24T05:00:14.000Z | 2019-03-24T05:00:14.000Z | mimesis/data/int/business.py | aprasanna/mimesis | 71b89fb36d6bf6d5b52b6719138d50a6565c0c75 | [
"MIT"
] | null | null | null | mimesis/data/int/business.py | aprasanna/mimesis | 71b89fb36d6bf6d5b52b6719138d50a6565c0c75 | [
"MIT"
] | null | null | null | """Provides all the generic data related to the business."""
CURRENCY_ISO_CODES = [
'AED',
'AFN',
'ALL',
'AMD',
'ANG',
'AOA',
'ARS',
'AUD',
'AWG',
'AZN',
'BAM',
'BBD',
'BDT',
'BGN',
'BHD',
'BIF',
'BMD',
'BND',
'BOB',
'BOV',
'BRL',
... | 11.785124 | 60 | 0.28331 |
794c8034f0fab32c508404814902c1f68da5ba99 | 10,042 | py | Python | onir/predictors/reranker.py | tgeral68/OpenNIR | 225b26185bd67fdc00f24de3ef70d35768e22243 | [
"MIT"
] | 3 | 2021-01-07T15:44:38.000Z | 2021-08-23T03:44:47.000Z | onir/predictors/reranker.py | tgeral68/OpenNIR | 225b26185bd67fdc00f24de3ef70d35768e22243 | [
"MIT"
] | null | null | null | onir/predictors/reranker.py | tgeral68/OpenNIR | 225b26185bd67fdc00f24de3ef70d35768e22243 | [
"MIT"
] | 1 | 2021-11-16T09:10:47.000Z | 2021-11-16T09:10:47.000Z | import os
import json
import torch
import onir
from onir import util, spec, predictors, datasets
from onir.interfaces import trec, plaintext
@predictors.register('reranker')
class Reranker(predictors.BasePredictor):
name = None
@staticmethod
def default_config():
return {
'batch_size'... | 43.284483 | 124 | 0.553973 |
794c80a118d8313bfb5ac93e085bfcd3c20c80f5 | 9,600 | py | Python | lib/visualization_lib.py | Diesmaster/komodo-cctools-python | c7345a3e0efc9bf42b31deb61c5a9be64b43d36c | [
"MIT"
] | null | null | null | lib/visualization_lib.py | Diesmaster/komodo-cctools-python | c7345a3e0efc9bf42b31deb61c5a9be64b43d36c | [
"MIT"
] | null | null | null | lib/visualization_lib.py | Diesmaster/komodo-cctools-python | c7345a3e0efc9bf42b31deb61c5a9be64b43d36c | [
"MIT"
] | null | null | null | import csv
from datetime import datetime
import sys
from lib import tuilib
def create_prices_csv(rpc_connection, depth):
prices_json = rpc_connection.prices(depth)
timestamps = prices_json["timestamps"]
dates = []
for timestamp in timestamps:
dates.append(datetime.utcfromtimestamp(t... | 41.37931 | 149 | 0.615417 |
794c811bb00733aada27bf14e84fffbf194033f4 | 1,211 | py | Python | python_practice/strings_part_one.py | WorldPolice/python_practice | aa18734961301895796f64ff7893493cd695c2c6 | [
"Apache-2.0"
] | null | null | null | python_practice/strings_part_one.py | WorldPolice/python_practice | aa18734961301895796f64ff7893493cd695c2c6 | [
"Apache-2.0"
] | 2 | 2018-12-10T00:56:44.000Z | 2019-01-21T21:52:21.000Z | python_practice/strings_part_one.py | WorldPolice/python_practice | aa18734961301895796f64ff7893493cd695c2c6 | [
"Apache-2.0"
] | 3 | 2018-12-08T22:48:05.000Z | 2018-12-11T01:19:15.000Z | # -*- coding: utf-8 -*-
def is_my_argument_a_string(maybe_string):
"""In this challenge you need check to see what type of object
the variable 'maybe_string' is. If it is a string type please return a true
if it is not a string object please return false.
"""
return isinstance(maybe_string, str)... | 34.6 | 116 | 0.718415 |
794c811db6208d1fb27f44d8ea5b58127873f206 | 1,873 | py | Python | setup.py | xingetouzi/Spirit | 0d298f0b608c3f3a2dbbc152a8da042eef6d2e05 | [
"MIT"
] | 1 | 2020-12-08T01:09:30.000Z | 2020-12-08T01:09:30.000Z | setup.py | xingetouzi/Spirit | 0d298f0b608c3f3a2dbbc152a8da042eef6d2e05 | [
"MIT"
] | 7 | 2021-03-30T22:06:05.000Z | 2021-03-30T22:06:08.000Z | setup.py | xingetouzi/Spirit | 0d298f0b608c3f3a2dbbc152a8da042eef6d2e05 | [
"MIT"
] | 6 | 2018-06-25T02:17:53.000Z | 2020-12-08T01:09:32.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import sys
import os
import io
from setuptools import setup, find_packages
BASE_DIR = os.path.join(os.path.dirname(__file__))
with io.open(os.path.join(BASE_DIR, 'README.md'), encoding='utf-8') as f:
README = f.read()
VERSIO... | 29.265625 | 81 | 0.662573 |
794c813d8f2ef8bcbf083737f0e01548ceee3649 | 9,604 | py | Python | ceilosca/tests/functional/api/v2/test_api_with_monasca_driver.py | b-com/ceilosca | fa130de7bb0fb0b5f481f455dd678071fb2a72c9 | [
"Apache-2.0"
] | null | null | null | ceilosca/tests/functional/api/v2/test_api_with_monasca_driver.py | b-com/ceilosca | fa130de7bb0fb0b5f481f455dd678071fb2a72c9 | [
"Apache-2.0"
] | null | null | null | ceilosca/tests/functional/api/v2/test_api_with_monasca_driver.py | b-com/ceilosca | fa130de7bb0fb0b5f481f455dd678071fb2a72c9 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2015 Hewlett Packard
#
# 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 wr... | 38.570281 | 78 | 0.556851 |
794c81636504cf46f4ef81b3be3229c4e6951504 | 546 | py | Python | easy_thumbnails/test_settings.py | emschorsch/easy-thumbnails | 769fddaada30eea9564ab459f120364da5888711 | [
"BSD-3-Clause"
] | 1 | 2021-11-08T09:45:52.000Z | 2021-11-08T09:45:52.000Z | easy_thumbnails/test_settings.py | emschorsch/easy-thumbnails | 769fddaada30eea9564ab459f120364da5888711 | [
"BSD-3-Clause"
] | null | null | null | easy_thumbnails/test_settings.py | emschorsch/easy-thumbnails | 769fddaada30eea9564ab459f120364da5888711 | [
"BSD-3-Clause"
] | null | null | null | import os
SITE_ID = 1
MEDIA_ROOT = os.path.normcase(os.path.dirname(os.path.abspath(__file__)))
MEDIA_URL = '/media/'
DATABASE_ENGINE = 'sqlite3'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
INSTALLED_APPS = [
'django.contrib.contenttypes',
... | 18.2 | 73 | 0.652015 |
794c829df5daea5f3f12925d88730e5f629a5fa8 | 203,703 | py | Python | py65/tests/devices/test_mpu6502.py | MorrisMA/py65 | bda1553ff88fc577944bde3d7cb3e75a3b83ccfa | [
"BSD-3-Clause"
] | null | null | null | py65/tests/devices/test_mpu6502.py | MorrisMA/py65 | bda1553ff88fc577944bde3d7cb3e75a3b83ccfa | [
"BSD-3-Clause"
] | null | null | null | py65/tests/devices/test_mpu6502.py | MorrisMA/py65 | bda1553ff88fc577944bde3d7cb3e75a3b83ccfa | [
"BSD-3-Clause"
] | null | null | null | import unittest
import sys
import Py65MAM.py65.assembler
import Py65MAM.py65.devices.mpu6502
class Common6502Tests:
"""Tests common to 6502-based microprocessors"""
# Reset
def test_reset_sets_registers_to_initial_states(self):
mpu = self._make_mpu()
mpu.reset()
self.assertEqual(... | 34.613934 | 79 | 0.593752 |
794c85ba1bb44b487c650fa2a187596f9eacf4c5 | 273 | py | Python | Estudo Python/Manipulando Textos/ex026.py | ErickFernan/Estudos-de-Pyhton | ce6818b7ba1fcede0d0e6708488a6f55f5ae6351 | [
"MIT"
] | null | null | null | Estudo Python/Manipulando Textos/ex026.py | ErickFernan/Estudos-de-Pyhton | ce6818b7ba1fcede0d0e6708488a6f55f5ae6351 | [
"MIT"
] | null | null | null | Estudo Python/Manipulando Textos/ex026.py | ErickFernan/Estudos-de-Pyhton | ce6818b7ba1fcede0d0e6708488a6f55f5ae6351 | [
"MIT"
] | null | null | null | frase = input('Digite uma frase: ').lower().strip(' ')
print('A letra "A" aparece {} vezes.'.format(frase.count('a')))
print('A letra "A" aparece a primeira vez em {}.'.format(frase.find('a')+1))
print('A última letra a aparece por ultimo em {}'.format(frase.rfind('a')+1)) | 68.25 | 77 | 0.655678 |
794c85d15a78376016c464a4ea85ac7b6f97d4e8 | 7,551 | py | Python | src/utilities/utils_images.py | robertsmoto/sodavault | 200e843be7abe6cc447647bba55c7c1309092e5e | [
"BSD-3-Clause"
] | null | null | null | src/utilities/utils_images.py | robertsmoto/sodavault | 200e843be7abe6cc447647bba55c7c1309092e5e | [
"BSD-3-Clause"
] | null | null | null | src/utilities/utils_images.py | robertsmoto/sodavault | 200e843be7abe6cc447647bba55c7c1309092e5e | [
"BSD-3-Clause"
] | null | null | null | from decouple import config
from django.utils import timezone
from imagekit import ImageSpec
from imagekit.processors import ResizeToFill
from sodavault.utils_logging import svlog_info
import boto3
import botocore
import os
def create_dir_size_var(fn: str, size: tuple) -> str:
# Create dirs
now = timezone.now... | 29.964286 | 76 | 0.629321 |
794c864fb5398ef11f8680a12b740344041063af | 19,931 | py | Python | tools/run-tests.py | ErcOneMOD/external_chromium_org_v8 | d4b68d974eaebae6c56acd20fda20c52112f6511 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | tools/run-tests.py | ErcOneMOD/external_chromium_org_v8 | d4b68d974eaebae6c56acd20fda20c52112f6511 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | tools/run-tests.py | ErcOneMOD/external_chromium_org_v8 | d4b68d974eaebae6c56acd20fda20c52112f6511 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2012 the V8 project authors. 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 code must retain the above copyright
# noti... | 38.625969 | 80 | 0.633285 |
794c8676a6d1638cb7b71e62ba7418e4dd0f7919 | 45,440 | py | Python | wildlifecompliance/components/users/api.py | mintcoding/wildlifecompliance | 28f5bb4ce3116fb62d836a39612c72a052e54ae1 | [
"Apache-2.0"
] | null | null | null | wildlifecompliance/components/users/api.py | mintcoding/wildlifecompliance | 28f5bb4ce3116fb62d836a39612c72a052e54ae1 | [
"Apache-2.0"
] | 3 | 2020-03-12T00:45:31.000Z | 2022-03-02T10:37:23.000Z | wildlifecompliance/components/users/api.py | mintcoding/wildlifecompliance | 28f5bb4ce3116fb62d836a39612c72a052e54ae1 | [
"Apache-2.0"
] | null | null | null | import re
import traceback
from django.db.models import Q
from django.db import transaction
from django.http import HttpResponse
from django.core.exceptions import ValidationError
from rest_framework import viewsets, serializers, views, status
#from rest_framework.decorators import detail_route, list_route
from rest_fr... | 42.46729 | 163 | 0.613644 |
794c86a250389728f63be756a8bb8b3f3b33b42a | 4,142 | py | Python | tools/quota-monitoring-alerting/python/src/common/lib/pubsub_lib.py | ruchirjain86/professional-services | 739ac0f5ffc8237f750804fa9f0f14d4d918a0fa | [
"Apache-2.0"
] | 2,116 | 2017-05-18T19:33:05.000Z | 2022-03-31T13:34:48.000Z | tools/quota-monitoring-alerting/python/src/common/lib/pubsub_lib.py | ruchirjain86/professional-services | 739ac0f5ffc8237f750804fa9f0f14d4d918a0fa | [
"Apache-2.0"
] | 548 | 2017-05-20T05:05:35.000Z | 2022-03-28T16:38:12.000Z | tools/quota-monitoring-alerting/python/src/common/lib/pubsub_lib.py | ruchirjain86/professional-services | 739ac0f5ffc8237f750804fa9f0f14d4d918a0fa | [
"Apache-2.0"
] | 1,095 | 2017-05-19T00:02:36.000Z | 2022-03-31T05:21:39.000Z | # Copyright 2021 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 required by applicable law or ag... | 29.375887 | 75 | 0.649445 |
794c87427087aadbee2661e46f69add11eaa75ed | 4,775 | py | Python | app/eg005_envelope_recipients.py | AaronWDS/eg-03-python-auth-code-grant | 6cb1694cbbb8cdbf166fda282e81886fd8380e5e | [
"MIT"
] | null | null | null | app/eg005_envelope_recipients.py | AaronWDS/eg-03-python-auth-code-grant | 6cb1694cbbb8cdbf166fda282e81886fd8380e5e | [
"MIT"
] | null | null | null | app/eg005_envelope_recipients.py | AaronWDS/eg-03-python-auth-code-grant | 6cb1694cbbb8cdbf166fda282e81886fd8380e5e | [
"MIT"
] | null | null | null | """005: List an envelope's recipients and status"""
from flask import render_template, url_for, redirect, session, flash, request
from os import path
import json
from app import ds_config, views
from docusign_esign import *
from docusign_esign.rest import ApiException
eg = "eg005" # reference (and url) for this exam... | 41.885965 | 110 | 0.588691 |
794c87cdb2b68febe98b9ab3c244e5202199ab05 | 5,950 | py | Python | PyTrinamic/examples/evalboards/TMC4671/TMC4671_eval_BLDC_ABN_encoder_offset_estimation.py | trinamic-AA/PyTrinamic | b054f4baae8eb6d3f5d2574cf69c232f66abb4ee | [
"MIT"
] | 37 | 2019-01-13T11:08:45.000Z | 2022-03-25T07:18:15.000Z | PyTrinamic/examples/evalboards/TMC4671/TMC4671_eval_BLDC_ABN_encoder_offset_estimation.py | AprDec/PyTrinamic | a9db10071f8fbeebafecb55c619e5893757dd0ce | [
"MIT"
] | 56 | 2019-02-25T02:48:27.000Z | 2022-03-31T08:45:34.000Z | PyTrinamic/examples/evalboards/TMC4671/TMC4671_eval_BLDC_ABN_encoder_offset_estimation.py | AprDec/PyTrinamic | a9db10071f8fbeebafecb55c619e5893757dd0ce | [
"MIT"
] | 26 | 2019-01-14T05:20:16.000Z | 2022-03-08T13:27:35.000Z | #!/usr/bin/env python3
'''
Created on 26.02.2019
@author: ED
'''
import time
from PyTrinamic.connections.ConnectionManager import ConnectionManager
from PyTrinamic.evalboards.TMC4671_eval import TMC4671_eval
from PyTrinamic.ic.TMC4671.TMC4671 import TMC4671 as TMC4671_IC
from PyTrinamic.connections.uart_ic... | 35.416667 | 164 | 0.771597 |
794c883318d96411c1d7c5991eaebafa3551e364 | 448 | py | Python | cfgread/cfg03.py | MarkDuenas/mycode | 99f5a83ee8448b565a8d53e1c62a12bdfd2cc6ad | [
"MIT"
] | null | null | null | cfgread/cfg03.py | MarkDuenas/mycode | 99f5a83ee8448b565a8d53e1c62a12bdfd2cc6ad | [
"MIT"
] | null | null | null | cfgread/cfg03.py | MarkDuenas/mycode | 99f5a83ee8448b565a8d53e1c62a12bdfd2cc6ad | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
## create file object in "r"ead mode
file_name = input("Enter file to read: \n")
with open(file_name, "r") as configfile:
## readlines() creates a list by reading target
## file line by line
configlist = configfile.readlines()
## file was just auto closed (no more indenting)
## ea... | 28 | 57 | 0.703125 |
794c8860b3c5882eb1510bc1b029f1df84aadfdc | 1,617 | py | Python | xls_to_cs.py | wryl/ET_xls_to_cs | 18b0b5a22c4e5aca238431b57eb37c5366320d4c | [
"MIT"
] | null | null | null | xls_to_cs.py | wryl/ET_xls_to_cs | 18b0b5a22c4e5aca238431b57eb37c5366320d4c | [
"MIT"
] | null | null | null | xls_to_cs.py | wryl/ET_xls_to_cs | 18b0b5a22c4e5aca238431b57eb37c5366320d4c | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# coding=utf-8
import codecs
import copy
import os
import traceback
from itertools import groupby
import time,datetime
import sys
from jinja2 import Environment, FileSystemLoader
import xlrd
def get_action_fullname(onerow,offset=0):
"""获取完整名称
:param onerow: 一行数据
:param offset: 是否... | 28.368421 | 89 | 0.709957 |
794c886d9799bf4d1e386f5e6c4d06ae24800764 | 1,911 | py | Python | dynamo/tools/dynamo_bk.py | davisidarta/dynamo-release | 0dbd769f52ea07f3cdaa8fb31022ceb89938c382 | [
"BSD-3-Clause"
] | null | null | null | dynamo/tools/dynamo_bk.py | davisidarta/dynamo-release | 0dbd769f52ea07f3cdaa8fb31022ceb89938c382 | [
"BSD-3-Clause"
] | null | null | null | dynamo/tools/dynamo_bk.py | davisidarta/dynamo-release | 0dbd769f52ea07f3cdaa8fb31022ceb89938c382 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from scipy.optimize import least_squares
from sklearn.decomposition import TruncatedSVD
from sklearn.manifold import TSNE
from sklearn.neighbors import NearestNeighbors
from scipy.stats import norm as normal
def sol_u(t, u0, alpha, beta):
return u0 * np.exp(-beta * t) + alpha / beta * (1 - np.e... | 23.024096 | 77 | 0.56044 |
794c88a2e03cf983adddc8b2f0ac53fc4027da4f | 394 | py | Python | python/237_Delete_Node_in_a_Linked_List.py | dvlpsh/leetcode-1 | f965328af72113ac8a5a9d6624868c1502be937b | [
"MIT"
] | 4,416 | 2016-03-30T15:02:26.000Z | 2022-03-31T16:31:03.000Z | python/237_Delete_Node_in_a_Linked_List.py | YinpuLi/leetcode-6 | 1371de2631d745efba39de41b51c3424e35da434 | [
"MIT"
] | 20 | 2018-11-17T13:46:25.000Z | 2022-03-13T05:37:06.000Z | python/237_Delete_Node_in_a_Linked_List.py | YinpuLi/leetcode-6 | 1371de2631d745efba39de41b51c3424e35da434 | [
"MIT"
] | 1,374 | 2017-05-26T15:44:30.000Z | 2022-03-30T19:21:02.000Z | # Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def deleteNode(self, node):
"""
:type node: ListNode
:rtype: void Do not return anything, modify node in-place instead.
... | 28.142857 | 74 | 0.583756 |
794c88eed627452f97f98c21e424cdd3c4ac8fb7 | 1,422 | py | Python | data_structures/graphs/mother_vertex.py | ruler30cm/python-ds | f84605c5b746ea1d46de3d00b86f5fba399445c7 | [
"MIT"
] | 1,723 | 2019-07-30T07:06:22.000Z | 2022-03-31T15:22:22.000Z | data_structures/graphs/mother_vertex.py | ruler30cm/python-ds | f84605c5b746ea1d46de3d00b86f5fba399445c7 | [
"MIT"
] | 213 | 2019-10-06T08:07:47.000Z | 2021-10-04T15:38:36.000Z | data_structures/graphs/mother_vertex.py | ruler30cm/python-ds | f84605c5b746ea1d46de3d00b86f5fba399445c7 | [
"MIT"
] | 628 | 2019-10-06T10:26:25.000Z | 2022-03-31T01:41:00.000Z | """
A mother vertex is a vertex such that all other vertices
can be reached by a path from this vertex
Reference - https://www.geeksforgeeks.org/find-a-mother-vertex-in-a-graph/
Time complexity - 2 * O(V + E) = O(V + E)
"""
from collections import defaultdict
class Graph:
def __init__(self, vertices):
... | 21.545455 | 74 | 0.563994 |
794c89ef7a77e2fd063586136cf0aaaf73c3d385 | 7,240 | py | Python | CNN_Model/run_3d_cnn.py | jessecha/OPCAS | 2b51543b4ad1ee37dba2e45a0c7d0b872309d418 | [
"MIT"
] | 1 | 2021-02-28T05:58:50.000Z | 2021-02-28T05:58:50.000Z | CNN_Model/run_3d_cnn.py | jessecha/OPCAS | 2b51543b4ad1ee37dba2e45a0c7d0b872309d418 | [
"MIT"
] | null | null | null | CNN_Model/run_3d_cnn.py | jessecha/OPCAS | 2b51543b4ad1ee37dba2e45a0c7d0b872309d418 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import numpy as np
import cv2
import tensorflow as tf
from keras.backend.tensorflow_backend import set_session
config = tf.ConfigProto(allow_soft_placement=True, device_count = {'CPU' : 1... | 37.512953 | 90 | 0.62942 |
794c8a90d5288df252b14f1633cf278a9ff6c27f | 7,167 | py | Python | models/sentiment_train_model.py | PierreLessard/Public-Morale-Over-Covid | 14d8d7616a1b17dc2e6b5f76ccad09f7630da28a | [
"Apache-2.0"
] | 1 | 2021-12-11T22:36:30.000Z | 2021-12-11T22:36:30.000Z | models/sentiment_train_model.py | PierreLessard/Public-Morale-Over-Covid | 14d8d7616a1b17dc2e6b5f76ccad09f7630da28a | [
"Apache-2.0"
] | null | null | null | models/sentiment_train_model.py | PierreLessard/Public-Morale-Over-Covid | 14d8d7616a1b17dc2e6b5f76ccad09f7630da28a | [
"Apache-2.0"
] | 3 | 2021-12-11T07:31:31.000Z | 2021-12-12T05:10:25.000Z | """Structure for model trainer loosely taken from:
https://realpython.com/sentiment-analysis-python mainly for guide on spacy.
dataset used is from https://ai.stanford.edu/~amaas/data/sentiment/
using version 2.3.5 of spacy as version 3 includes api issues when trying to use en cor web sm
"""
import os
from random impo... | 42.660714 | 165 | 0.646993 |
794c8ab042c5f06e5b6f490a3b743929cc218205 | 15,515 | py | Python | contrib/dokku-installer.py | Lieunoir/dokku | aa13be80a39e764c159fab577e377b362c5f6588 | [
"MIT"
] | null | null | null | contrib/dokku-installer.py | Lieunoir/dokku | aa13be80a39e764c159fab577e377b362c5f6588 | [
"MIT"
] | null | null | null | contrib/dokku-installer.py | Lieunoir/dokku | aa13be80a39e764c159fab577e377b362c5f6588 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import cgi
import json
import os
import re
import shutil
try:
import SimpleHTTPServer
import SocketServer
except ImportError:
import http.server as SimpleHTTPServer
import socketserver as SocketServer
import subprocess
import sys
import threading
VERSION = 'v0.23.7'
def bytes_t... | 35.341686 | 418 | 0.594135 |
794c8c145ef375791bc4971551a65862414b5af7 | 120 | py | Python | hackerrank/contest/wfr2016_a.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | 1 | 2018-11-12T15:18:55.000Z | 2018-11-12T15:18:55.000Z | hackerrank/contest/wfr2016_a.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | null | null | null | hackerrank/contest/wfr2016_a.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | null | null | null | N = int(input())
ans = []
i = 0
while N >> i:
if (N >> i) & 1:
ans.append(i+1)
i += 1
print(*ans[::-1])
| 13.333333 | 23 | 0.4 |
794c8c21c46d0edd2c83d50f41f9005f72c75342 | 10,389 | py | Python | aws_topology/tests/conftest.py | StackVista/stackstate-agent-integrations | 93f07da060ad09a36361cd8f3a037a531e9bb74e | [
"BSD-3-Clause"
] | 2 | 2020-03-10T13:21:37.000Z | 2021-04-01T07:52:16.000Z | aws_topology/tests/conftest.py | StackVista/stackstate-agent-integrations | 93f07da060ad09a36361cd8f3a037a531e9bb74e | [
"BSD-3-Clause"
] | 33 | 2020-02-05T16:18:32.000Z | 2022-03-21T14:08:04.000Z | aws_topology/tests/conftest.py | StackVista/stackstate-agent-integrations | 93f07da060ad09a36361cd8f3a037a531e9bb74e | [
"BSD-3-Clause"
] | 7 | 2020-03-10T13:21:39.000Z | 2021-03-11T07:16:44.000Z | # (C) StackState 2021
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import pytest
import unittest
import os
import json
from mock import patch
from stackstate_checks.base.stubs import topology as top, aggregator
from stackstate_checks.aws_topology import AwsTopologyCheck, InitConfig
... | 33.512903 | 119 | 0.618731 |
794c8c54ade42fa21ffe9dd7582d657aad49c03c | 12,552 | py | Python | saleor/graphql/shop/types.py | Tobos20/saleor | ecb43299360d282733d36df9a9b1488a3d8ed7dd | [
"CC-BY-4.0"
] | null | null | null | saleor/graphql/shop/types.py | Tobos20/saleor | ecb43299360d282733d36df9a9b1488a3d8ed7dd | [
"CC-BY-4.0"
] | null | null | null | saleor/graphql/shop/types.py | Tobos20/saleor | ecb43299360d282733d36df9a9b1488a3d8ed7dd | [
"CC-BY-4.0"
] | null | null | null | from typing import Optional
import graphene
from django.conf import settings
from django.utils import translation
from django_countries import countries
from django_prices_vatlayer.models import VAT
from phonenumbers import COUNTRY_CODE_TO_REGION_CODE
from ...account import models as account_models
from ...core.permi... | 36.488372 | 88 | 0.704908 |
794c8d7e10e60b227fde22fbc2285c068044edec | 1,727 | py | Python | daemons/useq_nextcloud_monitor.py | UMCUGenetics/USEQ_tools | fb003c34b965c9648a6c4dc960235f0fee526ac0 | [
"MIT"
] | null | null | null | daemons/useq_nextcloud_monitor.py | UMCUGenetics/USEQ_tools | fb003c34b965c9648a6c4dc960235f0fee526ac0 | [
"MIT"
] | 2 | 2021-03-31T20:12:34.000Z | 2021-11-22T14:33:22.000Z | daemons/useq_nextcloud_monitor.py | UMCUGenetics/USEQ_tools | fb003c34b965c9648a6c4dc960235f0fee526ac0 | [
"MIT"
] | null | null | null | from config import NEXTCLOUD_HOST,NEXTCLOUD_WEBDAV_ROOT,NEXTCLOUD_RAW_DIR,NEXTCLOUD_PROCESSED_DIR,NEXTCLOUD_LOG_DIR,MAIL_SENDER, NEXTCLOUD_USER, NEXTCLOUD_PW, NEXTCLOUD_STORAGE, NEXTCLOUD_MAX,MAIL_SENDER,MAIL_ADMINS,NEXTCLOUD_MANUAL_DIR
from modules.useq_nextcloud import NextcloudUtil
from modules.useq_template impor... | 36.744681 | 237 | 0.749855 |
794c8dec9aad8667eba821523e36efec533754e1 | 5,533 | py | Python | scipy_central/filestorage/models.py | wqshi/test | 63dc0c684ec749cd03e9c071176f30f439188f14 | [
"BSD-3-Clause"
] | null | null | null | scipy_central/filestorage/models.py | wqshi/test | 63dc0c684ec749cd03e9c071176f30f439188f14 | [
"BSD-3-Clause"
] | null | null | null | scipy_central/filestorage/models.py | wqshi/test | 63dc0c684ec749cd03e9c071176f30f439188f14 | [
"BSD-3-Clause"
] | null | null | null | from django.db import models
from django.conf import settings
from scipy_central import utils
from django.utils.datastructures import SortedDict
from dvcs_wrapper import DVCSError, DVCSRepo
# Python imports
import os
import logging
import shutil
storage_dir = settings.SPC['storage_dir']
backend = settings.SPC['revisio... | 33.331325 | 89 | 0.586662 |
794c8fc6ee36d1e8e7ab648e588cd6acc7d8607b | 9,001 | py | Python | gui/qt/utxo_list.py | acidsploit/Electron-Cash | 5f6799c97bc25dcb869720a61e8ba8d1b900db17 | [
"MIT"
] | null | null | null | gui/qt/utxo_list.py | acidsploit/Electron-Cash | 5f6799c97bc25dcb869720a61e8ba8d1b900db17 | [
"MIT"
] | null | null | null | gui/qt/utxo_list.py | acidsploit/Electron-Cash | 5f6799c97bc25dcb869720a61e8ba8d1b900db17 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2015 Thomas Voegtlin
#
# 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... | 51.729885 | 138 | 0.627264 |
794c90c8c169cabde9aed5afa454f0aef4f237d4 | 4,568 | py | Python | aioboto3/session.py | VeevaLabs/aioboto3 | e760c336d4ef8c09df43e6bf919daf88ed1ef382 | [
"Apache-2.0"
] | null | null | null | aioboto3/session.py | VeevaLabs/aioboto3 | e760c336d4ef8c09df43e6bf919daf88ed1ef382 | [
"Apache-2.0"
] | null | null | null | aioboto3/session.py | VeevaLabs/aioboto3 | e760c336d4ef8c09df43e6bf919daf88ed1ef382 | [
"Apache-2.0"
] | 1 | 2022-02-17T08:17:21.000Z | 2022-02-17T08:17:21.000Z | # -*- coding: utf-8 -*-
"""
This class essentially overrides the boto3 session init, passing in
an async botocore session
"""
import aiobotocore.session
import boto3.session
import boto3.resources.base
import boto3.utils
from aioboto3.resources import AIOBoto3ResourceFactory
class Session(boto3.session.Session):
... | 38.066667 | 76 | 0.652802 |
794c918ff378092d6106f7600fb011636d2d708e | 739 | py | Python | dapr/actor/runtime/reentrancy_context.py | willtsai/python-sdk | 7de59720cd30e02a5fa2a90fb43eb5bb93c0f63e | [
"Apache-2.0"
] | 125 | 2019-10-16T17:57:22.000Z | 2022-03-08T09:16:01.000Z | dapr/actor/runtime/reentrancy_context.py | willtsai/python-sdk | 7de59720cd30e02a5fa2a90fb43eb5bb93c0f63e | [
"Apache-2.0"
] | 319 | 2019-10-17T13:49:23.000Z | 2022-03-31T19:32:53.000Z | dapr/actor/runtime/reentrancy_context.py | willtsai/python-sdk | 7de59720cd30e02a5fa2a90fb43eb5bb93c0f63e | [
"Apache-2.0"
] | 69 | 2019-10-23T23:22:56.000Z | 2022-03-16T13:27:17.000Z | # -*- coding: utf-8 -*-
"""
Copyright 2021 The Dapr Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | 36.95 | 86 | 0.782138 |
794c91c289b862881ca111da6e84567f519adf61 | 687 | py | Python | mysite/learn4/views.py | jasongwq/MySite | 72b89f8c830554e9d31a7d0bb1a5fa715666c51c | [
"MIT"
] | null | null | null | mysite/learn4/views.py | jasongwq/MySite | 72b89f8c830554e9d31a7d0bb1a5fa715666c51c | [
"MIT"
] | null | null | null | mysite/learn4/views.py | jasongwq/MySite | 72b89f8c830554e9d31a7d0bb1a5fa715666c51c | [
"MIT"
] | null | null | null | from django.http import HttpResponse
from django.shortcuts import render
try:
from django.http import JsonResponse
except ImportError:
from .tool import JsonResponse
def index(request):
return render(request, 'index.html')
def add(request):
a = request.GET['a']
b = request.GET['b']
a = int(a... | 23.689655 | 81 | 0.700146 |
794c91dddc1930072bbe133c1ec21e028db1bb02 | 1,865 | py | Python | catalyst/dl/meters/classerrormeter.py | andrey-avdeev/catalyst | fd17aaba7775c99b7e2b1ce86e60aa8f2379acc3 | [
"Apache-2.0"
] | 46 | 2020-03-27T20:12:32.000Z | 2021-11-21T19:08:51.000Z | catalyst/dl/meters/classerrormeter.py | andrey-avdeev/catalyst | fd17aaba7775c99b7e2b1ce86e60aa8f2379acc3 | [
"Apache-2.0"
] | 2 | 2020-04-06T10:43:04.000Z | 2020-07-01T18:26:10.000Z | catalyst/dl/meters/classerrormeter.py | andrey-avdeev/catalyst | fd17aaba7775c99b7e2b1ce86e60aa8f2379acc3 | [
"Apache-2.0"
] | 5 | 2020-04-17T14:09:53.000Z | 2021-05-10T08:58:29.000Z | import numbers
import numpy as np
import torch
from . import meter
class ClassErrorMeter(meter.Meter):
def __init__(self, topk=[1], accuracy=False):
super(ClassErrorMeter, self).__init__()
self.topk = np.sort(topk)
self.accuracy = accuracy
self.reset()
def reset(self):
... | 32.155172 | 77 | 0.541019 |
794c92127a19f7086fcea770597ffd303456dbc2 | 288 | py | Python | pfa/postfix/forms.py | fretscha/pfa | 88de7994779d893cef8e762111d2789bfde96095 | [
"BSD-3-Clause"
] | 1 | 2015-01-24T13:29:58.000Z | 2015-01-24T13:29:58.000Z | pfa/postfix/forms.py | fretscha/pfa | 88de7994779d893cef8e762111d2789bfde96095 | [
"BSD-3-Clause"
] | null | null | null | pfa/postfix/forms.py | fretscha/pfa | 88de7994779d893cef8e762111d2789bfde96095 | [
"BSD-3-Clause"
] | 3 | 2015-01-25T19:48:31.000Z | 2021-01-08T20:49:50.000Z | from __future__ import absolute_import
from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, ButtonHolder, Submit
from . import models
class DomainForm(forms.ModelForm):
class Mata:
fields = ('domain', 'mailboxes',)
| 19.2 | 60 | 0.767361 |
794c92e0bbaf6d4c072a29634eb08f0a347c1b1b | 3,523 | py | Python | proj/shared_settings.py | NBISweden/web_scampi2 | dbe70421109fdb5e556d014d56bbe0e540476461 | [
"MIT"
] | 1 | 2021-03-25T13:12:17.000Z | 2021-03-25T13:12:17.000Z | proj/shared_settings.py | NBISweden/web_scampi2 | dbe70421109fdb5e556d014d56bbe0e540476461 | [
"MIT"
] | 14 | 2019-04-24T09:10:56.000Z | 2022-03-29T08:12:17.000Z | proj/shared_settings.py | nanjiangshu/web_boctopus2 | 8c925db93568f1419b57397027a083213024f3c1 | [
"MIT"
] | 1 | 2018-09-17T19:33:57.000Z | 2018-09-17T19:33:57.000Z | """
Shared settings
Django settings for the project 'proj'
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
# Build paths inside the project like this: os.path.joi... | 25.904412 | 91 | 0.643486 |
794c93102c01c96f739704ed941805e5dcd6d5d9 | 769 | py | Python | authorityControl/postOverwrite.py | cul/archivesspace | 9c088d4495cf1006c7d02ed2850224a9d28b35c1 | [
"MIT"
] | 4 | 2018-12-13T16:18:30.000Z | 2020-02-14T14:01:28.000Z | authorityControl/postOverwrite.py | cul/archivesspace | 9c088d4495cf1006c7d02ed2850224a9d28b35c1 | [
"MIT"
] | null | null | null | authorityControl/postOverwrite.py | cul/archivesspace | 9c088d4495cf1006c7d02ed2850224a9d28b35c1 | [
"MIT"
] | 2 | 2019-09-03T19:15:24.000Z | 2020-12-01T20:27:14.000Z | import json
import requests
import secrets
import time
startTime = time.time()
baseURL = secrets.baseURL
user = secrets.user
password = secrets.password
auth = requests.post(baseURL + '/users/'+user+'/login?password='+password).json()
session = auth["session"]
headers = {'X-ArchivesSpace-Session':session, 'Content_T... | 28.481481 | 81 | 0.689207 |
794c9311a3a5835c9f28c3df4a64cbc9188b4721 | 1,300 | py | Python | src/OTLMOW/OTLModel/Datatypes/KlVormSchermelement.py | davidvlaminck/OTLClassPython | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | 2 | 2022-02-01T08:58:11.000Z | 2022-02-08T13:35:17.000Z | src/OTLMOW/OTLModel/Datatypes/KlVormSchermelement.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | src/OTLMOW/OTLModel/Datatypes/KlVormSchermelement.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | # coding=utf-8
from OTLMOW.OTLModel.Datatypes.KeuzelijstField import KeuzelijstField
from OTLMOW.OTLModel.Datatypes.KeuzelijstWaarde import KeuzelijstWaarde
# Generated with OTLEnumerationCreator. To modify: extend, do not edit
class KlVormSchermelement(KeuzelijstField):
"""Deze keuzelijst geeft aan of het scherm... | 52 | 130 | 0.65 |
794c93168fdeaf93fe0a2ca41c2c6bc71f0794e2 | 11,129 | py | Python | core/storage/story/gae_models.py | apoorva-saxena-test/oppia | f9e1e8d4f2f9f48efef121a720459f98ecb08ddf | [
"Apache-2.0"
] | null | null | null | core/storage/story/gae_models.py | apoorva-saxena-test/oppia | f9e1e8d4f2f9f48efef121a720459f98ecb08ddf | [
"Apache-2.0"
] | null | null | null | core/storage/story/gae_models.py | apoorva-saxena-test/oppia | f9e1e8d4f2f9f48efef121a720459f98ecb08ddf | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 40.616788 | 82 | 0.696559 |
794c950d26b3939ef246cd4b151bb2643194601f | 15,158 | py | Python | Packs/FireEye-Detection-on-Demand/Integrations/FireEye-Detection-on-Demand/FireEye-Detection-on-Demand.py | mckibbenc/content | 2a54b699ea8b2f73afd48393c5104be258935b5d | [
"MIT"
] | null | null | null | Packs/FireEye-Detection-on-Demand/Integrations/FireEye-Detection-on-Demand/FireEye-Detection-on-Demand.py | mckibbenc/content | 2a54b699ea8b2f73afd48393c5104be258935b5d | [
"MIT"
] | null | null | null | Packs/FireEye-Detection-on-Demand/Integrations/FireEye-Detection-on-Demand/FireEye-Detection-on-Demand.py | mckibbenc/content | 2a54b699ea8b2f73afd48393c5104be258935b5d | [
"MIT"
] | null | null | null | from typing import Any, Dict, List, Optional, Tuple
import dateparser
import demistomock as demisto
import requests
from CommonServerPython import * # noqa: F401
# Disable insecure warnings
requests.packages.urllib3.disable_warnings()
''' CONSTANTS '''
DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ'
''' CLIENT CLASS '''
c... | 33.684444 | 120 | 0.609975 |
794c96459df2f5ab5ab9c92458e818aeba34e390 | 7,072 | py | Python | flit/init.py | Zaab1t/flit | 58e8eaf224c11c5ad4bb7ff06350f95989bbb867 | [
"BSD-3-Clause"
] | 1 | 2020-07-22T19:50:08.000Z | 2020-07-22T19:50:08.000Z | flit/init.py | Mariatta/flit | 0a44f806f1689b6ae5d9e4c0b82e3b5094ab32a2 | [
"BSD-3-Clause"
] | null | null | null | flit/init.py | Mariatta/flit | 0a44f806f1689b6ae5d9e4c0b82e3b5094ab32a2 | [
"BSD-3-Clause"
] | null | null | null | from collections import OrderedDict
from datetime import date
import json
import os
from pathlib import Path
import re
import sys
import pytoml as toml
def get_data_dir():
"""Get the directory path for flit user data files.
"""
home = os.path.realpath(os.path.expanduser('~'))
if sys.platform == 'darwi... | 34.837438 | 104 | 0.56349 |
794c96bb486bafbda42421d3069815190e1464f6 | 194 | py | Python | filer/server/main_server_urls.py | PeterW-LWL/django-filer | 472a0419bfa185a8b0a861bd0779ac6d817082c7 | [
"BSD-3-Clause"
] | 134 | 2015-01-01T17:57:03.000Z | 2021-11-01T15:21:47.000Z | filer/server/main_server_urls.py | PeterW-LWL/django-filer | 472a0419bfa185a8b0a861bd0779ac6d817082c7 | [
"BSD-3-Clause"
] | 143 | 2015-01-05T04:53:01.000Z | 2015-11-27T14:44:29.000Z | filer/server/main_server_urls.py | PeterW-LWL/django-filer | 472a0419bfa185a8b0a861bd0779ac6d817082c7 | [
"BSD-3-Clause"
] | 86 | 2015-01-05T13:05:25.000Z | 2021-04-03T01:36:15.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^(?P<path>.*)$', views.serve_protected_file),
]
| 16.166667 | 55 | 0.680412 |
794c9731cb2ed5a2b32c2594f7b917bd24737cf5 | 1,641 | py | Python | app/api/models.py | deckTECHeu/profiles-rest-api | 031a917f2c5dfbccca60ffec4c55addf57433e61 | [
"MIT"
] | null | null | null | app/api/models.py | deckTECHeu/profiles-rest-api | 031a917f2c5dfbccca60ffec4c55addf57433e61 | [
"MIT"
] | 6 | 2021-03-19T11:56:01.000Z | 2022-02-10T10:35:55.000Z | app/api/models.py | deckTECHeu/profiles-rest-api | 031a917f2c5dfbccca60ffec4c55addf57433e61 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractBaseUser
from django.contrib.auth.models import PermissionsMixin
from django.contrib.auth.models import BaseUserManager
class UserProfileManager(BaseUserManager):
"""Manager for user profiles"""
def create_user(self, email, name, pas... | 28.789474 | 64 | 0.675807 |
794c9732fd94b9e9e48dbc4d2aa03f9c131e2674 | 715 | py | Python | odoo-13.0/addons/website_membership/models/membership.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/addons/website_membership/models/membership.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/addons/website_membership/models/membership.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | 1 | 2021-05-05T07:59:08.000Z | 2021-05-05T07:59:08.000Z | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class MembershipLine(models.Model):
_inherit = 'membership.membership_line'
def get_published_companies(self, limit=None):
if not self.ids:
return []
limit_c... | 35.75 | 100 | 0.641958 |
794c97b618476d2dc555fbd17578ab10a79ece13 | 57,041 | py | Python | openmc/settings.py | SamPUG/openmc | 70c19dfef4991c5f89161a87868f109c47efc76d | [
"MIT"
] | 1 | 2020-11-19T14:46:10.000Z | 2020-11-19T14:46:10.000Z | openmc/settings.py | SamPUG/openmc | 70c19dfef4991c5f89161a87868f109c47efc76d | [
"MIT"
] | 2 | 2020-02-24T15:13:15.000Z | 2020-03-17T18:59:22.000Z | openmc/settings.py | SamPUG/openmc | 70c19dfef4991c5f89161a87868f109c47efc76d | [
"MIT"
] | null | null | null | from collections.abc import Iterable, MutableSequence, Mapping
from pathlib import Path
from numbers import Real, Integral
import warnings
from xml.etree import ElementTree as ET
import sys
import numpy as np
from openmc._xml import clean_indentation, get_text
import openmc.checkvalue as cv
from openmc import VolumeC... | 39.833101 | 89 | 0.641276 |
794c980fbca3983f92f4c1ecc44bf1122316d515 | 6,279 | py | Python | venus/solver/milp_solver.py | vas-group-imperial/venus2 | c0fa7f095a0b3fdaff93fc5e7d948035fae6412a | [
"BSD-2-Clause"
] | null | null | null | venus/solver/milp_solver.py | vas-group-imperial/venus2 | c0fa7f095a0b3fdaff93fc5e7d948035fae6412a | [
"BSD-2-Clause"
] | null | null | null | venus/solver/milp_solver.py | vas-group-imperial/venus2 | c0fa7f095a0b3fdaff93fc5e7d948035fae6412a | [
"BSD-2-Clause"
] | null | null | null | # ************
# File: milp_solver.py
# Top contributors (to current version):
# Panagiotis Kouvaros (panagiotis.kouvaros@gmail.com)
# This file is part of the Venus project.
# Copyright: 2019-2021 by the authors listed in the AUTHORS file in the
# top-level directory.
# License: BSD 2-Clause (see the file LICENSE i... | 33.222222 | 105 | 0.620003 |
794c99ff77ff67a8d37d03b7193ae8a280cacc8e | 1,187 | py | Python | test/test_bill_of_materials_api.py | altoyield/python-beanieclient | 448b8dd328054eaf32dd7d0bdff700e603b5c27d | [
"Apache-2.0"
] | null | null | null | test/test_bill_of_materials_api.py | altoyield/python-beanieclient | 448b8dd328054eaf32dd7d0bdff700e603b5c27d | [
"Apache-2.0"
] | null | null | null | test/test_bill_of_materials_api.py | altoyield/python-beanieclient | 448b8dd328054eaf32dd7d0bdff700e603b5c27d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Beanie ERP API
An API specification for interacting with the Beanie ERP system # noqa: E501
OpenAPI spec version: 0.2
Contact: dev@bean.ie
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import be... | 21.581818 | 86 | 0.67818 |
794c9a081f9669dda491a9d0b80149a21d11f873 | 2,529 | py | Python | tests/query_test/test_tpch_queries.py | henryr/minimised-impala | 264d20a4f02ece6ee94e96bc49db2825b0bb1548 | [
"Apache-2.0"
] | null | null | null | tests/query_test/test_tpch_queries.py | henryr/minimised-impala | 264d20a4f02ece6ee94e96bc49db2825b0bb1548 | [
"Apache-2.0"
] | null | null | null | tests/query_test/test_tpch_queries.py | henryr/minimised-impala | 264d20a4f02ece6ee94e96bc49db2825b0bb1548 | [
"Apache-2.0"
] | 2 | 2019-09-22T07:59:28.000Z | 2021-02-25T21:56:07.000Z | # Copyright (c) 2012 Cloudera, Inc. All rights reserved.
# Functional tests running the TPCH workload.
#
import logging
import pytest
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestTpchQuery(ImpalaTestSuite):
@classmethod
def get_workload(self):
return 'tpch'
@... | 27.791209 | 82 | 0.718861 |
794c9a28ecfe104824f399e809595264758666f7 | 2,351 | py | Python | DQMOffline/Muon/python/muonQualityTests_cff.py | gputtley/cmssw | c1ef8454804e4ebea8b65f59c4a952a6c94fde3b | [
"Apache-2.0"
] | 2 | 2020-01-27T15:21:37.000Z | 2020-05-11T11:13:18.000Z | DQMOffline/Muon/python/muonQualityTests_cff.py | gputtley/cmssw | c1ef8454804e4ebea8b65f59c4a952a6c94fde3b | [
"Apache-2.0"
] | 26 | 2018-10-30T12:47:58.000Z | 2022-03-29T08:39:00.000Z | DQMOffline/Muon/python/muonQualityTests_cff.py | gputtley/cmssw | c1ef8454804e4ebea8b65f59c4a952a6c94fde3b | [
"Apache-2.0"
] | 3 | 2019-03-09T13:06:43.000Z | 2020-07-03T00:47:30.000Z | import FWCore.ParameterSet.Config as cms
# the clients
from DQM.TrackingMonitor.ClientTrackEfficiencySTACosmicMuons_cff import *
from DQM.TrackingMonitor.ClientTrackEfficiencyTkTracks_cff import *
from DQMOffline.Muon.trackResidualsTest_cfi import *
from DQMOffline.Muon.muonRecoTest_cfi import *
from DQMOffline.Muon.m... | 45.211538 | 79 | 0.578477 |
794c9c120d7c188b74b14699a5022a739d98cbca | 17,228 | py | Python | visual/plot_imp_matrix.py | BuysDB/siCloneFitIO | b5b1ff320d13e8fe1062a1ed5d55ab161daa9644 | [
"MIT"
] | 2 | 2019-11-27T20:26:55.000Z | 2022-02-16T11:15:55.000Z | visual/plot_imp_matrix.py | BuysDB/siCloneFitIO | b5b1ff320d13e8fe1062a1ed5d55ab161daa9644 | [
"MIT"
] | null | null | null | visual/plot_imp_matrix.py | BuysDB/siCloneFitIO | b5b1ff320d13e8fe1062a1ed5d55ab161daa9644 | [
"MIT"
] | 1 | 2020-06-04T13:54:28.000Z | 2020-06-04T13:54:28.000Z | #!/usr/bin/env python3
import warnings
warnings.filterwarnings("ignore")
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import matplotlib
import seaborn as sns
import os
import sparsebinarydistance.distance as distance
import traceback
matplotlib.rcParams['f... | 45.57672 | 152 | 0.609589 |
794c9d2a981a50b275fcd25311d5b7fdedb403de | 534 | py | Python | telegram_chat/bot.py | joao-coimbra/easy-python-telegram | ffbf8959bff83e9c5a712bc49c8a269faa28f047 | [
"MIT"
] | null | null | null | telegram_chat/bot.py | joao-coimbra/easy-python-telegram | ffbf8959bff83e9c5a712bc49c8a269faa28f047 | [
"MIT"
] | null | null | null | telegram_chat/bot.py | joao-coimbra/easy-python-telegram | ffbf8959bff83e9c5a712bc49c8a269faa28f047 | [
"MIT"
] | null | null | null | import telegram
import logging
import os
from telegram_chat.keys import *
logging.basicConfig(
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
level=logging.INFO
)
bot = telegram.Bot(
token=TELEGRAM_TOKEN
)
def sendMessage(text):
bot.sendMessage(
chat_id=CHAT_ID,
text=text
)
d... | 18.413793 | 64 | 0.632959 |
794c9dcc5dc1e71d3d49b243901a73c349ca855e | 6,037 | py | Python | train.py | jsheng7/DeepCovidXR | 7bf794d8225bcfa2adff96676013663453077a71 | [
"MIT"
] | null | null | null | train.py | jsheng7/DeepCovidXR | 7bf794d8225bcfa2adff96676013663453077a71 | [
"MIT"
] | null | null | null | train.py | jsheng7/DeepCovidXR | 7bf794d8225bcfa2adff96676013663453077a71 | [
"MIT"
] | null | null | null | # Train an individual model
import argparse
import os
from utils import imgUtils, trainFeatures
import pickle
def get_args():
# Implement command line argument
parser = argparse.ArgumentParser(description='Train a model on a given dataset.')
parser.add_argument('-m', '--model', dest='model_name', meta... | 42.216783 | 133 | 0.656286 |
794c9e9d37a0f20097f5fb43a6d0a61bd9b521cb | 25,757 | py | Python | selfdrive/car/volkswagen/values.py | kansakitw/dragonpilotamd | 83295e6746e685b22e218bd0bd943df674e42a81 | [
"MIT"
] | 46 | 2021-05-20T08:54:54.000Z | 2022-03-30T20:37:42.000Z | selfdrive/car/volkswagen/values.py | kansakitw/dragonpilotamd | 83295e6746e685b22e218bd0bd943df674e42a81 | [
"MIT"
] | 10 | 2020-07-17T14:50:38.000Z | 2022-03-08T15:40:52.000Z | selfdrive/car/volkswagen/values.py | kansakitw/dragonpilotamd | 83295e6746e685b22e218bd0bd943df674e42a81 | [
"MIT"
] | 130 | 2020-08-19T04:20:02.000Z | 2022-03-24T23:05:22.000Z | # flake8: noqa
from collections import defaultdict
from typing import Dict
from cereal import car
from selfdrive.car import dbc_dict
Ecu = car.CarParams.Ecu
NetworkLocation = car.CarParams.NetworkLocation
TransmissionType = car.CarParams.TransmissionType
GearShifter = car.CarState.GearShifter
class CarControllerPar... | 43.582064 | 106 | 0.677447 |
794c9ee367c1aac5064ded54db0e3ef136215b2a | 4,480 | py | Python | skl2onnx/operator_converters/label_binariser.py | xiaowuhu/sklearn-onnx | e85674a67a0a043e19c2ffe181e5d31eca8ce40b | [
"Apache-2.0"
] | 323 | 2018-12-18T20:23:19.000Z | 2022-03-25T09:47:31.000Z | skl2onnx/operator_converters/label_binariser.py | xiaowuhu/sklearn-onnx | e85674a67a0a043e19c2ffe181e5d31eca8ce40b | [
"Apache-2.0"
] | 408 | 2019-01-02T12:16:10.000Z | 2022-03-21T14:01:28.000Z | skl2onnx/operator_converters/label_binariser.py | xiaowuhu/sklearn-onnx | e85674a67a0a043e19c2ffe181e5d31eca8ce40b | [
"Apache-2.0"
] | 70 | 2018-12-20T19:36:07.000Z | 2022-03-14T06:41:36.000Z | # SPDX-License-Identifier: Apache-2.0
import numpy as np
from ..proto import onnx_proto
from ..common._apply_operation import apply_cast, apply_reshape
from ..common._registration import register_converter
from ..common._topology import Scope, Operator
from ..common._container import ModelComponentContainer
def con... | 47.157895 | 79 | 0.651116 |
794ca025542db6c454c7402393374fea92a1c558 | 5,997 | py | Python | sdk/python/pulumi_azure_nextgen/datalakestore/firewall_rule.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/datalakestore/firewall_rule.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/datalakestore/firewall_rule.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilities, _tables
__al... | 44.753731 | 198 | 0.651159 |
794ca05fc2793f0e1169353db8864f5757ba73c6 | 991 | py | Python | daily_problems/problem_0_to_100/problem_33.py | rrwt/daily-coding-challenge | b16fc365fd142ebab429e605cb146c8bb0bc97a2 | [
"MIT"
] | 1 | 2019-04-18T03:29:02.000Z | 2019-04-18T03:29:02.000Z | daily_problems/problem_0_to_100/problem_33.py | rrwt/daily-coding-challenge | b16fc365fd142ebab429e605cb146c8bb0bc97a2 | [
"MIT"
] | null | null | null | daily_problems/problem_0_to_100/problem_33.py | rrwt/daily-coding-challenge | b16fc365fd142ebab429e605cb146c8bb0bc97a2 | [
"MIT"
] | null | null | null | """
Compute the running median of a sequence of numbers. That is,
given a stream of numbers, print out the median of the list so far on each new element.
Recall that the median of an even-numbered list is the average of the two middle numbers.
For example, given the sequence [2, 1, 5, 7, 2, 0, 5], your algorithm should... | 27.527778 | 89 | 0.586276 |
794ca0c0fbab5907f14a81327e383e4e4ed4c5b6 | 938 | py | Python | api/views.py | Public-Health-Bioinformatics/sequdas-web | 7ad58510568844f8469c68832caaa94b48f75fb3 | [
"MIT"
] | 1 | 2020-02-02T05:01:16.000Z | 2020-02-02T05:01:16.000Z | api/views.py | Public-Health-Bioinformatics/sequdas-web | 7ad58510568844f8469c68832caaa94b48f75fb3 | [
"MIT"
] | 3 | 2018-12-06T01:49:54.000Z | 2019-01-07T18:30:11.000Z | api/views.py | Public-Health-Bioinformatics/sequdas-web | 7ad58510568844f8469c68832caaa94b48f75fb3 | [
"MIT"
] | null | null | null | from rest_framework import viewsets
from django.contrib.auth.models import User
from . import models
from . import serializers
class UserViewSet(viewsets.ReadOnlyModelViewSet):
queryset = User.objects.all()
serializer_class = serializers.UserSerializer
class SequencerViewSet(viewsets.ReadOnlyModelViewSet):
... | 37.52 | 61 | 0.824094 |
794ca0eb40e2c2effc5ed19e4d2916ef2663d55b | 2,474 | py | Python | python/seldon_core/persistence.py | dtaniwaki/seldon-core | fa9b7451b866b355571a46df6f697e3577c8259a | [
"Apache-2.0"
] | null | null | null | python/seldon_core/persistence.py | dtaniwaki/seldon-core | fa9b7451b866b355571a46df6f697e3577c8259a | [
"Apache-2.0"
] | null | null | null | python/seldon_core/persistence.py | dtaniwaki/seldon-core | fa9b7451b866b355571a46df6f697e3577c8259a | [
"Apache-2.0"
] | null | null | null | import threading
import os
import time
import logging
import pickle
import redis
from seldon_core.user_model import SeldonComponent
from typing import Dict, Type
logger = logging.getLogger(__name__)
PRED_UNIT_ID = os.environ.get("PREDICTIVE_UNIT_ID", "0")
PREDICTOR_ID = os.environ.get("PREDICTOR_ID", "0")
DEPLOYMENT_... | 28.767442 | 84 | 0.70574 |
794ca1d66ad4a75b8ff7b87ca6c5032871862036 | 6,438 | py | Python | web3/datastructures.py | kseikyo/web3.py | 8bc987e8ec2089133fbaf870dd0daa71e7447584 | [
"MIT"
] | 3 | 2019-11-12T07:55:51.000Z | 2020-04-01T11:19:18.000Z | web3/datastructures.py | kseikyo/web3.py | 8bc987e8ec2089133fbaf870dd0daa71e7447584 | [
"MIT"
] | 5 | 2020-07-18T14:09:54.000Z | 2022-02-18T13:07:42.000Z | web3/datastructures.py | kseikyo/web3.py | 8bc987e8ec2089133fbaf870dd0daa71e7447584 | [
"MIT"
] | 2 | 2019-10-20T14:54:47.000Z | 2020-06-11T07:29:37.000Z | from collections import (
OrderedDict,
)
from collections.abc import (
Hashable,
Mapping,
MutableMapping,
Sequence,
)
from eth_utils import (
is_integer,
)
from web3._utils.formatters import (
recursive_map,
)
# Hashable must be immutable:
# "the implementation of hashable collections req... | 29.805556 | 92 | 0.605623 |
794ca1ed5d2fd63d2b6a2543efdcbede2f3502f0 | 600 | py | Python | utils/CompetitionLimited.py | slyslyme/CTF_AWD_Platform | 6e9eec0a23a316aaf1927d4ec5be923ac26ff21e | [
"MIT"
] | null | null | null | utils/CompetitionLimited.py | slyslyme/CTF_AWD_Platform | 6e9eec0a23a316aaf1927d4ec5be923ac26ff21e | [
"MIT"
] | 1 | 2019-04-30T14:48:46.000Z | 2019-04-30T14:48:46.000Z | utils/CompetitionLimited.py | slyslyme/CTF_AWD_Platform | 6e9eec0a23a316aaf1927d4ec5be923ac26ff21e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 19-5-19 下午8:20
# @Author : Archerx
# @Site : https://blog.ixuchao.cn
# @File : CompetitionLimited.py
# @Software: PyCharm
from rest_framework import serializers
import datetime
def CompetitionIsStarted(competiton):
start_time = competiton.competiti... | 25 | 61 | 0.67 |
794ca1f4ff3168cfffe3212fb71de83f898ff539 | 2,382 | py | Python | tests/brightway_fixtures.py | pjamesjoyce/wurst | 95b37e72eaa18b33bdd83cd4a51d37d9eb4ae7ba | [
"BSD-2-Clause"
] | 1 | 2022-03-29T14:59:13.000Z | 2022-03-29T14:59:13.000Z | tests/brightway_fixtures.py | pjamesjoyce/wurst | 95b37e72eaa18b33bdd83cd4a51d37d9eb4ae7ba | [
"BSD-2-Clause"
] | null | null | null | tests/brightway_fixtures.py | pjamesjoyce/wurst | 95b37e72eaa18b33bdd83cd4a51d37d9eb4ae7ba | [
"BSD-2-Clause"
] | null | null | null | try:
from bw2data.tests import bw2test
from bw2data import Database
import pytest
biosphere = {
("biosphere", '1'): {
'categories': ['things'],
'code': '1',
'exchanges': [],
'reference product': 'find me!',
'name': 'an emission',
... | 28.023529 | 52 | 0.370277 |
794ca21ce5f979a1fe053fd83d529204d342ae6f | 18,448 | py | Python | wildcam/_version.py | wiederm/wildcam | 74f4e9e1c96a160be1042a6d7086e1406dd4b058 | [
"MIT"
] | null | null | null | wildcam/_version.py | wiederm/wildcam | 74f4e9e1c96a160be1042a6d7086e1406dd4b058 | [
"MIT"
] | null | null | null | wildcam/_version.py | wiederm/wildcam | 74f4e9e1c96a160be1042a6d7086e1406dd4b058 | [
"MIT"
] | null | null | null |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | 35.408829 | 79 | 0.584508 |
794ca29848e2f978e847d6431d4824b64e5ed854 | 674 | py | Python | models/migrations/0006_auto_20200426_2222.py | liembudzien/Personal-Dashboard | 43d6501258edb667a629660565e5b7d60ff2ff5f | [
"Unlicense"
] | null | null | null | models/migrations/0006_auto_20200426_2222.py | liembudzien/Personal-Dashboard | 43d6501258edb667a629660565e5b7d60ff2ff5f | [
"Unlicense"
] | null | null | null | models/migrations/0006_auto_20200426_2222.py | liembudzien/Personal-Dashboard | 43d6501258edb667a629660565e5b7d60ff2ff5f | [
"Unlicense"
] | null | null | null | # Generated by Django 3.0.5 on 2020-04-27 03:22
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('models', '0005_auto_20200422_1455'),
]
operations = [
migrations.AlterField(
model_name='taskitem',
... | 26.96 | 99 | 0.611276 |
794ca61bcba04f09d71b321f84c7be4612cde633 | 13,054 | py | Python | data/suncg_dataset.py | aluo-x/3D_SLN | 0a29dbf17e3ca58064e76f9227f536a127c4863b | [
"Apache-2.0"
] | 39 | 2020-07-25T18:03:18.000Z | 2022-03-30T04:27:47.000Z | data/suncg_dataset.py | aluo-x/3D_SLN | 0a29dbf17e3ca58064e76f9227f536a127c4863b | [
"Apache-2.0"
] | 1 | 2020-10-19T03:12:48.000Z | 2020-10-19T03:49:04.000Z | data/suncg_dataset.py | aluo-x/3D_SLN | 0a29dbf17e3ca58064e76f9227f536a127c4863b | [
"Apache-2.0"
] | 6 | 2020-08-02T07:44:42.000Z | 2022-01-06T03:13:15.000Z | import random
from collections import defaultdict
import torch
from torch.utils.data import Dataset
from data.base_dataset import BaseDataset
from utils import load_json, compute_rel
class SuncgDataset(BaseDataset):
def __init__(self, data_dir, train_3d, touching_relations=True, use_attr_30=False):
super(D... | 38.621302 | 118 | 0.522369 |
794ca63e6c15a75697d8d29d11c6f7d95d648a7d | 5,456 | py | Python | python/tvm/topi/cuda/softmax.py | aurel333/incubator-tvm | df4b8076ba729d94de58a9e99306e37a1c747101 | [
"Apache-2.0"
] | null | null | null | python/tvm/topi/cuda/softmax.py | aurel333/incubator-tvm | df4b8076ba729d94de58a9e99306e37a1c747101 | [
"Apache-2.0"
] | null | null | null | python/tvm/topi/cuda/softmax.py | aurel333/incubator-tvm | df4b8076ba729d94de58a9e99306e37a1c747101 | [
"Apache-2.0"
] | null | null | null | # 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.13245 | 98 | 0.633981 |
794ca6938bf651dfd12d79298ce89fb0efebe9d2 | 3,369 | py | Python | worklog.py | soasme/worklog | 71f9af86c3b66c2165527de044a2a68864c782e6 | [
"MIT"
] | null | null | null | worklog.py | soasme/worklog | 71f9af86c3b66c2165527de044a2a68864c782e6 | [
"MIT"
] | null | null | null | worklog.py | soasme/worklog | 71f9af86c3b66c2165527de044a2a68864c782e6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import hashlib
import json
import time
import calendar
from datetime import datetime
from flask import Flask, abort, jsonify, request, session
from flask_sqlalchemy import SQLAlchemy
with open(os.environ.get('WORKLOG_ENV') or '.env') as f:
env = json.load(f)
app = Flask(__name__... | 26.527559 | 83 | 0.655387 |
794ca834bca8dff8357048033ecb3a599ebf73ff | 848 | py | Python | demos/chat/aiohttpdemo_chat/main.py | Ixyk-Wolf/aiohttp-demos | e26ef202e6fd4759f4c77f44cdbdbec482196b41 | [
"Apache-2.0"
] | 649 | 2017-10-27T10:55:59.000Z | 2022-03-29T07:14:09.000Z | demos/chat/aiohttpdemo_chat/main.py | Ixyk-Wolf/aiohttp-demos | e26ef202e6fd4759f4c77f44cdbdbec482196b41 | [
"Apache-2.0"
] | 87 | 2017-10-27T11:12:06.000Z | 2021-08-17T18:36:59.000Z | demos/chat/aiohttpdemo_chat/main.py | Ixyk-Wolf/aiohttp-demos | e26ef202e6fd4759f4c77f44cdbdbec482196b41 | [
"Apache-2.0"
] | 284 | 2017-11-05T13:24:51.000Z | 2022-03-12T03:37:55.000Z | import logging
import jinja2
import aiohttp_jinja2
from aiohttp import web
from aiohttpdemo_chat.views import index
async def init_app():
app = web.Application()
app['websockets'] = {}
app.on_shutdown.append(shutdown)
aiohttp_jinja2.setup(
app, loader=jinja2.PackageLoader('aiohttpdemo_ch... | 17.306122 | 74 | 0.676887 |
794ca857cd1763c408da14b6e892798e39582bf3 | 8,497 | py | Python | telethon/events/inlinequery.py | rotem443/Telethon | 35ba9848d9126462b6d51a35d3e16762b18660a9 | [
"MIT"
] | null | null | null | telethon/events/inlinequery.py | rotem443/Telethon | 35ba9848d9126462b6d51a35d3e16762b18660a9 | [
"MIT"
] | null | null | null | telethon/events/inlinequery.py | rotem443/Telethon | 35ba9848d9126462b6d51a35d3e16762b18660a9 | [
"MIT"
] | null | null | null | import inspect
import re
import asyncio
from .common import EventBuilder, EventCommon, name_inner_event
from .. import utils
from ..tl import types, functions, custom
from ..tl.custom.sendergetter import SenderGetter
@name_inner_event
class InlineQuery(EventBuilder):
"""
Occurs whenever you sign in as a bot... | 36.004237 | 81 | 0.538072 |
794ca8b736673cf635b9e615795cf40656e6fdd3 | 1,030 | py | Python | tools/print_config.py | tianyuluan/mmdet | f9330c4dfd07bf8f71d058125e9cf7dfb6fa9536 | [
"Apache-2.0"
] | null | null | null | tools/print_config.py | tianyuluan/mmdet | f9330c4dfd07bf8f71d058125e9cf7dfb6fa9536 | [
"Apache-2.0"
] | null | null | null | tools/print_config.py | tianyuluan/mmdet | f9330c4dfd07bf8f71d058125e9cf7dfb6fa9536 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
'''
Author: luantianyu
LastEditors: Luan Tianyu
email: 1558747541@qq.com
github: https://github.com/tianyuluan/
Date: 2021-09-13 19:04:07
LastEditTime: 2021-11-30 22:02:10
motto: Still water run deep
Description: Modify here please
FilePath: /mmdetection/tools/print_config.py
'''
# ... | 25.121951 | 76 | 0.713592 |
794ca97b65c971e3b8b2d205e449afadc3081690 | 660 | py | Python | manage.py | morrisonGithinji/projectile | bef3cf66841ca52f51bfd91d30e0a426167f3d41 | [
"MIT"
] | 1 | 2020-11-19T15:09:23.000Z | 2020-11-19T15:09:23.000Z | manage.py | morrisonGithinji/projectile | bef3cf66841ca52f51bfd91d30e0a426167f3d41 | [
"MIT"
] | null | null | null | manage.py | morrisonGithinji/projectile | bef3cf66841ca52f51bfd91d30e0a426167f3d41 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'rate.settings')
try:
from django.core.management import execute_from_command_line
except ImportE... | 28.695652 | 73 | 0.677273 |
794caaded2dc6c67105321e092ac31f1dd912661 | 4,958 | py | Python | sdk/python/pulumi_azure_nextgen/containerservice/latest/list_managed_cluster_access_profile.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/containerservice/latest/list_managed_cluster_access_profile.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/containerservice/latest/list_managed_cluster_access_profile.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
__a... | 35.927536 | 231 | 0.651271 |
794cab8d690cdcf3ae36831a6e965eeb0f31537b | 11,230 | py | Python | python/scripts/hpx_optsweep.py | alexmyczko/hpx | fd68e000ead9a03a6b5bad49cf4905df1c0b78c4 | [
"BSL-1.0"
] | 1 | 2019-08-17T21:18:03.000Z | 2019-08-17T21:18:03.000Z | python/scripts/hpx_optsweep.py | alexmyczko/hpx | fd68e000ead9a03a6b5bad49cf4905df1c0b78c4 | [
"BSL-1.0"
] | 1 | 2017-07-24T07:16:26.000Z | 2017-07-24T08:03:33.000Z | python/scripts/hpx_optsweep.py | biddisco/hpx | 2d244e1e27c6e014189a6cd59c474643b31fad4b | [
"BSL-1.0"
] | null | null | null | #! /usr/bin/env python
#
# Copyright (c) 2009 Maciej Brodowicz
# Copyright (c) 2011 Bryce Lelbach
# Copyright (c) 2019 Patrick Diehl
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
"""
Perform parameter sweep runs ... | 32.740525 | 87 | 0.566607 |
794cab9ad763aa4abf91fed21e21dc3b43a47d2c | 20,562 | py | Python | qradar/utils/qradar_cef_generator.py | sahil2303/ta_cloud_exchange_plugins | 931299ed317ea12968ce53edd7bf4318d23c1e3e | [
"BSD-3-Clause"
] | null | null | null | qradar/utils/qradar_cef_generator.py | sahil2303/ta_cloud_exchange_plugins | 931299ed317ea12968ce53edd7bf4318d23c1e3e | [
"BSD-3-Clause"
] | null | null | null | qradar/utils/qradar_cef_generator.py | sahil2303/ta_cloud_exchange_plugins | 931299ed317ea12968ce53edd7bf4318d23c1e3e | [
"BSD-3-Clause"
] | null | null | null | """
BSD 3-Clause License
Copyright (c) 2021, Netskope OSS
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of condi... | 34.733108 | 117 | 0.543041 |
794cacf3311f5ae1b1b746979f78208786b62105 | 4,428 | py | Python | src/OTLMOW/PostenMapping/Model/Post060340210.py | davidvlaminck/OTLClassPython | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | 2 | 2022-02-01T08:58:11.000Z | 2022-02-08T13:35:17.000Z | src/OTLMOW/PostenMapping/Model/Post060340210.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | src/OTLMOW/PostenMapping/Model/Post060340210.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | # coding=utf-8
from OTLMOW.PostenMapping.StandaardPost import StandaardPost
from OTLMOW.PostenMapping.StandaardPostMapping import StandaardPostMapping
# Generated with PostenCreator. To modify: extend, do not edit
class Post060340210(StandaardPost):
def __init__(self):
super().__init__(
nummer... | 48.659341 | 146 | 0.578365 |
794cad9bfad07bff052d98531a7bed12f0eadd7e | 6,841 | py | Python | tracer.py | nerox8664/pytracer | 10ef0d2a309b6b2840b2d43ec7cb0f742578ee4e | [
"MIT"
] | null | null | null | tracer.py | nerox8664/pytracer | 10ef0d2a309b6b2840b2d43ec7cb0f742578ee4e | [
"MIT"
] | null | null | null | tracer.py | nerox8664/pytracer | 10ef0d2a309b6b2840b2d43ec7cb0f742578ee4e | [
"MIT"
] | null | null | null | #!/bin/python
import numpy as np
import matplotlib.pyplot as plt
import multiprocessing as mp
from functools import partial
import argparse
from plane import Plane
from sphere import Sphere
from common_utils import *
# Defines
depth_max = 3
light_depth_max = 3
shadow_steps = 8
h = 768
w = 1024
r = float(w) / h
# L... | 28.036885 | 115 | 0.568923 |
794cadc165213c4ea0015854183911ab3746c9fe | 598 | py | Python | diffpy/__init__.py | yevgenyr/diffpy.srxplanar | 67d4dae2d9c2267e1c4d18a9901525cc35009530 | [
"BSD-3-Clause"
] | 1 | 2015-12-12T20:54:14.000Z | 2015-12-12T20:54:14.000Z | diffpy/__init__.py | yevgenyr/diffpy.srxplanar | 67d4dae2d9c2267e1c4d18a9901525cc35009530 | [
"BSD-3-Clause"
] | 1 | 2021-06-15T21:54:44.000Z | 2021-06-16T00:32:03.000Z | diffpy/__init__.py | yevgenyr/diffpy.srxplanar | 67d4dae2d9c2267e1c4d18a9901525cc35009530 | [
"BSD-3-Clause"
] | 4 | 2015-09-23T17:47:15.000Z | 2022-03-24T22:37:23.000Z | #!/usr/bin/env python
##############################################################################
#
# diffpy.srxplanar by DANSE Diffraction group
# Simon J. L. Billinge
# (c) 2010 Trustees of the Columbia University
# in the City of New York. All rights reserve... | 33.222222 | 78 | 0.478261 |
794cae43050eaf2043dc0a8a22f58ffcf9f67772 | 10,918 | py | Python | wagtail/admin/widgets.py | patta42/wagtail | 419c8d3a03e6ea7fe2aa01922592e5be8d0d73e1 | [
"BSD-3-Clause"
] | 1 | 2018-08-15T18:27:09.000Z | 2018-08-15T18:27:09.000Z | wagtail/admin/widgets.py | patta42/wagtail | 419c8d3a03e6ea7fe2aa01922592e5be8d0d73e1 | [
"BSD-3-Clause"
] | 13 | 2019-03-25T19:57:35.000Z | 2019-12-28T19:25:23.000Z | wagtail/admin/widgets.py | patta42/wagtail | 419c8d3a03e6ea7fe2aa01922592e5be8d0d73e1 | [
"BSD-3-Clause"
] | null | null | null | import itertools
import json
from functools import total_ordering
from django.conf import settings
from django.forms import widgets
from django.forms.utils import flatatt
from django.template.loader import render_to_string
from django.urls import reverse
from django.utils.formats import get_format
from django.utils.fu... | 34.333333 | 108 | 0.644349 |
794cb00b7ade71032556e8e57860682065ec919d | 120,429 | py | Python | pybind/slxos/v16r_1_00b/brocade_mpls_rpc/show_mpls_lsp_extensive/output/lsp/show_mpls_lsp_extensive_info/show_mpls_lsp_sec_path_info/sec_path/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/brocade_mpls_rpc/show_mpls_lsp_extensive/output/lsp/show_mpls_lsp_extensive_info/show_mpls_lsp_sec_path_info/sec_path/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/brocade_mpls_rpc/show_mpls_lsp_extensive/output/lsp/show_mpls_lsp_extensive_info/show_mpls_lsp_sec_path_info/sec_path/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | 85.048729 | 2,530 | 0.789818 |
794cb04b442342b34f9dad144cee3c047e678912 | 212,673 | py | Python | h2o-py/h2o/frame.py | further2006/h2o-3 | b0dcacaeaf0814755334214c0897a976ee151c40 | [
"Apache-2.0"
] | 1 | 2020-10-09T02:45:59.000Z | 2020-10-09T02:45:59.000Z | h2o-py/h2o/frame.py | further2006/h2o-3 | b0dcacaeaf0814755334214c0897a976ee151c40 | [
"Apache-2.0"
] | null | null | null | h2o-py/h2o/frame.py | further2006/h2o-3 | b0dcacaeaf0814755334214c0897a976ee151c40 | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
H2O data frame.
:copyright: (c) 2016 H2O.ai
:license: Apache License Version 2.0 (see LICENSE for details)
"""
from __future__ import absolute_import, division, print_function, unicode_literals
from h2o.utils.compatibility import * # NOQA
import csv
import datetime
import functools
fr... | 41.135977 | 165 | 0.58305 |
794cb09015dcf5f4b5a89387040236137cebfabf | 9,617 | py | Python | lib/MCP342x.py | timbarnes/PyRoaster | b55fd84bdd6991345232a7b976a5743555807f62 | [
"BSD-2-Clause"
] | null | null | null | lib/MCP342x.py | timbarnes/PyRoaster | b55fd84bdd6991345232a7b976a5743555807f62 | [
"BSD-2-Clause"
] | 5 | 2021-12-14T05:51:16.000Z | 2021-12-14T05:58:18.000Z | lib/MCP342x.py | timbarnes/PyRoaster | b55fd84bdd6991345232a7b976a5743555807f62 | [
"BSD-2-Clause"
] | null | null | null | """
MicroPython driver for the mcp342x ADC.
Adapted to PyCom boards from stevemarple/python-MCP342x
https://github.com/stevemarple/python-MCP342x
"""
import time
__author__ = 'Jose A. Jimenez-Berni'
__version__ = '0.0.1'
__license__ = 'MIT'
class MCP342x(object):
"""
Class to represent MCP342x ADC.
"""
... | 34.844203 | 113 | 0.559842 |
794cb10035bf1d487eab3f1419c63acb685d281f | 3,072 | py | Python | opencv-2.4.11/samples/python2/lk_track.py | durai-chellamuthu/node-opencv | a9c18c77b2fe0f62f2f8376854bdf33de71f5dc3 | [
"MIT"
] | 55 | 2015-06-20T20:15:33.000Z | 2022-02-10T02:45:14.000Z | opencv-2.4.11/samples/python2/lk_track.py | durai-chellamuthu/node-opencv | a9c18c77b2fe0f62f2f8376854bdf33de71f5dc3 | [
"MIT"
] | 8 | 2015-06-20T18:46:52.000Z | 2015-10-31T11:08:04.000Z | opencv-2.4.11/samples/python2/lk_track.py | durai-chellamuthu/node-opencv | a9c18c77b2fe0f62f2f8376854bdf33de71f5dc3 | [
"MIT"
] | 73 | 2015-06-20T15:59:27.000Z | 2020-03-15T22:43:36.000Z | #!/usr/bin/env python
'''
Lucas-Kanade tracker
====================
Lucas-Kanade sparse optical flow demo. Uses goodFeaturesToTrack
for track initialization and back-tracking for match verification
between frames.
Usage
-----
lk_track.py [<video_source>]
Keys
----
ESC - exit
'''
import numpy as np
import cv2
impo... | 30.72 | 92 | 0.513346 |
794cb163720060ae7527f73f3e54aae545884d88 | 2,933 | py | Python | simulation/client.py | lilybhattacharjee5/visualize-pbft | f9e31ee43d38f58408b7c5ab0d0ce0f93d68400a | [
"ADSL"
] | 1 | 2021-12-08T18:05:27.000Z | 2021-12-08T18:05:27.000Z | simulation/client.py | lilybhattacharjee5/visualize-pbft | f9e31ee43d38f58408b7c5ab0d0ce0f93d68400a | [
"ADSL"
] | null | null | null | simulation/client.py | lilybhattacharjee5/visualize-pbft | f9e31ee43d38f58408b7c5ab0d0ce0f93d68400a | [
"ADSL"
] | null | null | null | from simulation.message_generator import generate_transaction_msg
from simulation.utils import verify_mac
import json
## CLIENT FUNCTIONS
def send_transaction(queues, client_name, primary_name, curr_transaction, curr_view, p, client_primary_session_key, replica_names):
for q_name, q in queues.items():
if q... | 47.306452 | 160 | 0.617457 |
794cb1ac127e080b1eb69b83fff9e64665e64618 | 142 | py | Python | sortingAlgorithm/__init__.py | BennyJane/algorithm_mad | 4173a4cc60d0f4f87b0cb7f6bc87d1eefbaff937 | [
"Apache-2.0"
] | null | null | null | sortingAlgorithm/__init__.py | BennyJane/algorithm_mad | 4173a4cc60d0f4f87b0cb7f6bc87d1eefbaff937 | [
"Apache-2.0"
] | null | null | null | sortingAlgorithm/__init__.py | BennyJane/algorithm_mad | 4173a4cc60d0f4f87b0cb7f6bc87d1eefbaff937 | [
"Apache-2.0"
] | null | null | null | # !/usr/bin/env python
# -*-coding:utf-8 -*-
# PROJECT : algorithm_mad
# Time :2020/12/22 10:15
# Warning :The Hard Way Is Easier
| 23.666667 | 36 | 0.605634 |
794cb27f7864d8c9c2cf5839f92c7429559720a9 | 317 | py | Python | test.py | saifkhan-m/SentEval | 7cd652409864a849dfbf44ce984c2bd8cececa1d | [
"BSD-3-Clause"
] | null | null | null | test.py | saifkhan-m/SentEval | 7cd652409864a849dfbf44ce984c2bd8cececa1d | [
"BSD-3-Clause"
] | null | null | null | test.py | saifkhan-m/SentEval | 7cd652409864a849dfbf44ce984c2bd8cececa1d | [
"BSD-3-Clause"
] | null | null | null | import os
print(os.path.exists('C:/Users/khans/Documents/ber_hwr_hiwi/Paper/SentEval-master/SentEval-master/data/downstream/MR/rt-polarity.pos'))
print(os.path.exists('data/downstream/MR/rt-polarity.pos'))
#C:\Users\khans\Documents\ber_hwr_hiwi\Paper\SentEval-master\SentEval-master\data\downstream\MR\rt-polarity.pos | 79.25 | 135 | 0.817035 |
794cb33fc229ab2c186ae474d4a92693dd0dfe54 | 2,843 | py | Python | setup.py | alxlampe/d3rlpy | af7e6bd018a51f95138d121f59c50dc36ec87e3a | [
"MIT"
] | null | null | null | setup.py | alxlampe/d3rlpy | af7e6bd018a51f95138d121f59c50dc36ec87e3a | [
"MIT"
] | null | null | null | setup.py | alxlampe/d3rlpy | af7e6bd018a51f95138d121f59c50dc36ec87e3a | [
"MIT"
] | null | null | null | import os
from setuptools import setup, Extension
os.environ['CFLAGS'] = '-std=c++11'
if __name__ == "__main__":
from numpy import get_include
from Cython.Build import cythonize
# setup Cython build
ext = Extension('d3rlpy.dataset',
sources=['d3rlpy/dataset.pyx'],
... | 41.202899 | 98 | 0.460429 |
794cb374877fac19cc5bf5ee6103dd519130b7e6 | 8,363 | py | Python | src/robot/result/resultbuilder.py | N-Aero/robotframework | e15664f80e830f30209f118117bf361c74ebe7fb | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2022-02-17T11:02:52.000Z | 2022-02-17T11:02:52.000Z | src/robot/result/resultbuilder.py | N-Aero/robotframework | e15664f80e830f30209f118117bf361c74ebe7fb | [
"ECL-2.0",
"Apache-2.0"
] | 24 | 2021-01-26T07:07:27.000Z | 2022-03-03T06:41:53.000Z | src/robot/result/resultbuilder.py | rticau/robotframework | 33ee46dfacd5173c0a38d89c1a60abf6a747c8c0 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-11-30T18:49:45.000Z | 2018-11-30T18:49:45.000Z | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
#
# 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
... | 40.597087 | 87 | 0.617482 |
794cb4326088c53e7b9066955bbcd0f6f69e5e11 | 353 | py | Python | rcommander_pr2_gui/src/rcommander_pr2_gui/rcommander_pr2_server.py | gt-ros-pkg/rcommander-pr2 | 7c7408db30525b80a77dde34b4a8af68ec23d5a4 | [
"BSD-3-Clause"
] | 3 | 2015-03-18T10:20:13.000Z | 2021-03-01T02:46:20.000Z | rcommander_pr2_gui/src/rcommander_pr2_gui/rcommander_pr2_server.py | gt-ros-pkg/rcommander-pr2 | 7c7408db30525b80a77dde34b4a8af68ec23d5a4 | [
"BSD-3-Clause"
] | null | null | null | rcommander_pr2_gui/src/rcommander_pr2_gui/rcommander_pr2_server.py | gt-ros-pkg/rcommander-pr2 | 7c7408db30525b80a77dde34b4a8af68ec23d5a4 | [
"BSD-3-Clause"
] | 2 | 2016-08-03T21:50:59.000Z | 2021-03-01T02:46:20.000Z | #!/usr/bin/python
import roslib; roslib.load_manifest('rcommander_pr2_gui')
import pypr2.pr2_utils as pu
import rcommander_web.rcommander_auto_server as rcs
import sys
import tf
import rospy
# "home/haidai/Desktop/rcommander")
rospy.init_node('rcommander_pr2_server')
path = sys.argv[1]
tf = tf.TransformListener()
pr2... | 23.533333 | 57 | 0.787535 |
794cb6e91f7daa38a9126974762b4541b398cb9b | 1,520 | py | Python | example/locfdr_compute.py | yangle293/FDRnet | 8906936b192cd8905e7fd12e1fabed5ace962d6c | [
"MIT"
] | 2 | 2021-02-17T17:24:47.000Z | 2022-01-06T14:17:30.000Z | example/locfdr_compute.py | yangle293/FDRnet | 8906936b192cd8905e7fd12e1fabed5ace962d6c | [
"MIT"
] | null | null | null | example/locfdr_compute.py | yangle293/FDRnet | 8906936b192cd8905e7fd12e1fabed5ace962d6c | [
"MIT"
] | 4 | 2019-11-14T15:56:06.000Z | 2021-03-15T23:54:18.000Z | from __future__ import print_function
import sys
sys.path.insert(0, "../locfdr-python")
from locfdr import locfdr
from collections import OrderedDict
from os import listdir
from os.path import isfile, join, basename, splitext
import math
import numpy as np
import re
from scipy.stats import norm as norm
def run(pfilena... | 30.4 | 100 | 0.599342 |
794cb7227c3058fd8f38fa9a89e969b32b10ad5d | 29,536 | py | Python | core/domain/summary_services.py | jlau323/oppia | 37438a2c9bf7e66892fb9a6a93a1fe4ca7a82691 | [
"Apache-2.0"
] | 2 | 2021-04-08T01:06:08.000Z | 2021-06-02T08:20:13.000Z | core/domain/summary_services.py | gitter-badger/oppia | 7d8e659264582d7ce74bc6c139e597b82bca0e04 | [
"Apache-2.0"
] | 1 | 2020-05-27T06:08:17.000Z | 2020-05-27T06:08:17.000Z | core/domain/summary_services.py | gitter-badger/oppia | 7d8e659264582d7ce74bc6c139e597b82bca0e04 | [
"Apache-2.0"
] | 1 | 2020-11-05T12:26:10.000Z | 2020-11-05T12:26:10.000Z | # coding: utf-8
#
# Copyright 2014 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 39.276596 | 80 | 0.659568 |
794cb7cb8c1a6625fcc5cba4edfefd2ef9b817d4 | 4,361 | py | Python | src/primaires/scripting/fonctions/est_de_type.py | vlegoff/tsunami | 36b3b974f6eefbf15cd5d5f099fc14630e66570b | [
"BSD-3-Clause"
] | 14 | 2015-08-21T19:15:21.000Z | 2017-11-26T13:59:17.000Z | src/primaires/scripting/fonctions/est_de_type.py | vincent-lg/tsunami | 36b3b974f6eefbf15cd5d5f099fc14630e66570b | [
"BSD-3-Clause"
] | 20 | 2015-09-29T20:50:45.000Z | 2018-06-21T12:58:30.000Z | src/primaires/scripting/fonctions/est_de_type.py | vlegoff/tsunami | 36b3b974f6eefbf15cd5d5f099fc14630e66570b | [
"BSD-3-Clause"
] | 3 | 2015-05-02T19:42:03.000Z | 2018-09-06T10:55:00.000Z | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# 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 code must retain the above copyright notice, this
# ... | 40.009174 | 81 | 0.690667 |
794cb7fe67f869299cf5ec2f7df3110a6e4ca21d | 7,393 | py | Python | Garteur Model/Reference Model/modal_optim_GARTEUR_COBYLA.py | aguptaisae/Masters-Research-Project-S2 | b44cd21a95a60b8fb38852dac5a5b0794e1f3e3f | [
"Apache-2.0"
] | 4 | 2019-02-15T14:43:15.000Z | 2021-04-13T04:22:48.000Z | Garteur Model/Reference Model/modal_optim_GARTEUR_COBYLA.py | aguptaisae/Masters-Research-Project-S2 | b44cd21a95a60b8fb38852dac5a5b0794e1f3e3f | [
"Apache-2.0"
] | null | null | null | Garteur Model/Reference Model/modal_optim_GARTEUR_COBYLA.py | aguptaisae/Masters-Research-Project-S2 | b44cd21a95a60b8fb38852dac5a5b0794e1f3e3f | [
"Apache-2.0"
] | 3 | 2020-11-27T02:18:16.000Z | 2021-08-04T13:47:46.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue Mar 29 10:50:10 2016
@author: © Joan Mas Colomer
"""
from __future__ import print_function
from openmdao.api import Problem, Group, IndepVarComp, ExecComp, ScipyGMRES, SqliteRecorder, ScipyOptimizer, view_model
from aerostructures import NastranDynamic, ModalFun... | 36.781095 | 164 | 0.626674 |
794cb81f77bdf41f3c48613d84f98414766ddab8 | 4,041 | py | Python | hplip-3.20.3/ui/choosedevicedlg.py | Deril-Pana/wikiBlackcoinNL | 9633307f0b485c27feae5da242944adf450e8963 | [
"MIT"
] | null | null | null | hplip-3.20.3/ui/choosedevicedlg.py | Deril-Pana/wikiBlackcoinNL | 9633307f0b485c27feae5da242944adf450e8963 | [
"MIT"
] | 1 | 2021-11-20T16:33:39.000Z | 2021-11-20T16:33:39.000Z | hplip-3.20.3/ui/choosedevicedlg.py | Deril-Pana/wikiBlackcoinNL | 9633307f0b485c27feae5da242944adf450e8963 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# (c) Copyright 2001-2015 HP Development Company, L.P.
#
# This program 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 2 of the License, or
# (at your option) any late... | 37.073394 | 100 | 0.691908 |
794cb9225553a0568af4f9ef067e7f68e492b9ba | 5,857 | py | Python | diffco/kernel.py | rhgkrsus1/diffco | d5e393abee110b84ac94df449986dd0ed3f011a2 | [
"MIT"
] | 11 | 2021-02-17T09:07:36.000Z | 2022-03-13T10:11:19.000Z | diffco/kernel.py | rhgkrsus1/diffco | d5e393abee110b84ac94df449986dd0ed3f011a2 | [
"MIT"
] | null | null | null | diffco/kernel.py | rhgkrsus1/diffco | d5e393abee110b84ac94df449986dd0ed3f011a2 | [
"MIT"
] | 3 | 2021-03-24T14:48:25.000Z | 2022-02-16T08:53:19.000Z | import numpy as np
import torch
class KernelFunc:
def __init__(self):
pass
def __call__(self):
raise NotImplementedError('You need to define your own __call__ function.')
class RQKernel(KernelFunc):
def __init__(self, gamma, p=2):
self.gamma = gamma
self.p = p
def __... | 33.855491 | 92 | 0.556428 |
794cba4204a3d086698d49316c5e2ae372f8a10f | 5,606 | py | Python | Cogs/Emoji.py | MrAngelDo6pa/MedBotS | 89e19d831507e20d0898114502967b2ad8ecf957 | [
"MIT"
] | 2 | 2021-09-28T10:40:10.000Z | 2021-11-07T14:49:07.000Z | Cogs/Emoji.py | ddoskid/lol12 | 35c097bbebeca3043a939b902b07474473344a3c | [
"MIT"
] | null | null | null | Cogs/Emoji.py | ddoskid/lol12 | 35c097bbebeca3043a939b902b07474473344a3c | [
"MIT"
] | null | null | null | import discord, os
from discord.ext import commands
from Cogs import GetImage, Utils
def setup(bot):
bot.add_cog(Emoji(bot))
class Emoji(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.max_emojis = 10
global Utils, DisplayName
Utils = self.bot.get_cog("Utils")
... | 46.330579 | 173 | 0.570817 |
794cbafab4851cdb4130d3fab5d475e6da99210b | 5,606 | py | Python | python/rpc.py | necab0/vimsence | 19d3eb901c2989519ae33052d1abe1878b21cb6b | [
"MIT"
] | 59 | 2018-06-22T11:39:40.000Z | 2022-02-15T20:35:49.000Z | python/rpc.py | necab0/vimsence | 19d3eb901c2989519ae33052d1abe1878b21cb6b | [
"MIT"
] | 9 | 2018-07-19T07:56:16.000Z | 2020-10-25T23:50:24.000Z | python/rpc.py | necab0/vimsence | 19d3eb901c2989519ae33052d1abe1878b21cb6b | [
"MIT"
] | 14 | 2018-07-19T03:43:26.000Z | 2020-02-08T14:37:53.000Z | # References:
# * https://github.com/devsnek/discord-rpc/tree/master/src/transports/IPC.js
# * https://github.com/devsnek/discord-rpc/tree/master/example/main.js
# * https://github.com/discordapp/discord-rpc/tree/master/documentation/hard-mode.md
# * https://github.com/discordapp/discord-rpc/tree/master/src
# * https:/... | 26.951923 | 112 | 0.584909 |
794cbc658286d28b91915f5e5a2f3faa03478373 | 1,500 | py | Python | kea/utils/_signal_assigner.py | SmartAcoustics/Kea | 5790f18dafccfc01fe9dbe98de5bb1a5ce584c56 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | 3 | 2020-02-28T13:03:59.000Z | 2020-09-20T06:33:04.000Z | kea/utils/_signal_assigner.py | SmartAcoustics/Kea | 5790f18dafccfc01fe9dbe98de5bb1a5ce584c56 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | kea/utils/_signal_assigner.py | SmartAcoustics/Kea | 5790f18dafccfc01fe9dbe98de5bb1a5ce584c56 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | 3 | 2018-12-17T16:33:08.000Z | 2020-01-21T14:10:25.000Z | from myhdl import *
@block
def boolean_signal_assigner(signal_in, signal_out):
@always_comb
def assigner():
# Pass the signal straight through
signal_out.next = signal_in
return assigner
@block
def intbv_signal_assigner(signal_in, signal_out, offset):
@always_comb
def assigner()... | 26.785714 | 78 | 0.674667 |
794cbced65e9844fb5a988e06c46fbfd59ae4e4b | 492 | py | Python | create_lesson_plan/migrations/0006_lesson_score.py | rishabhranawat/CrowdPlatform | 1de2ad7e70fbf6cbf2e29bc9368341134b4f7e0d | [
"MIT"
] | 1 | 2020-07-23T21:35:40.000Z | 2020-07-23T21:35:40.000Z | create_lesson_plan/migrations/0006_lesson_score.py | rishabhranawat/CrowdPlatform | 1de2ad7e70fbf6cbf2e29bc9368341134b4f7e0d | [
"MIT"
] | 9 | 2021-02-08T20:32:35.000Z | 2022-03-02T14:58:07.000Z | create_lesson_plan/migrations/0006_lesson_score.py | rishabhranawat/CrowdPlatform | 1de2ad7e70fbf6cbf2e29bc9368341134b4f7e0d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-03-22 15:20
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('create_lesson_plan', '0005_auto_20170317_1709'),
]
operations = [
migrations.... | 22.363636 | 58 | 0.619919 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.