hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 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 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 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.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
143b49e77f95faed0f33ec50d94bcc182f1daf5e | 402 | py | Python | torchreid/__init__.py | iankuoli/OSNet-TopDrop | 3ab57ba507e9f8939762e27834137172375cd91c | [
"MIT"
] | null | null | null | torchreid/__init__.py | iankuoli/OSNet-TopDrop | 3ab57ba507e9f8939762e27834137172375cd91c | [
"MIT"
] | null | null | null | torchreid/__init__.py | iankuoli/OSNet-TopDrop | 3ab57ba507e9f8939762e27834137172375cd91c | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import print_function
__author__ = 'Rodolfo Quispe'
__description__ = 'Top Batch Dropblock for Person Re-Identification'
__url__ = 'https://github.com/RQuispeC/top-batch-dropblock'
__based_on__ = 'https://github.com/KaiyangZhou/deep-person-reid'
from . import (
... | 22.333333 | 68 | 0.733831 |
143cd949492ab20063e08fcf058c7b6fcccef20e | 1,425 | py | Python | examples/05-gray-scott-compression/paraview/animations.py | CODARcode/cheetah | 2d7148fad2e549a080e902e4fac180d9f22a9dc9 | [
"Apache-2.0"
] | 8 | 2018-07-11T19:55:37.000Z | 2022-02-03T20:55:32.000Z | examples/05-gray-scott-compression/paraview/animations.py | CODARcode/cheetah | 2d7148fad2e549a080e902e4fac180d9f22a9dc9 | [
"Apache-2.0"
] | 196 | 2017-06-13T14:48:05.000Z | 2022-03-02T21:53:39.000Z | examples/05-gray-scott-compression/paraview/animations.py | CODARcode/cheetah | 2d7148fad2e549a080e902e4fac180d9f22a9dc9 | [
"Apache-2.0"
] | 7 | 2018-07-02T16:50:43.000Z | 2022-02-08T16:06:54.000Z | from paraview.simple import *
vars = ['U', 'V']
Xs = [1, 16]
Ts = [0, 23]
for var in vars:
for X in Xs:
layout1, view1, view2 = compareT(var=var, X=X, play=False)
SaveAnimation('movies/%s_X%d.avi' % (var, X) , layout1, SaveAllViews=1,
ImageResolution=[2240, 860],
... | 43.181818 | 89 | 0.590175 |
143f866b2d562d6e58d70545f8b51ba4cdbd1e78 | 486 | py | Python | gnosis/eth/oracles/__init__.py | titandac/gnosis-py | cf0af4f25e64b22256eabb415d0f3fe3a6180b14 | [
"MIT"
] | 64 | 2018-09-26T19:56:50.000Z | 2022-03-18T21:45:59.000Z | gnosis/eth/oracles/__init__.py | zhanghao-ic/gnosis-py | d2a5912547b7d1b576c826909f4c1d0155db536f | [
"MIT"
] | 151 | 2018-09-10T21:42:05.000Z | 2022-03-31T12:33:31.000Z | gnosis/eth/oracles/__init__.py | zhanghao-ic/gnosis-py | d2a5912547b7d1b576c826909f4c1d0155db536f | [
"MIT"
] | 50 | 2018-12-13T20:43:46.000Z | 2022-03-30T09:32:32.000Z | # flake8: noqa F401
from .oracles import (
AaveOracle,
BalancerOracle,
CannotGetPriceFromOracle,
ComposedPriceOracle,
CreamOracle,
CurveOracle,
EnzymeOracle,
InvalidPriceFromOracle,
KyberOracle,
MooniswapOracle,
OracleException,
PoolTogetherOracle,
PriceOracle,
Pr... | 19.44 | 29 | 0.711934 |
14419e865d5310216570696263e0af4f4d542f91 | 1,192 | py | Python | glaciersat/tests/test_utils.py | jlandmann/glaciersat | 7d4b108c17a31cc85e568193024dabc2d590caa3 | [
"MIT"
] | 2 | 2021-02-18T22:06:04.000Z | 2021-06-23T13:04:20.000Z | glaciersat/tests/test_utils.py | jlandmann/glaciersat | 7d4b108c17a31cc85e568193024dabc2d590caa3 | [
"MIT"
] | null | null | null | glaciersat/tests/test_utils.py | jlandmann/glaciersat | 7d4b108c17a31cc85e568193024dabc2d590caa3 | [
"MIT"
] | 1 | 2021-12-08T09:03:54.000Z | 2021-12-08T09:03:54.000Z | import pytest
from glaciersat.tests import requires_credentials
from glaciersat.utils import *
import configobj
| 29.073171 | 57 | 0.676174 |
1443349cfe7290e5fde2e9b993127fa2b050e3ee | 2,103 | py | Python | wildlifecompliance/migrations/0354_remediationactiontaken_remediationactiontakendocument.py | preranaandure/wildlifecompliance | bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5 | [
"Apache-2.0"
] | 1 | 2020-12-07T17:12:40.000Z | 2020-12-07T17:12:40.000Z | wildlifecompliance/migrations/0354_remediationactiontaken_remediationactiontakendocument.py | preranaandure/wildlifecompliance | bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5 | [
"Apache-2.0"
] | 14 | 2020-01-08T08:08:26.000Z | 2021-03-19T22:59:46.000Z | wildlifecompliance/migrations/0354_remediationactiontaken_remediationactiontakendocument.py | preranaandure/wildlifecompliance | bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5 | [
"Apache-2.0"
] | 15 | 2020-01-08T08:02:28.000Z | 2021-11-03T06:48:32.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2019-12-20 07:11
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
| 45.717391 | 183 | 0.627675 |
1443eba36140a106439af6c4b73f1d1fea95754f | 214 | py | Python | files/read_lines.py | nv-krishna/python-crash-course | d481faeb2196712cd52ca1d34dc1fe967d13712f | [
"Apache-2.0"
] | 2 | 2020-11-02T05:52:33.000Z | 2021-06-09T01:28:22.000Z | files/read_lines.py | nv-krishna/python-crash-course | d481faeb2196712cd52ca1d34dc1fe967d13712f | [
"Apache-2.0"
] | null | null | null | files/read_lines.py | nv-krishna/python-crash-course | d481faeb2196712cd52ca1d34dc1fe967d13712f | [
"Apache-2.0"
] | 2 | 2021-04-08T05:26:04.000Z | 2021-06-09T01:28:23.000Z | file_name = 'pi_digits.txt'
with open(file_name) as file_object:
lines = file_object.readlines()
pi_string = ''
for line in lines:
pi_string += line.strip()
print(pi_string)
print(len(pi_string)) | 19.454545 | 36 | 0.691589 |
1444c2a69f4ae5a67cb69bbbd85ac69cbd3a414e | 4,553 | py | Python | scripts/pred_clef2018.py | rdenaux/acred | ffe44953a96338acfe3860a9898e7f0b70b5c9cb | [
"Apache-2.0"
] | 8 | 2020-08-31T04:14:22.000Z | 2021-09-29T06:00:31.000Z | scripts/pred_clef2018.py | expertailab/acred | ee45840c942ef2fac4f26da8d756b7c47e42847c | [
"Apache-2.0"
] | null | null | null | scripts/pred_clef2018.py | expertailab/acred | ee45840c942ef2fac4f26da8d756b7c47e42847c | [
"Apache-2.0"
] | 1 | 2020-10-07T08:09:29.000Z | 2020-10-07T08:09:29.000Z | #
# 2020 ExpertSystem
#
'''Script for generating predictions for Task2 of CLEF 2018 using the
acred predictor
See https://github.com/clef2018-factchecking/clef2018-factchecking
See also scripts/fetch-data.sh, which should download the v1.0 release
and place it in the `data/evaluation/` folder.
'''
import argparse
im... | 32.755396 | 91 | 0.62025 |
1446ef1bbef7e5c334c8b012e9fde1d3a271f09c | 2,712 | py | Python | vnpy_pro/data/source/tdxdata.py | zhangjf76/vnpy | b7c507a90c84a6a3c34831d8daf5f8947b9858d2 | [
"MIT"
] | 1 | 2020-06-12T14:42:02.000Z | 2020-06-12T14:42:02.000Z | vnpy_pro/data/source/tdxdata.py | zhangjf76/vnpy | b7c507a90c84a6a3c34831d8daf5f8947b9858d2 | [
"MIT"
] | null | null | null | vnpy_pro/data/source/tdxdata.py | zhangjf76/vnpy | b7c507a90c84a6a3c34831d8daf5f8947b9858d2 | [
"MIT"
] | null | null | null | from datetime import timedelta, datetime
from typing import List
from vnpy.trader.constant import Exchange, Interval
from vnpy.trader.object import BarData, HistoryRequest
from vnpy_pro.data.source.dataapi import SourceDataApi
from vnpy_pro.data.tdx.tdx_future_data import TdxFutureData
INTERVAL_VT2JQ = {
Interva... | 28.851064 | 86 | 0.588127 |
144811c35936d86235f73bcc74dc537fd45c6aff | 3,796 | py | Python | accounts/migrations/0001_initial.py | qinyanjuidavid/Dhana | 5a97ab224897bb87ce69d476a88930f3012ae7c5 | [
"MIT"
] | null | null | null | accounts/migrations/0001_initial.py | qinyanjuidavid/Dhana | 5a97ab224897bb87ce69d476a88930f3012ae7c5 | [
"MIT"
] | null | null | null | accounts/migrations/0001_initial.py | qinyanjuidavid/Dhana | 5a97ab224897bb87ce69d476a88930f3012ae7c5 | [
"MIT"
] | 1 | 2022-02-14T19:11:08.000Z | 2022-02-14T19:11:08.000Z | # Generated by Django 4.0.1 on 2022-02-01 12:57
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.manager
import phonenumber_field.modelfields
| 53.464789 | 168 | 0.613804 |
144bb1749b574daae9018e81890b3f972d50fc99 | 1,125 | py | Python | draalcore/test_utils/upload.py | jojanper/draalcore | 3d3f5a53efe32c721c34d7e48267328a4e9e8402 | [
"MIT"
] | 1 | 2017-04-25T10:54:55.000Z | 2017-04-25T10:54:55.000Z | draalcore/test_utils/upload.py | jojanper/draalcore | 3d3f5a53efe32c721c34d7e48267328a4e9e8402 | [
"MIT"
] | 1 | 2022-02-10T06:48:36.000Z | 2022-02-10T06:48:36.000Z | draalcore/test_utils/upload.py | jojanper/draalcore | 3d3f5a53efe32c721c34d7e48267328a4e9e8402 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""File upload utility"""
# System imports
import os
TEST_FILE_IMAGE = os.path.join(os.path.dirname(__file__), 'pic.jpg')
TEST_FILE_CONTENT_HEADER = 'attachment; filename="pic.jpg"'
TEST_FILE_INVALID = os.path.join(os.path.dirname(__file__), 'test.invalid')
TEST_FILE_GIF... | 32.142857 | 89 | 0.673778 |
144c3cf3a9fb5486330ac336fdca1f611c47ecb6 | 3,029 | py | Python | mudpi/utils.py | icyspace/mudpi-core | d2afffacee0ba5c5ca57eada3017495d8697c5a4 | [
"BSD-4-Clause"
] | 163 | 2020-02-17T16:34:54.000Z | 2022-02-28T23:12:11.000Z | mudpi/utils.py | icyspace/mudpi-core | d2afffacee0ba5c5ca57eada3017495d8697c5a4 | [
"BSD-4-Clause"
] | 28 | 2020-05-05T19:42:25.000Z | 2021-08-04T18:36:32.000Z | mudpi/utils.py | icyspace/mudpi-core | d2afffacee0ba5c5ca57eada3017495d8697c5a4 | [
"BSD-4-Clause"
] | 31 | 2020-02-27T18:30:42.000Z | 2022-01-18T21:14:56.000Z | import sys
import json
import socket
import inspect
import subprocess
from mudpi.extensions import Component, BaseExtension, BaseInterface
def get_module_classes(module_name):
""" Get all the classes from a module """
clsmembers = inspect.getmembers(sys.modules[module_name], inspect.isclass)
return clsmem... | 29.125 | 86 | 0.601849 |
144e7dc3bdd38db6b198578e9cb50720e54398ed | 695 | py | Python | Employee/models.py | TheStrixCoder/Parking-Lot-Management | dcb4c439928f9e2c8623e82e3acb860cf50d7041 | [
"MIT"
] | null | null | null | Employee/models.py | TheStrixCoder/Parking-Lot-Management | dcb4c439928f9e2c8623e82e3acb860cf50d7041 | [
"MIT"
] | null | null | null | Employee/models.py | TheStrixCoder/Parking-Lot-Management | dcb4c439928f9e2c8623e82e3acb860cf50d7041 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
| 36.578947 | 95 | 0.713669 |
144f22d32bbe5f4da41b97bb3ce594626e7bd532 | 1,421 | py | Python | pyctuator/health/db_health_provider.py | TheCodingLand/pyctuator | a5c9f41e426b006892020ce3b98d5e56c27e9dbc | [
"Apache-2.0"
] | 1 | 2020-10-24T16:31:15.000Z | 2020-10-24T16:31:15.000Z | pyctuator/health/db_health_provider.py | yanoom/pyctuator | b3aff058e1193eb6db8b887b1c1cf8c116819f82 | [
"Apache-2.0"
] | 1 | 2020-07-06T20:37:11.000Z | 2020-07-06T20:37:11.000Z | pyctuator/health/db_health_provider.py | yanoom/pyctuator | b3aff058e1193eb6db8b887b1c1cf8c116819f82 | [
"Apache-2.0"
] | 1 | 2020-07-02T21:37:52.000Z | 2020-07-02T21:37:52.000Z | import importlib.util
import time
from dataclasses import dataclass
from typing import Optional
from sqlalchemy.engine import Engine
from sqlalchemy.exc import OperationalError
from pyctuator.health.health_provider import HealthProvider, HealthStatus, Status, HealthDetails
class DbHealthProvider(HealthProvider):
| 28.42 | 104 | 0.683322 |
144ff03552b9b5f4adb81f6c8238173d57c8615f | 482 | py | Python | examples/serializers/blowfishtest.py | Jumpscale/jumpscale_examples7 | 7d7be2401489a0c5465950c66bbdbb266fe57fe7 | [
"Apache-2.0"
] | 1 | 2015-10-26T10:38:37.000Z | 2015-10-26T10:38:37.000Z | examples/serializers/blowfishtest.py | Jumpscale/jumpscale6_core | 0502ddc1abab3c37ed982c142d21ea3955d471d3 | [
"BSD-2-Clause"
] | null | null | null | examples/serializers/blowfishtest.py | Jumpscale/jumpscale6_core | 0502ddc1abab3c37ed982c142d21ea3955d471d3 | [
"BSD-2-Clause"
] | null | null | null | import os
import struct
from JumpScale import j
import JumpScale.baselib.serializers
j.application.start("blowfishtest")
from random import randrange
msg = ""
for i in range(1000):
msg += chr(randrange(0, 256))
key = ""
for i in range(56):
key += chr(randrange(0, 256))
# b means blowfish
s = j.db.serial... | 14.606061 | 52 | 0.690871 |
1451936f6556fb61e6556f37e17327936762d700 | 2,385 | py | Python | plico_motor/gui/motor_control_gui.py | ArcetriAdaptiveOptics/plico_motor | 955be506c6dcd21b1cc794790008f33272b9c99f | [
"MIT"
] | null | null | null | plico_motor/gui/motor_control_gui.py | ArcetriAdaptiveOptics/plico_motor | 955be506c6dcd21b1cc794790008f33272b9c99f | [
"MIT"
] | null | null | null | plico_motor/gui/motor_control_gui.py | ArcetriAdaptiveOptics/plico_motor | 955be506c6dcd21b1cc794790008f33272b9c99f | [
"MIT"
] | null | null | null | import sys
import plico_motor
from guietta import Gui, _, G, Exceptions
if __name__ == '__main__':
runner = Runner()
sys.exit(runner.run(sys.argv[1:]))
| 26.5 | 81 | 0.472537 |
145305b18a0c50cfad6baef16c32b27105d46bdd | 21,225 | py | Python | emma/core/metadata.py | djangowebstudio/emma | afbdaa5c02b4164687356755fddba307eb682ef4 | [
"BSD-3-Clause"
] | null | null | null | emma/core/metadata.py | djangowebstudio/emma | afbdaa5c02b4164687356755fddba307eb682ef4 | [
"BSD-3-Clause"
] | null | null | null | emma/core/metadata.py | djangowebstudio/emma | afbdaa5c02b4164687356755fddba307eb682ef4 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
metadata.py
Created by Geert Dekkers on 2008-02-11.
Copyright (c) 2008, 2009 Geert Dekkers Web Studio, 2010, 2011, 2012 Django Web Studio. All rights reserved.
"""
import string
import sys
import os
import unittest
import subprocess
import re
import datetime
import time
from... | 44.403766 | 157 | 0.527962 |
14532332bed6d241cade80730fa40fcc639066ed | 2,389 | py | Python | Manager/views.py | franklinwagbara/Brookstone-Pastoral-Management-System | a8a4cd66fbb7284e3cd61539bc313100ebd14f94 | [
"MIT"
] | null | null | null | Manager/views.py | franklinwagbara/Brookstone-Pastoral-Management-System | a8a4cd66fbb7284e3cd61539bc313100ebd14f94 | [
"MIT"
] | null | null | null | Manager/views.py | franklinwagbara/Brookstone-Pastoral-Management-System | a8a4cd66fbb7284e3cd61539bc313100ebd14f94 | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect
from .forms import SeasonForm, CurrentSeasonForm
from django.contrib import messages
from .functions import InitializeOtherSeasonValues
from StudentManager.models import Seasons, Students, CurrentSeason
from django.contrib.auth.decorators import login_required
from Dashboar... | 41.189655 | 101 | 0.662202 |
1453dc66d7e27b9f482339e0f5d11f6092505b1c | 1,316 | py | Python | easy/872-Leaf-Similar Trees.py | Davidxswang/leetcode | d554b7f5228f14c646f726ddb91014a612673e06 | [
"Apache-2.0"
] | 2 | 2020-05-08T02:17:17.000Z | 2020-05-17T04:55:56.000Z | easy/872-Leaf-Similar Trees.py | Davidxswang/leetcode | d554b7f5228f14c646f726ddb91014a612673e06 | [
"Apache-2.0"
] | null | null | null | easy/872-Leaf-Similar Trees.py | Davidxswang/leetcode | d554b7f5228f14c646f726ddb91014a612673e06 | [
"Apache-2.0"
] | null | null | null | """
https://leetcode.com/problems/leaf-similar-trees/
Consider all the leaves of a binary tree. From left to right order, the values of those leaves form a leaf value sequence.
For example, in the given tree above, the leaf value sequence is (6, 7, 4, 9, 8).
Two binary trees are considered leaf-similar if their le... | 30.604651 | 123 | 0.677052 |
145544a55d9f8af6fb2ce9e4cb8863368e3c6710 | 3,797 | py | Python | server/sections/views.py | ShahriarDhruvo/DU_Hackathon | 30650287a61a3314e6adb9e1c26206d4d8dbe312 | [
"MIT"
] | 3 | 2021-02-27T21:06:05.000Z | 2021-08-03T16:56:22.000Z | server/sections/views.py | ShahriarDhruvo/Class-Portal-Project-350- | 8ebc311a7992b61e5d15da19f0ba7dfdc059a705 | [
"MIT"
] | 1 | 2021-02-13T07:22:09.000Z | 2021-02-13T07:22:09.000Z | server/sections/views.py | ShahriarDhruvo/Class-Portal-Project-350- | 8ebc311a7992b61e5d15da19f0ba7dfdc059a705 | [
"MIT"
] | 1 | 2021-06-14T13:25:36.000Z | 2021-06-14T13:25:36.000Z | from rest_framework.decorators import api_view
from rest_framework.response import Response
from rest_framework.exceptions import (
NotFound,
APIException,
PermissionDenied,
)
from rest_framework.generics import (
CreateAPIView,
DestroyAPIView,
ListAPIView,
UpdateAPIView
)
fro... | 27.316547 | 75 | 0.632078 |
145570f50fd0d5242fca2c5f9ae0324f2bd8ada0 | 862 | py | Python | test-CapitalizeFile.py | shastriUF/appveyor-test | b85f6724fc0e5fc15618060a96da3a2c409ff2c2 | [
"MIT"
] | 3 | 2018-10-03T14:52:11.000Z | 2019-10-19T07:56:26.000Z | test-CapitalizeFile.py | shastriUF/appveyor-test | b85f6724fc0e5fc15618060a96da3a2c409ff2c2 | [
"MIT"
] | null | null | null | test-CapitalizeFile.py | shastriUF/appveyor-test | b85f6724fc0e5fc15618060a96da3a2c409ff2c2 | [
"MIT"
] | null | null | null | import CapitalizeFile
import os
import sys
import unittest
from unittest.mock import patch
if __name__ == '__main__':
unittest.main()
| 31.925926 | 75 | 0.657773 |
14557ccde474e88eaae99ac8ee7c1c015c75995c | 3,249 | py | Python | tests/tests.py | ipashchenko/pulses | 048078b4cd268390fe54eb25af4ecff5ffe1c0e4 | [
"MIT"
] | null | null | null | tests/tests.py | ipashchenko/pulses | 048078b4cd268390fe54eb25af4ecff5ffe1c0e4 | [
"MIT"
] | null | null | null | tests/tests.py | ipashchenko/pulses | 048078b4cd268390fe54eb25af4ecff5ffe1c0e4 | [
"MIT"
] | null | null | null | from unittest import (TestCase, skipIf)
import numpy as np
from astropy.time import Time, TimeDelta
from pulses.dsp import DSP
from pulses.dedispersion import DeDisperser, noncoherent_dedispersion
from pulses.preprocess import PreProcesser, create_ellipses
from pulses.search import Searcher, search_shear, search_ell
... | 36.1 | 80 | 0.579255 |
14562d82389831158d99eb2713f73021e22e88ef | 669 | py | Python | api/urls.py | tomazin/tpp | d9815cca93b43fc37593c3735161ec61d36c54b1 | [
"MIT"
] | 1 | 2018-02-07T14:21:10.000Z | 2018-02-07T14:21:10.000Z | api/urls.py | tpportugal/tpp_admin | 76089465d49fc043837422b67c9f818380427093 | [
"MIT"
] | null | null | null | api/urls.py | tpportugal/tpp_admin | 76089465d49fc043837422b67c9f818380427093 | [
"MIT"
] | 1 | 2021-06-20T17:31:29.000Z | 2021-06-20T17:31:29.000Z | from django.conf import settings
from django.conf.urls import url
from django.contrib import admin
from django.urls import include
from django.views.generic import RedirectView
from graphene_django.views import GraphQLView
from api.apps.gdrive.views import upload_timetable
urlpatterns = [
#url(r'^$', RedirectView... | 30.409091 | 92 | 0.735426 |
1456ebcd3a9f688ca99246c1d0ee66c13a04394d | 5,418 | py | Python | src/unpackaged/abm/BuildingTools/model4.py | agdturner/geog5990m | b6417820e6aaff7f0c785415c0d63eae3753a098 | [
"Apache-2.0"
] | null | null | null | src/unpackaged/abm/BuildingTools/model4.py | agdturner/geog5990m | b6417820e6aaff7f0c785415c0d63eae3753a098 | [
"Apache-2.0"
] | null | null | null | src/unpackaged/abm/BuildingTools/model4.py | agdturner/geog5990m | b6417820e6aaff7f0c785415c0d63eae3753a098 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
__version__ 1.0.0
"""
#import operator
import random
#import matplotlib.pyplot
import time
def distance_between(a, b):
""" A function to calculate the distance between agent a and agent b.
Args:
a: A list of two coordinates for orthoganol axes.
... | 36.857143 | 80 | 0.685124 |
1457921a9de9e9b972d2a00acd04f6e5e653bd5f | 13,451 | py | Python | project/app.py | FelippeJC/besa | 083e62457c9c9beccc869beb89675720be0d248a | [
"MIT"
] | null | null | null | project/app.py | FelippeJC/besa | 083e62457c9c9beccc869beb89675720be0d248a | [
"MIT"
] | 2 | 2021-05-10T16:40:12.000Z | 2021-09-05T09:26:07.000Z | project/app.py | FelippeJC/besa | 083e62457c9c9beccc869beb89675720be0d248a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
from flask import Flask, render_template, current_app
from flask_migrate import Migrate
from flask_restful import Api
from config import Config, DevelopmentConfig, TestingConfig
from .database import db
from datetime import datetime
import random
import folium
im... | 42.034375 | 137 | 0.544272 |
145854982248ea84d9abe0f478e5e22274de2489 | 142 | py | Python | vet_care/doc_events/patient_appointment.py | neerajvkn/vet_care | 14914b22e7a83265d736f9f9dc5186271ae62d66 | [
"MIT"
] | 2 | 2020-11-23T11:14:32.000Z | 2021-02-03T06:40:33.000Z | vet_care/doc_events/patient_appointment.py | neerajvkn/vet_care | 14914b22e7a83265d736f9f9dc5186271ae62d66 | [
"MIT"
] | null | null | null | vet_care/doc_events/patient_appointment.py | neerajvkn/vet_care | 14914b22e7a83265d736f9f9dc5186271ae62d66 | [
"MIT"
] | 7 | 2019-11-16T14:36:33.000Z | 2021-08-25T07:54:51.000Z | import frappe
| 20.285714 | 70 | 0.711268 |
1459e47e29f07327f77b66aae27e1f15b3c747d9 | 2,587 | py | Python | PyObjCTest/test_nsjavasetup.py | Khan/pyobjc-framework-Cocoa | f8b015ea2a72d8d78be6084fb12925c4785b8f1f | [
"MIT"
] | 132 | 2015-01-01T10:02:42.000Z | 2022-03-09T12:51:01.000Z | mac/pyobjc-framework-Cocoa/PyObjCTest/test_nsjavasetup.py | mba811/music-player | 7998986b34cfda2244ef622adefb839331b81a81 | [
"BSD-2-Clause"
] | 6 | 2015-01-06T08:23:19.000Z | 2019-03-14T12:22:06.000Z | mac/pyobjc-framework-Cocoa/PyObjCTest/test_nsjavasetup.py | mba811/music-player | 7998986b34cfda2244ef622adefb839331b81a81 | [
"BSD-2-Clause"
] | 27 | 2015-02-23T11:51:43.000Z | 2022-03-07T02:34:18.000Z | from PyObjCTools.TestSupport import *
import os
from Foundation import *
try:
unicode
except NameError:
unicode = str
if __name__ == "__main__":
main()
| 38.044118 | 82 | 0.665636 |
145b9e864830ccf706d0d9a073e4a05486a7340f | 605 | py | Python | code/crowdflower/front-end/data/gen_test_cases.py | raingo/TGIF-Release | 3e54d2f71418d8a2e9f5f61aa5be0edb9c0ac2b8 | [
"BSD-3-Clause"
] | 94 | 2016-04-07T15:07:13.000Z | 2022-02-25T07:19:57.000Z | code/crowdflower/front-end/data/gen_test_cases.py | raingo/TGIF-Release | 3e54d2f71418d8a2e9f5f61aa5be0edb9c0ac2b8 | [
"BSD-3-Clause"
] | 9 | 2016-08-22T15:35:27.000Z | 2020-10-13T15:48:52.000Z | code/crowdflower/front-end/data/gen_test_cases.py | raingo/TGIF-Release | 3e54d2f71418d8a2e9f5f61aa5be0edb9c0ac2b8 | [
"BSD-3-Clause"
] | 22 | 2016-04-07T15:39:57.000Z | 2022-03-04T08:04:47.000Z | #!/usr/bin/env python
"""
Python source code - replace this with a description of the code and write the code below this text.
"""
from string import Template
g = '''
<div class="gold">
<img src="$url" alt="" height="128" />
<p>$text</p>
</div>
'''
if __name__ == "__main__":
main()
# vim: tabstop=8 exp... | 17.794118 | 100 | 0.606612 |
145bf345f806782fbc11a49939daa4c8e412d622 | 807 | py | Python | setup.py | jhamrick/dbtools | 40ad39dd87b8bd25b48cfd5fb819e35f85a61f43 | [
"MIT"
] | 15 | 2015-04-08T12:22:37.000Z | 2020-08-29T17:50:00.000Z | setup.py | jhamrick/dbtools | 40ad39dd87b8bd25b48cfd5fb819e35f85a61f43 | [
"MIT"
] | null | null | null | setup.py | jhamrick/dbtools | 40ad39dd87b8bd25b48cfd5fb819e35f85a61f43 | [
"MIT"
] | 6 | 2015-01-07T09:13:18.000Z | 2021-10-17T15:37:09.000Z | #!/usr/bin/env python
from distutils.core import setup
setup(
name='dbtools',
version=open("VERSION.txt").read().strip(),
description='Lightweight SQLite interface',
author='Jessica B. Hamrick',
author_email='jhamrick@berkeley.edu',
url='https://github.com/jhamrick/dbtools',
packages=['dbt... | 27.827586 | 49 | 0.599752 |
145cd735796a8c0ced4a862fa94a42e586c1409a | 184 | py | Python | demo2_typing.py | cebucodecamp/pizzapy23-mypy | 648f636356e7771cb5b122620dcdd37fcd800553 | [
"CC0-1.0"
] | null | null | null | demo2_typing.py | cebucodecamp/pizzapy23-mypy | 648f636356e7771cb5b122620dcdd37fcd800553 | [
"CC0-1.0"
] | null | null | null | demo2_typing.py | cebucodecamp/pizzapy23-mypy | 648f636356e7771cb5b122620dcdd37fcd800553 | [
"CC0-1.0"
] | null | null | null | from typing import List
# ./runmypy cat /usr/local/lib/python3.6/typing.py
print(count_plus_first(list(range(10))))
| 18.4 | 50 | 0.711957 |
145ce43f4d1275496b60c29a64125c4a8e0ea1ef | 1,442 | py | Python | realestate_com_au/fajita/cookie_repository.py | aspratyush/realestate-com-au-api | 20fceb8ae16c516337034f832d2d3a940fbfe525 | [
"MIT"
] | null | null | null | realestate_com_au/fajita/cookie_repository.py | aspratyush/realestate-com-au-api | 20fceb8ae16c516337034f832d2d3a940fbfe525 | [
"MIT"
] | null | null | null | realestate_com_au/fajita/cookie_repository.py | aspratyush/realestate-com-au-api | 20fceb8ae16c516337034f832d2d3a940fbfe525 | [
"MIT"
] | null | null | null | import os
import pickle
| 28.84 | 80 | 0.65534 |
145e44674579d43491b3bb899a2a1249d889f439 | 6,326 | py | Python | orms_tools/sqlalchemy_tools/sa_combine.py | biobdeveloper/ormc | 413d3362fdf5cd7f171dfdb56ab00299099339ed | [
"MIT"
] | 9 | 2022-01-22T19:10:58.000Z | 2022-01-27T12:49:57.000Z | orms_tools/sqlalchemy_tools/sa_combine.py | biobdeveloper/ormc | 413d3362fdf5cd7f171dfdb56ab00299099339ed | [
"MIT"
] | null | null | null | orms_tools/sqlalchemy_tools/sa_combine.py | biobdeveloper/ormc | 413d3362fdf5cd7f171dfdb56ab00299099339ed | [
"MIT"
] | null | null | null | import datetime
from typing import List
from sqlalchemy.orm import ColumnProperty, DeclarativeMeta, class_mapper
from core.combine import AbstractModelCombine
from core.db_primitives import CoreField, CoreModel
from .sa_base import SABase, metadata, sa
def to_core_model(self, model: SABase) -> CoreModel:
... | 32.777202 | 99 | 0.587259 |
145e5344e9bd1be8c32e4a85709baff72526841b | 5,791 | py | Python | research/object_detection/dataset_tools/create_modalnet_tf_record.py | qa276390/tf-models | 39fc5ec5cfbd35c79f7017f52e36ff7c404cf252 | [
"Apache-2.0"
] | null | null | null | research/object_detection/dataset_tools/create_modalnet_tf_record.py | qa276390/tf-models | 39fc5ec5cfbd35c79f7017f52e36ff7c404cf252 | [
"Apache-2.0"
] | null | null | null | research/object_detection/dataset_tools/create_modalnet_tf_record.py | qa276390/tf-models | 39fc5ec5cfbd35c79f7017f52e36ff7c404cf252 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 32.533708 | 86 | 0.605595 |
145ff7cd59bf75144b6b899ecb7383e46371273c | 133 | py | Python | GeneticSimPython/GeneticSimPython/Genetic/constants.py | Scimson/GeneticSim | 7175e0ead69185bcf3221a91b5bac40b4cc42495 | [
"Apache-2.0"
] | null | null | null | GeneticSimPython/GeneticSimPython/Genetic/constants.py | Scimson/GeneticSim | 7175e0ead69185bcf3221a91b5bac40b4cc42495 | [
"Apache-2.0"
] | null | null | null | GeneticSimPython/GeneticSimPython/Genetic/constants.py | Scimson/GeneticSim | 7175e0ead69185bcf3221a91b5bac40b4cc42495 | [
"Apache-2.0"
] | null | null | null | INITIAL_GENE_VALUE_LIMIT = 1
MUTATION_PROBABILITY = 0.3
MUTATION_SIZE = 0.2
GENERATION_SIZE = 8
VERBOSE = False
DECIMAL_PRECISION = 3 | 22.166667 | 28 | 0.81203 |
14600f8835996a9b20a3a6f88d1ded4994fdafbf | 6,752 | py | Python | oseoserver/settings.py | pyoseo/oseoserver | 8c97ee5a7d698cc989e1c8cab8cfe0db78491307 | [
"Apache-2.0"
] | null | null | null | oseoserver/settings.py | pyoseo/oseoserver | 8c97ee5a7d698cc989e1c8cab8cfe0db78491307 | [
"Apache-2.0"
] | 10 | 2015-02-10T17:10:33.000Z | 2018-04-05T10:05:01.000Z | oseoserver/settings.py | pyoseo/oseoserver | 8c97ee5a7d698cc989e1c8cab8cfe0db78491307 | [
"Apache-2.0"
] | null | null | null | """Providing custom values for oseoserver's settings."""
from django.conf import settings
from . import constants
| 29.103448 | 76 | 0.499408 |
14605133b5a68f936b862bf051b6b8b818564c9d | 21,324 | py | Python | inn/inn_hotels/doctype/inn_room_charge_posting/inn_room_charge_posting.py | vinhnguyent090/front-desk | 7384642e9206e30855986465a7ef63c8fd76ef2a | [
"MIT"
] | 4 | 2021-08-19T03:33:36.000Z | 2021-08-28T16:37:52.000Z | inn/inn_hotels/doctype/inn_room_charge_posting/inn_room_charge_posting.py | vinhnguyent090/front-desk | 7384642e9206e30855986465a7ef63c8fd76ef2a | [
"MIT"
] | 98 | 2020-02-24T08:12:47.000Z | 2021-08-21T07:54:03.000Z | inn/inn_hotels/doctype/inn_room_charge_posting/inn_room_charge_posting.py | vinhnguyent090/front-desk | 7384642e9206e30855986465a7ef63c8fd76ef2a | [
"MIT"
] | 13 | 2021-01-24T18:08:43.000Z | 2022-03-29T09:23:25.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Core Initiative and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import json
import frappe
import math
import datetime
from frappe.model.document import Document
from inn.inn_hotels.doctype.inn_folio_transaction_ty... | 49.475638 | 169 | 0.790096 |
1460ea711d040294de88c1522d612f5a07e0f6af | 1,128 | py | Python | packages/syft/src/syft/core/node/common/client_manager/role_api.py | jackbandy/PySyft | 0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b | [
"Apache-2.0"
] | null | null | null | packages/syft/src/syft/core/node/common/client_manager/role_api.py | jackbandy/PySyft | 0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b | [
"Apache-2.0"
] | null | null | null | packages/syft/src/syft/core/node/common/client_manager/role_api.py | jackbandy/PySyft | 0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b | [
"Apache-2.0"
] | null | null | null | # stdlib
from typing import Any
# relative
from ...abstract.node import AbstractNodeClient
from ...enums import ResponseObjectEnum
from ..node_service.role_manager.role_manager_messages import CreateRoleMessage
from ..node_service.role_manager.role_manager_messages import DeleteRoleMessage
from ..node_service.role_man... | 35.25 | 79 | 0.749113 |
1461a6da7a9beed86ae1959d1a45ad20a0e024f7 | 90,700 | py | Python | ietf/ydk/models/ietf/iana_if_type.py | CiscoDevNet/ydk-py | 073731fea50694d0bc6cd8ebf10fec308dcc0aa9 | [
"ECL-2.0",
"Apache-2.0"
] | 177 | 2016-03-15T17:03:51.000Z | 2022-03-18T16:48:44.000Z | ietf/ydk/models/ietf/iana_if_type.py | CiscoDevNet/ydk-py | 073731fea50694d0bc6cd8ebf10fec308dcc0aa9 | [
"ECL-2.0",
"Apache-2.0"
] | 18 | 2016-03-30T10:45:22.000Z | 2020-07-14T16:28:13.000Z | ietf/ydk/models/ietf/iana_if_type.py | CiscoDevNet/ydk-py | 073731fea50694d0bc6cd8ebf10fec308dcc0aa9 | [
"ECL-2.0",
"Apache-2.0"
] | 85 | 2016-03-16T20:38:57.000Z | 2022-02-22T04:26:02.000Z | """ iana_if_type
This YANG module defines YANG identities for IANA\-registered
interface types.
This YANG module is maintained by IANA and reflects the
'ifType definitions' registry.
The latest revision of this YANG module can be obtained from
the IANA web site.
Requests for new values should be made to IANA via
e... | 20.492544 | 141 | 0.619901 |
146492b5825e6748c11ad8a01ce7cd816d909acc | 5,307 | py | Python | TimeSeriesTools/Similarities/similarities.py | Psicowired87/TimeSeriesTools | de42dbcc5371ee576df6c9521b1c79a47c147dd1 | [
"MIT"
] | 1 | 2015-05-01T14:14:02.000Z | 2015-05-01T14:14:02.000Z | TimeSeriesTools/Similarities/similarities.py | Psicowired87/TimeSeriesTools | de42dbcc5371ee576df6c9521b1c79a47c147dd1 | [
"MIT"
] | null | null | null | TimeSeriesTools/Similarities/similarities.py | Psicowired87/TimeSeriesTools | de42dbcc5371ee576df6c9521b1c79a47c147dd1 | [
"MIT"
] | 1 | 2015-05-01T14:15:03.000Z | 2015-05-01T14:15:03.000Z |
"""
Distances or similarities between time series are functions that computes a
distance measure or similarity measure pairwise and returns a matrix of
distances between each timeserie.
"""
import numpy as np
#import math
def general_comparison(X, method, kwargs={}):
"""Function which acts as a switcher and wr... | 28.686486 | 79 | 0.628415 |
146511309f8c17002dac29adf6b1235ccc4469be | 1,381 | py | Python | BDAI/datapredict/arandom.py | FYPYTHON/method | 94c8768b284f498dd4876ff152c355d76655f6c0 | [
"Apache-2.0"
] | null | null | null | BDAI/datapredict/arandom.py | FYPYTHON/method | 94c8768b284f498dd4876ff152c355d76655f6c0 | [
"Apache-2.0"
] | null | null | null | BDAI/datapredict/arandom.py | FYPYTHON/method | 94c8768b284f498dd4876ff152c355d76655f6c0 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
from random import randint
start = 1
end = 100
if __name__ == "__main__":
# get_fre()
get_char()
| 21.920635 | 71 | 0.493121 |
146608cbf54e2dc17b4bdc5c43fcee82318c9ee7 | 1,399 | py | Python | sw_stresstest/util.py | ox-inet-resilience/sw_stresstest | 6ffb6674b7550f32ac490a67fd5cb08352c92525 | [
"Apache-2.0"
] | null | null | null | sw_stresstest/util.py | ox-inet-resilience/sw_stresstest | 6ffb6674b7550f32ac490a67fd5cb08352c92525 | [
"Apache-2.0"
] | null | null | null | sw_stresstest/util.py | ox-inet-resilience/sw_stresstest | 6ffb6674b7550f32ac490a67fd5cb08352c92525 | [
"Apache-2.0"
] | null | null | null | import subprocess
import time
import matplotlib.pyplot as plt
# end
| 29.765957 | 87 | 0.634739 |
14661876a82e21d72a76cbaff98ac6765f7f7da1 | 1,792 | py | Python | src/omniverse/omniverse/pub_sub.py | XinghuiTao/ros2_turtlebot | 206aa5c8830cc6598077ab4cf86ffed261183d1a | [
"MIT"
] | null | null | null | src/omniverse/omniverse/pub_sub.py | XinghuiTao/ros2_turtlebot | 206aa5c8830cc6598077ab4cf86ffed261183d1a | [
"MIT"
] | null | null | null | src/omniverse/omniverse/pub_sub.py | XinghuiTao/ros2_turtlebot | 206aa5c8830cc6598077ab4cf86ffed261183d1a | [
"MIT"
] | null | null | null | import rclpy
from rclpy.node import Node
from geometry_msgs.msg import Twist
from sensor_msgs.msg import LaserScan
from rclpy.qos import ReliabilityPolicy, QoSProfile
from messager.msg import Date
if __name__ == '__main__':
main() | 33.811321 | 156 | 0.638393 |
146653bc27b7e95442355cef810e6af40d36eb20 | 958 | py | Python | agent/indy_catalyst_agent/messaging/basicmessage/handlers/basicmessage_handler.py | blhagadorn/indy-catalyst | c268dba024096d312f541fde40443a1757f21661 | [
"Apache-2.0"
] | null | null | null | agent/indy_catalyst_agent/messaging/basicmessage/handlers/basicmessage_handler.py | blhagadorn/indy-catalyst | c268dba024096d312f541fde40443a1757f21661 | [
"Apache-2.0"
] | null | null | null | agent/indy_catalyst_agent/messaging/basicmessage/handlers/basicmessage_handler.py | blhagadorn/indy-catalyst | c268dba024096d312f541fde40443a1757f21661 | [
"Apache-2.0"
] | null | null | null | """Basic message handler."""
from ...base_handler import BaseHandler, BaseResponder, RequestContext
from ..messages.basicmessage import BasicMessage
| 34.214286 | 80 | 0.677453 |
14667b6cfd7a7154cebc9042e17bc855580d4270 | 3,410 | py | Python | src/InversionSection.py | r-barnes/PIS-G | 8ce458654e7d7cfa4d89d0ddc618b60abebc9581 | [
"MIT"
] | 3 | 2020-09-24T14:33:46.000Z | 2021-01-12T03:49:14.000Z | src/InversionSection.py | r-barnes/PIS-G | 8ce458654e7d7cfa4d89d0ddc618b60abebc9581 | [
"MIT"
] | 8 | 2020-12-30T07:41:21.000Z | 2021-01-13T04:30:04.000Z | src/InversionSection.py | r-barnes/PIS-G | 8ce458654e7d7cfa4d89d0ddc618b60abebc9581 | [
"MIT"
] | 1 | 2021-01-10T20:19:15.000Z | 2021-01-10T20:19:15.000Z | import matplotlib
matplotlib.use("Qt5Agg")
from PyQt5.QtWidgets import *
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar
from matplotlib.figure import Figure
import matplotlib.pyplot as plt
f... | 37.888889 | 89 | 0.594135 |
1466fa7202c905c1ed7d0f3f21914b3b36e75eb2 | 390 | py | Python | make_a_plea/celery.py | uk-gov-mirror/ministryofjustice.manchester_traffic_offences_pleas | 4c625b13fa2826bdde083a0270dcea1791f6dc18 | [
"MIT"
] | 3 | 2015-12-22T16:37:14.000Z | 2018-01-22T18:44:38.000Z | make_a_plea/celery.py | uk-gov-mirror/ministryofjustice.manchester_traffic_offences_pleas | 4c625b13fa2826bdde083a0270dcea1791f6dc18 | [
"MIT"
] | 145 | 2015-03-04T11:17:50.000Z | 2022-03-21T12:10:13.000Z | make_a_plea/celery.py | uk-gov-mirror/ministryofjustice.manchester_traffic_offences_pleas | 4c625b13fa2826bdde083a0270dcea1791f6dc18 | [
"MIT"
] | 3 | 2015-12-29T14:59:12.000Z | 2021-04-11T06:24:11.000Z | from __future__ import absolute_import
import os
from celery import Celery
from django.conf import settings
if not "DJANGO_SETTINGS_MODULE" in os.environ:
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'make_a_plea.settings.local')
app = Celery('apps.plea')
app.config_from_object('django.conf:settings', namesp... | 27.857143 | 81 | 0.810256 |
146cf0019e1baae0f4a02bb5f0b25a3b7ca507b7 | 3,676 | py | Python | openr/py/openr/cli/clis/prefix_mgr.py | xubingyue/openr | d883b613ff0dae8c1048488bd5332cd138d78af7 | [
"MIT"
] | 1 | 2021-01-13T09:45:11.000Z | 2021-01-13T09:45:11.000Z | openr/py/openr/cli/clis/prefix_mgr.py | xubingyue/openr | d883b613ff0dae8c1048488bd5332cd138d78af7 | [
"MIT"
] | null | null | null | openr/py/openr/cli/clis/prefix_mgr.py | xubingyue/openr | d883b613ff0dae8c1048488bd5332cd138d78af7 | [
"MIT"
] | null | null | null | #
# Copyright (c) 2014-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import divi... | 31.689655 | 78 | 0.661045 |
146dd66480416c85e1f3fbd450fd3d6014348667 | 829 | py | Python | editor_csv.py | zhixing121/python-web-spider | b696bfee2c14bf30f925e202f2c61da45d4a7c23 | [
"CNRI-Python"
] | 1 | 2017-12-26T16:01:13.000Z | 2017-12-26T16:01:13.000Z | editor_csv.py | zhixing121/python-web-spider | b696bfee2c14bf30f925e202f2c61da45d4a7c23 | [
"CNRI-Python"
] | null | null | null | editor_csv.py | zhixing121/python-web-spider | b696bfee2c14bf30f925e202f2c61da45d4a7c23 | [
"CNRI-Python"
] | null | null | null | import csv
import os
from urllib.request import urlopen
from bs4 import BeautifulSoup
html = urlopen("http://en.wikipedia.org/wiki/Comparison_of_text_editors")
bsObj = BeautifulSoup(html, "html.parser")
main_table = bsObj.findAll("table", {"class": "wikitable"})[0] #findAll
rows = main_table.findAll("tr")
... | 27.633333 | 79 | 0.641737 |
146e301faad6d37d22b69f9018760b69109e85d8 | 4,267 | py | Python | CombatSystem/combatGame.py | climbablebug44/synergy | dc9bec9da56d436842151e9ceaf004a7db3ed8d0 | [
"MIT"
] | null | null | null | CombatSystem/combatGame.py | climbablebug44/synergy | dc9bec9da56d436842151e9ceaf004a7db3ed8d0 | [
"MIT"
] | null | null | null | CombatSystem/combatGame.py | climbablebug44/synergy | dc9bec9da56d436842151e9ceaf004a7db3ed8d0 | [
"MIT"
] | null | null | null | import pygame
from CombatSystem import playerEntity
from common import gameConstants as c
from CombatSystem.spriteSheetManager import spriteSheetManager
from pygame import mixer
| 41.833333 | 118 | 0.541833 |
146e6232114db733f3b0d7c61e5999eb7219ef0b | 18,337 | py | Python | semvecpy/vectors/binary_packedbitvectors.py | semanticvectors/semvecpy | b08c038a75faa9130f84cb8ff2ce57a40bca75c1 | [
"BSD-3-Clause"
] | 6 | 2019-08-07T19:09:21.000Z | 2021-12-10T15:14:07.000Z | semvecpy/vectors/binary_packedbitvectors.py | semanticvectors/semvecpy | b08c038a75faa9130f84cb8ff2ce57a40bca75c1 | [
"BSD-3-Clause"
] | 2 | 2019-08-20T16:34:49.000Z | 2020-08-07T22:52:57.000Z | semvecpy/vectors/binary_packedbitvectors.py | semanticvectors/semvecpy | b08c038a75faa9130f84cb8ff2ce57a40bca75c1 | [
"BSD-3-Clause"
] | 5 | 2019-06-20T18:50:05.000Z | 2020-02-14T07:04:41.000Z | """
Binary vectors provide the basis for a representational approach
developed by Pentti Kanerva known as the Binary Spatter Code, with
the following key components:
(1) Randomly generated bit vectors with a .5 probability of a set bit in each component
(2) A *superposition* operator: this combines bit vectors elementw... | 38.122661 | 149 | 0.587173 |
146e8fb91d80fa949c6e8011c9464b27f7799c13 | 2,380 | py | Python | kstore/migrations/0002_product.py | KeoH/django-keoh-kstore | 825d7984a06823a4e592265c4e791b455ddbb481 | [
"BSD-2-Clause"
] | null | null | null | kstore/migrations/0002_product.py | KeoH/django-keoh-kstore | 825d7984a06823a4e592265c4e791b455ddbb481 | [
"BSD-2-Clause"
] | null | null | null | kstore/migrations/0002_product.py | KeoH/django-keoh-kstore | 825d7984a06823a4e592265c4e791b455ddbb481 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
| 58.04878 | 133 | 0.628571 |
14717cb73f4fcafb66b24b0e05933e41c92a4ce2 | 6,194 | py | Python | lib/tensor_helper.py | jwspaeth/FAA-Project | afa9d3bec10deead48c4b17dff69df2e02691e41 | [
"MIT"
] | null | null | null | lib/tensor_helper.py | jwspaeth/FAA-Project | afa9d3bec10deead48c4b17dff69df2e02691e41 | [
"MIT"
] | 2 | 2019-10-20T00:42:40.000Z | 2019-10-30T18:06:11.000Z | lib/tensor_helper.py | jwspaeth/FAA-Project | afa9d3bec10deead48c4b17dff69df2e02691e41 | [
"MIT"
] | null | null | null |
import tensorflow as tf
from tensorflow.keras import backend
from tensorflow.keras.layers import Lambda
from tensorflow.keras import layers
##########################################
###############################
| 30.81592 | 94 | 0.669357 |
1471ffde947b195df3146f6179d3445bcf40ebc8 | 2,126 | py | Python | tests/unit/configuration_subsystem/test_internals.py | LaudateCorpus1/ansible-navigator | 28cdea13dba3e9039382eb993989db4b3e61b237 | [
"Apache-2.0"
] | null | null | null | tests/unit/configuration_subsystem/test_internals.py | LaudateCorpus1/ansible-navigator | 28cdea13dba3e9039382eb993989db4b3e61b237 | [
"Apache-2.0"
] | null | null | null | tests/unit/configuration_subsystem/test_internals.py | LaudateCorpus1/ansible-navigator | 28cdea13dba3e9039382eb993989db4b3e61b237 | [
"Apache-2.0"
] | null | null | null | """Test the internals of a NavigatorConfiguration."""
import os
from copy import deepcopy
from ansible_navigator.configuration_subsystem import Constants
from ansible_navigator.configuration_subsystem import NavigatorConfiguration
from ansible_navigator.initialization import parse_and_update
from .defaults import TE... | 39.37037 | 97 | 0.784572 |
1476362831f27710fac9b1814044976cc0886949 | 14,703 | py | Python | cogs/juan/fanclub.py | nwunderly/RevBots | 820a5a28c093f9fc4a73651117e06900e16976a2 | [
"MIT"
] | 5 | 2020-05-08T10:09:10.000Z | 2020-07-22T23:55:00.000Z | cogs/juan/fanclub.py | nwunderly/RevBots | 820a5a28c093f9fc4a73651117e06900e16976a2 | [
"MIT"
] | 2 | 2020-02-27T00:30:49.000Z | 2020-03-02T21:35:31.000Z | cogs/juan/fanclub.py | nwunderly/RevBots | 820a5a28c093f9fc4a73651117e06900e16976a2 | [
"MIT"
] | 2 | 2020-02-27T13:03:27.000Z | 2020-03-01T19:12:42.000Z |
import discord
from discord.ext import commands
from discord.ext import tasks
import datetime
import asyncio
import decimal
import yaml
import re
import copy
import collections
from utils import juan_checks as checks
from utils import db
from utils import converters
VISITOR_ROLE = 582405430274293770
DEVELOPER_ROLE... | 35.948655 | 149 | 0.600694 |
147794b11f083834b0a515872fd145a05f2c04be | 221 | py | Python | example/http_server.py | tor4z/ion | aa60ac23246f5fab5a5199704a65f7068d316179 | [
"MIT"
] | null | null | null | example/http_server.py | tor4z/ion | aa60ac23246f5fab5a5199704a65f7068d316179 | [
"MIT"
] | null | null | null | example/http_server.py | tor4z/ion | aa60ac23246f5fab5a5199704a65f7068d316179 | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
http = HTTPServer()
http.bind(("localhost", 9000))
http.serv("/", MyHTTPHandler)
http.start() | 22.1 | 34 | 0.61991 |
147ab841bf342fcda700f1104a6e09f84f9d4bf0 | 2,383 | py | Python | lab6/program/lidar_model.py | windsuzu/Robot-Navigation | 2b66df58e0a0799c25244f89a4e5a16d856b2320 | [
"MIT"
] | 6 | 2021-11-09T12:42:13.000Z | 2022-02-25T03:43:00.000Z | lab6/program/lidar_model.py | windsuzu/Robot-Navigation | 2b66df58e0a0799c25244f89a4e5a16d856b2320 | [
"MIT"
] | null | null | null | lab6/program/lidar_model.py | windsuzu/Robot-Navigation | 2b66df58e0a0799c25244f89a4e5a16d856b2320 | [
"MIT"
] | 1 | 2021-10-01T15:30:30.000Z | 2021-10-01T15:30:30.000Z | import numpy as np
import cv2
import sys
from utils import *
if __name__ == "__main__":
img = cv2.flip(cv2.imread("Maps/map.png"),0)
img[img>128] = 255
img[img<=128] = 0
m = np.asarray(img)
m = cv2.cvtColor(m, cv2.COLOR_RGB2GRAY)
m = m.astype(float) / 255.
img = img.astype(float)/255.
... | 33.097222 | 124 | 0.534201 |
147b00995ae20769b7f485083e84166a340a1e74 | 1,399 | py | Python | main/tools/verification_code.py | anngle/t923 | 078d2c566c77afa2ca1be7663d3c23c9f0ecddac | [
"BSD-3-Clause"
] | 1 | 2021-11-28T05:46:45.000Z | 2021-11-28T05:46:45.000Z | main/tools/verification_code.py | anngle/t923 | 078d2c566c77afa2ca1be7663d3c23c9f0ecddac | [
"BSD-3-Clause"
] | null | null | null | main/tools/verification_code.py | anngle/t923 | 078d2c566c77afa2ca1be7663d3c23c9f0ecddac | [
"BSD-3-Clause"
] | null | null | null |
import random,string
from datetime import datetime
from ..views.public import bp as public_bp
def rndChar():
""":"""
str = ''
for i in range(4):
str += chr(random.randint(65, 90))
return str
def rndColor():
"""1"""
return (random.randint(64, 255), random.randint(64, 255), random.... | 21.859375 | 86 | 0.61544 |
147bc4f8e6ae805cfc73d5804d3fd691847d2e69 | 973 | py | Python | docs/conf.py | purplepinapples/aniffinity | 36b6eec3c7b135aec61f138cdc139dd39561448a | [
"MIT"
] | 9 | 2019-03-10T01:22:35.000Z | 2021-11-08T12:36:10.000Z | docs/conf.py | purplepinapples/aniffinity | 36b6eec3c7b135aec61f138cdc139dd39561448a | [
"MIT"
] | 10 | 2019-01-04T21:22:42.000Z | 2019-04-27T13:10:53.000Z | docs/conf.py | purplepinapples/aniffinity | 36b6eec3c7b135aec61f138cdc139dd39561448a | [
"MIT"
] | 1 | 2019-04-12T08:56:14.000Z | 2019-04-12T08:56:14.000Z | import datetime
import sys
sys.path.insert(0, "..")
from aniffinity import __about__ # noqa: E402
year = datetime.datetime.now().year
author = __about__.__author__
project = __about__.__title__
release = __about__.__version__
copyright = "{}, {}".format(year, author)
version = ".".join(relea... | 18.711538 | 74 | 0.661871 |
147e4c37e82e99774bdffd577533bd3c9ad7347e | 716 | py | Python | staff/files.py | skyydq/GreaterWMS | e14014a73b36ec0f0df03712a229b0931cb388fb | [
"Apache-2.0"
] | 2 | 2021-11-09T10:29:44.000Z | 2021-11-15T08:03:40.000Z | staff/files.py | ashrafali46/GreaterWMS | 1aed14a8c26c8ac4571db5e6b07ab7e4fa3c7c72 | [
"Apache-2.0"
] | null | null | null | staff/files.py | ashrafali46/GreaterWMS | 1aed14a8c26c8ac4571db5e6b07ab7e4fa3c7c72 | [
"Apache-2.0"
] | 1 | 2021-07-01T03:05:21.000Z | 2021-07-01T03:05:21.000Z | from rest_framework_csv.renderers import CSVStreamingRenderer
| 23.866667 | 61 | 0.550279 |
147f39b77ce21747030f0597ae31c34fe414a767 | 3,837 | py | Python | scripts/utils.py | AlgoveraAI/DeFi | 9e98aa68ad34e5bb177ec8345121e8a03ada6edc | [
"MIT"
] | null | null | null | scripts/utils.py | AlgoveraAI/DeFi | 9e98aa68ad34e5bb177ec8345121e8a03ada6edc | [
"MIT"
] | 2 | 2021-12-15T20:15:35.000Z | 2021-12-16T10:03:58.000Z | scripts/utils.py | AlgoveraAI/DeFi | 9e98aa68ad34e5bb177ec8345121e8a03ada6edc | [
"MIT"
] | 1 | 2022-01-15T11:49:59.000Z | 2022-01-15T11:49:59.000Z | import pandas as pd
from fastai.tabular.all import *
| 33.365217 | 118 | 0.617931 |
147ff2eb5cc2520a781b4df48351b63b5d4614b5 | 1,645 | py | Python | tests/readers/test_po_reader.py | fabiocorneti/xlpo | 9fc4729c7e139a9a9fc74c88068e2691b2b120df | [
"BSD-3-Clause"
] | null | null | null | tests/readers/test_po_reader.py | fabiocorneti/xlpo | 9fc4729c7e139a9a9fc74c88068e2691b2b120df | [
"BSD-3-Clause"
] | null | null | null | tests/readers/test_po_reader.py | fabiocorneti/xlpo | 9fc4729c7e139a9a9fc74c88068e2691b2b120df | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import os
import unittest
from xlpo.readers import POFileTranslationsReader
from tests.base import BaseTestCase
if __name__ == '__main__':
unittest.main()
| 32.9 | 76 | 0.689362 |
147ff7eaa3c8d013a61ba02817c8400feb311c49 | 6,576 | py | Python | pytube/contrib/channel.py | JarbasAl/pytube | 10d0bdb6761682c2a48e4c816aec4bb9b801f7aa | [
"Unlicense"
] | 4,079 | 2015-01-08T13:09:24.000Z | 2020-12-31T08:59:22.000Z | pytube/contrib/channel.py | JarbasAl/pytube | 10d0bdb6761682c2a48e4c816aec4bb9b801f7aa | [
"Unlicense"
] | 807 | 2015-02-23T12:49:43.000Z | 2020-12-31T16:09:01.000Z | pytube/contrib/channel.py | JarbasAl/pytube | 10d0bdb6761682c2a48e4c816aec4bb9b801f7aa | [
"Unlicense"
] | 1,079 | 2015-01-08T10:16:47.000Z | 2020-12-30T15:26:13.000Z | # -*- coding: utf-8 -*-
"""Module for interacting with a user's youtube channel."""
import json
import logging
from typing import Dict, List, Optional, Tuple
from pytube import extract, Playlist, request
from pytube.helpers import uniqueify
logger = logging.getLogger(__name__)
| 32.554455 | 114 | 0.572384 |
1481014f1238c87b509f6d7636e1089e842e9bb5 | 2,821 | py | Python | lib/python3.6/site-packages/pony/orm/tests/test_getattr.py | PhonPhey/Magnezi | bf96246d69edc6882653ba5e1332c0eff8d10294 | [
"MIT"
] | 3 | 2017-04-27T09:37:25.000Z | 2017-08-12T16:25:22.000Z | lib/python3.6/site-packages/pony/orm/tests/test_getattr.py | PhonPhey/Magnezi | bf96246d69edc6882653ba5e1332c0eff8d10294 | [
"MIT"
] | 2 | 2017-06-29T13:25:58.000Z | 2017-07-21T10:09:27.000Z | lib/python3.6/site-packages/pony/orm/tests/test_getattr.py | PhonPhey/Magnezi | bf96246d69edc6882653ba5e1332c0eff8d10294 | [
"MIT"
] | 1 | 2017-10-08T11:42:52.000Z | 2017-10-08T11:42:52.000Z | from pony.py23compat import basestring
import unittest
from pony.orm import *
from pony import orm
from pony.utils import cached_property
from pony.orm.tests.testutils import raises_exception
| 30.663043 | 95 | 0.594116 |
148507709ec89a7b9ce8b3e2efc0d3035c5ed4c9 | 423 | py | Python | web/opsgrid/core/migrations/0010_auto_20200612_1724.py | simon-weber/opsgrid | 9719b9438a4a17eb75b638613a20b534ef82edc7 | [
"MIT"
] | null | null | null | web/opsgrid/core/migrations/0010_auto_20200612_1724.py | simon-weber/opsgrid | 9719b9438a4a17eb75b638613a20b534ef82edc7 | [
"MIT"
] | 1 | 2021-07-26T15:43:47.000Z | 2021-07-28T10:06:49.000Z | web/opsgrid/core/migrations/0010_auto_20200612_1724.py | simon-weber/opsgrid | 9719b9438a4a17eb75b638613a20b534ef82edc7 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.9 on 2020-06-12 17:24
from django.db import migrations, models
| 22.263158 | 69 | 0.619385 |
1485a31bf1f79c39d579abb85dfc18c55092eb28 | 3,545 | py | Python | fastapi_code_generator/__main__.py | allen-munsch/fastapi-code-generator | 516735f8992ab9e9b5b038a90766deffbb25e702 | [
"MIT"
] | null | null | null | fastapi_code_generator/__main__.py | allen-munsch/fastapi-code-generator | 516735f8992ab9e9b5b038a90766deffbb25e702 | [
"MIT"
] | null | null | null | fastapi_code_generator/__main__.py | allen-munsch/fastapi-code-generator | 516735f8992ab9e9b5b038a90766deffbb25e702 | [
"MIT"
] | null | null | null | from datetime import datetime, timezone
from pathlib import Path
from typing import Dict, Optional
import typer
from datamodel_code_generator import PythonVersion, chdir
from datamodel_code_generator.format import CodeFormatter
from datamodel_code_generator.parser.openapi import OpenAPIParser as OpenAPIModelParser
fro... | 33.130841 | 87 | 0.666855 |
14867dc769343133304ed2cb1cb736d1e1c8931c | 752 | py | Python | code/timewalk.py | spicecoder/Udacity_Robo_search | 682568845e23a5d6f1db8aa2423b6a3e0396a152 | [
"MIT"
] | null | null | null | code/timewalk.py | spicecoder/Udacity_Robo_search | 682568845e23a5d6f1db8aa2423b6a3e0396a152 | [
"MIT"
] | null | null | null | code/timewalk.py | spicecoder/Udacity_Robo_search | 682568845e23a5d6f1db8aa2423b6a3e0396a152 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import csv
import time
x = []
y = []
# Draw a point based on the x, y axis value.
with open('path.txt','r') as csvfile:
plots = csv.reader(csvfile, delimiter=',')
for row in plots:
time.sleep(1)
draw_point(row[0],row[1])
| 20.888889 | 60 | 0.632979 |
14873e1459fd28392f8d92a01500f6ff166f405e | 1,086 | py | Python | switch.py | wangzhifengemc/Pied | 3cb726835b80c5e40c79cb37a8382b085217aad2 | [
"MIT"
] | null | null | null | switch.py | wangzhifengemc/Pied | 3cb726835b80c5e40c79cb37a8382b085217aad2 | [
"MIT"
] | null | null | null | switch.py | wangzhifengemc/Pied | 3cb726835b80c5e40c79cb37a8382b085217aad2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import RPi.GPIO as GPIO
import time
LedPin = 26 # pin26
if __name__ == '__main__': # Program start from here
GPIO.setmode(GPIO.BCM) # Numbers pins by physical location
Switch_setup()
try:
while True:
print '...led on'
Switch(... | 27.846154 | 106 | 0.57919 |
14885518ee5bdf26119d578bdfe03fa5dfcbf72d | 3,371 | py | Python | tests/test_encode.py | DenverCoder1/godel-number-to-code | 1f4fc3d5eba97ca45411302a67db79c77e44e19d | [
"MIT"
] | null | null | null | tests/test_encode.py | DenverCoder1/godel-number-to-code | 1f4fc3d5eba97ca45411302a67db79c77e44e19d | [
"MIT"
] | null | null | null | tests/test_encode.py | DenverCoder1/godel-number-to-code | 1f4fc3d5eba97ca45411302a67db79c77e44e19d | [
"MIT"
] | 1 | 2022-01-18T19:51:33.000Z | 2022-01-18T19:51:33.000Z | from src.encode_program import (
encode_program_as_number,
encode_label,
encode_var,
convert_instruction,
)
from .test_utils.constants import BASIC, GOTO, VARIABLES
from .test_utils.test_utils import read_program
import pytest
def test_encode_program_basic():
"""Encode program with NOOP, ADD, MONUS to program ... | 28.811966 | 65 | 0.738653 |
148aed66cef31c0c2ec9eb004a6e093ae5f5aada | 477 | py | Python | content/admin.py | mislavcimpersak/sentish | 7402fa1cb65d4027f7e3151370283f9eb8743ace | [
"MIT"
] | null | null | null | content/admin.py | mislavcimpersak/sentish | 7402fa1cb65d4027f7e3151370283f9eb8743ace | [
"MIT"
] | null | null | null | content/admin.py | mislavcimpersak/sentish | 7402fa1cb65d4027f7e3151370283f9eb8743ace | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Publisher, Article
| 26.5 | 51 | 0.706499 |
148ceb1fb000771c1bef8a1a38a56aebb024d47d | 1,457 | py | Python | route/__init__.py | zyguan/pyroute | 16527374419780672f7ceae6f2a123a336603572 | [
"MIT"
] | null | null | null | route/__init__.py | zyguan/pyroute | 16527374419780672f7ceae6f2a123a336603572 | [
"MIT"
] | null | null | null | route/__init__.py | zyguan/pyroute | 16527374419780672f7ceae6f2a123a336603572 | [
"MIT"
] | null | null | null | import _route
VINCENTY = 1
HAVERSINE = 2
def distance(lat1, lng1, lat2, lng2, formula=VINCENTY, iterlimit=20):
"""
Calculate distance between two points.
:param lat1: latitude of point 1 in degrees
:param lng1: longitude of point 1 in degrees
:param lat2: latitude of point 2 in degrees
:param... | 31 | 72 | 0.702128 |
148edfcbbb548da291d232bce2ff074913d016aa | 1,335 | py | Python | django/contrib/contenttypes/tests.py | huicheese/Django-test3 | ac11d2dce245b48392e52d1f4acfd5e7433b243e | [
"BSD-3-Clause"
] | 91 | 2015-01-05T01:10:51.000Z | 2021-09-26T18:01:53.000Z | django/contrib/contenttypes/tests.py | joetyson/django | c3699190186561d5c216b2a77ecbfc487d42a734 | [
"BSD-3-Clause"
] | 4 | 2015-07-05T21:09:37.000Z | 2019-09-06T14:34:59.000Z | django/contrib/contenttypes/tests.py | joetyson/django | c3699190186561d5c216b2a77ecbfc487d42a734 | [
"BSD-3-Clause"
] | 32 | 2015-04-03T04:29:45.000Z | 2021-09-14T21:36:02.000Z | """
Make sure that the content type cache (see ContentTypeManager) works correctly.
Lookups for a particular content type -- by model or by ID -- should hit the
database only on the first lookup.
First, let's make sure we're dealing with a blank slate (and that DEBUG is on so
that queries get logged)::
>>> from d... | 28.404255 | 80 | 0.689139 |
148f4c1f2a15a99386afd8bf7437ae1271c28c0c | 63 | py | Python | gethigal/__init__.py | vlas-sokolov/gethigal | 4a1cdd2b5acd673f19fa99a87560f09ba8dba2eb | [
"MIT"
] | 4 | 2017-03-22T19:58:44.000Z | 2019-08-25T23:39:46.000Z | gethigal/__init__.py | vlas-sokolov/gethigal | 4a1cdd2b5acd673f19fa99a87560f09ba8dba2eb | [
"MIT"
] | null | null | null | gethigal/__init__.py | vlas-sokolov/gethigal | 4a1cdd2b5acd673f19fa99a87560f09ba8dba2eb | [
"MIT"
] | null | null | null | from . import requestform
from .requestform import RequestForm
| 21 | 36 | 0.84127 |
148fccfed7ce693db285318059d68d89b499a64d | 334 | py | Python | exemplo_8.py | felipesantoos/pandas | 4ebecbfed9e7963ee74d9510cca9157c2fcb54c0 | [
"MIT"
] | null | null | null | exemplo_8.py | felipesantoos/pandas | 4ebecbfed9e7963ee74d9510cca9157c2fcb54c0 | [
"MIT"
] | null | null | null | exemplo_8.py | felipesantoos/pandas | 4ebecbfed9e7963ee74d9510cca9157c2fcb54c0 | [
"MIT"
] | null | null | null | import pandas as pd
import shutil as sh
langs = {
"name": ["Go", "Python", "TypeScript", "PHP"],
"score": [10, 9, 10, 6]
}
df = pd.DataFrame(langs, index = ["lang1", "lang2", "lang3", "lang4"])
print(df.loc["lang2"]) # Retorna um Pandas Series.
print("-" * sh.get_terminal_size().columns)
print(df.loc[["lang3... | 23.857143 | 70 | 0.607784 |
148feabf54ade022cfd30a6e3c7acb31b5014b87 | 2,563 | py | Python | webserver/python2.7/site-packages/area/__init__.py | maxr1876/Radix | bf9a5470908ea0823c8398565086b1e6b960c73b | [
"BSD-2-Clause"
] | null | null | null | webserver/python2.7/site-packages/area/__init__.py | maxr1876/Radix | bf9a5470908ea0823c8398565086b1e6b960c73b | [
"BSD-2-Clause"
] | null | null | null | webserver/python2.7/site-packages/area/__init__.py | maxr1876/Radix | bf9a5470908ea0823c8398565086b1e6b960c73b | [
"BSD-2-Clause"
] | null | null | null | from __future__ import division
import json
from math import pi, sin
__version__ = '1.1.0'
WGS84_RADIUS = 6378137
def ring__area(coordinates):
"""
Calculate the approximate _area of the polygon were it projected onto
the earth. Note that this _area will be positive if ring is oriented
cloc... | 26.978947 | 96 | 0.609442 |
149096338c91567b2635fcffc0b59e5d56c47ad5 | 1,958 | py | Python | TMTool/Scripts/Scoring/owasp_rr.py | tmart234/TMTool | 054d055d73fa5e76be22bf04cf1136b88cb7efb9 | [
"MIT"
] | 7 | 2021-04-23T23:13:02.000Z | 2022-03-21T03:35:47.000Z | TMTool/Scripts/Scoring/owasp_rr.py | tmart234/TMTool | 054d055d73fa5e76be22bf04cf1136b88cb7efb9 | [
"MIT"
] | 1 | 2022-03-21T03:45:45.000Z | 2022-03-21T03:45:45.000Z | TMTool/Scripts/Scoring/owasp_rr.py | tmart234/TMTool | 054d055d73fa5e76be22bf04cf1136b88cb7efb9 | [
"MIT"
] | null | null | null | ## based on OWASP risk rating
# clculates impact or likihood
# translating the risk matrix
likihood = dict.fromkeys("SL","M","O","S","ED","EE","Aw","ID","Numerical Score","Categorical Score")
impact = dict.fromkeys("C","I","A","Ac","FD","RD","NCD","PV", "Numerical Score","Categorical Score")
| 41.659574 | 101 | 0.61287 |
1493a2c8eff385805e1d1e0101be2be42f87f69a | 4,760 | py | Python | cryptopals/set-2-block-crypto/chal-11/ecb_cbc_detection_oracle.py | reider-roque/crypto-challenges | efbc2afe5e2ca88671d9918b1d8eca26ba042b04 | [
"MIT"
] | null | null | null | cryptopals/set-2-block-crypto/chal-11/ecb_cbc_detection_oracle.py | reider-roque/crypto-challenges | efbc2afe5e2ca88671d9918b1d8eca26ba042b04 | [
"MIT"
] | null | null | null | cryptopals/set-2-block-crypto/chal-11/ecb_cbc_detection_oracle.py | reider-roque/crypto-challenges | efbc2afe5e2ca88671d9918b1d8eca26ba042b04 | [
"MIT"
] | null | null | null | import os
from base64 import b64decode
from binascii import hexlify, unhexlify
from functools import reduce
from random import SystemRandom
from Crypto.Cipher import AES
def xor(str1, str2):
"""Takes two byte strings"""
if len(str1) != len(str2):
raise ValueError("Arguments str1 and str2 lenghts di... | 24.285714 | 81 | 0.65021 |
1494e411076fb87b64c4ba9ac057f14cdbcbc48e | 3,739 | py | Python | legacy/Box.py | JUST0M/procedural-buildings | d51add4bc769823d01f16fbe1d599d97650ec404 | [
"MIT"
] | 2 | 2021-04-13T10:46:20.000Z | 2021-07-04T09:30:49.000Z | legacy/Box.py | JUST0M/procedural-buildings | d51add4bc769823d01f16fbe1d599d97650ec404 | [
"MIT"
] | null | null | null | legacy/Box.py | JUST0M/procedural-buildings | d51add4bc769823d01f16fbe1d599d97650ec404 | [
"MIT"
] | null | null | null | import numpy as np
| 38.546392 | 89 | 0.514844 |
1494f6a3975880fab8630625b748fe8b61a44ed1 | 1,032 | py | Python | backend-services/mongodbtest.py | Off-Top-App/off-top-python | af51a7da0e52d6ad978835cb05986d7c2a917861 | [
"bzip2-1.0.6"
] | 3 | 2019-12-01T23:09:12.000Z | 2020-12-22T03:02:37.000Z | backend-services/mongodbtest.py | Off-Top-App/off-top-python | af51a7da0e52d6ad978835cb05986d7c2a917861 | [
"bzip2-1.0.6"
] | 5 | 2020-03-05T17:17:12.000Z | 2020-06-16T07:02:27.000Z | backend-services/mongodbtest.py | Off-Top-App/off-top-python | af51a7da0e52d6ad978835cb05986d7c2a917861 | [
"bzip2-1.0.6"
] | 1 | 2020-05-18T12:57:14.000Z | 2020-05-18T12:57:14.000Z | from pymongo import MongoClient
# pprint library is used to make the output look more pretty
from pprint import pprint
import datetime
# connect to MongoDB
#To establish a connection to MongoDB with PyMongo you use the MongoClient class
client = MongoClient('mongodb://localhost:27017/')
#create a database object refer... | 41.28 | 116 | 0.778101 |
14962ad31f37224b6b9ef8b86e934a6eee991573 | 1,912 | py | Python | examples/example_multi_user_locustfile.py | dkiltyhc/appian-locust-hc-fork | 70239814fee9ae5a19d3656e7f433160d00e7427 | [
"Apache-2.0"
] | 1 | 2021-06-01T02:01:05.000Z | 2021-06-01T02:01:05.000Z | examples/example_multi_user_locustfile.py | dkiltyhc/appian-locust-hc-fork | 70239814fee9ae5a19d3656e7f433160d00e7427 | [
"Apache-2.0"
] | null | null | null | examples/example_multi_user_locustfile.py | dkiltyhc/appian-locust-hc-fork | 70239814fee9ae5a19d3656e7f433160d00e7427 | [
"Apache-2.0"
] | null | null | null | import json
import os
from locust import HttpUser, task, between
from appian_locust import AppianTaskSet
CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))
def get_config(file_name):
config_file = os.path.join(CURRENT_DIR, file_name)
if os.path.exists(config_file):
with open(config_file, 'r... | 30.83871 | 123 | 0.707113 |
149729421e1d6019f47c6eaa2d781c6e73d96e55 | 612 | py | Python | gammapy/stats/tests/test_data.py | joleroi/gammapy | c4e0c4bd74c79d30e0837559d18b7a1a269f70d9 | [
"BSD-3-Clause"
] | null | null | null | gammapy/stats/tests/test_data.py | joleroi/gammapy | c4e0c4bd74c79d30e0837559d18b7a1a269f70d9 | [
"BSD-3-Clause"
] | null | null | null | gammapy/stats/tests/test_data.py | joleroi/gammapy | c4e0c4bd74c79d30e0837559d18b7a1a269f70d9 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from numpy.testing import assert_allclose
from ...stats import Stats
| 26.608696 | 66 | 0.70098 |
149953f0a4dce1da36ef7cfd56898a74213ff856 | 506 | py | Python | odziez/clothes/migrations/0006_auto_20190718_2124.py | szymanskirafal/odziez | 029d20da0474a0380e8383f9f89c1072666c5399 | [
"MIT"
] | null | null | null | odziez/clothes/migrations/0006_auto_20190718_2124.py | szymanskirafal/odziez | 029d20da0474a0380e8383f9f89c1072666c5399 | [
"MIT"
] | null | null | null | odziez/clothes/migrations/0006_auto_20190718_2124.py | szymanskirafal/odziez | 029d20da0474a0380e8383f9f89c1072666c5399 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.8 on 2019-07-18 21:24
from django.db import migrations, models
import django.db.models.deletion
| 25.3 | 132 | 0.65415 |
1499ce61f55da5d49e4d66d22bd91de18f3eb916 | 1,235 | py | Python | examples/python/atkinson_example.py | shenlong95/concentrationMetrics | 266cdc5465cb948e5726aff52f10bc5b51a6ed8e | [
"MIT"
] | 1 | 2022-03-02T14:38:25.000Z | 2022-03-02T14:38:25.000Z | examples/python/atkinson_example.py | shenlong95/concentrationMetrics | 266cdc5465cb948e5726aff52f10bc5b51a6ed8e | [
"MIT"
] | null | null | null | examples/python/atkinson_example.py | shenlong95/concentrationMetrics | 266cdc5465cb948e5726aff52f10bc5b51a6ed8e | [
"MIT"
] | null | null | null | # encoding: utf-8
# (c) 2016-2022 Open Risk, all rights reserved
#
# ConcentrationMetrics is licensed under the MIT license a copy of which is included
# in the source distribution of concentrationMetrics. This is notwithstanding any licenses of
# third-party software included in this distribution. You may not use thi... | 32.5 | 96 | 0.765992 |
149a2938cb8b209c78d4c945bf2f3f42bf24a389 | 1,537 | py | Python | kcorpusParse.py | passingbreeze/findAntisocial | 704274c07ae8e03b903865d60c9188443b6e34fd | [
"MIT"
] | null | null | null | kcorpusParse.py | passingbreeze/findAntisocial | 704274c07ae8e03b903865d60c9188443b6e34fd | [
"MIT"
] | null | null | null | kcorpusParse.py | passingbreeze/findAntisocial | 704274c07ae8e03b903865d60c9188443b6e34fd | [
"MIT"
] | null | null | null | # -*- encoding:utf-8 -*-
import re
## Path Config in here
readTargetFolder = 'My Path'
outTargetFolder = readTargetFolder + 'conv_'
headNumber = range(4,9)
indexNumber = range(1,100)
fileCategory = ['CM','CK','CL']
contentReg = r'<s n=\d+>(.*?)<\/s>'
if __name__ == '__main__':
main() | 27.446429 | 82 | 0.527651 |
149cb07f7130ab39a13560d859b5390acc5e9ea0 | 626 | py | Python | scripts/PMP_setup.py | virati/autoDyn | b9abf8074381e0cd602d49f6fdf4adc72c9cb602 | [
"MIT"
] | null | null | null | scripts/PMP_setup.py | virati/autoDyn | b9abf8074381e0cd602d49f6fdf4adc72c9cb602 | [
"MIT"
] | null | null | null | scripts/PMP_setup.py | virati/autoDyn | b9abf8074381e0cd602d49f6fdf4adc72c9cb602 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 9 06:19:09 2020
@author: virati
Simple PMP buildup script
"""
import scipy.signal as sig
import matplotlib.pyplot as plt
import numpy as npo
import jax.numpy as np
from jax import grad, jit, vmap, jvp
from numpy import ndenumerate
import matplotlib... | 18.411765 | 36 | 0.669329 |
149eba75339970953c3ef6e83332d40a58bbc4e7 | 171 | py | Python | pktperf/__init__.py | junka/pktperf | 123ec099bb97452cdafb54ebb1ff3702770b1743 | [
"BSD-2-Clause"
] | 3 | 2022-01-15T16:01:41.000Z | 2022-02-10T06:34:14.000Z | pktperf/__init__.py | junka/pktperf | 123ec099bb97452cdafb54ebb1ff3702770b1743 | [
"BSD-2-Clause"
] | null | null | null | pktperf/__init__.py | junka/pktperf | 123ec099bb97452cdafb54ebb1ff3702770b1743 | [
"BSD-2-Clause"
] | null | null | null | """
pktperf provides pktgen helper scripts functions for pps
performance test.
"""
__version__ = "0.1.9"
__author__ = "junka"
__maintainer__ = "junka"
__license__ = "BSD"
| 19 | 56 | 0.736842 |
149f538f5367f0f292bb57d5e03344b3411fb3be | 3,639 | py | Python | search_service/api/table.py | fossabot/amundsensearchlibrary | dd169e486f7a9cd3233e184a416872d892f55078 | [
"Apache-2.0"
] | null | null | null | search_service/api/table.py | fossabot/amundsensearchlibrary | dd169e486f7a9cd3233e184a416872d892f55078 | [
"Apache-2.0"
] | 1 | 2019-09-21T23:59:47.000Z | 2019-09-21T23:59:47.000Z | search_service/api/table.py | fossabot/amundsensearchlibrary | dd169e486f7a9cd3233e184a416872d892f55078 | [
"Apache-2.0"
] | 1 | 2019-09-21T23:56:40.000Z | 2019-09-21T23:56:40.000Z | from http import HTTPStatus
from typing import Iterable, Any
from flask_restful import Resource, fields, marshal_with, reqparse
from search_service.proxy import get_proxy_client
table_fields = {
"name": fields.String,
"key": fields.String,
# description can be empty, if no description is present in DB
... | 31.643478 | 88 | 0.650179 |
149ffff8d64cab91c2f9be2e3f80f8c9c1f39873 | 6,370 | py | Python | cidan/LSSC/SpatialBox.py | Mishne-Lab/cidan | 3f579b6d5a49e17690e9aa07dfb60d3e8c05e681 | [
"MIT"
] | 2 | 2020-11-24T17:47:23.000Z | 2021-05-20T16:19:53.000Z | cidan/LSSC/SpatialBox.py | Mishne-Lab/CIDAN | 30d1176773e3ad0f236ba342cba48c89492f4e63 | [
"MIT"
] | 4 | 2020-08-18T16:42:23.000Z | 2020-08-18T20:58:12.000Z | cidan/LSSC/SpatialBox.py | Mishne-Lab/cidan | 3f579b6d5a49e17690e9aa07dfb60d3e8c05e681 | [
"MIT"
] | 1 | 2020-08-12T18:47:22.000Z | 2020-08-12T18:47:22.000Z | import logging
from typing import Tuple
import numpy as np
from dask import delayed
logger1 = logging.getLogger("cidan.LSSC.SpatialBox")
def point_to_box_point(self, point):
"""
Converts a point in the image to its cords in the box
Parameters
----------
point 2d point
... | 36.193182 | 117 | 0.574882 |
14a0c11dcb55cf743f8fa6d47c0541a4c1e0d0e5 | 6,252 | py | Python | Experiments/TrainStackedClassification.py | christymarc/raycasting-simulation | ed9b92143d3eb1c5a25900419ead517f93f8c315 | [
"MIT"
] | null | null | null | Experiments/TrainStackedClassification.py | christymarc/raycasting-simulation | ed9b92143d3eb1c5a25900419ead517f93f8c315 | [
"MIT"
] | null | null | null | Experiments/TrainStackedClassification.py | christymarc/raycasting-simulation | ed9b92143d3eb1c5a25900419ead517f93f8c315 | [
"MIT"
] | null | null | null | # ---
# jupyter:
# jupytext:
# formats: py:light
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.11.4
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
# name: python3
# ---
from argparse impo... | 29.630332 | 125 | 0.666667 |
14a1b02d39821a15e7fefd1639adef1cef0c66ac | 502 | py | Python | list-operations/Element-insertion/Python/insertion.py | Prince23598/cs-algorithms | 75c90a0603092e8d6d9c5b982beab6729c8cb516 | [
"MIT"
] | 239 | 2019-10-07T11:01:56.000Z | 2022-01-27T19:08:55.000Z | list-operations/Element-insertion/Python/insertion.py | ashfreakingoyal/cs-algorithms | 08f5aba5c3379e17d03b899fc36efcdccebd181c | [
"MIT"
] | 176 | 2019-10-07T06:59:49.000Z | 2020-09-30T08:16:22.000Z | list-operations/Element-insertion/Python/insertion.py | ashfreakingoyal/cs-algorithms | 08f5aba5c3379e17d03b899fc36efcdccebd181c | [
"MIT"
] | 441 | 2019-10-07T07:34:08.000Z | 2022-03-15T07:19:58.000Z |
#this program doesn't use inbuild list functions except append
n =int(input('No. of elements : '))
arr = []
print("Input the elements of the list\n")
for i in range(n):
x =int(input())
arr.append(x)
insertion(arr)
print(arr)
| 20.08 | 75 | 0.663347 |
14a25f0ac727521f4abfb47f72659815f279b90c | 170 | py | Python | coin_change.py | LeeGitaek/algorithm-python | 1fdc95ad6c1f8fded57aaf3ac80d0637f6c1c3fd | [
"MIT"
] | 2 | 2021-01-31T08:14:09.000Z | 2021-02-02T01:19:42.000Z | coin_change.py | LeeGitaek/algorithm-python | 1fdc95ad6c1f8fded57aaf3ac80d0637f6c1c3fd | [
"MIT"
] | null | null | null | coin_change.py | LeeGitaek/algorithm-python | 1fdc95ad6c1f8fded57aaf3ac80d0637f6c1c3fd | [
"MIT"
] | null | null | null | n = 1260
coin_count = 0
coin_types = [500,100,50,10]
for coin in coin_types:
if n%coin != 0:
coin_count += n/coin
n %= coin
print(int(coin_count))
| 14.166667 | 28 | 0.594118 |
14a3ca2e8e1328a8d7b6e04803a756da1775bb08 | 5,283 | py | Python | Module 2/Chapter 6/detect insults - kaggle competitor version/stack.py | saicharanabhishek/machinelearning_examples | f89857ae7e1a2baa76951fe1d55541832d0f0d20 | [
"MIT"
] | 101 | 2016-11-08T11:17:55.000Z | 2021-12-24T10:43:32.000Z | Module 2/Chapter 6/detect insults - kaggle competitor version/stack.py | saicharanabhishek/machinelearning_examples | f89857ae7e1a2baa76951fe1d55541832d0f0d20 | [
"MIT"
] | 2 | 2017-11-28T11:22:25.000Z | 2019-02-12T17:09:18.000Z | Module 2/Chapter 6/detect insults - kaggle competitor version/stack.py | saicharanabhishek/machinelearning_examples | f89857ae7e1a2baa76951fe1d55541832d0f0d20 | [
"MIT"
] | 102 | 2016-10-22T12:14:23.000Z | 2022-03-26T19:59:09.000Z | #!/usr/bin/env python
import random
from operator import itemgetter
import math
from datetime import datetime
import numpy
from sklearn import linear_model
from sklearn import cross_validation
from sklearn import metrics
from sklearn import ensemble
from model import Basic
from mkhtml import *
from utils import *
... | 21.651639 | 128 | 0.634109 |
14a4da818e55244ad6c1eca2a65a5ca929728ea0 | 4,652 | py | Python | windows_auth/scheduler.py | sourcery-ai-bot/django-windowsauth | 6701dcf4672e9d642185a547c3e193568ae98103 | [
"BSD-3-Clause"
] | 20 | 2020-12-18T12:24:47.000Z | 2022-03-16T12:15:08.000Z | windows_auth/scheduler.py | sourcery-ai-bot/django-windowsauth | 6701dcf4672e9d642185a547c3e193568ae98103 | [
"BSD-3-Clause"
] | 4 | 2021-01-15T16:42:18.000Z | 2021-10-30T03:38:56.000Z | windows_auth/scheduler.py | sourcery-ai-bot/django-windowsauth | 6701dcf4672e9d642185a547c3e193568ae98103 | [
"BSD-3-Clause"
] | 2 | 2021-07-23T19:25:41.000Z | 2022-03-16T12:15:10.000Z | import os
from pathlib import Path
from typing import Optional
import win32com.client
from pythoncom import com_error
from django.conf import settings
from django.utils import timezone
_PYTHON_PATH = str(Path(os.environ.get("VIRTUAL_ENV")) / "Scripts" / "python.exe")
LOCAL_SYSTEM = "NT Authority\\LocalSystem"
LOCAL... | 39.423729 | 113 | 0.72055 |
14a4e5e4e89e6e753f18f7181ec73bb1d3a9ba73 | 5,777 | py | Python | server/app.py | sofignatova/02books | 9eed066fee5503c88359958708dfb8eba56e465a | [
"MIT"
] | 38 | 2020-12-22T01:15:38.000Z | 2021-11-09T11:01:40.000Z | server/app.py | sofignatova/02books | 9eed066fee5503c88359958708dfb8eba56e465a | [
"MIT"
] | 1 | 2020-12-21T19:11:11.000Z | 2020-12-21T19:11:11.000Z | server/app.py | sofignatova/02books | 9eed066fee5503c88359958708dfb8eba56e465a | [
"MIT"
] | 3 | 2020-12-22T04:17:50.000Z | 2020-12-22T09:03:37.000Z | import json
import os
import os.path
from typing import List, Optional
import flask
from flask import Flask, Response, jsonify, request
import api
import corpus
import correct_runs_suggestor
import filestorage
import firestore_storage
import storage
import word_suggestor
app = Flask(__name__)
if os.environ.get("GA... | 28.458128 | 93 | 0.664532 |
14a75c9a99d985c478a454429ef963da655e67d0 | 24,332 | py | Python | hdltools/abshdl/highlvl.py | brunosmmm/hdltools | a98ca8c4d168740fa229c939a7b1f31ea73eec24 | [
"MIT"
] | 2 | 2020-02-28T13:02:39.000Z | 2021-06-30T09:15:35.000Z | hdltools/abshdl/highlvl.py | brunosmmm/hdltools | a98ca8c4d168740fa229c939a7b1f31ea73eec24 | [
"MIT"
] | 1 | 2020-03-22T17:32:45.000Z | 2020-03-23T15:43:39.000Z | hdltools/abshdl/highlvl.py | brunosmmm/hdltools | a98ca8c4d168740fa229c939a7b1f31ea73eec24 | [
"MIT"
] | null | null | null | """High-level coding using python syntax to build HDL structures."""
import inspect
import ast
import textwrap
import sys
import re
from collections import deque
from hdltools.abshdl import HDLObject
from hdltools.abshdl.expr import HDLExpression
from hdltools.abshdl.signal import HDLSignal, HDLSignalSlice
from hdltoo... | 36.589474 | 81 | 0.509206 |
14a801449469355adc8a1c2e42661d5dd0d77a49 | 1,085 | py | Python | tests.py | Dani-97/tbcnn | 1e19e20099188dea42c97f09de39a0fadbcba92f | [
"MIT"
] | 30 | 2019-01-26T09:19:17.000Z | 2022-01-27T06:52:56.000Z | tests.py | Dani-97/tbcnn | 1e19e20099188dea42c97f09de39a0fadbcba92f | [
"MIT"
] | 9 | 2019-07-26T07:00:57.000Z | 2021-05-11T10:08:40.000Z | tests.py | Dani-97/tbcnn | 1e19e20099188dea42c97f09de39a0fadbcba92f | [
"MIT"
] | 17 | 2019-08-20T09:46:00.000Z | 2022-02-16T19:44:26.000Z | import numpy as np
import train_variants
a = np.arange(15)
print('a =', a)
print()
# ---------------------------------------
print('train_variants.create_sets(4, a, a)')
imgs, labs = train_variants.create_sets(4, np.copy(a), np.copy(a))
print(imgs)
assert len(imgs) == 4
assert len(labs) == 4
assert all([np.array_equ... | 31.911765 | 138 | 0.58341 |
14a95440ee127e22ba060762d6955e5d4353d199 | 4,876 | py | Python | Gems/PythonAssetBuilder/Code/Tests/asset_builder_example.py | aaarsene/o3de | 37e3b0226958974defd14dd6d808e8557dcd7345 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-09-13T00:01:12.000Z | 2021-09-13T00:01:12.000Z | Gems/PythonAssetBuilder/Code/Tests/asset_builder_example.py | aaarsene/o3de | 37e3b0226958974defd14dd6d808e8557dcd7345 | [
"Apache-2.0",
"MIT"
] | null | null | null | Gems/PythonAssetBuilder/Code/Tests/asset_builder_example.py | aaarsene/o3de | 37e3b0226958974defd14dd6d808e8557dcd7345 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-07-20T11:07:25.000Z | 2021-07-20T11:07:25.000Z | """
Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
#
# Simple example asset builder that processes *.foo files
#
import azlmbr.math
import azlmbr.asset.builder
imp... | 38.393701 | 155 | 0.730517 |
14a9916ca2cb6361754e4375a1b044b446b70a15 | 12,112 | py | Python | autocert/api/bundle.py | Mozilla-GitHub-Standards/f085630706efa0d6c299c78ca54be3a7bc1bacc6818a5012c1eda6166401aebd | 26ea24a991cef080e4bd633d719185184aabf100 | [
"MIT"
] | null | null | null | autocert/api/bundle.py | Mozilla-GitHub-Standards/f085630706efa0d6c299c78ca54be3a7bc1bacc6818a5012c1eda6166401aebd | 26ea24a991cef080e4bd633d719185184aabf100 | [
"MIT"
] | null | null | null | autocert/api/bundle.py | Mozilla-GitHub-Standards/f085630706efa0d6c299c78ca54be3a7bc1bacc6818a5012c1eda6166401aebd | 26ea24a991cef080e4bd633d719185184aabf100 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import copy
import glob
import time
import tarfile
from io import BytesIO
from ruamel import yaml
from datetime import datetime, timedelta
from exceptions import AutocertError
from utils.dictionary import merge, head, body, head_body, keys_ending
from utils.ya... | 33.927171 | 140 | 0.557051 |
14aaf108131e71fa427262f5ee129addc001ddae | 33,527 | py | Python | canopy/openapi/api/sim_version_api.py | CanopySimulations/canopy-python | 9ec37e674e65d6fbef0402ac0c612c163d55631e | [
"MIT"
] | null | null | null | canopy/openapi/api/sim_version_api.py | CanopySimulations/canopy-python | 9ec37e674e65d6fbef0402ac0c612c163d55631e | [
"MIT"
] | 1 | 2022-01-31T10:18:08.000Z | 2022-01-31T10:18:08.000Z | canopy/openapi/api/sim_version_api.py | CanopySimulations/canopy-python | 9ec37e674e65d6fbef0402ac0c612c163d55631e | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Canopy.Api
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa:... | 45.063172 | 142 | 0.601068 |
14acabd8cbd4b513d1eb59c9df9ca847e6ac8cba | 9,994 | py | Python | brewtils/log.py | scott-taubman/brewtils | 3478e5ebd6383d7724286c9d0c7afac9ef5d7b45 | [
"MIT"
] | 7 | 2018-02-04T18:11:29.000Z | 2021-10-03T18:47:08.000Z | brewtils/log.py | scott-taubman/brewtils | 3478e5ebd6383d7724286c9d0c7afac9ef5d7b45 | [
"MIT"
] | 256 | 2018-02-04T18:07:50.000Z | 2022-03-07T21:11:03.000Z | brewtils/log.py | scott-taubman/brewtils | 3478e5ebd6383d7724286c9d0c7afac9ef5d7b45 | [
"MIT"
] | 7 | 2019-01-03T17:18:26.000Z | 2021-12-15T16:55:18.000Z | # -*- coding: utf-8 -*-
"""Brewtils Logging Utilities
This module streamlines loading logging configuration from Beergarden.
Example:
To use this just call ``configure_logging`` sometime before you initialize
your Plugin object:
.. code-block:: python
from brewtils import configure_logging, get_... | 30.284848 | 87 | 0.659896 |
14ae332af62300b3f821c52ff9cb9ba5f6319266 | 64 | py | Python | stweet/file_reader/__init__.py | enginbozaba/stweet-twitter-api | 060250e00a01ae53c2ca12954719b5efc918e132 | [
"MIT"
] | null | null | null | stweet/file_reader/__init__.py | enginbozaba/stweet-twitter-api | 060250e00a01ae53c2ca12954719b5efc918e132 | [
"MIT"
] | null | null | null | stweet/file_reader/__init__.py | enginbozaba/stweet-twitter-api | 060250e00a01ae53c2ca12954719b5efc918e132 | [
"MIT"
] | null | null | null | from .read_from_file import read_from_csv, read_from_json_lines
| 32 | 63 | 0.890625 |
14ae9afede54e0cea3815e41671291f32a9f68bc | 216 | py | Python | pty/t2.py | dxm447/ptychogpu | 337d136b1b738ddbc3241144e49fa0129b7bcac1 | [
"MIT"
] | 1 | 2021-09-14T01:28:43.000Z | 2021-09-14T01:28:43.000Z | pty/t2.py | Rydeness/ptychogpu | 337d136b1b738ddbc3241144e49fa0129b7bcac1 | [
"MIT"
] | null | null | null | pty/t2.py | Rydeness/ptychogpu | 337d136b1b738ddbc3241144e49fa0129b7bcac1 | [
"MIT"
] | 2 | 2021-09-14T01:28:42.000Z | 2021-09-16T00:08:59.000Z | import numpy as np
import acc_image_utils as acc
import time
t1 = time.time()
size=128
shape = (size,size,size,size)
n1 = np.zeros(shape, dtype=np.float32)
n2 = acc.gpu_rot4D(n1,55)
t2 = time.time()
print(t2 - t1)
| 16.615385 | 38 | 0.712963 |
14aeec12a4f4a1f6347cb92bf444494d07caa82d | 228 | py | Python | profile/results/strip_file.py | AI-Pranto/OpenMOC | 7f6ce4797aec20ddd916981a56a4ba54ffda9a06 | [
"MIT"
] | 97 | 2015-01-02T02:13:45.000Z | 2022-03-09T14:12:45.000Z | profile/results/strip_file.py | AI-Pranto/OpenMOC | 7f6ce4797aec20ddd916981a56a4ba54ffda9a06 | [
"MIT"
] | 325 | 2015-01-07T17:43:14.000Z | 2022-02-21T17:22:00.000Z | profile/results/strip_file.py | AI-Pranto/OpenMOC | 7f6ce4797aec20ddd916981a56a4ba54ffda9a06 | [
"MIT"
] | 73 | 2015-01-17T19:11:58.000Z | 2022-03-24T16:31:37.000Z | import os
x = set()
with open(os.environ['PBS_NODEFILE'], 'r') as fh:
lines = fh.readlines()
for line in lines:
x.add(line)
name = 'machine-' + xxxMACHINExxx
with open(name, 'w') as fh:
for xi in x:
fh.write(xi)
| 17.538462 | 49 | 0.622807 |