hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | 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 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c25812708f73bfd533c1e0436f576998dc88a5d4 | 1,075 | py | Python | indian_name/india_name.py | NeelShah18/api | 602dcd7bce5b3a54873a004e7847565c17ce9fc9 | [
"MIT"
] | null | null | null | indian_name/india_name.py | NeelShah18/api | 602dcd7bce5b3a54873a004e7847565c17ce9fc9 | [
"MIT"
] | null | null | null | indian_name/india_name.py | NeelShah18/api | 602dcd7bce5b3a54873a004e7847565c17ce9fc9 | [
"MIT"
] | null | null | null | import sqlite3
import sys
import os
import io
def cleanName(m_name):
lis = []
lis = m_name
result_lis = {}
for data in lis:
text = str(data)
text = (((((text[2:len(text)-3].rstrip()).replace("@","")).replace("smt.","")).strip()).replace(".","")).replace("smt","")
temp_lis = text... | 25.595238 | 130 | 0.580465 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 180 | 0.167442 |
c25ccf7947b661f681ea864f696118baa98103e2 | 1,389 | py | Python | Lib/defcon/objects/lib.py | typemytype/defcon | 18dc8c22a1cf84c95f4f4e4f7bb6f033a062021c | [
"MIT"
] | null | null | null | Lib/defcon/objects/lib.py | typemytype/defcon | 18dc8c22a1cf84c95f4f4e4f7bb6f033a062021c | [
"MIT"
] | null | null | null | Lib/defcon/objects/lib.py | typemytype/defcon | 18dc8c22a1cf84c95f4f4e4f7bb6f033a062021c | [
"MIT"
] | null | null | null | from defcon.objects.base import BaseDictObject
class Lib(BaseDictObject):
"""
This object contains arbitrary data.
**This object posts the following notifications:**
=========== ====
Name Note
=========== ====
Lib.Changed Posted when the *dirty* attribute is set.
========... | 29.553191 | 79 | 0.673866 | 1,270 | 0.914327 | 0 | 0 | 0 | 0 | 0 | 0 | 1,089 | 0.784017 |
c25ef6c3bd3cdff08d9b5795b973809ddeedca03 | 93 | py | Python | Vizard/Presenter/apps.py | styinx/Vizard | f73e8478fef7017da65ed965932b4c141fef1bdd | [
"MIT"
] | null | null | null | Vizard/Presenter/apps.py | styinx/Vizard | f73e8478fef7017da65ed965932b4c141fef1bdd | [
"MIT"
] | null | null | null | Vizard/Presenter/apps.py | styinx/Vizard | f73e8478fef7017da65ed965932b4c141fef1bdd | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class PresenterConfig(AppConfig):
name = 'Presenter'
| 15.5 | 33 | 0.763441 | 56 | 0.602151 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0.11828 |
c25f9adb65d5dc5bc38b8b33443e4276d20956b1 | 685 | py | Python | ATM/atm_function.py | nouranHnouh/FormusWorkshop- | 7f69b9d2226209adcc6ecb208ac426eec7e86d2b | [
"MIT"
] | null | null | null | ATM/atm_function.py | nouranHnouh/FormusWorkshop- | 7f69b9d2226209adcc6ecb208ac426eec7e86d2b | [
"MIT"
] | null | null | null | ATM/atm_function.py | nouranHnouh/FormusWorkshop- | 7f69b9d2226209adcc6ecb208ac426eec7e86d2b | [
"MIT"
] | null | null | null | #this program is atm that withdraw any money amount
#allowed papers: 100,50,10,5, and the rest of requests
def withdraw(balance,request):
if request>balance:
print "can`t give you all this money"
while request>0:
if request>=100:
request-=100
print "give 100"
elif request>=50:
request-=50
print "g... | 13.7 | 55 | 0.659854 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 182 | 0.265693 |
c2611c72bea7ee655df6077231d5fe5c6f79d18c | 2,973 | py | Python | 2021/day.3.py | craignicol/adventofcode | 41ea3325adeb373dccc70d36a9a685eaf13359eb | [
"Apache-2.0"
] | null | null | null | 2021/day.3.py | craignicol/adventofcode | 41ea3325adeb373dccc70d36a9a685eaf13359eb | [
"Apache-2.0"
] | null | null | null | 2021/day.3.py | craignicol/adventofcode | 41ea3325adeb373dccc70d36a9a685eaf13359eb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
from statistics import mode
def execute():
with open('./input/day.3.txt') as inp:
lines = inp.readlines()
data = [l.strip() for l in lines if len(l.strip()) > 0]
return power_consumption(data), life_support_rating(data)
tests_failed = 0
tests_executed = 0
def verify(a, b):... | 29.147059 | 95 | 0.667003 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 166 | 0.055798 |
c263e873beab15ef3148ddea30b0dcbd4c5dcb1c | 6,194 | py | Python | src/propagation.py | haoningwu3639/EE229_Project_VideoStabilization | 74603e9dc5f10b3deffb2f4e0753c15dc8b9a92d | [
"MIT"
] | 1 | 2021-06-13T06:32:29.000Z | 2021-06-13T06:32:29.000Z | src/propagation.py | haoningwu3639/EE229_Project_VideoStabilization | 74603e9dc5f10b3deffb2f4e0753c15dc8b9a92d | [
"MIT"
] | null | null | null | src/propagation.py | haoningwu3639/EE229_Project_VideoStabilization | 74603e9dc5f10b3deffb2f4e0753c15dc8b9a92d | [
"MIT"
] | null | null | null | import cv2
import numpy as np
from scipy.signal import medfilt
from utils import init_dict, l2_dst
def keypoint_transform(H, keypoint):
"""
Input:
H: homography matrix of dimension (3*3)
keypoint: the (x, y) point to be transformed
Output:
keypoint_trans: Transformed point keypoint_trans = H ... | 37.768293 | 121 | 0.628996 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,650 | 0.266387 |
c264fe174bb79ece1406b41e4cb858d0735178ff | 1,140 | py | Python | plugins/cuckoo/komand_cuckoo/actions/vpn_status/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 46 | 2019-06-05T20:47:58.000Z | 2022-03-29T10:18:01.000Z | plugins/cuckoo/komand_cuckoo/actions/vpn_status/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 386 | 2019-06-07T20:20:39.000Z | 2022-03-30T17:35:01.000Z | plugins/cuckoo/komand_cuckoo/actions/vpn_status/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 43 | 2019-07-09T14:13:58.000Z | 2022-03-28T12:04:46.000Z | # GENERATED BY KOMAND SDK - DO NOT EDIT
import komand
import json
class Component:
DESCRIPTION = "Returns VPN status"
class Input:
pass
class Output:
VPNS = "vpns"
class VpnStatusInput(komand.Input):
schema = json.loads("""
{}
""")
def __init__(self):
super(self.__class__,... | 16.764706 | 57 | 0.490351 | 1,056 | 0.926316 | 0 | 0 | 0 | 0 | 0 | 0 | 724 | 0.635088 |
c267cbc162d3355bf7a9a7568e5120c20f9a8b94 | 15,306 | py | Python | src/utils/scout_compiler.py | CheckPointSW/Scour | 2f9391da45803b44181f7973e4e7c93bc2208252 | [
"MIT"
] | 152 | 2018-08-13T05:48:59.000Z | 2022-03-30T15:18:44.000Z | src/utils/scout_compiler.py | CheckPointSW/Scour | 2f9391da45803b44181f7973e4e7c93bc2208252 | [
"MIT"
] | 7 | 2019-08-29T15:24:41.000Z | 2021-05-04T06:38:49.000Z | src/utils/scout_compiler.py | CheckPointSW/Scour | 2f9391da45803b44181f7973e4e7c93bc2208252 | [
"MIT"
] | 21 | 2018-08-13T19:11:29.000Z | 2022-02-28T15:25:47.000Z | import os
import struct
from .compilation.scout_flags import *
from .compilation.scout_files import *
from .compilation.arc_intel import arcIntel
from .compilation.arc_arm import arcArm, arcArmThumb
from .compilation.arc_mips import arcMips
from .context_creator import *
#############################... | 43.731429 | 163 | 0.616425 | 13,872 | 0.906311 | 0 | 0 | 0 | 0 | 0 | 0 | 7,700 | 0.503071 |
c2683140e8ef3e0e1fef1af02d286989992c9f33 | 6,870 | py | Python | python/paddle/fluid/tests/custom_op/extension_utils.py | dingsiyu/Paddle | 2c974cc316bce4054bdf28d1f6b4c3bb8bd99d75 | [
"Apache-2.0"
] | 1 | 2021-03-16T13:40:07.000Z | 2021-03-16T13:40:07.000Z | python/paddle/fluid/tests/custom_op/extension_utils.py | dingsiyu/Paddle | 2c974cc316bce4054bdf28d1f6b4c3bb8bd99d75 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/custom_op/extension_utils.py | dingsiyu/Paddle | 2c974cc316bce4054bdf28d1f6b4c3bb8bd99d75 | [
"Apache-2.0"
] | 1 | 2021-03-16T13:40:08.000Z | 2021-03-16T13:40:08.000Z | # Copyright (c) 2021 PaddlePaddle 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 appli... | 31.658986 | 88 | 0.673071 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,760 | 0.401747 |
c268a7da87d9bb0526fdc4df929e276c63494567 | 8,095 | py | Python | HW_new_contact.py | AnastasiiaSarkisova/Home-Work-1 | 9021e9323a08f9dd96323b763aa0b0e689df24f8 | [
"Apache-2.0"
] | null | null | null | HW_new_contact.py | AnastasiiaSarkisova/Home-Work-1 | 9021e9323a08f9dd96323b763aa0b0e689df24f8 | [
"Apache-2.0"
] | null | null | null | HW_new_contact.py | AnastasiiaSarkisova/Home-Work-1 | 9021e9323a08f9dd96323b763aa0b0e689df24f8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from selenium.webdriver.firefox.webdriver import WebDriver
import unittest
from group import Group
from contact import Contact
def is_alert_present(wd):
try:
wd.switch_to_alert().text
return True
except:
return False
class HW_new_contact(unittest.TestCase):
... | 51.891026 | 112 | 0.652625 | 7,771 | 0.959975 | 0 | 0 | 0 | 0 | 0 | 0 | 1,749 | 0.216059 |
c268fccca788ac0d257bd73459ca8edc55f80559 | 2,189 | py | Python | SNPdata/ExcludeDuplicates.py | ejh243/BrainFANS | 903b30516ec395e0543d217c492eeac541515197 | [
"Artistic-2.0"
] | null | null | null | SNPdata/ExcludeDuplicates.py | ejh243/BrainFANS | 903b30516ec395e0543d217c492eeac541515197 | [
"Artistic-2.0"
] | 2 | 2022-02-16T09:35:08.000Z | 2022-03-29T08:06:32.000Z | SNPdata/ExcludeDuplicates.py | ejh243/BrainFANS | 903b30516ec395e0543d217c492eeac541515197 | [
"Artistic-2.0"
] | null | null | null | ## using output of king and plink --miss identify worse performing duplicate for exclusion
## this script is run as follows
## python ExcludeDuplicates.py <king output> <plink --miss output> <output file>
import sys
print "Reading in sample missingness from", sys.argv[2]
sampleMissing = file(sys.argv[2], "r")
sam... | 25.752941 | 91 | 0.692097 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 598 | 0.273184 |
c26ac1a91dabdb0034c28b5241ea7cfad78d438f | 3,375 | py | Python | jscatter/jscatter_test.py | flekschas/jupyter-scatter | 550eceb2311b0394caad83dbb399ed2f29e55af6 | [
"Apache-2.0"
] | 23 | 2021-02-03T02:05:47.000Z | 2022-03-17T14:53:39.000Z | jscatter/jscatter_test.py | manzt/jupyter-scatter | c38f94abfb655e03f407e7fcec80a883439796b5 | [
"Apache-2.0"
] | 5 | 2021-02-04T22:19:35.000Z | 2022-03-07T04:49:31.000Z | jscatter/jscatter_test.py | manzt/jupyter-scatter | c38f94abfb655e03f407e7fcec80a883439796b5 | [
"Apache-2.0"
] | 1 | 2021-06-15T14:14:47.000Z | 2021-06-15T14:14:47.000Z | import numpy as np
import pandas as pd
from .jscatter import Scatter, component_idx_to_name
from .utils import minmax_scale
def test_component_idx_to_name():
assert 'valueA' == component_idx_to_name(2)
assert 'valueB' == component_idx_to_name(3)
assert None == component_idx_to_name(4)
assert None == c... | 31.25 | 105 | 0.647704 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 290 | 0.085926 |
c26b638d6a13eb8cf7404de0290463e08f694482 | 10,917 | py | Python | py-world/world/main.py | Coastchb/Tacotron-2 | 0a61c8ff4fadfbd9d4157ee93b875e7d79fd750c | [
"MIT"
] | null | null | null | py-world/world/main.py | Coastchb/Tacotron-2 | 0a61c8ff4fadfbd9d4157ee93b875e7d79fd750c | [
"MIT"
] | null | null | null | py-world/world/main.py | Coastchb/Tacotron-2 | 0a61c8ff4fadfbd9d4157ee93b875e7d79fd750c | [
"MIT"
] | null | null | null | import logging
import sys
from typing import Iterable
# 3rd party imports
import numpy as np
# import matplotlib.pyplot as plt
from scipy.io.wavfile import read as wavread
# local imports
from .dio import dio
from .stonemask import stonemask
from .harvest import harvest
from .cheaptrick import cheaptrick
from .d4c im... | 42.644531 | 152 | 0.582944 | 10,395 | 0.952185 | 0 | 0 | 0 | 0 | 0 | 0 | 3,864 | 0.353943 |
c26b881427d152a0f3576dc1d7e1e0a52917ad82 | 8,165 | py | Python | src/universal_build/helpers/build_docker.py | prototypefund/universal-build | 809e641d5cf9dc1378cd0e0e3ea6e79f773ae4e7 | [
"MIT"
] | 17 | 2020-11-20T15:58:02.000Z | 2022-02-06T19:18:20.000Z | src/universal_build/helpers/build_docker.py | prototypefund/universal-build | 809e641d5cf9dc1378cd0e0e3ea6e79f773ae4e7 | [
"MIT"
] | 3 | 2021-02-17T13:47:44.000Z | 2021-10-14T13:53:15.000Z | src/universal_build/helpers/build_docker.py | prototypefund/universal-build | 809e641d5cf9dc1378cd0e0e3ea6e79f773ae4e7 | [
"MIT"
] | 6 | 2020-11-23T09:51:26.000Z | 2022-02-11T13:46:57.000Z | """Utilities to help building Docker images."""
import argparse
import os
import subprocess
from typing import List, Optional
from universal_build import build_utils
FLAG_DOCKER_IMAGE_PREFIX = "docker_image_prefix"
def parse_arguments(
input_args: List[str] = None, argument_parser: argparse.ArgumentParser = No... | 37.113636 | 205 | 0.679731 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,071 | 0.498592 |
c26b884dd3d4d5b8b8e569db3554db56ec68bc33 | 129 | py | Python | Code/YOLO/darkflow/darkflow/net/build.py | kalvin-osoro/ml_project | bf0bdc5719f2712682dd070045a5f1edf933a0c4 | [
"Apache-2.0"
] | null | null | null | Code/YOLO/darkflow/darkflow/net/build.py | kalvin-osoro/ml_project | bf0bdc5719f2712682dd070045a5f1edf933a0c4 | [
"Apache-2.0"
] | null | null | null | Code/YOLO/darkflow/darkflow/net/build.py | kalvin-osoro/ml_project | bf0bdc5719f2712682dd070045a5f1edf933a0c4 | [
"Apache-2.0"
] | null | null | null | version https://git-lfs.github.com/spec/v1
oid sha256:ea33786bb4be2c91d879beaff23346f37c5b4b5b8504df61a909e3570d67eb08
size 5150
| 32.25 | 75 | 0.883721 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c26c957464e23a15c778de134041cfb40b9fa636 | 1,415 | py | Python | norns/gear/migrations/0006_auto_20180522_2102.py | the-norns/norns | 8856626fb6937452c123e4629a5888a49a82c349 | [
"MIT"
] | null | null | null | norns/gear/migrations/0006_auto_20180522_2102.py | the-norns/norns | 8856626fb6937452c123e4629a5888a49a82c349 | [
"MIT"
] | 62 | 2018-05-19T22:18:01.000Z | 2018-05-26T00:13:21.000Z | norns/gear/migrations/0006_auto_20180522_2102.py | the-norns/norns | 8856626fb6937452c123e4629a5888a49a82c349 | [
"MIT"
] | 3 | 2018-05-19T18:54:28.000Z | 2018-05-21T02:14:47.000Z | # Generated by Django 2.0.5 on 2018-05-22 21:02
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('status', '0003_auto_20180522_1745'),
('gear', '0005_weapon_reach'),
]
operations = [
migrations.Cre... | 32.906977 | 125 | 0.582332 | 1,289 | 0.910954 | 0 | 0 | 0 | 0 | 0 | 0 | 288 | 0.203534 |
c26e8a076cd054bdeb3d8edfa2f30d5c046667f6 | 1,121 | py | Python | src/genie/libs/parser/ios/tests/ShowProcessesCpuSorted/cli/equal/golden_output_1_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 204 | 2018-06-27T00:55:27.000Z | 2022-03-06T21:12:18.000Z | src/genie/libs/parser/ios/tests/ShowProcessesCpuSorted/cli/equal/golden_output_1_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 468 | 2018-06-19T00:33:18.000Z | 2022-03-31T23:23:35.000Z | src/genie/libs/parser/ios/tests/ShowProcessesCpuSorted/cli/equal/golden_output_1_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 309 | 2019-01-16T20:21:07.000Z | 2022-03-30T12:56:41.000Z | expected_output = {
"sort": {
1: {
"invoked": 3321960,
"usecs": 109,
"tty": 0,
"one_min_cpu": 0.54,
"process": "PIM Process",
"five_min_cpu": 0.48,
"runtime": 362874,
"pid": 368,
"five_sec_cpu": 1.03,... | 26.069767 | 75 | 0.407672 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 434 | 0.387154 |
c26f5c129b7cbf79a66da9961a7b6a906731cbb8 | 4,702 | py | Python | watcher_metering/publisher/publisher.py | b-com/watcher-metering | 7c09b243347146e5a421700d5b07d1d0a5c4d604 | [
"Apache-2.0"
] | 2 | 2015-10-22T19:44:57.000Z | 2017-06-15T15:01:07.000Z | watcher_metering/publisher/publisher.py | b-com/watcher-metering | 7c09b243347146e5a421700d5b07d1d0a5c4d604 | [
"Apache-2.0"
] | 1 | 2015-10-26T13:52:58.000Z | 2015-10-26T13:52:58.000Z | watcher_metering/publisher/publisher.py | b-com/watcher-metering | 7c09b243347146e5a421700d5b07d1d0a5c4d604 | [
"Apache-2.0"
] | 4 | 2015-10-10T13:59:39.000Z | 2020-05-29T11:47:07.000Z | # -*- encoding: utf-8 -*-
# Copyright (c) 2015 b<>com
#
# 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... | 38.227642 | 79 | 0.652276 | 3,860 | 0.820927 | 0 | 0 | 69 | 0.014675 | 0 | 0 | 1,898 | 0.403658 |
c2702f279730a02fd61505d6c6e1275ba009f9db | 873 | py | Python | setup.py | mortenlj/earthlyw | 7aa1762c84d680abed1192f88a42d4d4b227432c | [
"MIT"
] | null | null | null | setup.py | mortenlj/earthlyw | 7aa1762c84d680abed1192f88a42d4d4b227432c | [
"MIT"
] | 16 | 2021-08-21T20:11:04.000Z | 2022-03-12T19:55:53.000Z | setup.py | mortenlj/earthlyw | 7aa1762c84d680abed1192f88a42d4d4b227432c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup
setup(
name="earthlyw",
version="0.1",
packages=[
"ibidem",
"ibidem.earthlyw",
],
install_requires=[
"setuptools",
"colorlog<6",
"appdirs<2",
"requests<3",
],
extras_require={
"dev": ... | 19.4 | 51 | 0.5063 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 369 | 0.42268 |
c2722d474ea8fa2b576a6ea93761caf6c92cb828 | 5,547 | py | Python | export_pdf_decaissement.py | Ciwara/DE-ENCAISSEMENT | bd816b40c857a768e866535b46b30ae6fb5020e9 | [
"Apache-2.0"
] | null | null | null | export_pdf_decaissement.py | Ciwara/DE-ENCAISSEMENT | bd816b40c857a768e866535b46b30ae6fb5020e9 | [
"Apache-2.0"
] | null | null | null | export_pdf_decaissement.py | Ciwara/DE-ENCAISSEMENT | bd816b40c857a768e866535b46b30ae6fb5020e9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding= UTF-8 -*-
# Fad
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import A4
# setup the empty canvas
from io import FileIO as file
from reportlab.platypus import Flowable
# from Common.pyPdf import PdfFileWriter, PdfFileReader
from PyPDF2 import PdfFileWriter, PdfFil... | 33.415663 | 110 | 0.581035 | 512 | 0.092037 | 0 | 0 | 0 | 0 | 0 | 0 | 1,302 | 0.234046 |
c274168a8c5a204b07518e6afd5c3fd89f5eb019 | 9,073 | py | Python | pose/datasets/real_animal_all.py | chaneyddtt/UDA-Animal-Pose | f1ebfda860a2585c60fe86ce1632e910ac97ebc5 | [
"MIT"
] | 61 | 2021-03-30T08:34:24.000Z | 2022-03-30T02:45:46.000Z | pose/datasets/real_animal_all.py | chaneyddtt/UDA-Animal-Pose | f1ebfda860a2585c60fe86ce1632e910ac97ebc5 | [
"MIT"
] | 13 | 2021-04-10T12:46:58.000Z | 2022-03-11T10:40:02.000Z | pose/datasets/real_animal_all.py | chaneyddtt/UDA-Animal-Pose | f1ebfda860a2585c60fe86ce1632e910ac97ebc5 | [
"MIT"
] | 2 | 2021-07-22T04:53:44.000Z | 2022-02-15T14:19:02.000Z | from __future__ import print_function, absolute_import
import random
import torch.utils.data as data
from pose.utils.osutils import *
from pose.utils.transforms import *
from scipy.io import loadmat
import argparse
class Real_Animal_All(data.Dataset):
def __init__(self, is_train=True, is_aug=False, **kwargs):
... | 45.139303 | 136 | 0.554502 | 8,733 | 0.962526 | 0 | 0 | 0 | 0 | 0 | 0 | 1,609 | 0.177339 |
c276131b5adb85398eba0cb67c7e33579e3497af | 2,376 | py | Python | src/models/SLEuth_model.py | NCBI-Codeathons/SLEuth | c74c05bbc07ce4c813ee46ab66cfb6487fdc6966 | [
"MIT"
] | 2 | 2019-11-07T22:24:49.000Z | 2019-11-09T02:42:59.000Z | src/models/SLEuth_model.py | NCBI-Codeathons/STRATIFICATION-OF-SLE-PATIENT-COHORT-FOR-PRECISION-MEDICINE | c74c05bbc07ce4c813ee46ab66cfb6487fdc6966 | [
"MIT"
] | null | null | null | src/models/SLEuth_model.py | NCBI-Codeathons/STRATIFICATION-OF-SLE-PATIENT-COHORT-FOR-PRECISION-MEDICINE | c74c05bbc07ce4c813ee46ab66cfb6487fdc6966 | [
"MIT"
] | 1 | 2020-06-06T18:47:21.000Z | 2020-06-06T18:47:21.000Z | import sklearn
from sklearn.cluster import KMeans
from src.features.feature_selection import PCA_Variants2Gene_FeatureSelection
class SLEuth(sklearn.base.TransformerMixin, sklearn.base.ClusterMixin):
def __init__(self, cluster_num, variants_genes_path="../../data/interim/variants_top56_genes.csv",
... | 44.830189 | 147 | 0.676347 | 2,245 | 0.944865 | 0 | 0 | 0 | 0 | 0 | 0 | 1,253 | 0.527357 |
c2769ae34a085e912e6eacf2499ecd7dc14d3eeb | 492 | py | Python | cap6/ex6.py | felipesch92/livroPython | 061b1c095c3ec2d25fb1d5fdfbf9e9dbe10b3307 | [
"MIT"
] | null | null | null | cap6/ex6.py | felipesch92/livroPython | 061b1c095c3ec2d25fb1d5fdfbf9e9dbe10b3307 | [
"MIT"
] | null | null | null | cap6/ex6.py | felipesch92/livroPython | 061b1c095c3ec2d25fb1d5fdfbf9e9dbe10b3307 | [
"MIT"
] | null | null | null | p = [1, 4, 9, 10, 20, 25]
e1 = int(input('Primeiro elemento: '))
e2 = int(input('Segundo elemento: '))
x = 0
achou = False
primeiro = 0
while x < len(p):
if p[x] == e1:
print(f'Elemento 1 encontrado na posição {x} da lista!')
if primeiro == 0:
primeiro = 1
if p[x] == e2:
prin... | 27.333333 | 64 | 0.556911 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 192 | 0.387097 |
c276e6f457a794f0b9dc50d4ef823c9392fe5335 | 62 | py | Python | src/lk_db/ents/time/EntTime.py | nuuuwan/lk_db | ac0abfa47ba31b0d4c2c8566b3101b83749bd45d | [
"MIT"
] | null | null | null | src/lk_db/ents/time/EntTime.py | nuuuwan/lk_db | ac0abfa47ba31b0d4c2c8566b3101b83749bd45d | [
"MIT"
] | null | null | null | src/lk_db/ents/time/EntTime.py | nuuuwan/lk_db | ac0abfa47ba31b0d4c2c8566b3101b83749bd45d | [
"MIT"
] | null | null | null | from lk_db.ents.Ent import Ent
class EntTime(Ent):
pass
| 10.333333 | 30 | 0.709677 | 28 | 0.451613 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c278440f2c1e433cd58705bc68bd303258b8e21b | 8,084 | py | Python | lib/datasets/myvg.py | zhydong/faster-rcnn.pytorch | 36fa8b9718228edb4702b039deab924c40b973f5 | [
"MIT"
] | null | null | null | lib/datasets/myvg.py | zhydong/faster-rcnn.pytorch | 36fa8b9718228edb4702b039deab924c40b973f5 | [
"MIT"
] | null | null | null | lib/datasets/myvg.py | zhydong/faster-rcnn.pytorch | 36fa8b9718228edb4702b039deab924c40b973f5 | [
"MIT"
] | null | null | null | """
Visual Genome in Scene Graph Generation by Iterative Message Passing split
"""
import os
import cv2
import json
import h5py
import pickle
import numpy as np
import scipy.sparse
import os.path as osp
from datasets.imdb import imdb
from model.utils.config import cfg
from IPython import embed
class vg_sggimp(imdb)... | 36.579186 | 114 | 0.588323 | 7,687 | 0.950891 | 0 | 0 | 233 | 0.028822 | 0 | 0 | 2,168 | 0.268184 |
c279e40781e717d53e7e9d1d3467cb0c61eb0740 | 6,213 | py | Python | src/rfid/__init__.py | whaleygeek/SL030 | ff96337cd1619b4a5bd8097a5d5dd0455d2e1674 | [
"MIT"
] | null | null | null | src/rfid/__init__.py | whaleygeek/SL030 | ff96337cd1619b4a5bd8097a5d5dd0455d2e1674 | [
"MIT"
] | 8 | 2020-11-14T11:01:38.000Z | 2020-11-18T15:06:07.000Z | src/rfid/__init__.py | whaleygeek/SL030 | ff96337cd1619b4a5bd8097a5d5dd0455d2e1674 | [
"MIT"
] | 2 | 2020-07-23T14:41:31.000Z | 2020-11-19T13:19:38.000Z | # SL030 RFID reader driver for skpang supplied SL030 Mifare reader
# (c) 2013-2014 Thinking Binaries Ltd, David Whale
#===============================================================================
# CONFIGURATION
#
# You can change these configuration items either by editing them in this
# file, or by refering to th... | 26.21519 | 80 | 0.63013 | 2,391 | 0.384838 | 0 | 0 | 0 | 0 | 0 | 0 | 3,004 | 0.483502 |
c27a447ad8dc36c385389a565e4ed170305a8f4a | 1,293 | py | Python | parser_tool.py | kmwenja/marker | f9d9634eb1ddce3dc0ebbe6164bb87a27dc95dd9 | [
"MIT"
] | null | null | null | parser_tool.py | kmwenja/marker | f9d9634eb1ddce3dc0ebbe6164bb87a27dc95dd9 | [
"MIT"
] | null | null | null | parser_tool.py | kmwenja/marker | f9d9634eb1ddce3dc0ebbe6164bb87a27dc95dd9 | [
"MIT"
] | null | null | null | # parser.py - parses a given sentence using a given grammar definition
import sys, os
import argparse
from utils import load_grammar
def get_parser(grammar_file, *args, **kwargs):
""" loads a parser from the given grammar """
return load_grammar(grammar_file, *args, **kwargs)
def tokenize(sentence):
"""... | 26.387755 | 73 | 0.661253 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 419 | 0.324053 |
c27a8632891f52402501c008dbb668b6e46297a0 | 3,821 | py | Python | pyjapt/lexing.py | alejandroklever/pyjapt | 21b11fd4b5b21cabcc59673538c473e33af9e646 | [
"MIT"
] | 8 | 2020-07-23T06:19:28.000Z | 2021-11-06T04:26:47.000Z | pyjapt/lexing.py | alejandroklever/PyJapt | 21b11fd4b5b21cabcc59673538c473e33af9e646 | [
"MIT"
] | null | null | null | pyjapt/lexing.py | alejandroklever/PyJapt | 21b11fd4b5b21cabcc59673538c473e33af9e646 | [
"MIT"
] | null | null | null | import re
from typing import List, Any, Generator, Tuple, Pattern, Optional, Callable, Dict
class Token:
"""
A Token class.
Parameters
----------
lex: str
Token's lexeme.
token_type: Enum
Token's type.
"""
def __init__(self, lex, token_type, line=0, column=0):
... | 33.517544 | 111 | 0.576289 | 3,723 | 0.974352 | 1,033 | 0.270348 | 802 | 0.209893 | 0 | 0 | 654 | 0.171159 |
c27b06a45e2113932d5e033fa31486f2b933313d | 3,975 | py | Python | src/jobs/management/commands/try_retrain.py | fleur101/predict-python | d40c876d919232bbb77904e050b182c875bc36fa | [
"MIT"
] | 12 | 2018-06-27T08:09:18.000Z | 2021-10-10T22:19:04.000Z | src/jobs/management/commands/try_retrain.py | fleur101/predict-python | d40c876d919232bbb77904e050b182c875bc36fa | [
"MIT"
] | 17 | 2018-06-12T17:36:11.000Z | 2020-11-16T21:23:22.000Z | src/jobs/management/commands/try_retrain.py | fleur101/predict-python | d40c876d919232bbb77904e050b182c875bc36fa | [
"MIT"
] | 16 | 2018-08-02T14:40:17.000Z | 2021-11-12T12:28:46.000Z | import random
from django.core.management.base import BaseCommand
from pandas import Series
from src.cache.cache import put_labelled_logs
from src.core.core import get_encoded_logs
from src.jobs.models import Job
from src.jobs.tasks import prediction_task
from src.runtime.tasks import create_prediction_job
from src.... | 38.592233 | 103 | 0.585409 | 3,611 | 0.908428 | 0 | 0 | 0 | 0 | 0 | 0 | 523 | 0.131572 |
c27ba0e5861f097686336335cdd99739a27bfdc4 | 1,646 | py | Python | flydra_camnode/flydra_camnode/camnode_utils.py | elhananby/flydra | 09b86859b1863700cdea0bbcdd4758da6c83930b | [
"Apache-2.0",
"MIT"
] | 45 | 2017-08-25T06:46:56.000Z | 2021-08-29T16:42:49.000Z | flydra_camnode/flydra_camnode/camnode_utils.py | elhananby/flydra | 09b86859b1863700cdea0bbcdd4758da6c83930b | [
"Apache-2.0",
"MIT"
] | 7 | 2017-10-16T10:46:20.000Z | 2020-12-03T16:42:55.000Z | flydra_camnode/flydra_camnode/camnode_utils.py | elhananby/flydra | 09b86859b1863700cdea0bbcdd4758da6c83930b | [
"Apache-2.0",
"MIT"
] | 21 | 2018-04-11T09:06:40.000Z | 2021-12-26T23:38:40.000Z | #emacs, this is -*-Python-*- mode
from __future__ import division
from __future__ import with_statement
import contextlib
import threading, Queue
class ChainLink(object):
"""essentially a linked list of threads"""
def __init__(self):
self._queue = Queue.Queue()
self._lock = threading.Lock()
... | 27.433333 | 77 | 0.592345 | 1,275 | 0.774605 | 192 | 0.116646 | 219 | 0.13305 | 0 | 0 | 376 | 0.228433 |
c27c8a4376df70bee9dccb2ba1429b510d6719df | 3,439 | py | Python | app.py | Nerolation/Ethereum-Notary-Service-Prototype | ea5487a29813caee1e4be9edac495d89010c593e | [
"MIT"
] | null | null | null | app.py | Nerolation/Ethereum-Notary-Service-Prototype | ea5487a29813caee1e4be9edac495d89010c593e | [
"MIT"
] | null | null | null | app.py | Nerolation/Ethereum-Notary-Service-Prototype | ea5487a29813caee1e4be9edac495d89010c593e | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request, redirect, logging, make_response, json
from ethw3 import genkey, create_chain_data, verify_chain_data, create_acct, mine, history_slice
from utils_s3 import load_from_fetchlist
# Initialize flask an other global variables
app = Flask(__name__)
address, username, addr,... | 37.791209 | 198 | 0.628962 | 0 | 0 | 0 | 0 | 2,758 | 0.801977 | 0 | 0 | 255 | 0.074149 |
c27d5e7133ef2989b1ce8e0b881cabce3f8f0dab | 8,800 | py | Python | python/dsbox/planner/common/library.py | RqS/dsbox-ta2 | 43800d4365a154684fa5b9551c2c1cd21ec7139c | [
"MIT"
] | null | null | null | python/dsbox/planner/common/library.py | RqS/dsbox-ta2 | 43800d4365a154684fa5b9551c2c1cd21ec7139c | [
"MIT"
] | null | null | null | python/dsbox/planner/common/library.py | RqS/dsbox-ta2 | 43800d4365a154684fa5b9551c2c1cd21ec7139c | [
"MIT"
] | null | null | null | import json
import os
from datetime import date
from typing import List, Dict
from d3m_metadata.metadata import PrimitiveMetadata, PrimitiveFamily, PrimitiveAlgorithmType
from d3m import index
from dsbox.planner.common.primitive import Primitive
from dsbox.schema.profile_schema import DataProfileType as dpt
from col... | 42.307692 | 112 | 0.611932 | 8,448 | 0.96 | 0 | 0 | 0 | 0 | 0 | 0 | 1,255 | 0.142614 |
c27e04a4ce8b186ea59a6dc9c61fb5fd29af829e | 134 | py | Python | python-lab-file/64_capitalizefirshchar.py | zshashz/py1729 | 3281ae2a20c665ebcc0d53840cc95143cbe6861b | [
"MIT"
] | 1 | 2021-01-22T09:03:59.000Z | 2021-01-22T09:03:59.000Z | python-lab-file/64_capitalizefirshchar.py | zshashz/py1729 | 3281ae2a20c665ebcc0d53840cc95143cbe6861b | [
"MIT"
] | null | null | null | python-lab-file/64_capitalizefirshchar.py | zshashz/py1729 | 3281ae2a20c665ebcc0d53840cc95143cbe6861b | [
"MIT"
] | 2 | 2021-05-04T11:29:38.000Z | 2021-11-03T13:09:48.000Z | # Program 64 : Capitalize the First Character of a String
my_string = input()
cap_string = my_string.capitalize()
print(cap_string) | 19.142857 | 57 | 0.768657 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.425373 |
c27e0e6f346371d620980e3342a6a2e97c9b22a6 | 18,487 | py | Python | radiation_dose_estimator_keras.py | vsuomi/radiation-dose | 6a97e282b7b8a06cde7973ceeebb14ea3ef60f70 | [
"MIT"
] | 12 | 2019-02-27T17:07:58.000Z | 2021-12-17T20:31:31.000Z | radiation_dose_estimator_keras.py | liuhd073/radiation-dose | 6a97e282b7b8a06cde7973ceeebb14ea3ef60f70 | [
"MIT"
] | 2 | 2020-04-02T08:57:19.000Z | 2021-06-10T05:06:26.000Z | radiation_dose_estimator_keras.py | vsuomi/radiation-dose | 6a97e282b7b8a06cde7973ceeebb14ea3ef60f70 | [
"MIT"
] | 2 | 2019-09-21T12:19:08.000Z | 2020-04-28T04:30:41.000Z | # -*- coding: utf-8 -*-
'''
Created on Fri Nov 16 09:36:50 2018
@author:
Visa Suomi
Turku University Hospital
November 2018
@description:
This model is used to predict radiation dose from pre-treatment patient
parameters
'''
#%% clear variables
%reset -f
%clear
#%% import ne... | 37.960986 | 131 | 0.638611 | 136 | 0.007357 | 0 | 0 | 0 | 0 | 0 | 0 | 6,195 | 0.3351 |
c27e29fee5d31c11bd5413203986db3871f9139b | 3,610 | py | Python | gmsh_cad/emi_system_gap.py | MiroK/emi-cylinders | ccbbfa51003fc4fe8abc257dee916e229398c520 | [
"MIT"
] | null | null | null | gmsh_cad/emi_system_gap.py | MiroK/emi-cylinders | ccbbfa51003fc4fe8abc257dee916e229398c520 | [
"MIT"
] | null | null | null | gmsh_cad/emi_system_gap.py | MiroK/emi-cylinders | ccbbfa51003fc4fe8abc257dee916e229398c520 | [
"MIT"
] | 1 | 2018-05-30T14:26:59.000Z | 2018-05-30T14:26:59.000Z | from dolfin import *
parameters['form_compiler']['representation'] = 'uflacs'
parameters['form_compiler']['cpp_optimize'] = True
parameters['form_compiler']['cpp_optimize_flags'] = '-O3 -ffast-math -march=native'
parameters['ghost_mode'] = 'shared_facet'
mesh_file = 'cell_grid.h5'
comm = mpi_comm_world()
h5 = HDF5Fi... | 38.404255 | 84 | 0.650139 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,719 | 0.476177 |
c27e409359b0212f22ca1f835566250303f86f95 | 165 | py | Python | customers/tests/test_gemsutils.py | dcopm999/sibdev | 9dc01ed5d172869d4870c847f01d168602f31be8 | [
"MIT"
] | null | null | null | customers/tests/test_gemsutils.py | dcopm999/sibdev | 9dc01ed5d172869d4870c847f01d168602f31be8 | [
"MIT"
] | null | null | null | customers/tests/test_gemsutils.py | dcopm999/sibdev | 9dc01ed5d172869d4870c847f01d168602f31be8 | [
"MIT"
] | null | null | null | from django.test import TestCase
from customers.gems_utils import Gems
class GemUtilsCase(TestCase):
def setUp(self):
self.gems = Gems()
pass
| 16.5 | 37 | 0.690909 | 90 | 0.545455 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c2818a738014513d0cd2309428321fbec20d821d | 2,855 | py | Python | commands/load_metadata/products.py | DataViva/dataviva-scripts | 1e36f11e2849c33b8118cefe1755d312b19c0ecd | [
"MIT"
] | 10 | 2015-05-20T14:41:23.000Z | 2020-05-27T22:36:19.000Z | commands/load_metadata/products.py | DataViva/dataviva-scripts | 1e36f11e2849c33b8118cefe1755d312b19c0ecd | [
"MIT"
] | 11 | 2018-05-17T14:30:58.000Z | 2018-09-06T21:20:34.000Z | commands/load_metadata/products.py | DataViva/dataviva-scripts | 1e36f11e2849c33b8118cefe1755d312b19c0ecd | [
"MIT"
] | 12 | 2015-07-14T13:46:41.000Z | 2019-09-20T00:47:10.000Z | import click
import pandas
import pickle
import json
from clients import s3, redis
@click.command()
@click.option('--both', 'upload', flag_value='s3_and_redis', default=True, help='Upload metadata to both s3 and Redis')
@click.option('--s3', 'upload', flag_value='only_s3', help='Upload metadata only to s3')
@click.op... | 33.588235 | 119 | 0.561121 | 0 | 0 | 0 | 0 | 2,774 | 0.96993 | 0 | 0 | 668 | 0.233566 |
c282ea17115bac2dbe64555ce16709d1698a3231 | 5,158 | py | Python | docker/entrypoint_benchmark.py | augustoproiete-forks/OasisLMF--OasisLMF | 560749e9dd7d8bd84307cd2767517b3e1d3a1c01 | [
"BSD-3-Clause"
] | 88 | 2018-03-24T11:57:10.000Z | 2022-03-21T13:04:41.000Z | docker/entrypoint_benchmark.py | augustoproiete-forks/OasisLMF--OasisLMF | 560749e9dd7d8bd84307cd2767517b3e1d3a1c01 | [
"BSD-3-Clause"
] | 558 | 2018-03-14T14:16:30.000Z | 2022-03-29T12:48:14.000Z | docker/entrypoint_benchmark.py | augustoproiete-forks/OasisLMF--OasisLMF | 560749e9dd7d8bd84307cd2767517b3e1d3a1c01 | [
"BSD-3-Clause"
] | 41 | 2018-04-09T11:13:12.000Z | 2021-10-05T14:43:11.000Z | #!/usr/bin/env python3
import argparse
import os
import io
import subprocess
import sys
from tabulate import tabulate
def parse_args():
desc = (
'Performance testing script for OasisLMF input file generation'
'This script expects a set of nested sub directories each containing'
'acc.csv, ... | 35.819444 | 144 | 0.647732 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,076 | 0.402482 |
c28326651456ece0ed2b23f9a58a7727eada65f9 | 191 | py | Python | run.py | elchingon/flask-temperature-relay-app | ef2fcdf039eb2be5ef28a53ca1727d73c0732d0f | [
"MIT"
] | null | null | null | run.py | elchingon/flask-temperature-relay-app | ef2fcdf039eb2be5ef28a53ca1727d73c0732d0f | [
"MIT"
] | null | null | null | run.py | elchingon/flask-temperature-relay-app | ef2fcdf039eb2be5ef28a53ca1727d73c0732d0f | [
"MIT"
] | null | null | null | #!/bin/env python
from app import create_app, socketio
from app.db_setup import init_db
app = create_app(debug=False)
init_db()
if __name__ == '__main__':
socketio.run(app, port=5001)
| 17.363636 | 36 | 0.73822 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.141361 |
c2844b9558a0aad3fcd5e9e967cacb650e5737e3 | 1,427 | py | Python | GUI/index.py | Abhishek2019/Speech | 416827a02279cdafd268ef2748d4f4f52b0f0e15 | [
"MIT"
] | null | null | null | GUI/index.py | Abhishek2019/Speech | 416827a02279cdafd268ef2748d4f4f52b0f0e15 | [
"MIT"
] | null | null | null | GUI/index.py | Abhishek2019/Speech | 416827a02279cdafd268ef2748d4f4f52b0f0e15 | [
"MIT"
] | null | null | null | # from tkinter import *
# root = Tk()
# frametop = Frame(root)
# framebottom = Frame(root)
# frameleft = Frame(framebottom)
# frameright = Frame(framebottom)
# text = Text(frametop)
# scroll = Scrollbar(frametop, command=text.yview)
# btn1 = Button(frameleft, text="Course")
# btn2 = Button(frameleft, text="Abscences... | 29.122449 | 63 | 0.716889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,014 | 0.710582 |
c284f0eeab9d175ef398f1a574b272296ad415fe | 2,270 | py | Python | tests/0400_i18n/08_update_catalogs.py | sveetch/Optimus | 983aebeccd2ada7a5a0ab96f9296d4bba1112022 | [
"MIT"
] | 2 | 2019-05-31T00:23:15.000Z | 2021-04-26T07:26:16.000Z | tests/0400_i18n/08_update_catalogs.py | sveetch/Optimus | 983aebeccd2ada7a5a0ab96f9296d4bba1112022 | [
"MIT"
] | 27 | 2015-04-21T14:43:26.000Z | 2022-01-29T00:42:53.000Z | tests/0400_i18n/08_update_catalogs.py | sveetch/Optimus | 983aebeccd2ada7a5a0ab96f9296d4bba1112022 | [
"MIT"
] | 1 | 2017-05-21T17:32:28.000Z | 2017-05-21T17:32:28.000Z | import os
import logging
import shutil
from optimus.i18n.manager import I18NManager
def test_update_catalogs_all(
minimal_i18n_settings, caplog, temp_builds_dir, fixtures_settings
):
"""
Update every catalogs
"""
basepath = temp_builds_dir.join("i18n_update_catalogs_all")
# Copy sample proje... | 28.024691 | 82 | 0.654626 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 502 | 0.221145 |
c2873e4c6778750f7796b281ee5e6991fa174ee7 | 3,707 | py | Python | StreamPy/TestExamplesListToStreams/test_example_element_single_in_single_out_stateful.py | AnomalyInc/StreamPy | 94abca276b2857de48259f4f42ef95efbdf5f6d1 | [
"Apache-2.0"
] | 2 | 2017-04-27T11:04:27.000Z | 2019-02-07T21:03:32.000Z | StreamPy/TestExamplesListToStreams/test_example_element_single_in_single_out_stateful.py | StreamPy/StreamPy | 94abca276b2857de48259f4f42ef95efbdf5f6d1 | [
"Apache-2.0"
] | null | null | null | StreamPy/TestExamplesListToStreams/test_example_element_single_in_single_out_stateful.py | StreamPy/StreamPy | 94abca276b2857de48259f4f42ef95efbdf5f6d1 | [
"Apache-2.0"
] | null | null | null | """This module contains examples of stream_func where f_type
is 'element' and stream_func has a single input stream, and
a single output stream, and the operation is stateful.
The state captures information in the past input streams;
this information is required to append values to the tails
of the output streams.
Th... | 29.656 | 77 | 0.669005 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,298 | 0.619908 |
c288905ef79b8a14c466f9e48a449c4d916507ed | 7,815 | py | Python | summer21/mpqa_dataprocessing/mpqa3_to_dict.py | gu-sentiment-2021/sent | a3874a7286c965684d92fcf78e4091ad3a33aae1 | [
"MIT"
] | null | null | null | summer21/mpqa_dataprocessing/mpqa3_to_dict.py | gu-sentiment-2021/sent | a3874a7286c965684d92fcf78e4091ad3a33aae1 | [
"MIT"
] | null | null | null | summer21/mpqa_dataprocessing/mpqa3_to_dict.py | gu-sentiment-2021/sent | a3874a7286c965684d92fcf78e4091ad3a33aae1 | [
"MIT"
] | null | null | null | # mpqa3_to_dict helps to convert MPQA stand-off format to python dictionaries.
# It provides the following functionalities:
# 1) Clean up the MPQA 3.0 corpus
# 2) Convert an MPQA document to a dictionary
# 3) Convert an entire corpus to a dictionary
import os
import re
HAS_LIST_OF_IDS = [ # These attributes may have ... | 47.078313 | 124 | 0.583109 | 7,330 | 0.93794 | 0 | 0 | 0 | 0 | 0 | 0 | 3,931 | 0.503007 |
c289ff863c8d7033135d9b33b4209cc7939b98dc | 1,283 | py | Python | dev/Gems/CloudGemInGameSurvey/AWS/lambda-code/ServiceLambda/api/active_surveys_player_submissions.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 1,738 | 2017-09-21T10:59:12.000Z | 2022-03-31T21:05:46.000Z | dev/Gems/CloudGemInGameSurvey/AWS/lambda-code/ServiceLambda/api/active_surveys_player_submissions.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 427 | 2017-09-29T22:54:36.000Z | 2022-02-15T19:26:50.000Z | dev/Gems/CloudGemInGameSurvey/AWS/lambda-code/ServiceLambda/api/active_surveys_player_submissions.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 671 | 2017-09-21T08:04:01.000Z | 2022-03-29T14:30:07.000Z | #
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or th... | 33.763158 | 110 | 0.749805 | 0 | 0 | 0 | 0 | 590 | 0.45986 | 0 | 0 | 685 | 0.533905 |
c28c89d7b55ba84be47ce0c0270354c71ec824ef | 402 | py | Python | exercicio57.py | juniooor/Exercicios-python | aed87da4f93d0e6083b1a8c3af4081a028f145de | [
"MIT"
] | null | null | null | exercicio57.py | juniooor/Exercicios-python | aed87da4f93d0e6083b1a8c3af4081a028f145de | [
"MIT"
] | null | null | null | exercicio57.py | juniooor/Exercicios-python | aed87da4f93d0e6083b1a8c3af4081a028f145de | [
"MIT"
] | null | null | null | #Crie um programa que tenha uma tupla com várias palavras (não usar acentos). Depois disso, você deve mostrar, para cada palavra, quais são as suas vogais.
palavras=('SOPA','BATATAS','CACAU','CASTANHA','LASANHA','GOSTOSURAS','TRAVESSURAS','PARMEGIANA')
for p in palavras:
print(f'\n As Vogais de {p} são: ',end='')
... | 57.428571 | 156 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 278 | 0.683047 |
c28cb4aefdf64fe8ea7d0c518f1c67e77950a4da | 2,534 | py | Python | marketgrab/views.py | colinmcglone/window-time | 74ed90440b9bb93fa569534c7557972242569d3a | [
"MIT"
] | null | null | null | marketgrab/views.py | colinmcglone/window-time | 74ed90440b9bb93fa569534c7557972242569d3a | [
"MIT"
] | null | null | null | marketgrab/views.py | colinmcglone/window-time | 74ed90440b9bb93fa569534c7557972242569d3a | [
"MIT"
] | null | null | null | import os
from django.conf import *
from django.shortcuts import render_to_response, render
from django.http import HttpResponse
from .models import Data, MovingAvg, Movements, Sigma
from datetime import datetime
from django.template import RequestContext
def index(request):
ticker = Data.objects.values_list('tic... | 33.786667 | 97 | 0.609708 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 411 | 0.162194 |
c28e4edca7ae401126ff0a6fbb8cb56b375f7be5 | 195 | py | Python | Regular Expression/Introduction/Matching Whitespace % Non-whitespace Characters/matching_whitespace_and_non-whitespace_characters.py | brianchiang-tw/HackerRank | 02a30a0033b881206fa15b8d6b4ef99b2dc420c8 | [
"MIT"
] | 2 | 2020-05-28T07:15:00.000Z | 2020-07-21T08:34:06.000Z | Regular Expression/Introduction/Matching Whitespace % Non-whitespace Characters/matching_whitespace_and_non-whitespace_characters.py | brianchiang-tw/HackerRank | 02a30a0033b881206fa15b8d6b4ef99b2dc420c8 | [
"MIT"
] | null | null | null | Regular Expression/Introduction/Matching Whitespace % Non-whitespace Characters/matching_whitespace_and_non-whitespace_characters.py | brianchiang-tw/HackerRank | 02a30a0033b881206fa15b8d6b4ef99b2dc420c8 | [
"MIT"
] | null | null | null |
# Method_#1
#Regex_Pattern = r"\S\S\s\S\S\s\S\S" # Do not delete 'r'.
# Method_#2
Regex_Pattern = r"(\S\S\s){2}(\S\S){1}"
import re
print(str(bool(re.search(Regex_Pattern, input()))).lower()) | 19.5 | 59 | 0.625641 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 102 | 0.523077 |
c28f5399f5765ea45b857d48fc29ac34ed27c2a1 | 842 | py | Python | causalpy/utils/utils.py | maichmueller/CausalPy | d2dcd2c557e1ccdfa1fb77f3adbf78b0ea63c735 | [
"MIT"
] | null | null | null | causalpy/utils/utils.py | maichmueller/CausalPy | d2dcd2c557e1ccdfa1fb77f3adbf78b0ea63c735 | [
"MIT"
] | null | null | null | causalpy/utils/utils.py | maichmueller/CausalPy | d2dcd2c557e1ccdfa1fb77f3adbf78b0ea63c735 | [
"MIT"
] | null | null | null | import os
import shutil
class TempFolder:
def __init__(self, folder: str, **kwargs):
self.folder = folder
self.lock = kwargs.pop("LOCK", None)
def lockit(self):
if self.lock is not None:
self.lock.acquire()
def unlockit(self):
if self.lock is not None:
... | 24.057143 | 55 | 0.549881 | 815 | 0.967933 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.030879 |
c28fad06e8a818ac6ddee1694bd9cf847cd0da24 | 205 | py | Python | Semester 5 (PIP)/assignment1/prog4.py | MartyMiniac/ITER-Assignment | a7b355f40cc52a337ad90bb8328e54c4a9534530 | [
"MIT"
] | 14 | 2020-11-11T08:48:58.000Z | 2022-02-26T03:59:05.000Z | Semester 5 (PIP)/assignment1/prog4.py | SKSTCODE42/ITER-Assignment | a7b355f40cc52a337ad90bb8328e54c4a9534530 | [
"MIT"
] | 4 | 2020-11-12T13:31:14.000Z | 2021-06-21T05:41:34.000Z | Semester 5 (PIP)/assignment1/prog4.py | SKSTCODE42/ITER-Assignment | a7b355f40cc52a337ad90bb8328e54c4a9534530 | [
"MIT"
] | 10 | 2020-11-07T15:09:20.000Z | 2022-02-26T03:56:50.000Z | regno='1941012661'
year=2019
# print('My Regd. No is %s and I have taken admission in B. Tech. In %d.' %(regno, year))
print('My Regd. No is', regno,'and I have taken admission in B. Tech. In', year,'.' ) | 41 | 89 | 0.658537 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 163 | 0.795122 |
c2902a4704b44239ff0cf04b847569517aff459d | 483 | py | Python | api_server/apps/speech_api/models.py | take2make/sra_api | 923193789fdbfdd1022782f92bf2f041ddc4da29 | [
"MIT"
] | null | null | null | api_server/apps/speech_api/models.py | take2make/sra_api | 923193789fdbfdd1022782f92bf2f041ddc4da29 | [
"MIT"
] | null | null | null | api_server/apps/speech_api/models.py | take2make/sra_api | 923193789fdbfdd1022782f92bf2f041ddc4da29 | [
"MIT"
] | null | null | null | """
Описывается база данных для хранения, промежуточных результатов
"""
from django.db import models
class SpeechApiModel(models.Model):
encoded_data = models.TextField()
ext = models.CharField(max_length=300)
# blank=True означает, что поле может быть пустым при заполнении бд
model = models.CharFiel... | 26.833333 | 71 | 0.728778 | 424 | 0.726027 | 0 | 0 | 0 | 0 | 0 | 0 | 239 | 0.409247 |
c291f9afa8d4a69dbe3f4791438b896f2870685a | 1,690 | py | Python | setup.py | krismolendyke/den | aa18bb3ffc07688dbe5f9cbea9ba39fb9b67d37d | [
"MIT"
] | 6 | 2015-06-20T21:54:21.000Z | 2017-11-29T03:00:15.000Z | setup.py | krismolendyke/den | aa18bb3ffc07688dbe5f9cbea9ba39fb9b67d37d | [
"MIT"
] | 1 | 2017-02-13T09:08:54.000Z | 2017-02-13T09:33:46.000Z | setup.py | krismolendyke/den | aa18bb3ffc07688dbe5f9cbea9ba39fb9b67d37d | [
"MIT"
] | null | null | null | """setuptools entry point."""
from codecs import open
from os import path
from setuptools import find_packages, setup
HERE = path.abspath(path.dirname(__file__))
with open(path.join(HERE, "README.rst"), encoding="utf-8") as f:
LONG_DESCRIPTION = f.read()
with open(path.join(HERE, "src", "den", "VERSION")) as ve... | 29.649123 | 118 | 0.57929 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 688 | 0.407101 |
c293b3a4ad307a538250b63b7b3b8429f3fda47c | 25,807 | py | Python | apgl/util/Util.py | mathemaphysics/APGL | 6ca7c176e04017feeae00c4cee069fd126df0fbc | [
"BSD-3-Clause"
] | 13 | 2015-02-19T14:39:09.000Z | 2021-04-12T01:22:32.000Z | apgl/util/Util.py | mathemaphysics/APGL | 6ca7c176e04017feeae00c4cee069fd126df0fbc | [
"BSD-3-Clause"
] | 1 | 2020-07-29T07:09:33.000Z | 2020-07-29T07:09:33.000Z | apgl/util/Util.py | mathemaphysics/APGL | 6ca7c176e04017feeae00c4cee069fd126df0fbc | [
"BSD-3-Clause"
] | 7 | 2015-03-16T07:26:49.000Z | 2021-01-12T06:57:27.000Z | '''
Created on 31 Jul 2009
@author: charanpal
'''
from __future__ import print_function
import sys
import os
import numpy
from contextlib import contextmanager
import numpy.random as rand
import logging
import scipy.linalg
import scipy.sparse as sparse
import scipy.special
import pickle
from apgl.util.Parameter imp... | 35.016282 | 209 | 0.551168 | 25,469 | 0.986903 | 442 | 0.017127 | 24,900 | 0.964854 | 0 | 0 | 8,981 | 0.348006 |
c29405121608c5b0e9800d088104121ec6141017 | 7,242 | py | Python | src/python/weblyzard_api/client/jesaja_ng.py | PhilippKuntschik/weblyzard_api | 415df7d2c3e625e96636ad0ab91f3ba669db64ea | [
"Apache-2.0"
] | null | null | null | src/python/weblyzard_api/client/jesaja_ng.py | PhilippKuntschik/weblyzard_api | 415df7d2c3e625e96636ad0ab91f3ba669db64ea | [
"Apache-2.0"
] | null | null | null | src/python/weblyzard_api/client/jesaja_ng.py | PhilippKuntschik/weblyzard_api | 415df7d2c3e625e96636ad0ab91f3ba669db64ea | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
.. codeauthor: Albert Weichselbraun <albert.weichselbraun@htwchur.ch>
.. codeauthor:: Heinz-Peter Lang <lang@weblyzard.com>
'''
from __future__ import print_function
from __future__ import unicode_literals
from eWRT.ws.rest import MultiRESTClient
from weblyzard_api.client ... | 38.727273 | 140 | 0.609362 | 6,847 | 0.945457 | 0 | 0 | 0 | 0 | 0 | 0 | 3,892 | 0.537421 |
c29433ef9d2c9ff9b5cb2a9ea24e62b20f20373a | 395 | py | Python | app/config/__init__.py | mstroud/pykj | 2931892b19a697b20c9522dd017e135a1ad396b8 | [
"MIT"
] | null | null | null | app/config/__init__.py | mstroud/pykj | 2931892b19a697b20c9522dd017e135a1ad396b8 | [
"MIT"
] | null | null | null | app/config/__init__.py | mstroud/pykj | 2931892b19a697b20c9522dd017e135a1ad396b8 | [
"MIT"
] | null | null | null | class Config(object):
DEBUG = True
DEVELOPMENT = True
SECRET_KEY = 'do-i-really-need-this'
SQLALCHEMY_DATABASE_URI = 'sqlite:///testing.db'
SQLALCHEMY_TRACK_MODIFICATIONS = False
KARAOKE_MEDIA_ROOT = "/path/to/app/static/media"
class ProductionConfig(Config):
DEVELOPMENT = False
... | 30.384615 | 56 | 0.691139 | 389 | 0.98481 | 0 | 0 | 0 | 0 | 0 | 0 | 97 | 0.24557 |
c29512076f4adfe1c703eb019e1315c92cfb30fe | 3,342 | py | Python | tasks/utilities/runner.py | faisaltheparttimecoder/carelogBackend | b0635e72338e14dad24f1ee0329212cd60a3e83a | [
"MIT"
] | 1 | 2020-04-09T11:45:14.000Z | 2020-04-09T11:45:14.000Z | tasks/utilities/runner.py | faisaltheparttimecoder/carelogBackend | b0635e72338e14dad24f1ee0329212cd60a3e83a | [
"MIT"
] | 2 | 2020-06-05T18:04:30.000Z | 2021-06-10T20:11:46.000Z | tasks/utilities/runner.py | faisaltheparttimecoder/carelogBackend | b0635e72338e14dad24f1ee0329212cd60a3e83a | [
"MIT"
] | null | null | null | import datetime, os
from django.contrib.auth.models import User
from products.lib.data_load import LoadProducts
from zendesk.lib.load_tickets import LoadTickets
from tasks.engine.maintenance import Maintenance
from tasks.models import LastRun
class TaskRunner:
def __init__(self):
"""
Initialize t... | 37.550562 | 124 | 0.648115 | 3,096 | 0.926391 | 0 | 0 | 0 | 0 | 0 | 0 | 1,008 | 0.301616 |
c298455b91c04670dd6ada8face196e4608ff57c | 1,667 | py | Python | code/mlp-test.py | asdlei99/firewall | fd2819fab4cfde9989350397300efd4321e197fa | [
"MIT"
] | 1 | 2020-03-01T21:17:01.000Z | 2020-03-01T21:17:01.000Z | code/mlp-test.py | asdlei99/firewall | fd2819fab4cfde9989350397300efd4321e197fa | [
"MIT"
] | null | null | null | code/mlp-test.py | asdlei99/firewall | fd2819fab4cfde9989350397300efd4321e197fa | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Oct 23 10:51:14 2018
@author: peter
"""
from sklearn.feature_extraction.text import TfidfVectorizer
import os
from sklearn.model_selection import train_test_split
from sklearn.neural_network import MLPClassifier
from sklearn import metrics
import urllib.parse
from sklearn.ex... | 27.327869 | 98 | 0.720456 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 330 | 0.190862 |
c298b609bf3203502c3817910d7a265918d513ee | 3,176 | py | Python | crud.py | wileeam/discount-code-service | 74ccd0564115c636ed8d825e41d8e7d1bec33ded | [
"Apache-2.0"
] | null | null | null | crud.py | wileeam/discount-code-service | 74ccd0564115c636ed8d825e41d8e7d1bec33ded | [
"Apache-2.0"
] | null | null | null | crud.py | wileeam/discount-code-service | 74ccd0564115c636ed8d825e41d8e7d1bec33ded | [
"Apache-2.0"
] | null | null | null | import random
import string
from sqlalchemy.orm import Session
import models, schemas
def get_brand(db: Session, brand_id: int):
return db.query(models.Brand).filter(models.Brand.id == brand_id).first()
def get_brand_by_name(db: Session, name: str):
return db.query(models.Brand).filter(models.Brand.name ==... | 34.521739 | 86 | 0.573992 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 136 | 0.042821 |
c298ed848bd524b876312d8bab6fc24cd9b74131 | 28,847 | py | Python | python-obj-system.py | AlexPl292/python-obj-system | 7d0e743e4785989f54094ea0bac05e3681c308c2 | [
"MIT"
] | 54 | 2021-12-06T10:44:17.000Z | 2022-02-16T23:35:16.000Z | python-obj-system.py | AlexPl292/python-obj-system | 7d0e743e4785989f54094ea0bac05e3681c308c2 | [
"MIT"
] | 1 | 2022-01-22T07:09:16.000Z | 2022-01-22T07:09:16.000Z | python-obj-system.py | AlexPl292/python-obj-system | 7d0e743e4785989f54094ea0bac05e3681c308c2 | [
"MIT"
] | 4 | 2021-12-22T08:07:56.000Z | 2022-03-10T01:51:40.000Z | #!/usr/bin/env python3
from mdpyformat import *
import pprintex
header_md("""Python object primer for Python3 / meta classes""" )
header_md("""Introduction""", nesting = 2)
print_md("""
Python is good at creating the illusion of being a simple programming language. Sometimes this illusion fails, like when you have... | 43.707576 | 720 | 0.733456 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 27,351 | 0.947877 |
c29a504870955a0bf9ae588161b47325a0b2d50b | 3,508 | py | Python | src/Speech_process/speech_to_text.py | pranayjoshi/Medico | 2508a39d58eec50f5e94f3c878c00f599fff6629 | [
"MIT"
] | 13 | 2020-09-04T09:16:15.000Z | 2021-01-27T07:03:12.000Z | src/Speech_process/speech_to_text.py | bhargavaganti/Medico | 9059c59f49211f48a27805a00807121ac6f27b27 | [
"MIT"
] | 1 | 2020-10-04T03:23:45.000Z | 2020-10-04T03:23:45.000Z | src/Speech_process/speech_to_text.py | bhargavaganti/Medico | 9059c59f49211f48a27805a00807121ac6f27b27 | [
"MIT"
] | 2 | 2020-11-27T12:25:10.000Z | 2022-01-11T06:25:33.000Z | import speech_recognition as sr #Recognition Module
import pyttsx3 #Speaking package
import json
import series_counter as s_c
engine = pyttsx3.init() #initialising pyttsx value
def speak(text):
engine.say(text)
engine.runAndWait()
speak('hi user')
def Voice_recognize(wait... | 29.982906 | 127 | 0.646522 | 1,770 | 0.504561 | 0 | 0 | 0 | 0 | 0 | 0 | 821 | 0.234036 |
c29a89217076d97f8ff62faec004446052c3802d | 14,431 | py | Python | consai2_game/scripts/example/actions/defense.py | ibis-ssl/consai2-ibis | 2b7d67007703fa49fc7290e92e12481ba48a9a93 | [
"MIT"
] | 4 | 2019-12-16T12:17:32.000Z | 2020-02-15T04:45:47.000Z | consai2_game/scripts/example/actions/defense.py | ibis-ssl/consai2-ibis | 2b7d67007703fa49fc7290e92e12481ba48a9a93 | [
"MIT"
] | null | null | null | consai2_game/scripts/example/actions/defense.py | ibis-ssl/consai2-ibis | 2b7d67007703fa49fc7290e92e12481ba48a9a93 | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2019 SSL-Roots
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, pu... | 34.857488 | 119 | 0.654147 | 279 | 0.01558 | 0 | 0 | 195 | 0.01089 | 0 | 0 | 7,172 | 0.400514 |
c29af6b719187be274751f6a43356244d63bdafc | 2,432 | py | Python | scripts/feature-processing/average_pool_features.py | visionjo/pykinship | 1a73490ffd6ebc6dafc6e18c558ccc7e4ce9acec | [
"MIT"
] | 12 | 2020-02-19T02:50:49.000Z | 2022-03-31T19:39:35.000Z | scripts/feature-processing/average_pool_features.py | visionjo/pykinship | 1a73490ffd6ebc6dafc6e18c558ccc7e4ce9acec | [
"MIT"
] | 68 | 2020-03-23T00:07:28.000Z | 2022-03-28T10:02:16.000Z | scripts/feature-processing/average_pool_features.py | visionjo/pykinship | 1a73490ffd6ebc6dafc6e18c558ccc7e4ce9acec | [
"MIT"
] | 3 | 2020-02-11T19:07:08.000Z | 2020-11-04T18:48:00.000Z | #
# Script to fuse features per member per family (i.e., for each FID.MID, average all encodings across feature dim).
# Any features can be fused. Here is link to ArcFace features,
# https://www.dropbox.com/s/5rbj68dqud2folu/FIDs-features.tar.gz?dl=0
#
import pickle
from pathlib import Path
import numpy as np
from tqd... | 36.848485 | 115 | 0.580181 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 940 | 0.386513 |
c29b8867909e2528de5c43aad2904d281f32bd76 | 454 | py | Python | python/py-collections/most-commons.py | PingHuskar/hackerrank | 1bfdbc63de5d0f94cd9e6ae250476b4a267662f2 | [
"Unlicense"
] | 41 | 2018-05-11T07:54:34.000Z | 2022-03-29T19:02:32.000Z | python/py-collections/most-commons.py | PingHuskar/hackerrank | 1bfdbc63de5d0f94cd9e6ae250476b4a267662f2 | [
"Unlicense"
] | 2 | 2021-09-13T10:03:26.000Z | 2021-10-04T10:21:05.000Z | python/py-collections/most-commons.py | PingHuskar/hackerrank | 1bfdbc63de5d0f94cd9e6ae250476b4a267662f2 | [
"Unlicense"
] | 21 | 2019-01-23T19:06:59.000Z | 2021-12-23T16:03:47.000Z | # Python > Collections > Company Logo
# Print the number of character occurrences in descending order.
#
# https://www.hackerrank.com/challenges/most-commons/problem
#
from collections import Counter
from itertools import groupby
name = input()
nb = 0
for c, g in groupby(Counter(name).most_common(), key=lambda x: x[... | 23.894737 | 69 | 0.65859 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 163 | 0.359031 |
c29faa589f518d5f02ac893b18dc08fe8e171da1 | 19,174 | py | Python | sdk/python/pulumiverse_astra/cdc.py | mapped/pulumi-astra | 0d12cb616ed0eeb0d9e7dd9001b94f10bd4c3e8d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumiverse_astra/cdc.py | mapped/pulumi-astra | 0d12cb616ed0eeb0d9e7dd9001b94f10bd4c3e8d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumiverse_astra/cdc.py | mapped/pulumi-astra | 0d12cb616ed0eeb0d9e7dd9001b94f10bd4c3e8d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import ... | 38.119284 | 134 | 0.625222 | 18,766 | 0.978721 | 0 | 0 | 15,717 | 0.819704 | 0 | 0 | 8,020 | 0.418275 |
c2a178c1d8a1946506d66653d718f66410977163 | 2,960 | py | Python | fit_data.py | enricomeloni/covid-tools | 6920b8cfa0eb89bdb7e0ba96ecc74831185c44a7 | [
"MIT"
] | 1 | 2020-10-06T16:03:01.000Z | 2020-10-06T16:03:01.000Z | fit_data.py | enricomeloni/covid-tools | 6920b8cfa0eb89bdb7e0ba96ecc74831185c44a7 | [
"MIT"
] | 3 | 2022-02-13T20:21:56.000Z | 2022-02-27T10:19:23.000Z | fit_data.py | sailab-code/learning-sidarthe | 6920b8cfa0eb89bdb7e0ba96ecc74831185c44a7 | [
"MIT"
] | null | null | null | import os
from torch.optim import Adam, SGD
import skopt
import torch
from utils.data_utils import select_data
from utils.visualization_utils import plot_data_and_fit
from learning_models.logistic import Logistic
# df_file = os.path.join(os.getcwd(), "dati-regioni", "dpc-covid19-ita-regioni.csv")
df_file = os.path.j... | 33.636364 | 128 | 0.70473 | 0 | 0 | 0 | 0 | 116 | 0.039189 | 0 | 0 | 805 | 0.271959 |
c2a18f5087df24218cafcfe623033e7eac9d54d7 | 16,181 | py | Python | Kafka/automated/dedup_test.py | allensanborn/ChaosTestingCode | 36682e9ec70659f8e6a684e53fff6968bb5d15a2 | [
"MIT"
] | 73 | 2018-10-17T19:48:44.000Z | 2022-03-24T10:28:32.000Z | Kafka/automated/dedup_test.py | allensanborn/ChaosTestingCode | 36682e9ec70659f8e6a684e53fff6968bb5d15a2 | [
"MIT"
] | 1 | 2019-03-04T07:15:29.000Z | 2019-03-04T07:31:49.000Z | Kafka/automated/dedup_test.py | allensanborn/ChaosTestingCode | 36682e9ec70659f8e6a684e53fff6968bb5d15a2 | [
"MIT"
] | 35 | 2018-10-20T23:37:57.000Z | 2022-03-30T13:48:57.000Z | #!/usr/bin/env python
from confluent_kafka import Producer, Consumer, KafkaError
import sys
import time
import subprocess
from datetime import datetime
import threading
from collections import defaultdict
import re
import uuid
def log(text, to_file=False):
global output_file
print(text)
if to_file:
... | 37.630233 | 305 | 0.596131 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,312 | 0.451888 |
c2a329ec349312cdbee649e9a5eb68a195101366 | 2,374 | py | Python | libs/units/tests/test_string_reps.py | mscansian/drpexe-uploader | de17baf9085155a046b8e5f68b0b3191a2ce1847 | [
"MIT"
] | null | null | null | libs/units/tests/test_string_reps.py | mscansian/drpexe-uploader | de17baf9085155a046b8e5f68b0b3191a2ce1847 | [
"MIT"
] | null | null | null | libs/units/tests/test_string_reps.py | mscansian/drpexe-uploader | de17baf9085155a046b8e5f68b0b3191a2ce1847 | [
"MIT"
] | null | null | null | """Tests for string representations of Quantities and Units,
i.e. __repr__ and __str__"""
from units import unit
from units.predefined import define_units
from units.quantity import Quantity
from units.registry import REGISTRY
def test_quantity_repr():
"""Developer-friendly string representation of quantities."""... | 36.523077 | 77 | 0.607835 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,232 | 0.518955 |
c2a47a378106287329bd3e25e1d300fbd9312bc2 | 643 | py | Python | apps/store/permissions.py | JimenezJC/cozy-exchange | 131576e8159df8bab2ff680283ed55e66abaaa1d | [
"MIT"
] | null | null | null | apps/store/permissions.py | JimenezJC/cozy-exchange | 131576e8159df8bab2ff680283ed55e66abaaa1d | [
"MIT"
] | null | null | null | apps/store/permissions.py | JimenezJC/cozy-exchange | 131576e8159df8bab2ff680283ed55e66abaaa1d | [
"MIT"
] | null | null | null | from rest_framework.permissions import BasePermission, SAFE_METHODS
class IsOwnerOrReadOnly(BasePermission):
message = 'You must be the owner of this object'
def has_object_permission(self, request, view, obj):
if request.method in SAFE_METHODS:
return True
return obj.seller == re... | 33.842105 | 74 | 0.709176 | 570 | 0.88647 | 0 | 0 | 0 | 0 | 0 | 0 | 98 | 0.152411 |
c2a90d53c2c37e84ce26a4aecf160f999dff6816 | 969 | py | Python | fishpi/vehicle/test_quick.py | FishPi/FishPi-POCV---Command---Control | 6df8e9db29c1b4769ddedb3a89a21fadae260709 | [
"BSD-2-Clause"
] | 18 | 2015-01-17T17:03:07.000Z | 2020-10-17T06:38:26.000Z | fishpi/vehicle/test_quick.py | FishPi/FishPi-POCV---Command---Control | 6df8e9db29c1b4769ddedb3a89a21fadae260709 | [
"BSD-2-Clause"
] | null | null | null | fishpi/vehicle/test_quick.py | FishPi/FishPi-POCV---Command---Control | 6df8e9db29c1b4769ddedb3a89a21fadae260709 | [
"BSD-2-Clause"
] | 9 | 2015-02-14T01:42:46.000Z | 2019-08-26T20:24:36.000Z | #!/usr/bin/python
#
# FishPi - An autonomous drop in the ocean
#
# Simple test of PWM motor and servo drive
#
import logging
import raspberrypi
from time import sleep
from drive_controller import AdafruitDriveController
if __name__ == "__main__":
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
... | 20.617021 | 78 | 0.668731 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 215 | 0.221878 |
c2a9d8d15587245ae91d5e2b5d778ffa6fc78c2f | 13,246 | py | Python | sg_covid_impact/complexity.py | nestauk/sg_covid_impact | 0d52e643280cc6b06611759d4464dec82949ae05 | [
"MIT"
] | 2 | 2020-10-19T16:30:59.000Z | 2021-03-17T13:11:50.000Z | sg_covid_impact/complexity.py | nestauk/sg_covid_impact | 0d52e643280cc6b06611759d4464dec82949ae05 | [
"MIT"
] | 67 | 2020-10-07T09:34:38.000Z | 2021-04-06T08:46:49.000Z | sg_covid_impact/complexity.py | nestauk/sg_covid_impact | 0d52e643280cc6b06611759d4464dec82949ae05 | [
"MIT"
] | null | null | null | import logging
import numpy as np
import pandas as pd
import scipy.stats as ss
from scipy.linalg import eig
from numba import jit
import sg_covid_impact
# from mi_scotland.utils.pandas import preview
logger = logging.getLogger(__name__)
np.seterr(all="raise") # Raise errors on floating point errors
def process_c... | 29.968326 | 88 | 0.616337 | 0 | 0 | 0 | 0 | 554 | 0.041824 | 0 | 0 | 6,935 | 0.523554 |
c2aaa982479408d6fca2ceb47bf8d2f924d7e364 | 768 | py | Python | Exercicios/Ex019.py | RenanRibeiroDaSilva/Meu-Aprendizado-Python | 280bf2ad132ae0d26255e70b894fa7dbb69a5d01 | [
"MIT"
] | 2 | 2021-05-21T23:17:44.000Z | 2021-05-22T04:34:37.000Z | Exercicios/Ex019.py | RenanRibeiroDaSilva/Meu-Aprendizado-Python | 280bf2ad132ae0d26255e70b894fa7dbb69a5d01 | [
"MIT"
] | null | null | null | Exercicios/Ex019.py | RenanRibeiroDaSilva/Meu-Aprendizado-Python | 280bf2ad132ae0d26255e70b894fa7dbb69a5d01 | [
"MIT"
] | null | null | null | '''Ex 019 - Um professor quer sortear um dos seus quatro alunos para apagar o quadro.
Faça um programa que ajude ele, lendo o nome dos alunos e escrevendo na tela o nome do escolhido.'''
print('-' * 15, '>Ex 19<', '-' * 15)
from random import choice
# Usando Random para sortiar o escolhido.
# Recebendo dados.
aluno... | 33.391304 | 100 | 0.716146 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 527 | 0.685306 |
c2ad28eb7943b8ab5d743641a4bd509bff412fa2 | 4,807 | py | Python | evalml/preprocessing/data_splitters/balanced_classification_splitter.py | skvorekn/evalml | 2cbfa344ec3fdc0fb0f4a0f1093811135b9b97d8 | [
"BSD-3-Clause"
] | null | null | null | evalml/preprocessing/data_splitters/balanced_classification_splitter.py | skvorekn/evalml | 2cbfa344ec3fdc0fb0f4a0f1093811135b9b97d8 | [
"BSD-3-Clause"
] | null | null | null | evalml/preprocessing/data_splitters/balanced_classification_splitter.py | skvorekn/evalml | 2cbfa344ec3fdc0fb0f4a0f1093811135b9b97d8 | [
"BSD-3-Clause"
] | null | null | null | from sklearn.model_selection import StratifiedKFold
from evalml.preprocessing.data_splitters.balanced_classification_sampler import (
BalancedClassificationSampler
)
from evalml.preprocessing.data_splitters.base_splitters import (
BaseUnderSamplingSplitter
)
from evalml.preprocessing.data_splitters.training_va... | 60.848101 | 191 | 0.725817 | 4,427 | 0.920949 | 0 | 0 | 0 | 0 | 0 | 0 | 2,946 | 0.612856 |
c2afa0144857d385ec53c489e4695b2ff1d1fdcf | 1,327 | py | Python | alipay/aop/api/domain/AlipayOpenAuthUserauthTokenCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayOpenAuthUserauthTokenCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayOpenAuthUserauthTokenCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayOpenAuthUserauthTokenCreateModel(object):
def __init__(self):
self._scopes = None
self._user_id = None
@property
def scopes(self):
return self._scopes
... | 23.696429 | 65 | 0.57046 | 1,210 | 0.911831 | 0 | 0 | 546 | 0.411454 | 0 | 0 | 144 | 0.108515 |
c2b13350784cb8342c6137b9b2e68b9d9cf9a32f | 46,745 | py | Python | covidatx/plot.py | Mlograda/covidatx | 336bd5874ec5c6915f621ff3960ea10f70f6319c | [
"MIT"
] | null | null | null | covidatx/plot.py | Mlograda/covidatx | 336bd5874ec5c6915f621ff3960ea10f70f6319c | [
"MIT"
] | null | null | null | covidatx/plot.py | Mlograda/covidatx | 336bd5874ec5c6915f621ff3960ea10f70f6319c | [
"MIT"
] | null | null | null | from .data import CovidData
import datetime as dt
from matplotlib.offsetbox import AnchoredText
import pandas as pd
import seaborn as sns
import geopandas as gpd
import matplotlib.pyplot as plt
plt.style.use('ggplot')
def pan_duration(date):
"""Return the duration in days of the pandemic.
As... | 40.647826 | 79 | 0.58571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 21,156 | 0.452583 |
c2b24d9435ba2ee5e8600b5092a512734c93405a | 12,969 | py | Python | bkt/library/comrelease.py | pyro-team/bkt-toolbox | bbccba142a81ca0a46056f2bcda75899979158a5 | [
"MIT"
] | 12 | 2019-05-31T02:57:26.000Z | 2022-03-26T09:40:50.000Z | bkt/library/comrelease.py | mrflory/bkt-toolbox | bbccba142a81ca0a46056f2bcda75899979158a5 | [
"MIT"
] | 27 | 2021-11-27T16:33:19.000Z | 2022-03-27T17:47:26.000Z | bkt/library/comrelease.py | pyro-team/bkt-toolbox | bbccba142a81ca0a46056f2bcda75899979158a5 | [
"MIT"
] | 3 | 2019-06-12T10:59:20.000Z | 2020-04-21T15:13:50.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import logging
from contextlib import contextmanager
from System.Runtime.InteropServices import Marshal
@contextmanager
def autorelease(comobj):
"""COM auto release contextmanager"""
try:
yield comobj
finally:
Marshal.ReleaseComObject(c... | 36.532394 | 166 | 0.63806 | 12,192 | 0.940088 | 656 | 0.050582 | 152 | 0.01172 | 0 | 0 | 6,564 | 0.50613 |
c2b28cc65d1bcc4d30f8c76abcb566d6199f508e | 389 | py | Python | db/drop_db.py | muellerzr/capstone-2021 | a7f0c4de902735aece018d7c2ffedccc1995d51a | [
"Apache-2.0"
] | null | null | null | db/drop_db.py | muellerzr/capstone-2021 | a7f0c4de902735aece018d7c2ffedccc1995d51a | [
"Apache-2.0"
] | 1 | 2021-11-30T00:03:22.000Z | 2021-11-30T00:03:22.000Z | db/drop_db.py | muellerzr/capstone-2021 | a7f0c4de902735aece018d7c2ffedccc1995d51a | [
"Apache-2.0"
] | null | null | null | from pymongo import MongoClient
client = MongoClient('mongodb+srv://<username>:<password>@cluster0.27gwi.mongodb.net/Cluster0?retryWrites=true&w=majority')
username = ""
password = ""
url = f'mongodb+srv://{username}:{password}@cluster0.27gwi.mongodb.net/Cluster0?retryWrites=true&w=majority'
client = MongoClient(url)
... | 35.363636 | 123 | 0.768638 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 229 | 0.588689 |
c2b463e3b92836e2fb5a6f0fa7a7587ea2477928 | 750 | py | Python | advanced/image_processing/examples/plot_blur.py | rossbar/scipy-lecture-notes | 7f74e6925721c43bd81bf0bee34b4805ac4a3b57 | [
"CC-BY-4.0"
] | 2,538 | 2015-01-01T04:58:41.000Z | 2022-03-31T21:06:05.000Z | advanced/image_processing/examples/plot_blur.py | rossbar/scipy-lecture-notes | 7f74e6925721c43bd81bf0bee34b4805ac4a3b57 | [
"CC-BY-4.0"
] | 362 | 2015-01-18T14:16:23.000Z | 2021-11-18T16:24:34.000Z | advanced/image_processing/examples/plot_blur.py | rossbar/scipy-lecture-notes | 7f74e6925721c43bd81bf0bee34b4805ac4a3b57 | [
"CC-BY-4.0"
] | 1,127 | 2015-01-05T14:39:29.000Z | 2022-03-25T08:38:39.000Z | """
Blurring of images
===================
An example showing various processes that blur an image.
"""
import scipy.misc
from scipy import ndimage
import matplotlib.pyplot as plt
face = scipy.misc.face(gray=True)
blurred_face = ndimage.gaussian_filter(face, sigma=3)
very_blurred = ndimage.gaussian_filter(face, sigm... | 23.4375 | 63 | 0.716 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 0.158667 |
c2b55d621ee927360546ea50eef9438d938401b2 | 2,845 | py | Python | wmcore_base/ContainerScripts/AggregatePylint.py | ddaina/Docker | 29e330fcbe774cdd0c05b597792c7c5f0e430e67 | [
"Apache-2.0"
] | null | null | null | wmcore_base/ContainerScripts/AggregatePylint.py | ddaina/Docker | 29e330fcbe774cdd0c05b597792c7c5f0e430e67 | [
"Apache-2.0"
] | 18 | 2016-12-02T19:56:53.000Z | 2022-02-04T13:21:24.000Z | wmcore_base/ContainerScripts/AggregatePylint.py | ddaina/Docker | 29e330fcbe774cdd0c05b597792c7c5f0e430e67 | [
"Apache-2.0"
] | 7 | 2016-06-03T18:32:26.000Z | 2021-11-05T21:04:19.000Z | #! /usr/bin/env python
import json
from optparse import OptionParser
usage = "usage: %prog [options] message"
parser = OptionParser(usage)
(options, args) = parser.parse_args()
if len(args) != 1:
parser.error("You must supply a label")
label = args[0]
try:
with open('pylintReport.json', 'r') as reportFile:... | 29.635417 | 103 | 0.53638 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 377 | 0.132513 |
c2b5fc27d0f81bb0fc04c52397a1a93060a0b15c | 71 | py | Python | tests/__init__.py | lesleslie/jinja-inflection | a20c248a897aa95b38e860ecaee1517c3a5958fc | [
"BSD-3-Clause"
] | 1 | 2019-09-14T06:50:38.000Z | 2019-09-14T06:50:38.000Z | tests/__init__.py | lesleslie/jinja-inflection | a20c248a897aa95b38e860ecaee1517c3a5958fc | [
"BSD-3-Clause"
] | null | null | null | tests/__init__.py | lesleslie/jinja-inflection | a20c248a897aa95b38e860ecaee1517c3a5958fc | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Unit test package for jinja_inflection."""
| 17.75 | 45 | 0.619718 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 0.957746 |
c2b8cf5ed62085b93846cc634a5c0abe566a9d50 | 4,376 | py | Python | smartsnippets_inherit/cms_plugins.py | pbs/django-cms-smartsnippets | 61727dbdf44678ebd7df3fbeca8e7e190e364cc8 | [
"BSD-3-Clause"
] | 5 | 2015-08-06T14:47:00.000Z | 2021-02-17T19:18:27.000Z | smartsnippets_inherit/cms_plugins.py | pbs/django-cms-smartsnippets | 61727dbdf44678ebd7df3fbeca8e7e190e364cc8 | [
"BSD-3-Clause"
] | 11 | 2015-03-10T23:16:40.000Z | 2018-07-01T22:44:55.000Z | smartsnippets_inherit/cms_plugins.py | pbs/django-cms-smartsnippets | 61727dbdf44678ebd7df3fbeca8e7e190e364cc8 | [
"BSD-3-Clause"
] | 5 | 2015-06-04T17:35:34.000Z | 2018-02-08T15:43:59.000Z | from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from cms.plugins.utils import downcast_plugins
from cms.models.placeholdermodel import Placeholder
from cms.models.pluginmodel import CMSPlugin
from smartsnippets_inherit.models import InheritPageContent
from smartsnippets_inherit.forms i... | 37.084746 | 87 | 0.662934 | 3,483 | 0.795932 | 230 | 0.052559 | 246 | 0.056216 | 0 | 0 | 484 | 0.110603 |
c2b9340069bcb7200131d508a532aae97e280c02 | 1,389 | py | Python | drf_orjson_renderer/parsers.py | cblakkan/drf_orjson_renderer | 15fcfb65918d16cca087095216847594929f61c4 | [
"MIT"
] | 28 | 2020-01-22T05:57:49.000Z | 2022-03-17T09:07:44.000Z | drf_orjson_renderer/parsers.py | cblakkan/drf_orjson_renderer | 15fcfb65918d16cca087095216847594929f61c4 | [
"MIT"
] | 14 | 2020-02-18T16:17:34.000Z | 2022-03-23T01:07:35.000Z | drf_orjson_renderer/parsers.py | cblakkan/drf_orjson_renderer | 15fcfb65918d16cca087095216847594929f61c4 | [
"MIT"
] | 17 | 2020-02-17T22:31:28.000Z | 2022-03-10T04:48:10.000Z | from django.conf import settings
from rest_framework.exceptions import ParseError
from rest_framework.parsers import BaseParser
import orjson
__all__ = ["ORJSONParser"]
class ORJSONParser(BaseParser):
"""
Parses JSON-serialized data by orjson parser.
"""
media_type = "application/json"
def pa... | 33.878049 | 81 | 0.662347 | 1,214 | 0.87401 | 0 | 0 | 0 | 0 | 0 | 0 | 805 | 0.579554 |
c2b97e17283bf6ef0af93d080c8e954cf0f1c1c7 | 1,942 | py | Python | testproject/test/test_templatetag.py | tdivis/django-sane-testing | 99dc7200593a7a59ffa33edb906d52acc7d8f577 | [
"BSD-3-Clause"
] | 4 | 2015-11-08T11:33:19.000Z | 2018-01-29T22:34:24.000Z | testproject/test/test_templatetag.py | tdivis/django-sane-testing | 99dc7200593a7a59ffa33edb906d52acc7d8f577 | [
"BSD-3-Clause"
] | 1 | 2021-03-19T11:04:29.000Z | 2021-03-19T11:38:52.000Z | testproject/test/test_templatetag.py | Almad/django-sane-testing | 99dc7200593a7a59ffa33edb906d52acc7d8f577 | [
"BSD-3-Clause"
] | null | null | null | from djangosanetesting.cases import TemplateTagTestCase
class TestTagLib(TemplateTagTestCase):
preload = ('dsttesttags',)
def test_tag_error(self):
self.assert_raises(self.TemplateSyntaxError, self.render_template,
'{% table %}')
def test_tag_output(self):
self.... | 36.641509 | 81 | 0.634398 | 1,878 | 0.967044 | 0 | 0 | 0 | 0 | 0 | 0 | 354 | 0.182286 |
c2baf8408ea1139bafc4f15533339ffc776824ab | 680 | wsgi | Python | DistFiles/mercurial/Contrib/hgweb.wsgi | bobeaton/OneStoryEditor | dcb644c79a4d69b9558df72892636bb1cba97796 | [
"MIT"
] | 1 | 2021-06-08T11:53:32.000Z | 2021-06-08T11:53:32.000Z | DistFiles/mercurial/Contrib/hgweb.wsgi | bobeaton/OneStoryEditor | dcb644c79a4d69b9558df72892636bb1cba97796 | [
"MIT"
] | 4 | 2021-06-12T16:50:59.000Z | 2021-11-19T23:52:24.000Z | ChorusDeps/mercurial/Contrib/hgweb.wsgi | bobeaton/OneStoryEditor | dcb644c79a4d69b9558df72892636bb1cba97796 | [
"MIT"
] | 2 | 2020-05-03T07:23:12.000Z | 2021-07-14T15:58:17.000Z | # An example WSGI for use with mod_wsgi, edit as necessary
# See http://mercurial.selenic.com/wiki/modwsgi for more information
# Path to repo or hgweb config to serve (see 'hg help hgweb')
config = "/path/to/repo/or/config"
# Uncomment and adjust if Mercurial is not installed system-wide
# (consult "installed module... | 35.789474 | 72 | 0.769118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 536 | 0.788235 |
c2bbc6212ba14cce222e1171cae69fdb2905ea98 | 727 | py | Python | uploadHelpers.py | BNUZ-China/iGem-Wiki | 18216737bbd1d5316e5302ff7202a9fa139ad033 | [
"MIT"
] | 1 | 2021-08-28T15:06:10.000Z | 2021-08-28T15:06:10.000Z | uploadHelpers.py | BNUZ-China/iGem-Wiki | 18216737bbd1d5316e5302ff7202a9fa139ad033 | [
"MIT"
] | null | null | null | uploadHelpers.py | BNUZ-China/iGem-Wiki | 18216737bbd1d5316e5302ff7202a9fa139ad033 | [
"MIT"
] | null | null | null | import os
from subprocess import run
import pyperclip
import webbrowser
from urllib import parse
location = 'production'
def runOnSingleFolder(folder):
file_list = os.listdir(os.path.join(location, folder))
for file in file_list:
file_noextend = file[:-(len(folder) + 1)]
url = f'https://2021.... | 29.08 | 129 | 0.672627 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 222 | 0.285714 |
c2bc8e02528d8ad4917cf1b72be4033e672be9ac | 31 | py | Python | model/mscff/__init__.py | LK-Peng/CNN-based-Cloud-Detection-Methods | 1393a6886e62f1ed5a612d57c5a725c763a6b2cc | [
"MIT"
] | 2 | 2022-02-16T03:30:19.000Z | 2022-03-18T08:02:39.000Z | model/mscff/__init__.py | LK-Peng/CNN-based-Cloud-Detection-Methods | 1393a6886e62f1ed5a612d57c5a725c763a6b2cc | [
"MIT"
] | null | null | null | model/mscff/__init__.py | LK-Peng/CNN-based-Cloud-Detection-Methods | 1393a6886e62f1ed5a612d57c5a725c763a6b2cc | [
"MIT"
] | 1 | 2022-02-16T03:30:20.000Z | 2022-02-16T03:30:20.000Z | from .mscff_model import MSCFF
| 15.5 | 30 | 0.83871 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c2bd7d19cb0b1997605bb2bf0b20e39d01a29860 | 96 | py | Python | netensorflow/ann/macro_layer/layer_structure/__init__.py | psigelo/NeTensorflow | ec8bc09cc98346484d1b682a3dfd25c68c4ded61 | [
"MIT"
] | null | null | null | netensorflow/ann/macro_layer/layer_structure/__init__.py | psigelo/NeTensorflow | ec8bc09cc98346484d1b682a3dfd25c68c4ded61 | [
"MIT"
] | null | null | null | netensorflow/ann/macro_layer/layer_structure/__init__.py | psigelo/NeTensorflow | ec8bc09cc98346484d1b682a3dfd25c68c4ded61 | [
"MIT"
] | null | null | null | from .InputLayerStructure import InputLayerStructure
from .LayerStructure import LayerStructure
| 32 | 52 | 0.895833 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c2bd92ea5b65d1f42b8e2aa98a412fc4debb102e | 1,180 | py | Python | Snake.py | ZippyCodeYT/Zippy_Codes | 91101085194ba2f30c74a82639b4730d52bb76dc | [
"CC-BY-4.0"
] | 64 | 2021-07-11T17:56:42.000Z | 2022-03-28T14:17:53.000Z | Snake.py | ZippyCodeYT/Zippy_Codes | 91101085194ba2f30c74a82639b4730d52bb76dc | [
"CC-BY-4.0"
] | 9 | 2021-07-10T23:26:39.000Z | 2022-03-04T17:39:57.000Z | Snake.py | ZippyCodeYT/Ursina_Codes | 91101085194ba2f30c74a82639b4730d52bb76dc | [
"CC-BY-4.0"
] | 57 | 2021-07-14T17:09:46.000Z | 2022-03-31T08:55:51.000Z |
from ursina import *
app = Ursina()
snake = Entity(model='cube', texture = 'assets\snake', scale=0.4, z=-1, collider='box')
ground = Entity(model='cube', texture='grass',rotation=(90,0,0),scale=(5,1,5), z=1)
apple = Entity(model='cube', texture='assets\\apple', scale=0.4, position=(1,-1,-1), collider='mesh')
body = [... | 16.857143 | 101 | 0.572881 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.099153 |
c2bdcfb6eaabd65b263df02b6c6aceda6e9c5099 | 3,153 | py | Python | test/cp_request/test_entity.py | aquariumbio/experiment-request | 026e3eb767c47f980a35004e9ded5e4e33553693 | [
"MIT"
] | null | null | null | test/cp_request/test_entity.py | aquariumbio/experiment-request | 026e3eb767c47f980a35004e9ded5e4e33553693 | [
"MIT"
] | null | null | null | test/cp_request/test_entity.py | aquariumbio/experiment-request | 026e3eb767c47f980a35004e9ded5e4e33553693 | [
"MIT"
] | null | null | null | import json
from cp_request import Attribute, NamedEntity, Unit, Value
from cp_request.named_entity import NamedEntityEncoder, NamedEntityDecoder
class TestNamedEntity:
def test_entity(self):
e1 = NamedEntity(name="one", reference="http://one.one")
e2 = NamedEntity(name="one", reference="http://... | 35.829545 | 214 | 0.567396 | 3,003 | 0.952426 | 0 | 0 | 0 | 0 | 0 | 0 | 871 | 0.276245 |
c2bf3d5dd42932c24559dabc8a1b555f111001f2 | 4,282 | py | Python | model/loss_and_metric/loss_util.py | goodgodgd/vode-2020 | 98e34120d642780576ac51d57c2f0597e7e1e524 | [
"BSD-2-Clause"
] | 4 | 2020-08-15T02:14:03.000Z | 2021-01-30T08:18:18.000Z | model/loss_and_metric/loss_util.py | goodgodgd/vode-2020 | 98e34120d642780576ac51d57c2f0597e7e1e524 | [
"BSD-2-Clause"
] | 23 | 2020-01-24T07:25:40.000Z | 2021-06-02T00:50:32.000Z | model/loss_and_metric/loss_util.py | goodgodgd/vode-2020 | 98e34120d642780576ac51d57c2f0597e7e1e524 | [
"BSD-2-Clause"
] | 1 | 2020-07-02T12:26:45.000Z | 2020-07-02T12:26:45.000Z | import tensorflow as tf
from utils.decorators import shape_check
@shape_check
def photometric_loss_l1(synt_target, orig_target, reduce=True):
"""
:param synt_target: scaled synthesized target image [batch, numsrc, height/scale, width/scale, 3]
:param orig_target: scaled original target image [batch, heigh... | 44.14433 | 101 | 0.685427 | 0 | 0 | 0 | 0 | 4,208 | 0.982718 | 0 | 0 | 1,974 | 0.461 |
c2bf82786883e88ae221354f9ad562aa51a42fc8 | 23,127 | py | Python | my_version/craw_page_parse_2.py | xuerenlv/PaperWork | f096b57a80e8d771f080a02b925a22edbbee722a | [
"Apache-2.0"
] | 1 | 2015-10-15T12:26:07.000Z | 2015-10-15T12:26:07.000Z | my_version/craw_page_parse_2.py | xuerenlv/PaperWork | f096b57a80e8d771f080a02b925a22edbbee722a | [
"Apache-2.0"
] | null | null | null | my_version/craw_page_parse_2.py | xuerenlv/PaperWork | f096b57a80e8d771f080a02b925a22edbbee722a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Created on 2015-08-21
@author: xhj
'''
import requests
import StringIO
import gzip
import threading
from loginer import Loginer
import time
from my_log import WeiboSearchLog
import os
import traceback
from bs4 import BeautifulSoup
import re
from Queue import Queue
import datetime
from st... | 37.727569 | 293 | 0.589657 | 14,463 | 0.613593 | 0 | 0 | 0 | 0 | 0 | 0 | 4,616 | 0.195834 |
c2c2bc98c89407c449beca19dbbedcbb96369738 | 246 | py | Python | sureflap/resources/request_models.py | fabieu/sureflap-api | 711bb32a7add64367fa3e15b25d52468f8aa7904 | [
"Apache-2.0"
] | 1 | 2020-12-03T16:43:55.000Z | 2020-12-03T16:43:55.000Z | sureflap/resources/request_models.py | fabieu/sureflap-api | 711bb32a7add64367fa3e15b25d52468f8aa7904 | [
"Apache-2.0"
] | 3 | 2021-07-14T21:41:53.000Z | 2022-01-29T16:56:21.000Z | sureflap/resources/request_models.py | fabieu/sureflap-api | 711bb32a7add64367fa3e15b25d52468f8aa7904 | [
"Apache-2.0"
] | 2 | 2021-02-13T12:11:22.000Z | 2021-02-14T09:58:40.000Z | from datetime import datetime, time
from enum import Enum
from typing import Optional, Sequence, Union
from pydantic import BaseModel
class Direction(Enum):
enum_1 = 1
enum_2 = 2
class PetLocationSet(BaseModel):
where: Direction
| 16.4 | 44 | 0.756098 | 105 | 0.426829 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c2c2f2be9b86caf1ba37fe85783e830ab1aa9049 | 1,303 | py | Python | trecrts-clients/python/dumb-retweet-client/retweet_service.py | rosequ/RTS18 | 9a9b63c5d454e03dc996d56cb9e4b3e35e413f4d | [
"Apache-2.0"
] | 7 | 2016-03-02T15:39:09.000Z | 2016-04-04T10:31:40.000Z | trecrts-clients/python/dumb-retweet-client/retweet_service.py | rosequ/RTS18 | 9a9b63c5d454e03dc996d56cb9e4b3e35e413f4d | [
"Apache-2.0"
] | 14 | 2015-10-22T18:51:17.000Z | 2015-11-15T06:36:33.000Z | trecrts-clients/python/dumb-retweet-client/retweet_service.py | aroegies/trecrts-tools | 1afe7a4226e59ad963419d5f96401a191bbc0112 | [
"Apache-2.0"
] | null | null | null | ##########################
####
# WARNING: THIS FILE IS DEPRECATED AND IS ONLY RETAINED FOR INFORMATIONAL PURPOSES
# ../dumb_topic_client is the up-to-date sample program
###
#########################
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
import requests
... | 31.780488 | 82 | 0.711435 | 610 | 0.46815 | 0 | 0 | 0 | 0 | 0 | 0 | 462 | 0.354566 |
c2c31ca71ec1d801042e3c41eac4e04e937da0de | 11,186 | py | Python | instance_selection/_DROP3.py | dpr1005/Semisupervised-learning-and-instance-selection-methods | 646d9e729c85322e859928e71a3241f2aec6d93d | [
"MIT"
] | 3 | 2021-12-10T09:04:18.000Z | 2022-01-22T15:03:19.000Z | instance_selection/_DROP3.py | dpr1005/Semisupervised-learning-and-instance-selection-methods | 646d9e729c85322e859928e71a3241f2aec6d93d | [
"MIT"
] | 107 | 2021-12-02T07:43:11.000Z | 2022-03-31T11:02:46.000Z | instance_selection/_DROP3.py | dpr1005/Semisupervised-learning-and-instance-selection-methods | 646d9e729c85322e859928e71a3241f2aec6d93d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Filename: DROP3.py
# @Author: Daniel Puente Ramírez
# @Time: 31/12/21 16:00
# @Version: 5.0
import copy
from sys import maxsize
import numpy as np
import pandas as pd
from sklearn.neighbors import NearestNeighbors
from .utils import transform
class... | 39.111888 | 85 | 0.614339 | 10,870 | 0.971664 | 0 | 0 | 5,779 | 0.516582 | 0 | 0 | 4,724 | 0.422276 |
c2c32defe3ff1b1dc5ec25d1e122b83a9bcc81b7 | 485 | py | Python | orchestra/contrib/issues/apps.py | RubenPX/django-orchestra | 5ab4779e1ae12ec99569d682601b7810587ed381 | [
"Unlicense"
] | 68 | 2015-02-09T10:28:44.000Z | 2022-03-12T11:08:36.000Z | orchestra/contrib/issues/apps.py | RubenPX/django-orchestra | 5ab4779e1ae12ec99569d682601b7810587ed381 | [
"Unlicense"
] | 17 | 2015-05-01T18:10:03.000Z | 2021-03-19T21:52:55.000Z | orchestra/contrib/issues/apps.py | RubenPX/django-orchestra | 5ab4779e1ae12ec99569d682601b7810587ed381 | [
"Unlicense"
] | 29 | 2015-03-31T04:51:03.000Z | 2022-02-17T02:58:50.000Z | from django.apps import AppConfig
from orchestra.core import accounts, administration
from orchestra.core.translations import ModelTranslation
class IssuesConfig(AppConfig):
name = 'orchestra.contrib.issues'
verbose_name = "Issues"
def ready(self):
from .models import Queue, Ticket
a... | 30.3125 | 59 | 0.734021 | 338 | 0.696907 | 0 | 0 | 0 | 0 | 0 | 0 | 65 | 0.134021 |
c2c383eca130058829926eb64535622bb27a0128 | 178 | py | Python | python-data-analysis/matplotlib/ImshowDemo.py | meteor1993/python-learning | 4ee574c9360caf6e63bb6ee2ef31fa6a9918fa40 | [
"MIT"
] | 83 | 2019-10-15T06:54:06.000Z | 2022-03-28T14:08:21.000Z | python-data-analysis/matplotlib/ImshowDemo.py | wenxuefeng3930/python-learning | 4ee574c9360caf6e63bb6ee2ef31fa6a9918fa40 | [
"MIT"
] | 1 | 2020-04-16T08:13:19.000Z | 2020-07-14T01:52:46.000Z | python-data-analysis/matplotlib/ImshowDemo.py | wenxuefeng3930/python-learning | 4ee574c9360caf6e63bb6ee2ef31fa6a9918fa40 | [
"MIT"
] | 74 | 2019-11-02T08:10:36.000Z | 2022-02-19T12:23:36.000Z | import numpy as np
import matplotlib.pyplot as plt
x = np.random.rand(10, 10)
plt.imshow(x, cmap=plt.cm.hot)
# 显示右边颜色条
plt.colorbar()
plt.savefig('imshow_demo.png')
| 16.181818 | 32 | 0.691011 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.213542 |
c2c712a00d07acb813d9c64e92dbe982f58abfc3 | 942 | py | Python | tests/core/exceptions/test_exceptions_auto.py | ccrvs/attack_surface_pypy | f2bc9998cf42f4764f1c495e6243d970e01bd176 | [
"CC0-1.0"
] | null | null | null | tests/core/exceptions/test_exceptions_auto.py | ccrvs/attack_surface_pypy | f2bc9998cf42f4764f1c495e6243d970e01bd176 | [
"CC0-1.0"
] | null | null | null | tests/core/exceptions/test_exceptions_auto.py | ccrvs/attack_surface_pypy | f2bc9998cf42f4764f1c495e6243d970e01bd176 | [
"CC0-1.0"
] | null | null | null | # This test code was written by the `hypothesis.extra.ghostwriter` module
# and is provided under the Creative Commons Zero public domain dedication.
from pathlib import Path
from hypothesis import given, strategies as st
import attack_surface_pypy.core.exceptions
@given(message=st.text())
def test_fuzz_InvalidFile... | 33.642857 | 87 | 0.814225 | 0 | 0 | 0 | 0 | 663 | 0.703822 | 0 | 0 | 164 | 0.174098 |
c2c78be72ea72b242adb4ca29ed829fd6b4d5b20 | 1,445 | py | Python | set4/challenge27.py | solfer/cryptopals_python | 6b22981a663b3dd2ef5fb5c30b1a6dc13eb0af1a | [
"MIT"
] | null | null | null | set4/challenge27.py | solfer/cryptopals_python | 6b22981a663b3dd2ef5fb5c30b1a6dc13eb0af1a | [
"MIT"
] | null | null | null | set4/challenge27.py | solfer/cryptopals_python | 6b22981a663b3dd2ef5fb5c30b1a6dc13eb0af1a | [
"MIT"
] | null | null | null | #! /usr/bin/python3
from Crypto.Cipher import AES
from random import randint
# https://www.cryptopals.com/sets/4/challenges/27
# Recover the key from CBC with IV=Key
import sys
sys.path.append('..')
from cryptopals import ctr,xor,random_aes_key,cbc_decrypt,cbc_encrypt
def random_aes_key(blocksize=16):
return... | 21.567164 | 69 | 0.632526 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 222 | 0.153633 |
c2c80dfda0a5984d9ce2a209c4604c7a22beaa47 | 577 | wsgi | Python | testproject/testproject.wsgi | c4mb0t/django-setman | 6551e3f6367bf8ee7c8f91e893c9e8439428f28a | [
"BSD-3-Clause"
] | 1 | 2015-05-30T15:05:14.000Z | 2015-05-30T15:05:14.000Z | testproject/testproject.wsgi | c4mb0t/django-setman | 6551e3f6367bf8ee7c8f91e893c9e8439428f28a | [
"BSD-3-Clause"
] | null | null | null | testproject/testproject.wsgi | c4mb0t/django-setman | 6551e3f6367bf8ee7c8f91e893c9e8439428f28a | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
DIRNAME = os.path.abspath(os.path.dirname(__file__))
rel = lambda *x: os.path.abspath(os.path.join(DIRNAME, *x))
PROJECT_DIR = rel('..')
activate_this = rel('env', 'bin', 'activate_this.py')
# Activate virtualenv
execfile(activate_this, {'__file__': activate_this})
os.environ['DJANGO_SETTINGS_... | 26.227273 | 72 | 0.753899 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 206 | 0.357019 |
c2caaf55603ef2c7129fc78578663a36d8c83697 | 8,057 | py | Python | ntp/modules/generate.py | Michiel29/ntp-release | 567bf1ca823eeef5eeb2d63bbe16023ea63af766 | [
"Apache-2.0"
] | 3 | 2019-07-03T11:25:12.000Z | 2019-11-28T20:24:03.000Z | ntp/modules/generate.py | Michiel29/ntp-release | 567bf1ca823eeef5eeb2d63bbe16023ea63af766 | [
"Apache-2.0"
] | null | null | null | ntp/modules/generate.py | Michiel29/ntp-release | 567bf1ca823eeef5eeb2d63bbe16023ea63af766 | [
"Apache-2.0"
] | null | null | null | """Functions for generating random data with injected relationships"""
from itertools import product
import os
import json
import re
import random
import numpy as np
from numpy import random as rd
from scipy.special import comb
from ntp.util.util_kb import load_from_list
def gen_relationships(n_pred, n_rel, body_... | 37.129032 | 163 | 0.666749 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,308 | 0.286459 |
c2cabc8b7c10f234c2f764e400a0eb0ee368ade4 | 1,116 | py | Python | accounts/tests/test_account_views.py | borzecki/django-paymate | 960e1dcce2682e57374663d87e47c5cff0c7aae4 | [
"MIT"
] | null | null | null | accounts/tests/test_account_views.py | borzecki/django-paymate | 960e1dcce2682e57374663d87e47c5cff0c7aae4 | [
"MIT"
] | null | null | null | accounts/tests/test_account_views.py | borzecki/django-paymate | 960e1dcce2682e57374663d87e47c5cff0c7aae4 | [
"MIT"
] | null | null | null | from django.urls import reverse
from rest_framework import status
from rest_framework.test import APITestCase
from accounts.models import Account
from accounts.serializers import AccountSerializer
from .utils import create_accounts
class AccountViewsTests(APITestCase):
def test_create_account(self):
"""... | 32.823529 | 97 | 0.689964 | 879 | 0.787634 | 0 | 0 | 0 | 0 | 0 | 0 | 207 | 0.185484 |
c2cb04716bb5f1c7ce9e0998301f2ac347c3c6dd | 202 | py | Python | CTF/Pico2017/level_two/forensics/little_school_bus/solve.py | RegaledSeer/netsecnoobie | d3366937ec8c67a9742f61e47698239ae693af49 | [
"MIT"
] | null | null | null | CTF/Pico2017/level_two/forensics/little_school_bus/solve.py | RegaledSeer/netsecnoobie | d3366937ec8c67a9742f61e47698239ae693af49 | [
"MIT"
] | null | null | null | CTF/Pico2017/level_two/forensics/little_school_bus/solve.py | RegaledSeer/netsecnoobie | d3366937ec8c67a9742f61e47698239ae693af49 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
FILE_PATH = "./littleschoolbus.bmp"
with open(FILE_PATH,"rb") as f:
bytes = bytearray(f.read())
result = ""
for byte in bytes[54:]:
result += str(byte & 1)
print(result)
| 14.428571 | 35 | 0.633663 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 47 | 0.232673 |