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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
794cbd265afa444f9dc39a789c28ef40dc335c90 | 3,584 | py | Python | OdlApplication/testcode.py | eriksore/sdn | 16eaa6a28bcbf957974e8339ea70724e604f5da9 | [
"MIT"
] | null | null | null | OdlApplication/testcode.py | eriksore/sdn | 16eaa6a28bcbf957974e8339ea70724e604f5da9 | [
"MIT"
] | null | null | null | OdlApplication/testcode.py | eriksore/sdn | 16eaa6a28bcbf957974e8339ea70724e604f5da9 | [
"MIT"
] | null | null | null | #External libraries
import sys
import json
import networkx as nx
from networkx.readwrite import json_graph
import httplib2
from xml.dom import minidom
from lxml import etree
#Own libraries
import restconf
import frontend
#Base URLs for Config and operational
baseUrl = 'http://192.168.231.246:8080'
confUrl = baseUrl + ... | 44.246914 | 153 | 0.666295 |
794cbd6d1d7d5a4eaa37e2fe6108a47794e82522 | 56,700 | py | Python | SBMLDiagrams/drawNetwork.py | sys-bio/SBMLDiagrams | ff951ff987fadf61a25d239966134e7bbfa1ff1a | [
"MIT"
] | null | null | null | SBMLDiagrams/drawNetwork.py | sys-bio/SBMLDiagrams | ff951ff987fadf61a25d239966134e7bbfa1ff1a | [
"MIT"
] | 20 | 2022-03-04T17:07:18.000Z | 2022-03-30T22:22:24.000Z | SBMLDiagrams/drawNetwork.py | sys-bio/SBMLDiagrams | ff951ff987fadf61a25d239966134e7bbfa1ff1a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# This script was initiated by Herbert Sauro, written by Jin Xu and available on Github
# https://github.com/SunnyXu/SBMLDiagrams
# This file includes all the functions to visualize or edit the SBML file.
"""
Created on Fri Jul 16 09:57:30 2021
@author: Jin Xu and Herbert Sauro
"""
import math
... | 42.663657 | 131 | 0.588025 |
794cbd78c5602c789d8bdb55a3e7eb9e93121d12 | 29,945 | py | Python | src/interface/Python/paramonte/_paradram.py | shahmoradi/paramonte-1 | 77c81c14e475bfacb19fa6de1f41629380e453d3 | [
"MIT"
] | null | null | null | src/interface/Python/paramonte/_paradram.py | shahmoradi/paramonte-1 | 77c81c14e475bfacb19fa6de1f41629380e453d3 | [
"MIT"
] | null | null | null | src/interface/Python/paramonte/_paradram.py | shahmoradi/paramonte-1 | 77c81c14e475bfacb19fa6de1f41629380e453d3 | [
"MIT"
] | 1 | 2020-09-19T03:45:07.000Z | 2020-09-19T03:45:07.000Z | ####################################################################################################################################
####################################################################################################################################
####
#### MIT License
####
#### ParaMonte: plain p... | 44.297337 | 132 | 0.566672 |
794cbd7f46e5b3151decc39867de4882abcbd087 | 1,072 | py | Python | app/routes.py | opt9/vuln-python-flask2 | 2b1753abc29ab9f3bf14c6a9fd348ae41acfa180 | [
"MIT"
] | null | null | null | app/routes.py | opt9/vuln-python-flask2 | 2b1753abc29ab9f3bf14c6a9fd348ae41acfa180 | [
"MIT"
] | 1 | 2020-07-27T09:55:28.000Z | 2020-07-27T09:55:28.000Z | app/routes.py | opt9/vuln-python-flask2 | 2b1753abc29ab9f3bf14c6a9fd348ae41acfa180 | [
"MIT"
] | null | null | null | from flask import request, render_template_string, render_template, Markup
from app import app
@app.route('/hello')
def hello_world():
user = {'username':"world", 'secret':"dG9wIHNlY3JldA=="}
if request.args.get('username'):
user['username'] = request.args.get('username')
template = Markup('''<h2>... | 26.8 | 74 | 0.63153 |
794cbe3a160ef12eb393ca1e87d176c2ed587793 | 798 | py | Python | properties.py | FTAsr/STS | 07fd4720cf00c9c78733718bd032fba7d92efc3a | [
"MIT"
] | null | null | null | properties.py | FTAsr/STS | 07fd4720cf00c9c78733718bd032fba7d92efc3a | [
"MIT"
] | null | null | null | properties.py | FTAsr/STS | 07fd4720cf00c9c78733718bd032fba7d92efc3a | [
"MIT"
] | null | null | null | ## Contains the configurable parameters for the Short Answer Scoring system.
## Set the required grading scale as True
GRADING_SCALE_MULTICLASS = False
GRADING_SCALE_REAL_0_5 = True
GRADING_SCALE_REAL_0_1 = False
GRADING_SCALE_Integer_0_5 = False
GRADING_SCALE_LABELS = ['Incorrect', 'Partially Correct', 'Correct']
PA... | 27.517241 | 76 | 0.79198 |
794cbe84dff75acb6846184862b70b8c7854a29d | 2,286 | py | Python | insta/tests.py | EmmanuelMuchiri/instagram | d737e4afc34058c7b725e30145a8fe31187fc8dd | [
"MIT"
] | 1 | 2021-05-03T19:08:58.000Z | 2021-05-03T19:08:58.000Z | insta/tests.py | EmmanuelMuchiri/instagram | d737e4afc34058c7b725e30145a8fe31187fc8dd | [
"MIT"
] | 4 | 2020-06-05T22:39:56.000Z | 2021-09-08T01:15:38.000Z | insta/tests.py | EmmanuelMuchiri/instagram | d737e4afc34058c7b725e30145a8fe31187fc8dd | [
"MIT"
] | 2 | 2019-09-03T08:49:49.000Z | 2019-11-19T12:57:55.000Z | from django.test import TestCase
from .models import Image,Profile
from django.contrib.auth.models import User
# Create your tests here.
class ImageTestClass(TestCase):
# Set up method
def setUp(self):
self.user = User.objects.create_user(username='testuser', password='12345')
self.profile = Pr... | 35.71875 | 139 | 0.678478 |
794cbfcf818c422530db87edb9eff13ed6fe999f | 3,564 | py | Python | bindings/python/ensmallen/datasets/string/bordetellabronchiseptica.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/bordetellabronchiseptica.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/bordetellabronchiseptica.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Bordetella bronchiseptica.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--prot... | 33 | 223 | 0.679012 |
794cc0b3895dccd7e9ce551240f8e736030f91d0 | 645 | py | Python | CursoEmVideo_python/Mundo 1/Exercicios/desafio4_aula6.py | IgorBalest/PythonCodes | 58e8ac7523fa599395c8dcdda2c2bd81c190a021 | [
"MIT"
] | null | null | null | CursoEmVideo_python/Mundo 1/Exercicios/desafio4_aula6.py | IgorBalest/PythonCodes | 58e8ac7523fa599395c8dcdda2c2bd81c190a021 | [
"MIT"
] | null | null | null | CursoEmVideo_python/Mundo 1/Exercicios/desafio4_aula6.py | IgorBalest/PythonCodes | 58e8ac7523fa599395c8dcdda2c2bd81c190a021 | [
"MIT"
] | null | null | null | entrada = input('Digite algo: ')
print('O tipo primitivo dessa variavel é {}'.format(type(entrada)))
print('è um identificador? ', entrada.isidentifier())
print('é da tabelas ascII? ' , entrada.isascii())
print('É letra minuscula? ', entrada.islower())
print('É somente espaços? ', entrada.isspace())
print('É letra m... | 37.941176 | 67 | 0.700775 |
794cc1215e183e4c3a81015a2289e0d7695227a6 | 11,659 | py | Python | lib/python3.6/site-packages/ansible/modules/network/nxos/nxos_vpc.py | Thekubebro/jupyter-playbook | 7b14ddfdfca09e8a569b155d2604083692943986 | [
"Apache-2.0"
] | null | null | null | lib/python3.6/site-packages/ansible/modules/network/nxos/nxos_vpc.py | Thekubebro/jupyter-playbook | 7b14ddfdfca09e8a569b155d2604083692943986 | [
"Apache-2.0"
] | null | null | null | lib/python3.6/site-packages/ansible/modules/network/nxos/nxos_vpc.py | Thekubebro/jupyter-playbook | 7b14ddfdfca09e8a569b155d2604083692943986 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | 32.118457 | 89 | 0.597135 |
794cc15c6b2e6600e641659903d78082a3eb4c2b | 23,170 | py | Python | oadenv/lib/python2.7/site-packages/django/db/backends/base/operations.py | isabernardes/Archaeodatabase | 86090e8f840d5d202c15906e614d683f8a12d3bc | [
"MIT"
] | 7 | 2017-02-12T06:03:00.000Z | 2020-12-31T11:57:35.000Z | oadenv/lib/python2.7/site-packages/django/db/backends/base/operations.py | isabernardes/Archaeodatabase | 86090e8f840d5d202c15906e614d683f8a12d3bc | [
"MIT"
] | 10 | 2017-07-13T00:24:03.000Z | 2017-07-17T07:39:03.000Z | oadenv/lib/python2.7/site-packages/django/db/backends/base/operations.py | isabernardes/Archaeodatabase | 86090e8f840d5d202c15906e614d683f8a12d3bc | [
"MIT"
] | 7 | 2017-08-01T04:02:07.000Z | 2018-10-06T21:07:20.000Z | import datetime
import decimal
import warnings
from importlib import import_module
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db.backends import utils
from django.utils import six, timezone
from django.utils.dateparse import parse_duration
from django.utils.dep... | 38.108553 | 117 | 0.648899 |
794cc2b6a77d0b20456ade1ebfc64e113e0bb6b4 | 1,536 | py | Python | src/veiws/class/parser.py | FrostyBonny/MSDevoDevelop | 9e6f0685806c26d3e294fb976e422f67ab581124 | [
"MIT"
] | 1 | 2019-05-15T03:17:27.000Z | 2019-05-15T03:17:27.000Z | src/veiws/class/parser.py | FrostyBonny/MSDevoDevelop | 9e6f0685806c26d3e294fb976e422f67ab581124 | [
"MIT"
] | null | null | null | src/veiws/class/parser.py | FrostyBonny/MSDevoDevelop | 9e6f0685806c26d3e294fb976e422f67ab581124 | [
"MIT"
] | null | null | null | from flask_restful import reqparse
getParser = reqparse.RequestParser()
getParser.add_argument('name', type=str, help='please enter name')
getParser.add_argument('id', type=str, help='please enter id')
getParser.add_argument('type', type=str, help='please enter type')
getParser.add_argument('page', type=int, help='ple... | 48 | 85 | 0.770833 |
794cc30a936c217d2f912a51492b5dc3f167ec95 | 3,065 | py | Python | messenger/modules/weight_correctness.py | NCATS-Gamma/robokop-messenger | 04cd6c614f0503ce7969eedab994abe6d548dde2 | [
"MIT"
] | null | null | null | messenger/modules/weight_correctness.py | NCATS-Gamma/robokop-messenger | 04cd6c614f0503ce7969eedab994abe6d548dde2 | [
"MIT"
] | 4 | 2020-03-26T12:05:56.000Z | 2020-08-04T15:38:59.000Z | messenger/modules/weight_correctness.py | NCATS-Gamma/robokop-messenger | 04cd6c614f0503ce7969eedab994abe6d548dde2 | [
"MIT"
] | null | null | null | """Weight edges."""
from collections import defaultdict
import math
from typing import Optional
from fastapi import Query
from reasoner_pydantic import Request, Message
async def query(
request: Request,
relevance: Optional[float] = Query(
0.0025,
description='portion of coocc... | 30.959596 | 94 | 0.530506 |
794cc310d56af3fafc4e553fb157d7c61420f5eb | 837 | py | Python | ics2csv.py | Guiraud/csv-ical | 60f55ae494ff42074742891784799c95acf6af6c | [
"MIT"
] | null | null | null | ics2csv.py | Guiraud/csv-ical | 60f55ae494ff42074742891784799c95acf6af6c | [
"MIT"
] | null | null | null | ics2csv.py | Guiraud/csv-ical | 60f55ae494ff42074742891784799c95acf6af6c | [
"MIT"
] | null | null | null | from csv_ical import Convert
convert = Convert()
convert.CSV_FILE_LOCATION = 'mg.csv'
convert.SAVE_LOCATION = 'mg.ics'
convert.read_ical(convert.SAVE_LOCATION)
convert.make_csv()
convert.save_csv(convert.CSV_FILE_LOCATION)
convert = Convert()
convert.CSV_FILE_LOCATION = 'mg_CNAM.csv'
convert.SAVE_LOCATION = 'mg_CNA... | 24.617647 | 43 | 0.81362 |
794cc37e26cc2e63cc4c858d7a3b45a00ceb467a | 7,842 | py | Python | AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_largefile.py | CEOALT1/RefindPlusUDK | 116b957ad735f96fbb6d80a0ba582046960ba164 | [
"BSD-2-Clause"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_largefile.py | CEOALT1/RefindPlusUDK | 116b957ad735f96fbb6d80a0ba582046960ba164 | [
"BSD-2-Clause"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_largefile.py | CEOALT1/RefindPlusUDK | 116b957ad735f96fbb6d80a0ba582046960ba164 | [
"BSD-2-Clause"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | """Test largefile support on system where this makes sense.
"""
from __future__ import print_function
import os
import stat
import sys
import unittest
from test.test_support import run_unittest, TESTFN, verbose, requires, \
unlink
import io # C implementation of io
import _p... | 39.014925 | 90 | 0.551135 |
794cc3beb6f6b9e71383fb7f2e9339342830a82f | 504 | py | Python | utils/decorators.py | enaluz/cis450-topical-analysis | 69da5c184b207598548cbf305ee69e09739c557a | [
"MIT"
] | null | null | null | utils/decorators.py | enaluz/cis450-topical-analysis | 69da5c184b207598548cbf305ee69e09739c557a | [
"MIT"
] | 6 | 2020-04-24T03:28:32.000Z | 2021-09-08T01:55:26.000Z | utils/decorators.py | enaluz/cis450-topical-analysis | 69da5c184b207598548cbf305ee69e09739c557a | [
"MIT"
] | null | null | null | def exceptionHandler(childFunction):
def higherOrderFunction(*args, **kwargs):
try:
return childFunction(*args, **kwargs)
except Exception as e:
print("Caught Error: ", e)
pass
return higherOrderFunction
def classDecorator(decorator):
def decorate(cls):
... | 28 | 65 | 0.603175 |
794cc3ee19cc60276ee0b435f1551be1e97a3ee1 | 2,627 | py | Python | models/admin_control.py | chaoannricardo/NTU_CARDO_Database | 5fbfa1383f2e65a04fabd863c68373f45bbf05fd | [
"Apache-2.0"
] | 1 | 2020-07-04T22:30:41.000Z | 2020-07-04T22:30:41.000Z | models/admin_control.py | chaoannricardo/NTU_CARDO_Database | 5fbfa1383f2e65a04fabd863c68373f45bbf05fd | [
"Apache-2.0"
] | null | null | null | models/admin_control.py | chaoannricardo/NTU_CARDO_Database | 5fbfa1383f2e65a04fabd863c68373f45bbf05fd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf8 -*-
from time import sleep as t_sleep
import configuration as conf
from models import data_processing, database_management, file_management
import pymysql
from views import view_CLI
def admin_control():
print("【管理員模式】")
print("0. 產生主表(請使用專用表格)")
command = input("# 請輸入您所需要的功能,或輸入'exit'返回... | 39.80303 | 124 | 0.584697 |
794cc404f6714d2bfc8ab828db342ba43ac28df0 | 9,745 | py | Python | ucsmsdk/mometa/compute/ComputePCIeFatalProtocolStats.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 78 | 2015-11-30T14:10:05.000Z | 2022-02-13T00:29:08.000Z | ucsmsdk/mometa/compute/ComputePCIeFatalProtocolStats.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 113 | 2015-11-20T09:42:46.000Z | 2022-03-16T16:53:29.000Z | ucsmsdk/mometa/compute/ComputePCIeFatalProtocolStats.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 86 | 2015-12-12T08:22:18.000Z | 2022-01-23T03:56:34.000Z | """This module contains the general information for ComputePCIeFatalProtocolStats ManagedObject."""
from ...ucsmo import ManagedObject
from ...ucscoremeta import MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class ComputePCIeFatalProtocolStatsConsts:
SUSPECT_FALSE = "false"
SUSPECT_NO = "no"
... | 76.732283 | 258 | 0.701591 |
794cc41dda9b8b4253613c304f72eac016fdb50f | 78 | py | Python | tasks/__init__.py | cyente/OFA | 291a0abb76559a6379f1a7ebbdfdf1350c94a9f4 | [
"Apache-2.0"
] | null | null | null | tasks/__init__.py | cyente/OFA | 291a0abb76559a6379f1a7ebbdfdf1350c94a9f4 | [
"Apache-2.0"
] | null | null | null | tasks/__init__.py | cyente/OFA | 291a0abb76559a6379f1a7ebbdfdf1350c94a9f4 | [
"Apache-2.0"
] | null | null | null | from .mm_tasks import *
from .rec_tasks import *
from .ofa_task import OFATask | 26 | 29 | 0.794872 |
794cc42d49405276791b9a5ff580e7fb9fa1abfd | 6,620 | py | Python | pybind/slxos/v16r_1_00b/brocade_interface_ext_rpc/get_interface_switchport/output/switchport/inactive_vlans/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/brocade_interface_ext_rpc/get_interface_switchport/output/switchport/inactive_vlans/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/brocade_interface_ext_rpc/get_interface_switchport/output/switchport/inactive_vlans/__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... | 50.151515 | 546 | 0.72855 |
794cc457055c157ef0f1677b93747b8a911ead13 | 16,472 | py | Python | strawberryfields/apps/qchem/dynamics.py | Bayaniblues/strawberryfields | 9d9e2f4488ef3783d3d4b2f226afac0bc431257e | [
"Apache-2.0"
] | null | null | null | strawberryfields/apps/qchem/dynamics.py | Bayaniblues/strawberryfields | 9d9e2f4488ef3783d3d4b2f226afac0bc431257e | [
"Apache-2.0"
] | null | null | null | strawberryfields/apps/qchem/dynamics.py | Bayaniblues/strawberryfields | 9d9e2f4488ef3783d3d4b2f226afac0bc431257e | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Xanadu Quantum Technologies Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agre... | 35.271949 | 119 | 0.641209 |
794cc4a7a0c737968c35e7ceccad291048183340 | 504 | py | Python | kolibri/core/wage_tracker/api_urls.py | MihirBharali/akshar-app | 74f01615da5a33eebf393e5bc3940b8f25b6d4f0 | [
"MIT"
] | null | null | null | kolibri/core/wage_tracker/api_urls.py | MihirBharali/akshar-app | 74f01615da5a33eebf393e5bc3940b8f25b6d4f0 | [
"MIT"
] | null | null | null | kolibri/core/wage_tracker/api_urls.py | MihirBharali/akshar-app | 74f01615da5a33eebf393e5bc3940b8f25b6d4f0 | [
"MIT"
] | null | null | null | from django.conf.urls import include
from django.conf.urls import url
from rest_framework import routers
from .api import UserWageAccountViewset, UserWageAccountTransactionViewset
router = routers.SimpleRouter()
router.register(
r"account", UserWageAccountViewset, base_name="account"
)
router.register(
r"trans... | 28 | 80 | 0.704365 |
794cc4b8d00e2ba42483fb62c856fd380d43727e | 37,393 | py | Python | tests/models/test_channel.py | Solrkohen/Tucson | 2aca2186d74fdbfe77a008e3f05f6f2f12fca0aa | [
"BSD-3-Clause"
] | null | null | null | tests/models/test_channel.py | Solrkohen/Tucson | 2aca2186d74fdbfe77a008e3f05f6f2f12fca0aa | [
"BSD-3-Clause"
] | null | null | null | tests/models/test_channel.py | Solrkohen/Tucson | 2aca2186d74fdbfe77a008e3f05f6f2f12fca0aa | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from collections import OrderedDict
import os
from conda.common.io import env_var
from conda._vendor.auxlib.ish import dals
from conda.base.context import context, reset_context
from conda.common.compat import ... | 44.67503 | 140 | 0.618164 |
794cc513d15c2f5475ea1953814eb2e287842b8e | 41,635 | py | Python | pyne/ensdf.py | ypark234/pyne | b7c4932c0399e6a0881aea943b392fb97cd0b6bd | [
"MIT"
] | 1 | 2019-03-26T17:37:57.000Z | 2019-03-26T17:37:57.000Z | pyne/ensdf.py | ypark234/pyne | b7c4932c0399e6a0881aea943b392fb97cd0b6bd | [
"MIT"
] | 58 | 2019-01-07T16:13:26.000Z | 2019-05-09T15:56:26.000Z | pyne/ensdf.py | ypark234/pyne | b7c4932c0399e6a0881aea943b392fb97cd0b6bd | [
"MIT"
] | null | null | null | from __future__ import division
import re
import sys
import copy
from collections import defaultdict
from warnings import warn
from pyne.utils import QAWarning
from pyne.utils import time_conv_dict
import numpy as np
from pyne import nucname, rxname, data
if sys.version_info[0] > 2:
basestring = str
warn(__name... | 33.334668 | 97 | 0.536544 |
794cc524f6a9e71f0b9adc1779178e963fd32a1d | 13,992 | py | Python | eZmaxApi/model/list_save_listpresentation_v1_response.py | eZmaxinc/eZmax-SDK-python | 5b4d54b69db68aab8ee814a1e26460a0af03784e | [
"MIT"
] | null | null | null | eZmaxApi/model/list_save_listpresentation_v1_response.py | eZmaxinc/eZmax-SDK-python | 5b4d54b69db68aab8ee814a1e26460a0af03784e | [
"MIT"
] | null | null | null | eZmaxApi/model/list_save_listpresentation_v1_response.py | eZmaxinc/eZmax-SDK-python | 5b4d54b69db68aab8ee814a1e26460a0af03784e | [
"MIT"
] | null | null | null | """
eZmax API Definition
This API expose all the functionnalities for the eZmax and eZsign applications. # noqa: E501
The version of the OpenAPI document: 1.1.3
Contact: support-api@ezmax.ca
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from ... | 43.588785 | 121 | 0.593911 |
794cc55c6b5a7916d790f34a3ca7a661fd00268f | 212 | py | Python | examples/go_to_pose.py | nalbion/pycozmo | 35ee1ea741ecf7a39affc38d4ff5ad17865fea16 | [
"MIT"
] | 123 | 2019-08-25T21:28:23.000Z | 2022-03-12T13:54:59.000Z | examples/go_to_pose.py | nalbion/pycozmo | 35ee1ea741ecf7a39affc38d4ff5ad17865fea16 | [
"MIT"
] | 41 | 2019-08-25T21:21:37.000Z | 2022-02-09T14:20:54.000Z | examples/go_to_pose.py | nalbion/pycozmo | 35ee1ea741ecf7a39affc38d4ff5ad17865fea16 | [
"MIT"
] | 51 | 2019-09-04T13:30:02.000Z | 2022-01-09T01:20:24.000Z | #!/usr/bin/env python
import pycozmo
with pycozmo.connect() as cli:
target = pycozmo.util.Pose(200, 100.0, 0.0, angle_z=pycozmo.util.Angle(degrees=0.0))
cli.go_to_pose(target, relative_to_robot=True)
| 21.2 | 88 | 0.721698 |
794cc57dbfb9a758719c1ec1a7b7c7ee8c48429d | 4,683 | py | Python | Utils/tdms_to_video_converter.py | philshams/FC_analysis | cabe2385d5061d206a21b230605bfce9e39ec7f2 | [
"MIT"
] | null | null | null | Utils/tdms_to_video_converter.py | philshams/FC_analysis | cabe2385d5061d206a21b230605bfce9e39ec7f2 | [
"MIT"
] | null | null | null | Utils/tdms_to_video_converter.py | philshams/FC_analysis | cabe2385d5061d206a21b230605bfce9e39ec7f2 | [
"MIT"
] | null | null | null | import numpy as np
import os
from tempfile import mkdtemp
from nptdms import TdmsFile
import psutil
import gc
import time
from multiprocessing.dummy import Pool as ThreadPool
from tqdm import tqdm
import cv2
class TDMs_to_Video():
""" current implementation: takes one .tdms video and saves it into as a number o... | 37.766129 | 119 | 0.589366 |
794cc61879074a04e59f6b4c366d3e0b2e63547e | 15,092 | py | Python | src/util/util.py | Shoooooon/TensorOrder | 6a390c34f5f05a4c28bcdf5429da0582f34d749a | [
"MIT"
] | 14 | 2020-01-31T23:02:39.000Z | 2021-12-26T06:00:13.000Z | src/util/util.py | Shoooooon/TensorOrder | 6a390c34f5f05a4c28bcdf5429da0582f34d749a | [
"MIT"
] | 3 | 2020-06-27T21:11:46.000Z | 2020-06-27T21:11:47.000Z | src/util/util.py | Shoooooon/TensorOrder | 6a390c34f5f05a4c28bcdf5429da0582f34d749a | [
"MIT"
] | 1 | 2021-05-28T05:12:43.000Z | 2021-05-28T05:12:43.000Z | import click
import ctypes
import enum
import itertools
import os
import queue
import signal
import sys
import threading
import time
class TimeoutTimer:
"""
A convenient wrapper for triggering a TimeoutError after a given time.
There should only be a single TimeoutTimer object at a given time.
"""
... | 29.944444 | 108 | 0.606281 |
794cc6867141386e74c194e2df1578c20276c526 | 7,641 | py | Python | vgio/duke3d/tests/test_map.py | joshuaskelly/game-tools | e71bcf4ef6553adf0b51f4379f72bc5a82a60176 | [
"MIT"
] | 22 | 2017-11-30T22:13:50.000Z | 2019-12-19T17:56:40.000Z | vgio/duke3d/tests/test_map.py | joshuaskelly/vgio | e71bcf4ef6553adf0b51f4379f72bc5a82a60176 | [
"MIT"
] | 22 | 2019-08-11T05:07:26.000Z | 2020-12-30T16:07:04.000Z | vgio/duke3d/tests/test_map.py | joshuaskelly/game-tools | e71bcf4ef6553adf0b51f4379f72bc5a82a60176 | [
"MIT"
] | 4 | 2018-06-24T14:04:36.000Z | 2019-05-14T06:01:51.000Z | import unittest
from vgio.duke3d.tests.basecase import TestCase
from vgio.duke3d import map
class TestMapReadWrite(TestCase):
def test_check_file_type(self):
self.assertFalse(map.is_mapfile('./test_data/test.art'))
def test_sector(self):
s0 = map.Sector(
wall_pointer=1,
... | 46.591463 | 112 | 0.647297 |
794cc6867b96c425546f7a5ec84cbdf35de7c533 | 3,554 | py | Python | homeassistant/components/tplink/__init__.py | alindeman/home-assistant | b274b10f3874c196f0db8f9cfa5f47eb756d1f8e | [
"Apache-2.0"
] | 4 | 2019-07-03T22:36:57.000Z | 2019-08-10T15:33:25.000Z | homeassistant/components/tplink/__init__.py | alindeman/home-assistant | b274b10f3874c196f0db8f9cfa5f47eb756d1f8e | [
"Apache-2.0"
] | 7 | 2019-08-23T05:26:02.000Z | 2022-03-11T23:57:18.000Z | homeassistant/components/tplink/__init__.py | alindeman/home-assistant | b274b10f3874c196f0db8f9cfa5f47eb756d1f8e | [
"Apache-2.0"
] | 2 | 2018-08-15T03:59:35.000Z | 2018-10-18T12:20:05.000Z | """Component to embed TP-Link smart home devices."""
import logging
import voluptuous as vol
from homeassistant.const import CONF_HOST
from homeassistant import config_entries
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.typing import ConfigType, HomeAssistantType
from .common impo... | 28.66129 | 79 | 0.66798 |
794cc6ec1d3975fbc59464027d957f40d9223528 | 5,229 | py | Python | instagram/views.py | xamaan585/InstaClone | 4c1b41c2c77cfc04808d339db7ed7e337c36cea3 | [
"Unlicense"
] | null | null | null | instagram/views.py | xamaan585/InstaClone | 4c1b41c2c77cfc04808d339db7ed7e337c36cea3 | [
"Unlicense"
] | null | null | null | instagram/views.py | xamaan585/InstaClone | 4c1b41c2c77cfc04808d339db7ed7e337c36cea3 | [
"Unlicense"
] | null | null | null | from django.http import HttpResponse,Http404,HttpResponseRedirect
import datetime as dt
from django.shortcuts import render,redirect,get_object_or_404
from .models import Follow, Image,Profile,Comments
from django.contrib.auth.models import User
from .forms import NewsLetterForm, UpdateUserForm, UpdateUserProfileForm,... | 36.566434 | 165 | 0.689807 |
794cc77f613223557804595389a16d28c8a63cb6 | 4,950 | py | Python | trax/layers/__init__.py | pkozakowski/trax | 31215c378017347e0b66ba51c37cd3cbedf60b17 | [
"Apache-2.0"
] | 1 | 2021-03-09T10:47:00.000Z | 2021-03-09T10:47:00.000Z | trax/layers/__init__.py | pkozakowski/trax | 31215c378017347e0b66ba51c37cd3cbedf60b17 | [
"Apache-2.0"
] | null | null | null | trax/layers/__init__.py | pkozakowski/trax | 31215c378017347e0b66ba51c37cd3cbedf60b17 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021 The Trax 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 a... | 43.421053 | 80 | 0.79798 |
794cc8222efc78e63ae98bc7e69eca2e83345867 | 2,137 | py | Python | 19-monster-messages/test_solution19.py | johntelforduk/advent-of-code-2020 | 138df3a7b12e418f371f641fed02e57a98a7392e | [
"MIT"
] | 1 | 2020-12-03T13:20:49.000Z | 2020-12-03T13:20:49.000Z | 19-monster-messages/test_solution19.py | johntelforduk/advent-of-code-2020 | 138df3a7b12e418f371f641fed02e57a98a7392e | [
"MIT"
] | null | null | null | 19-monster-messages/test_solution19.py | johntelforduk/advent-of-code-2020 | 138df3a7b12e418f371f641fed02e57a98a7392e | [
"MIT"
] | null | null | null | # Unit tests for day 19 of AOC 2020, Monster Messages.
from solution19 import rule_to_regex, message_match_regexp
import unittest
class TestFunctions(unittest.TestCase):
def test_functions(self):
test_regex = rule_to_regex(rules={'0': ['"a"']}, rule_number='0')
self.assertEqual(test_regex, 'a')... | 50.880952 | 105 | 0.60365 |
794cc901eb3e1683819050817ea3bde13d4933c2 | 1,629 | py | Python | learning/setup.py | dibakch/differential-privacy | ae9c6b6d5b7e772837ae336d1b3092683481ec16 | [
"Apache-2.0"
] | 2,550 | 2019-09-04T13:13:24.000Z | 2022-03-31T16:05:50.000Z | learning/setup.py | fbalicchia/differential-privacy | 099080e49c4c047802d785bc818898c0caf84d45 | [
"Apache-2.0"
] | 90 | 2019-09-10T15:37:10.000Z | 2022-03-28T12:55:03.000Z | learning/setup.py | fbalicchia/differential-privacy | 099080e49c4c047802d785bc818898c0caf84d45 | [
"Apache-2.0"
] | 324 | 2019-09-05T11:52:06.000Z | 2022-03-31T03:30:26.000Z | # Copyright 2021 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 34.659574 | 74 | 0.712093 |
794cc97c324a12c8dfed190e7a372f4af1d97c3c | 2,731 | py | Python | laboratorios/models.py | tacianosilva/gestorlab | ca18b2b442ea1ae814f87cb4b4624ec9331fe062 | [
"MIT"
] | null | null | null | laboratorios/models.py | tacianosilva/gestorlab | ca18b2b442ea1ae814f87cb4b4624ec9331fe062 | [
"MIT"
] | 1 | 2020-07-23T13:39:26.000Z | 2020-07-23T13:39:26.000Z | laboratorios/models.py | tacianosilva/gestorlab | ca18b2b442ea1ae814f87cb4b4624ec9331fe062 | [
"MIT"
] | null | null | null | from django.urls import reverse
from django.conf import settings
from django.db import models
from django.utils.text import slugify
class Departamento(models.Model):
"""
Um departamento tem identificador, código, nome, sigla, endereço e site.
"""
id_unidade = models.IntegerField(unique=True)
... | 32.903614 | 99 | 0.683266 |
794cca7257a339d3947189ff1e6fd8a746d43e43 | 9,216 | py | Python | setup.py | ASDen/horovod | 7b5346e233395449f0d1132a789d7eeffcce1776 | [
"Apache-2.0"
] | null | null | null | setup.py | ASDen/horovod | 7b5346e233395449f0d1132a789d7eeffcce1776 | [
"Apache-2.0"
] | null | null | null | setup.py | ASDen/horovod | 7b5346e233395449f0d1132a789d7eeffcce1776 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Uber Technologies, Inc. All Rights Reserved.
# Modifications copyright Microsoft
# Modifications copyright (C) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may ... | 41.142857 | 124 | 0.642253 |
794ccad0e8457c89068acb39cc7c0c8355457cf8 | 8,759 | py | Python | tests/test_client_payment.py | captn3m0/razorpay | 0352f2d81696984c96e51c55a81178c663be320f | [
"MIT"
] | 3 | 2015-11-18T10:28:07.000Z | 2015-11-21T01:17:35.000Z | tests/test_client_payment.py | captn3m0/razorpay | 0352f2d81696984c96e51c55a81178c663be320f | [
"MIT"
] | null | null | null | tests/test_client_payment.py | captn3m0/razorpay | 0352f2d81696984c96e51c55a81178c663be320f | [
"MIT"
] | null | null | null | import responses
import json
from .helpers import mock_file, ClientTestCase
class TestClientPayment(ClientTestCase):
def setUp(self):
super(TestClientPayment, self).setUp()
self.base_url = '{}/payments'.format(self.base_url)
@responses.activate
def test_payment_all(self):
result... | 41.511848 | 110 | 0.600868 |
794ccb71011ae689ebbbb75ad382b542646615a3 | 11,423 | py | Python | verticapy/learn/linear_model.py | afard/VerticaPy | ecbee0027a208ba53b31438e5b2f4577af95a07e | [
"Apache-2.0"
] | 52 | 2020-06-29T12:31:14.000Z | 2022-03-31T20:24:23.000Z | verticapy/learn/linear_model.py | afard/VerticaPy | ecbee0027a208ba53b31438e5b2f4577af95a07e | [
"Apache-2.0"
] | 175 | 2020-07-13T18:16:28.000Z | 2022-03-31T14:01:45.000Z | verticapy/learn/linear_model.py | afard/VerticaPy | ecbee0027a208ba53b31438e5b2f4577af95a07e | [
"Apache-2.0"
] | 21 | 2020-07-07T22:53:10.000Z | 2022-03-04T11:30:48.000Z | # (c) Copyright [2018-2021] Micro Focus or one of its affiliates.
# 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 applicabl... | 32.54416 | 86 | 0.57428 |
794ccb9909087ce7b84c1ef162955cb8d22331f1 | 734 | py | Python | manage.py | FGacheru/blog_app | 3c32e7f38a39c4f77c95e7645bd58abf9083916b | [
"MIT"
] | null | null | null | manage.py | FGacheru/blog_app | 3c32e7f38a39c4f77c95e7645bd58abf9083916b | [
"MIT"
] | null | null | null | manage.py | FGacheru/blog_app | 3c32e7f38a39c4f77c95e7645bd58abf9083916b | [
"MIT"
] | null | null | null | from app import create_app,db
from app.models import *
from flask_migrate import Migrate, MigrateCommand
from flask_script import Manager, Server
# Creating app instance
app = create_app('test')
app = create_app('production')
manager = Manager(app)
manager.add_command('server',Server)
migrate = Migrate(app,db)
m... | 24.466667 | 95 | 0.723433 |
794cccc6af2e8734483a8786519b223529726026 | 9,823 | py | Python | src/examples/MapReduceModel/main.py | MarkoRimac/YAFS | 5ea354439e4acb4ca83714b01eb427b508718836 | [
"MIT"
] | 58 | 2018-09-19T12:00:01.000Z | 2022-03-28T12:14:32.000Z | src/examples/MapReduceModel/main.py | MarkoRimac/YAFS | 5ea354439e4acb4ca83714b01eb427b508718836 | [
"MIT"
] | 55 | 2018-03-18T09:58:27.000Z | 2022-02-19T16:40:02.000Z | src/examples/MapReduceModel/main.py | MarkoRimac/YAFS | 5ea354439e4acb4ca83714b01eb427b508718836 | [
"MIT"
] | 51 | 2018-05-30T11:33:10.000Z | 2022-03-14T15:37:01.000Z | """
This example...
@author: Isaac Lera & Carlos Guerrero
"""
import json
import argparse
from yafs.core import Sim
from yafs.application import Application,Message
from yafs.topology import Topology
from yafs.placement import JSONPlacement,JSONPlacementOnCloud
from yafs.distribution import *
import numpy as n... | 30.506211 | 160 | 0.628016 |
794ccd2d020eb2a95459d4108500063283259713 | 2,021 | py | Python | AdminManageAPI/serializers.py | sammacorpy/House-keeping-management-only-api | 01edaf85712c9f3a7daa809f544a299fe8f5fe39 | [
"MIT"
] | 3 | 2019-07-17T15:36:43.000Z | 2021-03-18T04:41:37.000Z | AdminManageAPI/serializers.py | sammacorpy/House-keeping-management-only-api | 01edaf85712c9f3a7daa809f544a299fe8f5fe39 | [
"MIT"
] | null | null | null | AdminManageAPI/serializers.py | sammacorpy/House-keeping-management-only-api | 01edaf85712c9f3a7daa809f544a299fe8f5fe39 | [
"MIT"
] | null | null | null | from rest_framework import serializers,exceptions
from AdminManageAPI.models import *
from django.contrib.auth import authenticate,login
from django.contrib.auth.models import User
class UserSerializer(serializers.ModelSerializer):
class Meta:
model=User
fields='__all__'
class AssetSerializer(se... | 22.208791 | 66 | 0.53142 |
794ccd5d6fea9c2604b6b589368bfc870b448270 | 1,582 | py | Python | setup.py | cloudnull/pasted-client | 66839ae234ae13d0a69f08b7206e55ece0838d98 | [
"Apache-2.0"
] | null | null | null | setup.py | cloudnull/pasted-client | 66839ae234ae13d0a69f08b7206e55ece0838d98 | [
"Apache-2.0"
] | null | null | null | setup.py | cloudnull/pasted-client | 66839ae234ae13d0a69f08b7206e55ece0838d98 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 31.64 | 75 | 0.651707 |
794ccf31c9e0493751c0b34bdcf1a7c87d577e3f | 1,685 | py | Python | Lesson05/transmembrane.py | NatalieTehranchi/learning_python | ea24162ef5d4042f0e969e0ed6b1aa0765a8bb55 | [
"MIT"
] | null | null | null | Lesson05/transmembrane.py | NatalieTehranchi/learning_python | ea24162ef5d4042f0e969e0ed6b1aa0765a8bb55 | [
"MIT"
] | null | null | null | Lesson05/transmembrane.py | NatalieTehranchi/learning_python | ea24162ef5d4042f0e969e0ed6b1aa0765a8bb55 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import biotoolbox
# Write a program that predicts if a protein is trans-membrane
# Trans-membrane proteins have the following properties
# Signal peptide: https://en.wikipedia.org/wiki/Signal_peptide
# Hydrophobic regions(s): https://en.wikipedia.org/wiki/Transmembrane_protein
# ... | 22.77027 | 77 | 0.735905 |
794cd1542015cd7016fe92a4a93089a9f9f71303 | 831 | py | Python | qriter/noxfile.py | tonyfast/writers-workshop | fa6d24330bc24f1e2060b00de06ff26236d24f21 | [
"BSD-3-Clause"
] | null | null | null | qriter/noxfile.py | tonyfast/writers-workshop | fa6d24330bc24f1e2060b00de06ff26236d24f21 | [
"BSD-3-Clause"
] | null | null | null | qriter/noxfile.py | tonyfast/writers-workshop | fa6d24330bc24f1e2060b00de06ff26236d24f21 | [
"BSD-3-Clause"
] | 1 | 2021-05-14T16:31:33.000Z | 2021-05-14T16:31:33.000Z | """sessions for running tasks to build docs and packages
nox -s docs
"""
import os
import nox
CI = "GITHUB_ACTION" in os.environ or "READTHEDOCS" in os.environ
@nox.session(reuse_venv=True, python=False if CI else "3.8")
def docs(session):
session.install(*"""-rworks/requirements-docs.txt --ignore-installed"... | 36.130435 | 99 | 0.684717 |
794cd184f19e6b57f5ff303b228c397303f308b8 | 1,737 | py | Python | test/sagemaker_tests/pytorch/training/integration/__init__.py | Jarryd-rk/deep-learning-containers | 6b98175bb70f1badd7e64843914e1c475c3128fa | [
"Apache-2.0"
] | 7 | 2021-12-18T05:49:22.000Z | 2021-12-28T09:52:32.000Z | test/sagemaker_tests/pytorch/training/integration/__init__.py | Jarryd-rk/deep-learning-containers | 6b98175bb70f1badd7e64843914e1c475c3128fa | [
"Apache-2.0"
] | 2 | 2022-03-28T12:39:09.000Z | 2022-03-29T12:42:01.000Z | test/sagemaker_tests/pytorch/training/integration/__init__.py | Jarryd-rk/deep-learning-containers | 6b98175bb70f1badd7e64843914e1c475c3128fa | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" fil... | 45.710526 | 93 | 0.776051 |
794cd1e0b7e241159a699f232ad898046566b58d | 2,358 | py | Python | 3D_CNN/SequenceBatchGenerator.py | dahe-cvl/apa_paper | bec38e0270fda6f0fd092eacc6f10344b26a0f19 | [
"MIT"
] | 1 | 2021-05-13T10:33:20.000Z | 2021-05-13T10:33:20.000Z | 3D_CNN/SequenceBatchGenerator.py | dahe-cvl/apa_paper | bec38e0270fda6f0fd092eacc6f10344b26a0f19 | [
"MIT"
] | null | null | null | 3D_CNN/SequenceBatchGenerator.py | dahe-cvl/apa_paper | bec38e0270fda6f0fd092eacc6f10344b26a0f19 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from DataAugmentation import DataAugmentation
class SequenceBatchGenerator:
# Create minibatches of a given size from a dataset.
# Preserves the original sample order unless shuffle() is used.
batchsize = 0;
dataset = None;
tform = None;
stat = None;
nBatches... | 28.409639 | 98 | 0.630195 |
794cd2b9a5aac8b13f7a34688d69809e8916091a | 631 | py | Python | manage.py | petmik2018/DRF_backend | d81cf75db1451bfd8f5ba9205c7353d7ea845dab | [
"MIT"
] | null | null | null | manage.py | petmik2018/DRF_backend | d81cf75db1451bfd8f5ba9205c7353d7ea845dab | [
"MIT"
] | 7 | 2020-06-06T01:46:05.000Z | 2022-02-10T10:29:31.000Z | manage.py | petmik2018/DRF_backend | d81cf75db1451bfd8f5ba9205c7353d7ea845dab | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'drf_backend.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Im... | 28.681818 | 75 | 0.684628 |
794cd3fc01e8683cf80a54a7cc02eff9b79238c5 | 898 | py | Python | actions/format.py | cognifloyd/stackstorm-csv | 75af77cf905f41a0551b17b587d79859356e1c94 | [
"Apache-2.0"
] | null | null | null | actions/format.py | cognifloyd/stackstorm-csv | 75af77cf905f41a0551b17b587d79859356e1c94 | [
"Apache-2.0"
] | null | null | null | actions/format.py | cognifloyd/stackstorm-csv | 75af77cf905f41a0551b17b587d79859356e1c94 | [
"Apache-2.0"
] | null | null | null | import csv
from six.moves import StringIO
from st2common.runners.base_action import Action
from st2common.exceptions.action import InvalidActionParameterException
__all__ = [
'FormatCSVAction'
]
class FormatCSVAction(Action):
def run(self, data, delimiter=',', quote_char='"'):
if len(data) == 0:
... | 27.212121 | 80 | 0.650334 |
794cd481bd185a8071cfdd33a47d73336666de69 | 222 | py | Python | crash_course/ch04/dimensions.py | dantin/python-by-example | 5769c7a332ebd60fd54e477b6813f2f2a0f3f37f | [
"BSD-3-Clause"
] | null | null | null | crash_course/ch04/dimensions.py | dantin/python-by-example | 5769c7a332ebd60fd54e477b6813f2f2a0f3f37f | [
"BSD-3-Clause"
] | null | null | null | crash_course/ch04/dimensions.py | dantin/python-by-example | 5769c7a332ebd60fd54e477b6813f2f2a0f3f37f | [
"BSD-3-Clause"
] | null | null | null |
dimensions = (200, 50)
print(dimensions[0])
print(dimensions[1])
print('Original dimensions:')
for d in dimensions:
print(d)
dimensions = (400, 100)
print('\nModified dimensions:')
for d in dimensions:
print(d)
| 15.857143 | 31 | 0.693694 |
794cd5345fa0677178c67136261cf8856246f808 | 6,777 | py | Python | bindings/python/cntk/ops/tests/block_test.py | MSXC/CNTK | d223d48b411bc994acd465ed333c9f6bed64dd7f | [
"RSA-MD"
] | null | null | null | bindings/python/cntk/ops/tests/block_test.py | MSXC/CNTK | d223d48b411bc994acd465ed333c9f6bed64dd7f | [
"RSA-MD"
] | null | null | null | bindings/python/cntk/ops/tests/block_test.py | MSXC/CNTK | d223d48b411bc994acd465ed333c9f6bed64dd7f | [
"RSA-MD"
] | null | null | null | # Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.md file in the project root
# for full license information.
# ==============================================================================
"""
Unit tests for as_block operation, only forward pass is tested
"""
from __futu... | 39.17341 | 159 | 0.710491 |
794cd628894a14fc7b2c57b60f264fb45c3fe219 | 411 | py | Python | fetch-data.py | gidoca/renormalize | 45ef51677043239dc0cb6af71528a2401635d842 | [
"MIT"
] | null | null | null | fetch-data.py | gidoca/renormalize | 45ef51677043239dc0cb6af71528a2401635d842 | [
"MIT"
] | null | null | null | fetch-data.py | gidoca/renormalize | 45ef51677043239dc0cb6af71528a2401635d842 | [
"MIT"
] | null | null | null | import requests
import json
url_bs : str = 'https://data.bs.ch/api/records/1.0/search/?dataset=100111&q=&sort=-datum&facet=datum'
res_bs = requests.get(url_bs)
res_bs.raise_for_status()
data = [{'date': record['fields']['datum'], 'count': record['fields']['total_geimpfte_personen']} for record in res_bs.json()['record... | 41.1 | 137 | 0.717762 |
794cd74c4ae2c6c86b1ec7863359e07f3d9a9e2d | 2,499 | py | Python | test/system/test_eapictl.py | arista-eosplus/eapictl | 38917722dd61224f044f30daf21f8120cdf034fa | [
"BSD-3-Clause"
] | 2 | 2017-08-24T04:41:07.000Z | 2020-02-27T00:14:11.000Z | test/system/test_eapictl.py | arista-eosplus/eapictl | 38917722dd61224f044f30daf21f8120cdf034fa | [
"BSD-3-Clause"
] | 1 | 2015-04-14T18:06:19.000Z | 2017-04-26T13:45:31.000Z | test/system/test_eapictl.py | arista-eosplus/eapictl | 38917722dd61224f044f30daf21f8120cdf034fa | [
"BSD-3-Clause"
] | null | null | null | import unittest
import os
import json
import shlex
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '../lib'))
from StringIO import StringIO
from systestlib import get_fixture
import eapictl.app
class TestStatus(unittest.TestCase):
def setUp(self):
self.stdout = sys.stdout
sy... | 28.724138 | 77 | 0.62425 |
794cd758a58be1c10db0ca0aed57cfef46717710 | 3,658 | py | Python | Landmark, Triangulation & Face Morphing/Code/part3.py | cansuynk/ComputerVision | 441e8621528ddae9d213d1633e4317d1ffb6abfa | [
"MIT"
] | null | null | null | Landmark, Triangulation & Face Morphing/Code/part3.py | cansuynk/ComputerVision | 441e8621528ddae9d213d1633e4317d1ffb6abfa | [
"MIT"
] | null | null | null | Landmark, Triangulation & Face Morphing/Code/part3.py | cansuynk/ComputerVision | 441e8621528ddae9d213d1633e4317d1ffb6abfa | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import cv2
import numpy as np
import dlib
from part2 import catLandmarks
#Loads images
catImage = cv2.imread("./CAT_00/00000095_001.jpg")
rows, cols, ch = catImage.shape
firstImage = cv2.imread("./dennis_ritchie.jpg")
secondImage = cv2.imread("./yusuf.jpg")
#Since it is necessa... | 27.923664 | 82 | 0.6386 |
794cd8433f7956863e22a503a6ad9d953717dd98 | 1,296 | py | Python | ch06/overfit_dropout.py | atocplusplus/test | 471ff64c25d27eaad58d8b5a9e787249db974d44 | [
"MIT"
] | null | null | null | ch06/overfit_dropout.py | atocplusplus/test | 471ff64c25d27eaad58d8b5a9e787249db974d44 | [
"MIT"
] | null | null | null | ch06/overfit_dropout.py | atocplusplus/test | 471ff64c25d27eaad58d8b5a9e787249db974d44 | [
"MIT"
] | null | null | null | # coding: utf-8
import os
import sys
sys.path.append(os.pardir) # 親ディレクトリのファイルをインポートするための設定
import numpy as np
import matplotlib.pyplot as plt
from dataset.mnist import load_mnist
from common.multi_layer_net_extend import MultiLayerNetExtend
from common.trainer import Trainer
(x_train, t_train), (x_test, t_test) = lo... | 35.027027 | 100 | 0.725309 |
794cd8856437f1fc981614237f747c9335a6968a | 1,432 | py | Python | fHDHR_web/pages/settings_html.py | CarloDiGi/fHDHR_Ceton | c8ab6405aeca6f32e6df37e1dabc9269642a4aeb | [
"WTFPL"
] | 1 | 2021-03-08T23:34:49.000Z | 2021-03-08T23:34:49.000Z | fHDHR_web/pages/settings_html.py | CarloDiGi/fHDHR_Ceton | c8ab6405aeca6f32e6df37e1dabc9269642a4aeb | [
"WTFPL"
] | null | null | null | fHDHR_web/pages/settings_html.py | CarloDiGi/fHDHR_Ceton | c8ab6405aeca6f32e6df37e1dabc9269642a4aeb | [
"WTFPL"
] | null | null | null | from flask import request, render_template, session
class Settings_HTML():
endpoints = ["/settings", "/settings.html"]
endpoint_name = "page_settings_html"
endpoint_access_level = 1
endpoint_category = "tool_pages"
pretty_name = "Settings"
def __init__(self, fhdhr):
self.fhdhr = fhdhr... | 42.117647 | 147 | 0.651536 |
794cd8d43ab62723043908224e5d375785aff82c | 467 | py | Python | pvm/transition_state.py | gosion/pyPvm | d7326799c907b660db11b02fd16843fdb4733eb7 | [
"MIT"
] | null | null | null | pvm/transition_state.py | gosion/pyPvm | d7326799c907b660db11b02fd16843fdb4733eb7 | [
"MIT"
] | null | null | null | pvm/transition_state.py | gosion/pyPvm | d7326799c907b660db11b02fd16843fdb4733eb7 | [
"MIT"
] | null | null | null | from enum import IntEnum
class TransitionState(IntEnum):
def __new__(cls, value, phrase, description=""):
obj = int.__new__(cls, value)
obj._value_ = value
obj.phrase = phrase
obj.description = description
return obj
Pending = 1, "Pending", "Pending to run."
Passe... | 27.470588 | 59 | 0.608137 |
794cd9454e55e94d3a51f4e63792c7ce9d0bd264 | 271 | py | Python | app/__init__.py | AdamKobi/s3uploader | 25266604ecfa4cced02f88a3cf063acfcf20ca93 | [
"MIT"
] | null | null | null | app/__init__.py | AdamKobi/s3uploader | 25266604ecfa4cced02f88a3cf063acfcf20ca93 | [
"MIT"
] | null | null | null | app/__init__.py | AdamKobi/s3uploader | 25266604ecfa4cced02f88a3cf063acfcf20ca93 | [
"MIT"
] | null | null | null | #!/usr/bin/python2
# Author: Adam Kobi <adamkobi12@gmail.com>
from .utils import *
logger = init_logging('uploader')
cfg = init_config()
if cfg['debug']:
logger.setLevel(logging.DEBUG)
logger.debug("Configuration - '{}'".format(cfg))
logger.info("Initiated")
| 19.357143 | 52 | 0.693727 |
794cd949b0fa85d9181a3bf04fd4d9123918692b | 8,619 | py | Python | pub_data_visualization/global_tools/compute_delivery_period_index.py | cre-os/pub-data-visualization | e5ec45e6397258646290836fc1a3b39ad69bf266 | [
"MIT"
] | 10 | 2020-10-08T11:35:49.000Z | 2021-01-22T16:47:59.000Z | pub_data_visualization/global_tools/compute_delivery_period_index.py | cre-os/pub-data-visualization | e5ec45e6397258646290836fc1a3b39ad69bf266 | [
"MIT"
] | 3 | 2021-03-15T14:26:43.000Z | 2021-12-02T15:27:49.000Z | pub_data_visualization/global_tools/compute_delivery_period_index.py | cre-dev/pub-data-visualization | 229bb7a543684be2cb06935299345ce3263da946 | [
"MIT"
] | 1 | 2021-01-22T16:47:10.000Z | 2021-01-22T16:47:10.000Z |
import pandas as pd
import re
#
from .. import global_var
def compute_delivery_period_index(frequency = None,
delivery_begin_dt_local = None,
delivery_end_date_local = None,
tz_local = No... | 59.854167 | 153 | 0.489964 |
794cd9a98751b3c205907a9b695240808464a1fb | 1,981 | py | Python | parser1.py | divyeshBhartiya/InvoiceReader.OCR | 2fe21d51235114a694aaf95231f164508ba84c34 | [
"MIT"
] | null | null | null | parser1.py | divyeshBhartiya/InvoiceReader.OCR | 2fe21d51235114a694aaf95231f164508ba84c34 | [
"MIT"
] | null | null | null | parser1.py | divyeshBhartiya/InvoiceReader.OCR | 2fe21d51235114a694aaf95231f164508ba84c34 | [
"MIT"
] | null | null | null | from tkinter import *
from tkinter import filedialog
from PIL import ImageTk, Image
import cv2
import pytesseract
pytesseract.pytesseract.tesseract_cmd = 'C:\\Program Files\\Tesseract-OCR\\tesseract.exe'
root = Tk()
root.title('Text Extractor')
newline= Label(root)
uploaded_img=Label(root)
scrollbar =... | 31.951613 | 143 | 0.619384 |
794cdafb939a7093da5cad520aa79fa6ea900dc3 | 1,090 | py | Python | ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/eCpriMsgType3_template.py | Vibaswan/ixnetwork_restpy | 239fedc7050890746cbabd71ea1e91c68d9e5cad | [
"MIT"
] | null | null | null | ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/eCpriMsgType3_template.py | Vibaswan/ixnetwork_restpy | 239fedc7050890746cbabd71ea1e91c68d9e5cad | [
"MIT"
] | null | null | null | ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/eCpriMsgType3_template.py | Vibaswan/ixnetwork_restpy | 239fedc7050890746cbabd71ea1e91c68d9e5cad | [
"MIT"
] | null | null | null | from ixnetwork_restpy.base import Base
from ixnetwork_restpy.files import Files
class eCPRI_Msg_Type_Generic_Data_Transfer3(Base):
__slots__ = ()
_SDM_NAME = 'eCpriMsgType3'
_SDM_ATT_MAP = {
'pcid': 'eCpriMsgType3.header.pcid',
'seqid': 'eCpriMsgType3.header.seqid',
'userdata': 'eC... | 32.058824 | 83 | 0.708257 |
794cdbde99cf3a80caf7a1045928185017eacc28 | 4,909 | py | Python | dbt/adapters/athena/impl.py | JustasCe/dbt-athena | af61eff1b73f38815c10c15c0dc23b7339f3303f | [
"Apache-2.0"
] | null | null | null | dbt/adapters/athena/impl.py | JustasCe/dbt-athena | af61eff1b73f38815c10c15c0dc23b7339f3303f | [
"Apache-2.0"
] | null | null | null | dbt/adapters/athena/impl.py | JustasCe/dbt-athena | af61eff1b73f38815c10c15c0dc23b7339f3303f | [
"Apache-2.0"
] | null | null | null | from uuid import uuid4
import agate
import re
import boto3
from botocore.exceptions import ClientError
from concurrent.futures import Future
from itertools import chain
from threading import Lock
from typing import Iterator, List, Optional, Tuple
from dbt.adapters.base import available
from dbt.adapters.base.impl impo... | 37.189394 | 136 | 0.649012 |
794cdca05ff5119fa6e97271a066960c9773aa0b | 669 | py | Python | segregation/tests/test_multi_squared_coefficient_of_variation.py | sjsrey/segregation | bdf53f5423477f0c66975f994f48ce3a16000788 | [
"BSD-3-Clause"
] | null | null | null | segregation/tests/test_multi_squared_coefficient_of_variation.py | sjsrey/segregation | bdf53f5423477f0c66975f994f48ce3a16000788 | [
"BSD-3-Clause"
] | null | null | null | segregation/tests/test_multi_squared_coefficient_of_variation.py | sjsrey/segregation | bdf53f5423477f0c66975f994f48ce3a16000788 | [
"BSD-3-Clause"
] | null | null | null | import unittest
from libpysal.examples import load_example
import geopandas as gpd
import numpy as np
from segregation.aspatial import MultiSquaredCoefficientVariation
class Multi_Squared_Coefficient_of_Variation_Tester(unittest.TestCase):
def test_Multi_Squared_Coefficient_of_Variation(self):
s_map = gpd... | 37.166667 | 87 | 0.769806 |
794cddad771ab3679ebe1492ad2b656ca17837dd | 92,765 | py | Python | src/transformers/trainer.py | rmroczkowski/transformers | c988db5af2a5f1ccfcb5ad19bd735b6a77516637 | [
"Apache-2.0"
] | 1 | 2021-12-27T04:48:40.000Z | 2021-12-27T04:48:40.000Z | src/transformers/trainer.py | rmroczkowski/transformers | c988db5af2a5f1ccfcb5ad19bd735b6a77516637 | [
"Apache-2.0"
] | null | null | null | src/transformers/trainer.py | rmroczkowski/transformers | c988db5af2a5f1ccfcb5ad19bd735b6a77516637 | [
"Apache-2.0"
] | 1 | 2021-12-27T04:49:35.000Z | 2021-12-27T04:49:35.000Z | # coding=utf-8
# Copyright 2020-present the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 47.304946 | 190 | 0.642042 |
794cdf410a99d064d1b13bf39145209ba8d5d837 | 1,230 | py | Python | autoio/projrot_io/reader.py | sjklipp/autoio | e2b471e9c9dec933319c98a30d4d519ca5d47645 | [
"Apache-2.0"
] | null | null | null | autoio/projrot_io/reader.py | sjklipp/autoio | e2b471e9c9dec933319c98a30d4d519ca5d47645 | [
"Apache-2.0"
] | null | null | null | autoio/projrot_io/reader.py | sjklipp/autoio | e2b471e9c9dec933319c98a30d4d519ca5d47645 | [
"Apache-2.0"
] | null | null | null | """
Functions to read in the projected frequencies generated by ProjRot
"""
def rpht_output(output_str):
""" Parses ProjRot frequency output file strings for the
projected vibrational frequencies, sorted in ascending order.
Works for the output of both
(1) rotation-translation projec... | 30 | 70 | 0.630894 |
794cdfd862368bc2c77596b409ff7a4ae5d18d24 | 687 | py | Python | python/test/misc/test_to_json.py | takashiharano/util | 0f730475386a77415545de3f9763e5bdeaab0e94 | [
"MIT"
] | null | null | null | python/test/misc/test_to_json.py | takashiharano/util | 0f730475386a77415545de3f9763e5bdeaab0e94 | [
"MIT"
] | null | null | null | python/test/misc/test_to_json.py | takashiharano/util | 0f730475386a77415545de3f9763e5bdeaab0e94 | [
"MIT"
] | null | null | null | #!python
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '../..'))
import util
def test_to_json():
data = {
'key1': 'val1',
'key2': 'val2',
'key3': [1, 2, 3],
'key4': {
'key4-1': 1,
'key4-2': 2,
'key4-3': 3
}
}
s = util.to_json(data) + '\n... | 16.756098 | 65 | 0.55313 |
794ce0573a07476015403be2341c8b297fad9c3a | 1,142 | py | Python | sinesum1.py | chapman-phys227-2016s/hw-1-seama107 | 52d942891c15a6e575f5c77e5378ed7cc17bdcc3 | [
"MIT"
] | null | null | null | sinesum1.py | chapman-phys227-2016s/hw-1-seama107 | 52d942891c15a6e575f5c77e5378ed7cc17bdcc3 | [
"MIT"
] | null | null | null | sinesum1.py | chapman-phys227-2016s/hw-1-seama107 | 52d942891c15a6e575f5c77e5378ed7cc17bdcc3 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import math
def f(t, T):
"""
returns -1, 0, or 1 based on relationship between t and T
throws IndexError
"""
if(t > 0 and t < float(T/2)):
return 1
elif(t == float(T/2)):
return 0
elif(t > float(T/2) and t < T):
return -1
raise IndexError("Out ... | 22.392157 | 86 | 0.52627 |
794ce26032d5715f901627df5781d455ed1df27a | 5,291 | py | Python | DPM/src/DPM.py | OSADP/PMA | 2dd81f55ee6e15eff4462506560faea44ea49a0e | [
"Apache-2.0"
] | null | null | null | DPM/src/DPM.py | OSADP/PMA | 2dd81f55ee6e15eff4462506560faea44ea49a0e | [
"Apache-2.0"
] | null | null | null | DPM/src/DPM.py | OSADP/PMA | 2dd81f55ee6e15eff4462506560faea44ea49a0e | [
"Apache-2.0"
] | 1 | 2020-02-02T18:10:59.000Z | 2020-02-02T18:10:59.000Z | """
The purpose of the prototype DMA Performance Measurement application is to
measures mode-independent trip-based traveler mobility and system productivity
by taking trip or trajectory based vehicle input and aggregating that
information into system wide performance measures. The DMA Performance
Measurement appl... | 32.262195 | 85 | 0.686449 |
794ce397331f451655b9c432b108708653db6223 | 980 | py | Python | Algorithms/0005_Longest_Palindromic_Substring.py | drjordy66/LeetCode | ba0c04ee5ddc8c9177dd2995be95dd6d0640bc38 | [
"MIT"
] | null | null | null | Algorithms/0005_Longest_Palindromic_Substring.py | drjordy66/LeetCode | ba0c04ee5ddc8c9177dd2995be95dd6d0640bc38 | [
"MIT"
] | null | null | null | Algorithms/0005_Longest_Palindromic_Substring.py | drjordy66/LeetCode | ba0c04ee5ddc8c9177dd2995be95dd6d0640bc38 | [
"MIT"
] | null | null | null | class Solution:
def longestPalindrome(self, s):
"""
:type s: str
:rtype: str
"""
x = [i for i in s]
if x != []:
longest = x[0]
else:
longest = ''
for i in range(len(x)):
indices = [index for index, value in enumerate... | 30.625 | 87 | 0.366327 |
794ce577037e302342b864852b6f22a93d7a05a9 | 7,143 | py | Python | setup.py | andsor/pydevs | b4e33f9d235d6ea0b694033b32fb201caac3acf7 | [
"Apache-2.0"
] | 3 | 2015-10-25T18:20:54.000Z | 2020-03-14T11:22:28.000Z | setup.py | andsor/pydevs | b4e33f9d235d6ea0b694033b32fb201caac3acf7 | [
"Apache-2.0"
] | 15 | 2015-02-20T19:46:52.000Z | 2019-02-15T09:44:40.000Z | setup.py | andsor/pydevs | b4e33f9d235d6ea0b694033b32fb201caac3acf7 | [
"Apache-2.0"
] | 4 | 2019-01-11T10:12:25.000Z | 2021-05-19T21:32:23.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Setup file for devs.
This file was generated with PyScaffold 1.2, a tool that easily
puts up a scaffold for your new Python project. Learn more under:
http://pyscaffold.readthedocs.org/
"""
import inspect
import os
import sys
from distutils.cmd import ... | 31.888393 | 79 | 0.606888 |
794ce6c08a1e9f19ebc41053e7895ed0dac2dcd0 | 1,852 | py | Python | backend/pyrogram/methods/users/update_username.py | appheap/social-media-analyzer | 0f9da098bfb0b4f9eb38e0244aa3a168cf97d51c | [
"Apache-2.0"
] | 5 | 2021-09-11T22:01:15.000Z | 2022-03-16T21:33:42.000Z | backend/pyrogram/methods/users/update_username.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | null | null | null | backend/pyrogram/methods/users/update_username.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | 3 | 2022-01-18T11:06:22.000Z | 2022-02-26T13:39:28.000Z | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 33.071429 | 114 | 0.649028 |
794ce702994b46c527488675696ac767656f22a9 | 1,266 | py | Python | tensorflow/contrib/__init__.py | sylviawhoa/tensorflow | 30f3cdfc420d831e2591cce62fa51164cf8a700a | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/__init__.py | sylviawhoa/tensorflow | 30f3cdfc420d831e2591cce62fa51164cf8a700a | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/__init__.py | sylviawhoa/tensorflow | 30f3cdfc420d831e2591cce62fa51164cf8a700a | [
"Apache-2.0"
] | 1 | 2020-10-02T16:06:39.000Z | 2020-10-02T16:06:39.000Z | # Copyright 2015 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 a... | 40.83871 | 80 | 0.755924 |
794ce840020cde1aedd096f88bf83f924e9ce449 | 2,843 | py | Python | examples/Mentor/09.5.GenSph.py | peterlama/pivy | ad7b50f9a3ce0b69d05184c059fd6de12b90839b | [
"0BSD"
] | null | null | null | examples/Mentor/09.5.GenSph.py | peterlama/pivy | ad7b50f9a3ce0b69d05184c059fd6de12b90839b | [
"0BSD"
] | null | null | null | examples/Mentor/09.5.GenSph.py | peterlama/pivy | ad7b50f9a3ce0b69d05184c059fd6de12b90839b | [
"0BSD"
] | null | null | null | #!/usr/bin/env python
###
# Copyright (c) 2002-2007 Systems in Motion
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS I... | 31.588889 | 88 | 0.680267 |
794ce891294131c9b9a2800d614d9b3f73f4cf94 | 1,519 | py | Python | TeamProject/src/PollardRho.py | cboyer2016/CSE4081TeamProject | 357b182d9cb1be62e03600211b75f36b88dbd964 | [
"MIT"
] | 1 | 2021-09-25T20:42:03.000Z | 2021-09-25T20:42:03.000Z | TeamProject/src/PollardRho.py | cboyer2016/CSE4081TeamProject | 357b182d9cb1be62e03600211b75f36b88dbd964 | [
"MIT"
] | null | null | null | TeamProject/src/PollardRho.py | cboyer2016/CSE4081TeamProject | 357b182d9cb1be62e03600211b75f36b88dbd964 | [
"MIT"
] | null | null | null | #extened euclid algorithm found via wikipedia and supporting online sources
def euclid_ext(a, b):
if b == 0:
return a, 1, 0
else:
d, xx, yy = euclid_ext(b, a % b)
x = yy
y = xx - (a / b) * yy
return d, x, y
def inverse(a, n):
return euclid_ext(a, n)[1]
def xab(x, ... | 21.394366 | 75 | 0.508887 |
794ce8d3cb9138e42b1c68e9be9f0d7cc328eedc | 6,174 | py | Python | corehq/motech/requests.py | akyogi/commcare-hq | 44c34634e1b54f566ca200f828ea2aa112f33aa4 | [
"BSD-3-Clause"
] | null | null | null | corehq/motech/requests.py | akyogi/commcare-hq | 44c34634e1b54f566ca200f828ea2aa112f33aa4 | [
"BSD-3-Clause"
] | null | null | null | corehq/motech/requests.py | akyogi/commcare-hq | 44c34634e1b54f566ca200f828ea2aa112f33aa4 | [
"BSD-3-Clause"
] | null | null | null | import logging
from django.conf import settings
import requests
from dimagi.utils.logging import notify_exception
from corehq.apps.hqwebapp.tasks import send_mail_async
from corehq.motech.const import REQUEST_TIMEOUT
from corehq.motech.models import RequestLog
from corehq.motech.utils import pformat_json
def log_... | 35.079545 | 106 | 0.607548 |
794ce907cdc266ffdce59ac09914d4289e868555 | 508 | py | Python | wcics/server/routes/auth/users.py | CS-Center/CS-Center | 3cd09f29d214406e6618fc67b9faf59a18f3f11b | [
"MIT"
] | null | null | null | wcics/server/routes/auth/users.py | CS-Center/CS-Center | 3cd09f29d214406e6618fc67b9faf59a18f3f11b | [
"MIT"
] | 6 | 2019-12-06T18:06:28.000Z | 2021-12-01T20:19:05.000Z | wcics/server/routes/auth/users.py | CS-Center/CS-Center | 3cd09f29d214406e6618fc67b9faf59a18f3f11b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from wcics import app
from wcics.auth.manage_user import user
from wcics.server.consts import USERS_PER_PAGE
from wcics.server.routes.utils import paged_data
from wcics.database.models import Users
from flask import render_template
@app.route("/users/")
def serve_user_home():
page, pages... | 29.882353 | 107 | 0.76378 |
794ce90cd88276372c2b83d4bc628d29a6b93d2e | 2,306 | py | Python | aliyun-python-sdk-polardb/aliyunsdkpolardb/request/v20170801/ResetAccountRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-polardb/aliyunsdkpolardb/request/v20170801/ResetAccountRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-polardb/aliyunsdkpolardb/request/v20170801/ResetAccountRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"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... | 34.939394 | 79 | 0.775369 |
794ce9358c0ca450d09eb08800b010a91bd25452 | 1,302 | py | Python | bandwidth/webrtc/exceptions/error_exception.py | roverdotcom/python-sdk | c6947fb3331b77f0064aeec2dcf0c4ff178de34c | [
"MIT"
] | 5 | 2020-11-04T14:29:37.000Z | 2022-02-23T20:33:07.000Z | bandwidth/webrtc/exceptions/error_exception.py | roverdotcom/python-sdk | c6947fb3331b77f0064aeec2dcf0c4ff178de34c | [
"MIT"
] | 3 | 2021-07-23T18:48:48.000Z | 2022-03-15T14:59:07.000Z | bandwidth/webrtc/exceptions/error_exception.py | roverdotcom/python-sdk | c6947fb3331b77f0064aeec2dcf0c4ff178de34c | [
"MIT"
] | 8 | 2020-04-14T09:22:53.000Z | 2022-03-11T10:46:06.000Z | # -*- coding: utf-8 -*-
"""
bandwidth
This file was automatically generated by APIMATIC v3.0 (
https://www.apimatic.io ).
"""
from bandwidth.api_helper import APIHelper
import bandwidth.exceptions.api_exception
class ErrorException(bandwidth.exceptions.api_exception.APIException):
def __init__(s... | 32.55 | 89 | 0.646697 |
794cea9b83d983f1b63f465f76cf560b6998c625 | 3,862 | py | Python | heat/engine/clients/os/zun.py | odmanV2/heat | 76c20f1fc94a06ce5a00730c50952efe19ed0e3e | [
"Apache-2.0"
] | 265 | 2015-01-02T09:33:22.000Z | 2022-03-26T23:19:54.000Z | heat/engine/clients/os/zun.py | HyunJin-Jeong/heat | 8353fddf9ebfb0eca67d6f2b2feb529031acff89 | [
"Apache-2.0"
] | 8 | 2015-09-01T15:43:19.000Z | 2021-12-14T05:18:23.000Z | heat/engine/clients/os/zun.py | HyunJin-Jeong/heat | 8353fddf9ebfb0eca67d6f2b2feb529031acff89 | [
"Apache-2.0"
] | 295 | 2015-01-06T07:00:40.000Z | 2021-09-06T08:05:06.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
# ... | 33.877193 | 79 | 0.640342 |
794cebd14d80bae4c5a7743083b78e6cb8798fee | 1,192 | py | Python | crawlerSystem/sports1/sports1/pipelines.py | Nouldine/Cloud-based-Big-data-project | 4649b7ac3964101d7a484d7d0c1481f23e70a7b1 | [
"MIT"
] | null | null | null | crawlerSystem/sports1/sports1/pipelines.py | Nouldine/Cloud-based-Big-data-project | 4649b7ac3964101d7a484d7d0c1481f23e70a7b1 | [
"MIT"
] | null | null | null | crawlerSystem/sports1/sports1/pipelines.py | Nouldine/Cloud-based-Big-data-project | 4649b7ac3964101d7a484d7d0c1481f23e70a7b1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
import pymongo
from scrapy.conf import settings
from scrapy.exceptions import DropItem
from scrapy import log
class Sports1P... | 17.529412 | 65 | 0.577181 |
794cebe02790ef00e5c5ca801467ec7c1d17a683 | 48,681 | py | Python | python/ccxt/async_support/bigone.py | ngugcx/ccxt | 57133bf1d129f962ed9aa861006257d55e43000c | [
"MIT"
] | null | null | null | python/ccxt/async_support/bigone.py | ngugcx/ccxt | 57133bf1d129f962ed9aa861006257d55e43000c | [
"MIT"
] | 1 | 2022-01-27T19:54:13.000Z | 2022-01-27T19:54:13.000Z | python/ccxt/async_support/bigone.py | ngugcx/ccxt | 57133bf1d129f962ed9aa861006257d55e43000c | [
"MIT"
] | 1 | 2022-03-15T22:51:08.000Z | 2022-03-15T22:51:08.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import Authenticatio... | 40.5 | 214 | 0.464411 |
794ceceae30087b7a1c134788793417e2c90281f | 10,182 | py | Python | python/setup.py | jmwdpk/SPARK-23674 | 029da00f0ad9d716cebcc2d523569e751b507c22 | [
"BSD-3-Clause-Open-MPI",
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"MIT-0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-Clear",
"PostgreSQL",
"BSD-3-Clause"
] | 2 | 2018-12-21T21:08:43.000Z | 2020-01-09T16:27:28.000Z | python/setup.py | jmwdpk/SPARK-23674 | 029da00f0ad9d716cebcc2d523569e751b507c22 | [
"BSD-3-Clause-Open-MPI",
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"MIT-0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-Clear",
"PostgreSQL",
"BSD-3-Clause"
] | 1 | 2018-04-13T02:18:43.000Z | 2018-04-13T02:18:43.000Z | python/setup.py | jmwdpk/SPARK-23674 | 029da00f0ad9d716cebcc2d523569e751b507c22 | [
"BSD-3-Clause-Open-MPI",
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"MIT-0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-Clear",
"PostgreSQL",
"BSD-3-Clause"
] | 4 | 2015-11-24T07:04:38.000Z | 2016-11-04T05:43:53.000Z | #!/usr/bin/env python
#
# 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 "Li... | 41.901235 | 100 | 0.642997 |
794cf051ead9cd18c6781a5e58b461962fdf1b22 | 14,699 | py | Python | services/common/tests/slots/test_merge.py | rtubio/server | 3bb15f4d4dcd543d6f95d1fda2cb737de0bb9a9b | [
"Apache-2.0"
] | 4 | 2015-03-23T16:34:53.000Z | 2017-12-12T11:41:54.000Z | services/common/tests/slots/test_merge.py | rtubio/server | 3bb15f4d4dcd543d6f95d1fda2cb737de0bb9a9b | [
"Apache-2.0"
] | 42 | 2015-01-08T22:21:04.000Z | 2021-12-13T19:48:44.000Z | services/common/tests/slots/test_merge.py | rtubio/server | 3bb15f4d4dcd543d6f95d1fda2cb737de0bb9a9b | [
"Apache-2.0"
] | 2 | 2015-04-04T15:23:35.000Z | 2017-07-23T23:14:06.000Z | """
Copyright 2013, 2014 Ricardo Tubio-Pardavila
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 ... | 40.051771 | 76 | 0.532621 |
794cf07a11a8f38f0824613448eedb04e24be5e1 | 276 | py | Python | rpisec/telegram_bot/commands/enable.py | marclr/rpi-security | 2f7b39c572c45169fa10a9c571bba9cf5f869254 | [
"MIT"
] | null | null | null | rpisec/telegram_bot/commands/enable.py | marclr/rpi-security | 2f7b39c572c45169fa10a9c571bba9cf5f869254 | [
"MIT"
] | 1 | 2021-06-01T23:14:14.000Z | 2021-06-01T23:14:14.000Z | rpisec/telegram_bot/commands/enable.py | marclr/rpi-security | 2f7b39c572c45169fa10a9c571bba9cf5f869254 | [
"MIT"
] | null | null | null | def enable(bot, update, webcontrol):
chat_id = update.message.chat_id
code, text = webcontrol.execute('detection', 'start')
if code == 200:
bot.sendMessage(chat_id=chat_id, text=text)
else:
bot.sendMessage(chat_id=chat_id, text="Try it later")
| 34.5 | 61 | 0.67029 |
794cf348dd9910d93657f138efcbbeef7f4c01e1 | 3,996 | py | Python | assignements/S1_algotools.py | YoanRouleau/BachelorDIM-Lectures-Algorithms-2020 | eafb79a096325dc9bf75c3a20520edb191bfa3e1 | [
"MIT"
] | null | null | null | assignements/S1_algotools.py | YoanRouleau/BachelorDIM-Lectures-Algorithms-2020 | eafb79a096325dc9bf75c3a20520edb191bfa3e1 | [
"MIT"
] | null | null | null | assignements/S1_algotools.py | YoanRouleau/BachelorDIM-Lectures-Algorithms-2020 | eafb79a096325dc9bf75c3a20520edb191bfa3e1 | [
"MIT"
] | null | null | null | """
Created by Yoan ROULEAU
@author: myself
"""
from random import randint
import numpy as np
def average_above_zero(array):
'''
Receives an array as a parameter and calculates its average.
:arg
array: an array
:returns
moy: Its average
'''
som = 0
positive_element_count=0... | 23.232558 | 119 | 0.555556 |
794cf44882962f9234b2b0838423c7435a230281 | 4,399 | py | Python | crawler/crawler.py | mtaung/bossfight_club | b3d4f62dd2fe917eeb2bbd022566ad5412d62f48 | [
"MIT"
] | null | null | null | crawler/crawler.py | mtaung/bossfight_club | b3d4f62dd2fe917eeb2bbd022566ad5412d62f48 | [
"MIT"
] | 8 | 2018-11-02T20:04:33.000Z | 2018-11-10T01:11:00.000Z | crawler/crawler.py | mtaung/bossfight_club | b3d4f62dd2fe917eeb2bbd022566ad5412d62f48 | [
"MIT"
] | null | null | null | import praw, pickle
from requests_html import HTMLSession
from psaw import PushshiftAPI
class Crawler:
def __init__(self, cid, sec, user, pwd, uage):
"""
A crawler object based on the praw Reddit class.
"""
self.reddit = praw.Reddit(client_id= cid,
... | 37.279661 | 130 | 0.541714 |
794cf4c23b60b7b50a0c2f0da2904f8e066b49ff | 504 | py | Python | Lib/site-packages/troposphere/certificatemanager.py | bopopescu/django-estore | c092ffa965b8ef68e71d27d34a17fde1beacd90e | [
"MIT"
] | null | null | null | Lib/site-packages/troposphere/certificatemanager.py | bopopescu/django-estore | c092ffa965b8ef68e71d27d34a17fde1beacd90e | [
"MIT"
] | null | null | null | Lib/site-packages/troposphere/certificatemanager.py | bopopescu/django-estore | c092ffa965b8ef68e71d27d34a17fde1beacd90e | [
"MIT"
] | 2 | 2019-04-29T14:16:10.000Z | 2020-07-23T12:04:17.000Z | from . import AWSObject, AWSProperty
class DomainValidationOption(AWSProperty):
props = {
'DomainName': (basestring, True),
'ValidationDomain': (basestring, True),
}
class Certificate(AWSObject):
resource_type = "AWS::CertificateManager::Certificate"
props = {
'DomainName': ... | 25.2 | 69 | 0.64881 |
794cf623e99ee75b007698918010165a9377f279 | 566 | py | Python | uploader/core/exceptions.py | stfc/cvmfs-stratum-uploader | 1a4ebecc53ea3e02e102c49e66ccb3009186f308 | [
"Apache-2.0"
] | null | null | null | uploader/core/exceptions.py | stfc/cvmfs-stratum-uploader | 1a4ebecc53ea3e02e102c49e66ccb3009186f308 | [
"Apache-2.0"
] | null | null | null | uploader/core/exceptions.py | stfc/cvmfs-stratum-uploader | 1a4ebecc53ea3e02e102c49e66ccb3009186f308 | [
"Apache-2.0"
] | null | null | null | class ApplicationError(Exception):
"""
Raised by application logic.l
"""
pass
class ArgumentError(ApplicationError):
"""
Raised on unexpected actions which should not occur during normal usage,
e.g. an user sends crafted HTTP header or opens URL which link does not exist anywhere in the ap... | 25.727273 | 110 | 0.69788 |
794cf69397e118cc97218cd99644e6619cbc05b6 | 69 | py | Python | acq4/drivers/nidaq/__init__.py | ablot/acq4 | ba7cd340d9d0282640adb501d3788f8c0837e4c4 | [
"MIT"
] | null | null | null | acq4/drivers/nidaq/__init__.py | ablot/acq4 | ba7cd340d9d0282640adb501d3788f8c0837e4c4 | [
"MIT"
] | null | null | null | acq4/drivers/nidaq/__init__.py | ablot/acq4 | ba7cd340d9d0282640adb501d3788f8c0837e4c4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#from nidaq import *
#from SuperTask import * | 23 | 24 | 0.637681 |
794cf769858eb97ab135cfe813c4bac9bca6cf12 | 5,160 | py | Python | google/cloud/errorreporting_v1beta1/services/error_group_service/transports/base.py | DazWilkin/python-error-reporting | e078a158b68d10b119ec226c02a17944b59ddccb | [
"Apache-2.0"
] | null | null | null | google/cloud/errorreporting_v1beta1/services/error_group_service/transports/base.py | DazWilkin/python-error-reporting | e078a158b68d10b119ec226c02a17944b59ddccb | [
"Apache-2.0"
] | null | null | null | google/cloud/errorreporting_v1beta1/services/error_group_service/transports/base.py | DazWilkin/python-error-reporting | e078a158b68d10b119ec226c02a17944b59ddccb | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 37.391304 | 84 | 0.665698 |
794cf7dd3e765b22928f6138fadb9822999326f9 | 4,575 | py | Python | py/src/ai/h2o/sparkling/ml/params/H2OTargetEncoderParams.py | salliewalecka/sparkling-water | 497306fbc7f4f374fe367f1303289db13be4ec48 | [
"Apache-2.0"
] | null | null | null | py/src/ai/h2o/sparkling/ml/params/H2OTargetEncoderParams.py | salliewalecka/sparkling-water | 497306fbc7f4f374fe367f1303289db13be4ec48 | [
"Apache-2.0"
] | null | null | null | py/src/ai/h2o/sparkling/ml/params/H2OTargetEncoderParams.py | salliewalecka/sparkling-water | 497306fbc7f4f374fe367f1303289db13be4ec48 | [
"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 us... | 34.923664 | 121 | 0.691366 |
794cf91e3c644e68d65294317d7a35c38876b14c | 31,660 | py | Python | code/ARAX/ARAXQuery/Filter_KG/remove_edges.py | andrewsu/RTX | dd1de262d0817f7e6d2f64e5bec7d5009a3a2740 | [
"MIT"
] | null | null | null | code/ARAX/ARAXQuery/Filter_KG/remove_edges.py | andrewsu/RTX | dd1de262d0817f7e6d2f64e5bec7d5009a3a2740 | [
"MIT"
] | null | null | null | code/ARAX/ARAXQuery/Filter_KG/remove_edges.py | andrewsu/RTX | dd1de262d0817f7e6d2f64e5bec7d5009a3a2740 | [
"MIT"
] | null | null | null | # This class will overlay the normalized google distance on a message (all edges)
#!/bin/env python3
import sys
import os
import traceback
import numpy as np
# relative imports
sys.path.append(os.path.dirname(os.path.abspath(__file__))+"/../../../UI/OpenAPI/python-flask-server/")
from openapi_server.models.attribute i... | 60.767754 | 293 | 0.5241 |
794cfb0b453d43483c477dd943018b562f522371 | 1,278 | py | Python | python/leetcode/062_unique_paths.py | yxun/Notebook | 680ae89a32d3f7d4fdcd541e66cea97e29efbd26 | [
"Apache-2.0"
] | 1 | 2021-10-04T13:26:32.000Z | 2021-10-04T13:26:32.000Z | python/leetcode/062_unique_paths.py | yxun/Notebook | 680ae89a32d3f7d4fdcd541e66cea97e29efbd26 | [
"Apache-2.0"
] | 3 | 2020-03-24T19:34:42.000Z | 2022-01-21T20:15:39.000Z | python/leetcode/062_unique_paths.py | yxun/Notebook | 680ae89a32d3f7d4fdcd541e66cea97e29efbd26 | [
"Apache-2.0"
] | 1 | 2021-04-01T20:56:50.000Z | 2021-04-01T20:56:50.000Z | #%%
"""
- Unique paths
- https://leetcode.com/problems/unique-paths
- Medium
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).
The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid (marked 'Fin... | 22.421053 | 171 | 0.58216 |
794cfd4ea0434fe59e96e1bccc692556ac08e0f2 | 162 | py | Python | boot.py | jfcherng-sublime/ST-patcher-LSP-intelephense | 97520041a572c8e07bef59388935020257768307 | [
"MIT"
] | 3 | 2020-11-07T07:11:18.000Z | 2021-06-11T13:24:48.000Z | boot.py | jfcherng-sublime/ST-patcher-LSP-intelephense | 97520041a572c8e07bef59388935020257768307 | [
"MIT"
] | null | null | null | boot.py | jfcherng-sublime/ST-patcher-LSP-intelephense | 97520041a572c8e07bef59388935020257768307 | [
"MIT"
] | null | null | null | from .plugin import set_up, tear_down
from .plugin.commands import *
def plugin_loaded() -> None:
set_up()
def plugin_unloaded() -> None:
tear_down()
| 14.727273 | 37 | 0.691358 |
794cfd562f49440ca45528c1aee0a1fd51e67212 | 3,484 | py | Python | molly/apps/contact/providers/mit.py | mollyproject/mollyproject | 3247c6bac3f39ce8d275d19aa410b30c6284b8a7 | [
"Apache-2.0"
] | 7 | 2015-05-16T13:27:21.000Z | 2019-08-06T11:09:24.000Z | molly/apps/contact/providers/mit.py | mollyproject/mollyproject | 3247c6bac3f39ce8d275d19aa410b30c6284b8a7 | [
"Apache-2.0"
] | null | null | null | molly/apps/contact/providers/mit.py | mollyproject/mollyproject | 3247c6bac3f39ce8d275d19aa410b30c6284b8a7 | [
"Apache-2.0"
] | 4 | 2015-11-27T13:36:36.000Z | 2021-03-09T17:55:53.000Z | from operator import itemgetter
import ldap
import ldap.filter
from molly.apps.contact.providers import BaseContactProvider, TooManyResults
class LDAPContactProvider(BaseContactProvider):
# See http://en.wikipedia.org/wiki/Nobility_particle for more information.
_NOBILITY_PARTICLES = set([
'de',... | 34.84 | 104 | 0.533295 |
794cfe102677ca87dcd8b7c801b845a511ff650f | 6,898 | py | Python | tests/periodic_tasks/content_diff/steps/steps_impl.py | uktrade/directory-tests | e54d3c4582bc19c10d8779d5146160fe0f644bf1 | [
"MIT"
] | 4 | 2017-06-02T09:09:10.000Z | 2018-01-25T19:06:12.000Z | tests/periodic_tasks/content_diff/steps/steps_impl.py | uktrade/directory-tests | e54d3c4582bc19c10d8779d5146160fe0f644bf1 | [
"MIT"
] | 53 | 2016-10-27T22:31:03.000Z | 2022-03-07T11:18:25.000Z | tests/periodic_tasks/content_diff/steps/steps_impl.py | uktrade/directory-tests | e54d3c4582bc19c10d8779d5146160fe0f644bf1 | [
"MIT"
] | 3 | 2017-11-22T11:42:40.000Z | 2022-02-21T01:20:04.000Z | # -*- coding: utf-8 -*-
import difflib
import json
import os
from typing import List
from urllib.parse import urljoin
import requests
from behave.runner import Context
from bs4 import BeautifulSoup
from envparse import env
from requests.exceptions import ConnectionError, Timeout, TooManyRedirects
from retrying import ... | 32.691943 | 88 | 0.66512 |
794cfe8ffd22e81dd96154601773956c56ed9e69 | 382 | py | Python | Python/Project.Euler/Answers.Python/16.py | jinlibao/toolkits | 529589832c130e2a33f96bb8fc3dcba952d3ecad | [
"MIT"
] | 1 | 2015-08-26T14:18:32.000Z | 2015-08-26T14:18:32.000Z | Python/Project.Euler/Answers.Python/16.py | imthomasking/MATLAB-files | 529589832c130e2a33f96bb8fc3dcba952d3ecad | [
"MIT"
] | null | null | null | Python/Project.Euler/Answers.Python/16.py | imthomasking/MATLAB-files | 529589832c130e2a33f96bb8fc3dcba952d3ecad | [
"MIT"
] | 1 | 2021-05-03T09:22:27.000Z | 2021-05-03T09:22:27.000Z | # problem 16
# Project Euler
__author__ = 'Libao Jin'
__date__ = 'July 13, 2015'
def PowerDigitSum(powerOrder):
power = 2 ** powerOrder
strPower = str(power)
intPower = []
for i in strPower:
intPower.append(int(i))
# pds: PowerDigitSum
pds = sum(intPower)
return [pds, power, intPower]
def test():
powerOrde... | 16.608696 | 32 | 0.696335 |
794cff9c7495b883f924caf58ccc9b6197d4a00e | 2,387 | py | Python | src/jgikbase/test/idmapping/builder_test.py | jgi-kbase/IDMappingService | 9d9f01662c4b09ac873174b7119d62828965e116 | [
"MIT"
] | null | null | null | src/jgikbase/test/idmapping/builder_test.py | jgi-kbase/IDMappingService | 9d9f01662c4b09ac873174b7119d62828965e116 | [
"MIT"
] | 118 | 2018-07-13T18:43:07.000Z | 2019-11-13T02:52:48.000Z | src/jgikbase/test/idmapping/builder_test.py | jgi-kbase/IDMappingService | 9d9f01662c4b09ac873174b7119d62828965e116 | [
"MIT"
] | 1 | 2018-07-02T17:56:57.000Z | 2018-07-02T17:56:57.000Z | from jgikbase.idmapping.builder import IDMappingBuilder, IDMappingBuildException
from jgikbase.idmapping.core.user import AuthsourceID
from jgikbase.test.idmapping.user_lookup_test_module import FakeUserLookup
from pytest import raises
from jgikbase.test.idmapping.test_utils import assert_exception_correct
from jgikbas... | 41.877193 | 94 | 0.725178 |
794d012ee6be02a265aba6ab0d0f2f85e192d57b | 5,514 | py | Python | utils/tagSchemeConverter.py | mahatmaWM/NCRFpp | b9784edd82f6b2062ee7e324c3b22acbc1a35540 | [
"Apache-2.0"
] | null | null | null | utils/tagSchemeConverter.py | mahatmaWM/NCRFpp | b9784edd82f6b2062ee7e324c3b22acbc1a35540 | [
"Apache-2.0"
] | null | null | null | utils/tagSchemeConverter.py | mahatmaWM/NCRFpp | b9784edd82f6b2062ee7e324c3b22acbc1a35540 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# @Author: Jie Yang
# @Date: 2017-11-27 16:53:36
# @Last Modified by: Jie Yang, Contact: jieynlp@gmail.com
# @Last Modified time: 2019-01-09 21:39:10
"""
convert NER/Chunking tag schemes, i.e. BIO->BIOES, BIOES->BIO, IOB->BIO, IOB->BIOES
"""
from __future__ import print_f... | 38.291667 | 113 | 0.479144 |
794d01339ce9423bdc947f567695675d1f77ff66 | 8,957 | py | Python | tests/core/full_node/test_conditions.py | todortron/chaingreen-blockchain | 89fe435e5dc87de4a7bb4d64c1ad335d81f24b95 | [
"Apache-2.0"
] | 1 | 2021-11-12T20:30:23.000Z | 2021-11-12T20:30:23.000Z | tests/core/full_node/test_conditions.py | morrillup/chaingreen-blockchain | 0b2d008dd10228670decf360d21448a65fce48a4 | [
"Apache-2.0"
] | 19 | 2021-09-07T08:07:05.000Z | 2022-03-29T08:10:34.000Z | tests/core/full_node/test_conditions.py | morrillup/chaingreen-blockchain | 0b2d008dd10228670decf360d21448a65fce48a4 | [
"Apache-2.0"
] | null | null | null | """
These are quick-to-run test that check spends can be added to the blockchain when they're valid
or that they're failing for the right reason when they're invalid.
"""
import atexit
import logging
import time
from typing import List, Optional, Tuple
import pytest
from blspy import G2Element
from clvm_tools.binu... | 38.943478 | 110 | 0.70671 |
794d016b07b6175381434b376a754f2fb94c51ed | 489 | py | Python | video_capture/capture.py | FrostyDesigner/Python_Scripts | ec9dcf1a8787e60e40cd72260618739a681087ef | [
"Unlicense"
] | 1 | 2021-07-05T22:30:47.000Z | 2021-07-05T22:30:47.000Z | video_capture/capture.py | FrostyDesigner/Python_Scripts | ec9dcf1a8787e60e40cd72260618739a681087ef | [
"Unlicense"
] | 8 | 2020-03-24T15:58:07.000Z | 2022-03-11T23:26:05.000Z | video_capture/capture.py | FrostyDesigner/Python_Scripts | ec9dcf1a8787e60e40cd72260618739a681087ef | [
"Unlicense"
] | null | null | null | import cv2, time
video=cv2.VideoCapture(0)
a=1
while True:
a=a+1
check, frame = video.read()
print(check)
print(frame)
gray=cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)
#time.sleep(3)
cv2.imshow("Capturing", gray)
#key=cv2.waitKey(1000) # 1 second intevals
key=cv2.waitKey(1) #... | 17.464286 | 56 | 0.635992 |
794d02bc0c0c9f380584bc1f290d13395ed65e1b | 1,214 | py | Python | ProjectFiles/bin/Release/2.80/scripts/addons/uv_magic_uv/legacy/__init__.py | BlazesRus/Bforartists | 126bdd9e47cc984fd97ba5299bfb92ec5278e754 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2019-07-08T15:51:14.000Z | 2019-07-08T15:51:14.000Z | ProjectFiles/bin/Release/2.80/scripts/addons/uv_magic_uv/legacy/__init__.py | BlazesRus/Bforartists | 126bdd9e47cc984fd97ba5299bfb92ec5278e754 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | ProjectFiles/bin/Release/2.80/scripts/addons/uv_magic_uv/legacy/__init__.py | BlazesRus/Bforartists | 126bdd9e47cc984fd97ba5299bfb92ec5278e754 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # <pep8-80 compliant>
# ##### BEGIN GPL LICENSE BLOCK #####
#
# 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 later version.
#
# ... | 31.128205 | 74 | 0.716639 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.