hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7965bd0b87d6fd669ab45392353033b7589d5c6b | 7,470 | py | Python | src/virtualenv/create/creator.py | jezdez/virtualenv | 5c9b6246a4107e5e613a23c42b805d0373672400 | [
"MIT"
] | 1 | 2022-02-21T02:01:37.000Z | 2022-02-21T02:01:37.000Z | src/virtualenv/create/creator.py | jezdez/virtualenv | 5c9b6246a4107e5e613a23c42b805d0373672400 | [
"MIT"
] | null | null | null | src/virtualenv/create/creator.py | jezdez/virtualenv | 5c9b6246a4107e5e613a23c42b805d0373672400 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, print_function, unicode_literals
import json
import logging
import os
import shutil
import sys
from abc import ABCMeta, abstractmethod
from argparse import ArgumentTypeError
from ast import literal_eval
from collections import OrderedDict
from stat import S_IWUSR
import six
fro... | 35.913462 | 113 | 0.610442 |
7965bda46b6d967d2271b451e6a2026c0a3fbb0d | 1,513 | py | Python | aws-pentesting-with-python/ec2/ec2_templates/start_ec2.py | qodirovshohijahon/python-scripting | 08f8492e137df37e7f9b41e9ee546f5783501c1a | [
"CNRI-Python"
] | null | null | null | aws-pentesting-with-python/ec2/ec2_templates/start_ec2.py | qodirovshohijahon/python-scripting | 08f8492e137df37e7f9b41e9ee546f5783501c1a | [
"CNRI-Python"
] | null | null | null | aws-pentesting-with-python/ec2/ec2_templates/start_ec2.py | qodirovshohijahon/python-scripting | 08f8492e137df37e7f9b41e9ee546f5783501c1a | [
"CNRI-Python"
] | null | null | null | import boto3
import json
import os
from json_datetime_serializer import json_datetime_serializer
import logging
from moto import mock_ec2
import botocore
logger = logging.getLogger()
logging.basicConfig(level=logging.INFO,
format='%(asctime)s: %(levelname)s: %(message)s')
# Starting the instance ... | 31.520833 | 110 | 0.674818 |
7965bf42288baeb755d713a5952d3cc67e1f17a3 | 7,495 | py | Python | arcade/examples/pymunk_box_stacks.py | royshea/arcade | d813f6ed7ea07e2671c60a2dc772ac72b14c708d | [
"MIT"
] | null | null | null | arcade/examples/pymunk_box_stacks.py | royshea/arcade | d813f6ed7ea07e2671c60a2dc772ac72b14c708d | [
"MIT"
] | null | null | null | arcade/examples/pymunk_box_stacks.py | royshea/arcade | d813f6ed7ea07e2671c60a2dc772ac72b14c708d | [
"MIT"
] | null | null | null | """
Use Pymunk physics engine.
For more info on Pymunk see:
http://www.pymunk.org/en/latest/
To install pymunk:
pip install pymunk
Artwork from http://kenney.nl
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.pymunk_box_stacks
Click and drag with th... | 34.699074 | 112 | 0.62495 |
7965bf472cbe08c50d441b4c9a8aa918af50eb3f | 8,775 | py | Python | tests/components/mobile_app/test_binary_sensor.py | basicpail/core | 5cc54618c5af3f75c08314bf2375cc7ac40d2b7e | [
"Apache-2.0"
] | 11 | 2018-02-16T15:35:47.000Z | 2020-01-14T15:20:00.000Z | tests/components/mobile_app/test_binary_sensor.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 87 | 2020-07-06T22:22:54.000Z | 2022-03-31T06:01:46.000Z | tests/components/mobile_app/test_binary_sensor.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 11 | 2020-12-16T13:48:14.000Z | 2022-02-01T00:28:05.000Z | """Entity tests for mobile_app."""
from homeassistant.const import STATE_OFF
from homeassistant.helpers import device_registry as dr
async def test_sensor(hass, create_registrations, webhook_client):
"""Test that sensors can be registered and updated."""
webhook_id = create_registrations[1]["webhook_id"]
... | 32.261029 | 86 | 0.613333 |
7965bf4b8c713cbe24f59be5e969fdd2c323bad8 | 2,309 | py | Python | bin/test_optional_dependencies.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 8,323 | 2015-01-02T15:51:43.000Z | 2022-03-31T13:13:19.000Z | bin/test_optional_dependencies.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 15,102 | 2015-01-01T01:33:17.000Z | 2022-03-31T22:53:13.000Z | bin/test_optional_dependencies.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 4,490 | 2015-01-01T17:48:07.000Z | 2022-03-31T17:24:05.000Z | #!/usr/bin/env python
"""
Run tests for specific packages that use optional dependencies.
The optional dependencies need to be installed before running this.
"""
# Add the local sympy to sys.path (needed for CI)
from get_sympy import path_hack
path_hack()
class TestsFailedError(Exception):
pass
print('Testing... | 17.761538 | 100 | 0.643136 |
7965bfbc46e270913b44df2432a72e683b8401b2 | 421 | py | Python | setup.py | jink-lang/jink | 68a35c079a798e22d835af54bd228628e6a299b4 | [
"MIT"
] | 12 | 2018-04-10T14:26:01.000Z | 2021-10-13T20:07:31.000Z | setup.py | jink-lang/jink | 68a35c079a798e22d835af54bd228628e6a299b4 | [
"MIT"
] | 9 | 2018-04-10T04:28:32.000Z | 2019-01-09T06:18:53.000Z | setup.py | jink-lang/jink | 68a35c079a798e22d835af54bd228628e6a299b4 | [
"MIT"
] | 9 | 2018-04-24T09:27:05.000Z | 2019-10-25T01:20:04.000Z | import sys
from cx_Freeze import setup, Executable
import os
build_exe_options = { "include_msvcr": True }
cwd = os.getcwd()
base=None
if sys.platform == "win32":
base = "Console"
setup(
name="jink",
version="0.0.2",
description="A strongly typed, JavaScript-like programming language.",
options={ "build_ex... | 23.388889 | 73 | 0.705463 |
7965c0797863b53e91dcd9faab16615dd74edd57 | 3,179 | py | Python | AlgorithmsDS/ex3.2.2dict_linkedlist.py | w1ld/StepikExercies | 3efe07819a0456aa3846587b2a23bad9dd9710db | [
"MIT"
] | 4 | 2019-05-11T17:26:24.000Z | 2022-01-30T17:48:25.000Z | AlgorithmsDS/ex3.2.2dict_linkedlist.py | w1ld/StepikExercises | 3efe07819a0456aa3846587b2a23bad9dd9710db | [
"MIT"
] | null | null | null | AlgorithmsDS/ex3.2.2dict_linkedlist.py | w1ld/StepikExercises | 3efe07819a0456aa3846587b2a23bad9dd9710db | [
"MIT"
] | 4 | 2019-01-24T22:15:21.000Z | 2020-12-21T10:23:52.000Z | """
https://stepik.org/lesson/Задачи-41562/step/2?course=Алгоритмы-теория-и-практика-Структуры-данных&unit=20016
NEXT:
- optimize: Failed test #26. Time limit exceeded
"""
import logging as log
from logging import debug
log.basicConfig(level=log.INFO, format='%(message)s')
class Node:
def __init__(... | 22.387324 | 109 | 0.445423 |
7965c12758b4f073cd1d39f680154b9148881e41 | 186 | py | Python | yapftests/huawei/huaweistyle/resources/paragraph_2/2_6_a_comment_idents_incorrect_.py | akuleshov7/huawei-yapf | 72c188257e2bafa4da9e553ba0ee9b86831c51b8 | [
"Apache-2.0"
] | 12 | 2020-04-24T18:12:08.000Z | 2021-06-09T16:53:10.000Z | yapftests/huawei/huaweistyle/resources/paragraph_2/2_6_a_comment_idents_incorrect_.py | akuleshov7/h-yapf | 72c188257e2bafa4da9e553ba0ee9b86831c51b8 | [
"Apache-2.0"
] | 1 | 2020-09-09T19:55:35.000Z | 2020-09-14T00:07:29.000Z | yapftests/huawei/huaweistyle/resources/paragraph_2/2_6_a_comment_idents_incorrect_.py | akuleshov7/h-yapf | 72c188257e2bafa4da9e553ba0ee9b86831c51b8 | [
"Apache-2.0"
] | null | null | null | # shifted top-level comment
if some_condition:
# shifted right
# just right
# shifted left
repssn_ind = ssn_data[index].repssn_index
repssn_ni = ssn_data[index].ni
| 23.25 | 45 | 0.693548 |
7965c2e9d68cffed31bdf230602eae9e617595aa | 9,456 | py | Python | jarviscli/plugins/evaluator.py | Farlgerann/Jarvis | 828fbbf04c2b88851e3e41b59e41f2ff8e7cbcdb | [
"MIT"
] | 1 | 2019-10-03T13:39:19.000Z | 2019-10-03T13:39:19.000Z | jarviscli/plugins/evaluator.py | Farlgerann/Jarvis | 828fbbf04c2b88851e3e41b59e41f2ff8e7cbcdb | [
"MIT"
] | null | null | null | jarviscli/plugins/evaluator.py | Farlgerann/Jarvis | 828fbbf04c2b88851e3e41b59e41f2ff8e7cbcdb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import re
import sympy
from colorama import Fore
from six.moves import input
from plugin import alias, plugin
@alias('calc', 'evaluate')
@plugin('calculate')
def calculate(jarvis, s):
"""
Jarvis will get your calculations done!
-- Example:
calculate 3 + 5
"""
temp... | 26.787535 | 90 | 0.558058 |
7965c4425e22fd28f0a424c7b8ba548d6ccf2ee7 | 1,322 | py | Python | examples/FreeCAD/Ex017_Shelling_to_Create_Thin_Features.py | justbuchanan/cadquery | 7ac64a7280490d99d26f4f12a1ff590370d7e8ba | [
"Apache-2.0"
] | null | null | null | examples/FreeCAD/Ex017_Shelling_to_Create_Thin_Features.py | justbuchanan/cadquery | 7ac64a7280490d99d26f4f12a1ff590370d7e8ba | [
"Apache-2.0"
] | null | null | null | examples/FreeCAD/Ex017_Shelling_to_Create_Thin_Features.py | justbuchanan/cadquery | 7ac64a7280490d99d26f4f12a1ff590370d7e8ba | [
"Apache-2.0"
] | null | null | null | #File: Ex017_Shelling_to_Create_Thin_Features.py
#To use this example file, you need to first follow the "Using CadQuery From Inside FreeCAD"
#instructions here: https://github.com/dcowden/cadquery#installing----using-cadquery-from-inside-freecad
#You run this example by typing the following in the FreeCAD python cons... | 45.586207 | 114 | 0.792738 |
7965c474ebfcc7326e56a57a72c5769086cc3625 | 1,195 | py | Python | seven23/models/accounts/serializers.py | niwo/seven23_server | f97c26e38908a6a7900024d1ea8af3422858ed30 | [
"MIT"
] | null | null | null | seven23/models/accounts/serializers.py | niwo/seven23_server | f97c26e38908a6a7900024d1ea8af3422858ed30 | [
"MIT"
] | 1 | 2019-07-30T08:23:15.000Z | 2019-07-30T17:02:49.000Z | seven23/models/accounts/serializers.py | niwo/seven23_server | f97c26e38908a6a7900024d1ea8af3422858ed30 | [
"MIT"
] | null | null | null | """
Serializer for accounts module
"""
# Default user model may get swapped out of the system and hence.
from django.contrib.auth.models import User
from rest_framework import serializers
from seven23.models.accounts.models import Account, AccountGuests
from seven23.models.currency.models import Currency
class Acc... | 38.548387 | 111 | 0.734728 |
7965c5a3d207f617337dd154eb40e5740918e549 | 7,653 | py | Python | readthedocs/doc_builder/python_environments.py | hitsumabushi/readthedocs.org | 7daac8b0bab696eef69ee03050156bc789e57d5d | [
"MIT"
] | null | null | null | readthedocs/doc_builder/python_environments.py | hitsumabushi/readthedocs.org | 7daac8b0bab696eef69ee03050156bc789e57d5d | [
"MIT"
] | 4 | 2021-02-08T21:06:49.000Z | 2021-12-13T20:51:17.000Z | readthedocs/doc_builder/python_environments.py | hitsumabushi/readthedocs.org | 7daac8b0bab696eef69ee03050156bc789e57d5d | [
"MIT"
] | null | null | null | import logging
import os
import shutil
from django.conf import settings
from readthedocs.doc_builder.config import ConfigWrapper
from readthedocs.doc_builder.loader import get_builder_class
from readthedocs.projects.constants import LOG_TEMPLATE
log = logging.getLogger(__name__)
class PythonEnvironment(object):
... | 31.493827 | 80 | 0.52241 |
7965c625b9e22607bf1ac9d83a047a8ae366e03a | 9,067 | py | Python | jina/__init__.py | Morriaty-The-Murderer/jina | 6e3ece22d7c58819ebdf4fe792ac5ea0a29dc8f1 | [
"Apache-2.0"
] | null | null | null | jina/__init__.py | Morriaty-The-Murderer/jina | 6e3ece22d7c58819ebdf4fe792ac5ea0a29dc8f1 | [
"Apache-2.0"
] | null | null | null | jina/__init__.py | Morriaty-The-Murderer/jina | 6e3ece22d7c58819ebdf4fe792ac5ea0a29dc8f1 | [
"Apache-2.0"
] | null | null | null | __copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"
# do not change this line manually
# this is managed by git tag and updated on every release
__version__ = '0.3.3'
# do not change this line manually
# this is managed by proto/build-proto.sh and updated on every exe... | 36.268 | 122 | 0.60461 |
7965c6d8dfe9e1f7d239e7c23c40be08baf7a8f8 | 944 | py | Python | demo/demo/urls.py | erdem/django-map-widget | e533fb1d8e25276654fa8e1d50891b9fde055e80 | [
"MIT"
] | null | null | null | demo/demo/urls.py | erdem/django-map-widget | e533fb1d8e25276654fa8e1d50891b9fde055e80 | [
"MIT"
] | null | null | null | demo/demo/urls.py | erdem/django-map-widget | e533fb1d8e25276654fa8e1d50891b9fde055e80 | [
"MIT"
] | null | null | null | """example URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based... | 37.76 | 77 | 0.725636 |
7965c71c8692928f4551c26fb0bc6426033bccc9 | 7,422 | py | Python | tad/util/condition_tools.py | randywessels/tad-blockchain | 08a5f9565aa27f211350717d5e8cda14b46359e4 | [
"Apache-2.0"
] | null | null | null | tad/util/condition_tools.py | randywessels/tad-blockchain | 08a5f9565aa27f211350717d5e8cda14b46359e4 | [
"Apache-2.0"
] | null | null | null | tad/util/condition_tools.py | randywessels/tad-blockchain | 08a5f9565aa27f211350717d5e8cda14b46359e4 | [
"Apache-2.0"
] | null | null | null | from typing import Dict, List, Optional, Tuple, Set
from blspy import G1Element
from tad.types.announcement import Announcement
from tad.types.blockchain_format.coin import Coin
from tad.types.blockchain_format.program import Program, SerializedProgram
from tad.types.blockchain_format.sized_bytes import bytes32
from ... | 37.675127 | 111 | 0.701428 |
7965c727ed269e4af5ea5a23ee7056b7b8296267 | 1,334 | py | Python | lib/wifi.py | bboortz/micropython-fun | 0ab98df765a78b7f39f7fa8d1d8d3e8d04ebb3bc | [
"MIT"
] | null | null | null | lib/wifi.py | bboortz/micropython-fun | 0ab98df765a78b7f39f7fa8d1d8d3e8d04ebb3bc | [
"MIT"
] | null | null | null | lib/wifi.py | bboortz/micropython-fun | 0ab98df765a78b7f39f7fa8d1d8d3e8d04ebb3bc | [
"MIT"
] | null | null | null | import logger
import time
import network
import ubinascii
#
# global constants
#
#
# class
#
class Wifi:
def __init__(self):
self.__nic = network.WLAN(network.STA_IF)
self.__nic.active(True)
def is_connected(self):
logger.print_cmd('Test WIFI Connection')
ret = self.__nic.isconnected()
if not ret:... | 19.057143 | 69 | 0.694903 |
7965c8311072a2eb06563e69da0ef1333167acfd | 6,375 | py | Python | ktrain/vision/wrn.py | sathishksankarpandi/ktrain | bc9169661592ee14b95d9e56622dbb20e66b3568 | [
"MIT"
] | null | null | null | ktrain/vision/wrn.py | sathishksankarpandi/ktrain | bc9169661592ee14b95d9e56622dbb20e66b3568 | [
"MIT"
] | null | null | null | ktrain/vision/wrn.py | sathishksankarpandi/ktrain | bc9169661592ee14b95d9e56622dbb20e66b3568 | [
"MIT"
] | null | null | null | from ..imports import *
weight_decay = 0.0005
def initial_conv(input):
x = Convolution2D(16, (3, 3), padding='same', kernel_initializer='he_normal',
kernel_regularizer=l2(weight_decay),
use_bias=False)(input)
channel_axis = 1 if K.image_data_format() == "channels_f... | 35.220994 | 109 | 0.614275 |
7965c8834d079ca9b53dc30ab2462d5a89bf94c1 | 12,122 | py | Python | src/python/director/affordanceitems.py | debaraj-barua/director | 9766469a2976719d2cb38e194d9415dd6ebd0164 | [
"BSD-3-Clause"
] | null | null | null | src/python/director/affordanceitems.py | debaraj-barua/director | 9766469a2976719d2cb38e194d9415dd6ebd0164 | [
"BSD-3-Clause"
] | null | null | null | src/python/director/affordanceitems.py | debaraj-barua/director | 9766469a2976719d2cb38e194d9415dd6ebd0164 | [
"BSD-3-Clause"
] | 2 | 2018-07-05T10:46:04.000Z | 2021-06-18T11:37:28.000Z | import director
import director.objectmodel as om
from director import visualization as vis
from director.visualization import PolyDataItem
from director import filterUtils
from director import ioUtils
from director import meshmanager
from director import transformUtils
from director.uuidutil import newUUID
from direct... | 39.103226 | 147 | 0.678931 |
7965c9916ba602ebc76d0c9a86dcc8502cea38a7 | 1,873 | py | Python | events/views.py | codely-dev/sample-django | bdef778450a4a8e54023f2a6b2d0c811b5be47c7 | [
"MIT"
] | null | null | null | events/views.py | codely-dev/sample-django | bdef778450a4a8e54023f2a6b2d0c811b5be47c7 | [
"MIT"
] | null | null | null | events/views.py | codely-dev/sample-django | bdef778450a4a8e54023f2a6b2d0c811b5be47c7 | [
"MIT"
] | null | null | null |
from django.shortcuts import render, get_object_or_404, get_list_or_404
from django.http import HttpResponseRedirect
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from django.urls import reverse_lazy
from django.contrib.auth.decorators import login_required
from ... | 36.72549 | 109 | 0.675387 |
7965ca0b9ea1a661414070fde883ae953a04787a | 1,221 | py | Python | JogoParOuImpar.py | Wollacy/Python | afd6dadad290aee0698d4513cd9b168309df810c | [
"MIT"
] | null | null | null | JogoParOuImpar.py | Wollacy/Python | afd6dadad290aee0698d4513cd9b168309df810c | [
"MIT"
] | null | null | null | JogoParOuImpar.py | Wollacy/Python | afd6dadad290aee0698d4513cd9b168309df810c | [
"MIT"
] | null | null | null | ## Jogo de Par ou Impar com o Computador
import random
from time import sleep
pc=random.randint(0, 10)
print('='*30)
print('VAMOS JOGAR PAR OU ÍMPAR')
sair = cont = 0
while True:
pc=random.randint(0, 10)
print('='*30)
n=int(input('Digite um valor: '))
e=str(input('[P] Par ou [I] Ímpar? ')).uppe... | 26.543478 | 89 | 0.522523 |
7965caf8706fa71d46a11db21d03c7f51aef38c0 | 2,234 | py | Python | examples/myo_data_queue.py | Benolds/kachMIT-myo-2015 | 3dfbe88737d8b336e266d545d80d0a46b9231a64 | [
"MIT"
] | null | null | null | examples/myo_data_queue.py | Benolds/kachMIT-myo-2015 | 3dfbe88737d8b336e266d545d80d0a46b9231a64 | [
"MIT"
] | null | null | null | examples/myo_data_queue.py | Benolds/kachMIT-myo-2015 | 3dfbe88737d8b336e266d545d80d0a46b9231a64 | [
"MIT"
] | null | null | null | class MyoDataQueue:
def __init__(self, size=1000):
self.size = size
self.elts = DoublyLinkedList()
def push(self,elt):
if self.elts.size<self.size:
self.elts.addToBack(elt)
def get(self):
ret = None
if not self.elts.empty:
... | 24.822222 | 73 | 0.494628 |
7965cb7a8c9a532c93ea48486cb99c8d8f42012c | 1,721 | py | Python | pushno/plugins/pushover.py | keans/pushno | 4ddab55121234e0e29321e3b31ed570496274091 | [
"MIT"
] | 1 | 2021-07-16T06:30:29.000Z | 2021-07-16T06:30:29.000Z | pushno/plugins/pushover.py | keans/pushno | 4ddab55121234e0e29321e3b31ed570496274091 | [
"MIT"
] | 1 | 2021-05-03T15:04:18.000Z | 2021-05-03T16:55:51.000Z | pushno/plugins/pushover.py | keans/pushno | 4ddab55121234e0e29321e3b31ed570496274091 | [
"MIT"
] | null | null | null | import logging
from .baseplugin import AbstractClient
from pushno.messages.pushovermessages import PushOverValidationMessage
# API endpoint base URL
BASE_URL = "https://api.pushover.net/1"
# API endpoint to send messages
MESSAGE_URL = "{}/messages.json".format(BASE_URL)
# API endpoint to validate the user key
VALID... | 26.476923 | 73 | 0.65369 |
7965cbc8696e0cf39ad70fa31872264f8ed72eed | 3,742 | py | Python | arakat-cluster-configuration/arakat-core/arakat-core/examples/special_cases/SampleByExample.py | CemalUnal/arakat | 6b7e1607e35b332bc493d755f777d9a480b5aed6 | [
"Apache-2.0"
] | 1 | 2018-12-06T06:57:41.000Z | 2018-12-06T06:57:41.000Z | arakat-cluster-configuration/arakat-core/arakat-core/examples/special_cases/SampleByExample.py | CemalUnal/arakat | 6b7e1607e35b332bc493d755f777d9a480b5aed6 | [
"Apache-2.0"
] | null | null | null | arakat-cluster-configuration/arakat-core/arakat-core/examples/special_cases/SampleByExample.py | CemalUnal/arakat | 6b7e1607e35b332bc493d755f777d9a480b5aed6 | [
"Apache-2.0"
] | null | null | null | from pipeline_generator.generators import PipelineGenerator
data={
"graph": {
"nodes": {
"node1":
{
"id": "node1",
"parent": "task1",
"name": "Batch Read from CSV",
"category": 0,
... | 37.79798 | 120 | 0.386959 |
7965cc8dcb8fc6a1cd538c7294743c3d48692598 | 2,510 | py | Python | vendor/munin/cassandra.py | starsep/NewsBlur | 6c59416ca82377ca1bbc7d044890bdead3eba904 | [
"MIT"
] | 1 | 2019-07-15T09:12:35.000Z | 2019-07-15T09:12:35.000Z | vendor/munin/cassandra.py | starsep/NewsBlur | 6c59416ca82377ca1bbc7d044890bdead3eba904 | [
"MIT"
] | 7 | 2021-02-08T20:32:31.000Z | 2022-03-11T23:50:47.000Z | vendor/munin/cassandra.py | starsep/NewsBlur | 6c59416ca82377ca1bbc7d044890bdead3eba904 | [
"MIT"
] | 1 | 2020-11-21T08:43:15.000Z | 2020-11-21T08:43:15.000Z | from __future__ import division
import os
import re
import socket
import time
from subprocess import Popen, PIPE
from vendor.munin import MuninPlugin
space_re = re.compile(r"\s+")
class MuninCassandraPlugin(MuninPlugin):
category = "Cassandra"
def __init__(self, *args, **kwargs):
super(MuninCassand... | 30.609756 | 100 | 0.53506 |
7965cd1893d6368d112b5aaa037ae4e9ab684757 | 1,466 | py | Python | fabfile.py | East196/stanford-cs224n-winter-2017 | dd5384ad8df3a7f4975ca41343a80e05886acd7a | [
"Apache-2.0"
] | 2 | 2017-12-01T07:54:57.000Z | 2020-04-10T09:22:29.000Z | fabfile.py | East196/stanford-cs224n-winter-2017 | dd5384ad8df3a7f4975ca41343a80e05886acd7a | [
"Apache-2.0"
] | null | null | null | fabfile.py | East196/stanford-cs224n-winter-2017 | dd5384ad8df3a7f4975ca41343a80e05886acd7a | [
"Apache-2.0"
] | null | null | null | from fabric.api import local, lcd
def build():
# local("jupyter nbconvert docs/**/*.ipynb --to markdown")
local("copy README.md docs\index.md")
local("mkdocs build")
with lcd("..\East196.github.io"):
local("rd /s /q cs224n")
local("xcopy site ..\East196.github.io\cs224n\ /s /e")
def serv... | 33.318182 | 83 | 0.54502 |
7965cf4957e105f27ced4f844b630dde02ffb97b | 23,669 | py | Python | factory/base.py | topwebmaster/factory_boy | 0da7a55644c6c5120e5b048afc196ae1c8716188 | [
"MIT"
] | null | null | null | factory/base.py | topwebmaster/factory_boy | 0da7a55644c6c5120e5b048afc196ae1c8716188 | [
"MIT"
] | 2 | 2019-06-13T08:16:13.000Z | 2019-11-23T19:47:45.000Z | factory/base.py | topwebmaster/factory_boy | 0da7a55644c6c5120e5b048afc196ae1c8716188 | [
"MIT"
] | 1 | 2021-06-30T15:43:25.000Z | 2021-06-30T15:43:25.000Z | # Copyright: See the LICENSE file.
import collections
import logging
from . import builder, declarations, enums, errors, utils
logger = logging.getLogger('factory.generate')
# Factory metaclasses
def get_factory_bases(bases):
"""Retrieve all FactoryMetaClass-derived bases from a list."""
return [b for b ... | 32.737206 | 108 | 0.622333 |
7965cf9923c701fdaaaa0744432b4dc7040b4513 | 571 | py | Python | 21-07/Long/4.py | allenalvin333/Codechef_Competitions | 44c3626de33cd9e17d1acfc74abe0aab809efbad | [
"MIT"
] | null | null | null | 21-07/Long/4.py | allenalvin333/Codechef_Competitions | 44c3626de33cd9e17d1acfc74abe0aab809efbad | [
"MIT"
] | null | null | null | 21-07/Long/4.py | allenalvin333/Codechef_Competitions | 44c3626de33cd9e17d1acfc74abe0aab809efbad | [
"MIT"
] | null | null | null | # https://www.codechef.com/JULY21C/problems/MINNOTES
def repeat(a,b):
while(b):
a,b=b,a%b
return a
def re(a):
n1=a[0]
n2=a[1]
den=repeat(n1,n2)
for z in range(2,n):
den=repeat(den,a[z])
return den
for T in range(int(input())):
a1 = []
n, a = int(input()),list(map(int... | 22.84 | 57 | 0.502627 |
7965d02ea7253feadd58c785ac3eee9c5e90dc0e | 14,785 | py | Python | src/infi/clickhouse_orm/models.py | Romamo/infi.clickhouse_orm | 39a812b1343f8b65c9eef1a4815a358b2a9e28c0 | [
"BSD-3-Clause"
] | null | null | null | src/infi/clickhouse_orm/models.py | Romamo/infi.clickhouse_orm | 39a812b1343f8b65c9eef1a4815a358b2a9e28c0 | [
"BSD-3-Clause"
] | null | null | null | src/infi/clickhouse_orm/models.py | Romamo/infi.clickhouse_orm | 39a812b1343f8b65c9eef1a4815a358b2a9e28c0 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
import sys
from collections import OrderedDict
from logging import getLogger
from six import with_metaclass, reraise, iteritems
import pytz
from .fields import Field, StringField
from .utils import parse_tsv
from .query import QuerySet
from .engines import Merge, Distributed
l... | 36.596535 | 116 | 0.620426 |
7965d0a168a03f92c727ce9c7b63e03145e08b28 | 1,092 | py | Python | presidio-analyzer/setup.py | kant/presidio | af7d82bde7e978313a11a7281eac961697bbe164 | [
"MIT"
] | null | null | null | presidio-analyzer/setup.py | kant/presidio | af7d82bde7e978313a11a7281eac961697bbe164 | [
"MIT"
] | null | null | null | presidio-analyzer/setup.py | kant/presidio | af7d82bde7e978313a11a7281eac961697bbe164 | [
"MIT"
] | null | null | null | import setuptools
import os.path
# with open(os.path.dirname(os.path.abspath(__file__)) + '/../README.MD', "r") as fh:
# long_description = fh.read()
setuptools.setup(
name="presidio_analyzer",
version="0.1.0",
author="Presidio team",
author_email="torosent@microsoft.com",
description="Presidi... | 30.333333 | 85 | 0.629121 |
7965d1e2d470e098652443ff8a3085837daaba5f | 9,034 | py | Python | src/problem3.py | zjuday/05b-Exam1Practice | 37baad36fb21daaf96f08f258ccf3b36e4cba323 | [
"MIT"
] | null | null | null | src/problem3.py | zjuday/05b-Exam1Practice | 37baad36fb21daaf96f08f258ccf3b36e4cba323 | [
"MIT"
] | null | null | null | src/problem3.py | zjuday/05b-Exam1Practice | 37baad36fb21daaf96f08f258ccf3b36e4cba323 | [
"MIT"
] | null | null | null | """
PRACTICE Exam 1, problem 3.
Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher,
Valerie Galluzzi, Mark Hays, Amanda Stouder, Aaron Wilkin,
their colleagues, and Zachary Juday.
""" # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE.
import rosegraphics as rg
#############################... | 36.574899 | 79 | 0.500996 |
7965d21d57700c62d1e877499b56258d3d76ddbf | 4,206 | py | Python | django/utils/version.py | rogerlindberg/django | 250baafd8951b4e1f669de30eb23a3f0ad41813d | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | null | null | null | django/utils/version.py | rogerlindberg/django | 250baafd8951b4e1f669de30eb23a3f0ad41813d | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | null | null | null | django/utils/version.py | rogerlindberg/django | 250baafd8951b4e1f669de30eb23a3f0ad41813d | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | null | null | null | import datetime
import functools
import os
import subprocess
import sys
from distutils.version import LooseVersion
# Private, stable API for detecting the Python version. PYXY means "Python X.Y
# or later". So that third-party apps can use these values, each constant
# should remain as long as the oldest supported Dja... | 29.006897 | 92 | 0.673562 |
7965d3832eaea0ad52e02e8a8a7fdbcdcb445d96 | 5,726 | py | Python | app/migrations/0001_initial.py | fluix-dev/cloak | 85b09b3f0bb7777234c2dd1218240bcbe1baeb85 | [
"MIT"
] | 3 | 2020-05-31T13:53:38.000Z | 2020-06-03T14:58:23.000Z | app/migrations/0001_initial.py | fluix-dev/cloak | 85b09b3f0bb7777234c2dd1218240bcbe1baeb85 | [
"MIT"
] | 1 | 2020-06-07T18:08:49.000Z | 2020-06-07T18:08:49.000Z | app/migrations/0001_initial.py | fluix-dev/cloak | 85b09b3f0bb7777234c2dd1218240bcbe1baeb85 | [
"MIT"
] | 2 | 2020-06-01T21:23:50.000Z | 2020-06-07T01:01:38.000Z | # Generated by Django 3.0.6 on 2020-05-30 19:38
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
... | 84.205882 | 261 | 0.677087 |
7965d3a2dd323c52bc4d44e79ef09859d596b35b | 728 | py | Python | books/PythonCleanCode/ch5_decorator/decorator_SoC_1.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch5_decorator/decorator_SoC_1.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch5_decorator/decorator_SoC_1.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """Clean Code in Python - Chapter 5: Decorators
> Separation of Concerns (SoC).
Break a coupled decorator into smaller ones.
"""
import functools
import time
from log import logger
def traced_function(function):
@functools.wraps(function)
def wrapped(*args, **kwargs):
logger.info("... | 23.483871 | 87 | 0.630495 |
7965d4190cfc8cc49f15ecff994fdd7f271620b7 | 4,132 | py | Python | Old - os.system standard/Archived (Old and backups)/PDFImagesOCR Good backup.py | alset333/PDFImagesOCR | ffaf79a3d32cdfabed2ffc57167929bd795f5407 | [
"BSD-3-Clause"
] | 2 | 2016-02-04T18:43:12.000Z | 2020-04-03T03:08:32.000Z | Old - os.system standard/Archived (Old and backups)/PDFImagesOCR Good backup.py | alset333/PDFImagesOCR | ffaf79a3d32cdfabed2ffc57167929bd795f5407 | [
"BSD-3-Clause"
] | 1 | 2016-02-22T18:15:36.000Z | 2016-02-22T18:15:36.000Z | Old - os.system standard/Archived (Old and backups)/PDFImagesOCR Good backup.py | alset333/PDFImagesOCR | ffaf79a3d32cdfabed2ffc57167929bd795f5407 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# PDFImagesOCR.py
import sys
import os
import tempfile
import shutil
__author__ = "Peter Maar"
__version__ = "0.1.0"
################################## PREPARATIONS BEGIN ##########################################
# Print help text if needed
if (len(sys.argv) != 3 and len(sys.argv) != 4) ... | 31.541985 | 156 | 0.632623 |
7965d45e4f16d0475550aa61c7831ef6eeb1dbff | 17,162 | py | Python | venv/Lib/site-packages/matplotlib/testing/decorators.py | 997Yi/Flask-web | 6b5e5d274bfa25fbd3db5af02723a5671f1e901d | [
"MIT"
] | 2 | 2020-07-23T18:28:16.000Z | 2021-02-26T18:43:36.000Z | venv/Lib/site-packages/matplotlib/testing/decorators.py | 997Yi/Flask-web | 6b5e5d274bfa25fbd3db5af02723a5671f1e901d | [
"MIT"
] | null | null | null | venv/Lib/site-packages/matplotlib/testing/decorators.py | 997Yi/Flask-web | 6b5e5d274bfa25fbd3db5af02723a5671f1e901d | [
"MIT"
] | 1 | 2020-07-22T11:32:07.000Z | 2020-07-22T11:32:07.000Z | import contextlib
from distutils.version import StrictVersion
import functools
import inspect
import os
from pathlib import Path
import shutil
import sys
import unittest
import warnings
import matplotlib as mpl
import matplotlib.style
import matplotlib.units
import matplotlib.testing
from matplotlib import cbook
from ... | 37.389978 | 79 | 0.645205 |
7965d65497ae7073013e8441a412464de5be27cf | 1,026 | py | Python | curso-em-video/ex071.2.py | joseluizbrits/sobre-python | 316143c341e5a44070a3b13877419082774bd730 | [
"MIT"
] | null | null | null | curso-em-video/ex071.2.py | joseluizbrits/sobre-python | 316143c341e5a44070a3b13877419082774bd730 | [
"MIT"
] | null | null | null | curso-em-video/ex071.2.py | joseluizbrits/sobre-python | 316143c341e5a44070a3b13877419082774bd730 | [
"MIT"
] | null | null | null | # Simulador de Caixa Eletrônico
'''Crie um programa que simule o funcionamento de um CAIXA ELETRÔNICO.
No início, pergunte ao usuário qual será o VALOR A SER SACADO (número inteiro)
e o programa vai informar quantas CÉDULAS de cada valor serão entregues.
OBS: Considere que o caixa possue cédulas de R$ 50, R$ 20, R$ 10 ... | 32.0625 | 78 | 0.599415 |
7965d6bbd84f30a10cb2d9454babe9b17aa2beba | 1,704 | py | Python | setup.py | sjthespian/ISYlib-python | 9b4b7557a3a397bd63ec0cfcbff63a76e7c992eb | [
"BSD-2-Clause"
] | null | null | null | setup.py | sjthespian/ISYlib-python | 9b4b7557a3a397bd63ec0cfcbff63a76e7c992eb | [
"BSD-2-Clause"
] | null | null | null | setup.py | sjthespian/ISYlib-python | 9b4b7557a3a397bd63ec0cfcbff63a76e7c992eb | [
"BSD-2-Clause"
] | null | null | null |
# python setup.py --dry-run --verbose install
import os.path
from setuptools import setup, find_packages
from distutils.command.install_scripts import install_scripts
import ssl
# ssl._create_default_https_context = ssl._create_unverified_context
from distutils.core import setup
class install_scripts_and_symlinks... | 34.08 | 89 | 0.67723 |
7965d7ce8a9c5b0a033f3ab7214d0ec36cfdc797 | 657 | py | Python | microbot/preset.py | minelminel/microbot | 71517217b6deccc61efe408e91d5545838d910c8 | [
"MIT"
] | null | null | null | microbot/preset.py | minelminel/microbot | 71517217b6deccc61efe408e91d5545838d910c8 | [
"MIT"
] | null | null | null | microbot/preset.py | minelminel/microbot | 71517217b6deccc61efe408e91d5545838d910c8 | [
"MIT"
] | null | null | null | """
preset.py
"""
import logging, threading
log = logging.getLogger(__name__)
class Preset(object):
lock = threading.Lock()
name = None
_state = None
def __init__(self, name=None):
self.name = name if name is not None else self.name
self._state = {}
def __repr__(self):
... | 21.193548 | 67 | 0.596651 |
7965d7ecb46f11e2372fb05c4bf485841cfcd944 | 835 | py | Python | coms/test.py | OliMoose/kermit | 887119e710be6552e817abd82a69ed2aac92bd04 | [
"MIT"
] | null | null | null | coms/test.py | OliMoose/kermit | 887119e710be6552e817abd82a69ed2aac92bd04 | [
"MIT"
] | null | null | null | coms/test.py | OliMoose/kermit | 887119e710be6552e817abd82a69ed2aac92bd04 | [
"MIT"
] | null | null | null | import asyncio, discord
try:
from _command import Command
except:
from coms._command import Command
import time
class Com(Command):
def __init__(self):
self.usage = "!test"
self.description = "Tests the bot's response time."
self.keys = ["!test", ".test", "test?"]
self.pe... | 23.194444 | 130 | 0.602395 |
7965d7fc2b3450155e47320165654538f4547481 | 467 | py | Python | social/posts/forms.py | vyahello/social-media | 77cabf08dee1da0eb4e5c277391d92b7d829b67d | [
"MIT"
] | null | null | null | social/posts/forms.py | vyahello/social-media | 77cabf08dee1da0eb4e5c277391d92b7d829b67d | [
"MIT"
] | 2 | 2022-02-07T09:44:15.000Z | 2022-03-22T16:43:18.000Z | social/posts/forms.py | vyahello/social-media | 77cabf08dee1da0eb4e5c277391d92b7d829b67d | [
"MIT"
] | null | null | null | from django import forms
from posts import models
class PostForm(forms.ModelForm):
class Meta:
fields = ("message", "group")
model = models.Post
def __init__(self, *args, **kwargs):
user = kwargs.pop("user", None)
super().__init__(*args, **kwargs)
if user is not None:
... | 27.470588 | 72 | 0.595289 |
7965d8ce3db1f27aa59fa98815b6b8b98b02a0f0 | 1,361 | py | Python | codenames/preprocess.py | vladimir-tikhonov/codenames_ai | c8ebedda75024fd5b7a1e00500a22c08b6d0c4f7 | [
"ISC"
] | null | null | null | codenames/preprocess.py | vladimir-tikhonov/codenames_ai | c8ebedda75024fd5b7a1e00500a22c08b6d0c4f7 | [
"ISC"
] | 1 | 2022-03-19T09:45:56.000Z | 2022-03-19T10:06:20.000Z | codenames/preprocess.py | vladimir-tikhonov/codenames_ai | c8ebedda75024fd5b7a1e00500a22c08b6d0c4f7 | [
"ISC"
] | null | null | null | import argparse
import os
from pathlib import Path
import cv2
from codenames.preprocessing import Split, ExtractCards, Rotate, get_all_images_in
def preprocess() -> None:
preprocessors = {
'split': Split(),
'extract_cards': ExtractCards(),
'rotate': Rotate()
}
parser = argparse.... | 32.404762 | 107 | 0.709772 |
7965d9e938e39305779f86f914ced4f64f83fdcf | 2,831 | py | Python | run_en.py | hadyelsahar/RE-NLG-Dataset | 460d52d50e5dc302cdd879f1435bda45a4946202 | [
"MIT"
] | 44 | 2018-03-05T00:40:30.000Z | 2022-03-21T04:44:09.000Z | run_en.py | hadyelsahar/RE-NLG-Dataset | 460d52d50e5dc302cdd879f1435bda45a4946202 | [
"MIT"
] | 4 | 2018-11-08T15:32:46.000Z | 2020-10-24T14:32:10.000Z | run_en.py | hadyelsahar/RE-NLG-Dataset | 460d52d50e5dc302cdd879f1435bda45a4946202 | [
"MIT"
] | 10 | 2018-01-23T00:30:39.000Z | 2021-11-08T03:24:25.000Z | from pipeline.pipeline import *
from pipeline.entitylinker import *
from pipeline.triplealigner import *
from pipeline.placeholdertagger import *
from pipeline.datareader import DBpediaAbstractsDataReader
from pipeline.writer import *
# from pipeline.coreference import *
from utils.triplereader import *
from utils.trip... | 34.52439 | 128 | 0.729424 |
7965d9fd9ea9912664c22e3c90ee6dd5d9fe6a78 | 4,105 | py | Python | src/stk/ea/fitness_normalizers/replace_fitness.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | 21 | 2018-04-12T16:25:24.000Z | 2022-02-14T23:05:43.000Z | src/stk/ea/fitness_normalizers/replace_fitness.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | 8 | 2019-03-19T12:36:36.000Z | 2020-11-11T12:46:00.000Z | src/stk/ea/fitness_normalizers/replace_fitness.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | 5 | 2018-08-07T13:00:16.000Z | 2021-11-01T00:55:10.000Z | """
Replace Fitness
===============
"""
from .fitness_normalizer import FitnessNormalizer
class ReplaceFitness(FitnessNormalizer):
"""
Replaces fitness values of a certain value with a new value.
Examples
--------
*Giving a Fitness Value to Failed Calculations*
You want to replace fitness ... | 33.92562 | 70 | 0.587089 |
7965dac9a589c77a102164e82d97148748187857 | 2,495 | py | Python | setup.py | plocket/docassemble-DeadBrokeDads2 | 30dacc640685b6875fcec78f3eb713dbda8f19b8 | [
"MIT"
] | null | null | null | setup.py | plocket/docassemble-DeadBrokeDads2 | 30dacc640685b6875fcec78f3eb713dbda8f19b8 | [
"MIT"
] | 21 | 2021-04-07T21:21:03.000Z | 2021-12-22T11:00:31.000Z | setup.py | plocket/docassemble-DeadBrokeDads2 | 30dacc640685b6875fcec78f3eb713dbda8f19b8 | [
"MIT"
] | 2 | 2021-03-02T15:36:56.000Z | 2021-05-22T19:44:57.000Z | import os
import sys
from setuptools import setup, find_packages
from fnmatch import fnmatchcase
from distutils.util import convert_path
standard_exclude = ('*.pyc', '*~', '.*', '*.bak', '*.swp*')
standard_exclude_directories = ('.*', 'CVS', '_darcs', './build', './dist', 'EGG-INFO', '*.egg-info')
def find_package_dat... | 40.901639 | 156 | 0.546293 |
7965dcb2a924e343d1fd9b766e99302b6afd1974 | 2,086 | py | Python | cryptocurrencychatbot.py | PriyaShaji/cryptocurrencychatbot | dc8d87e6458ec730e2c3b783af901557484f3b1f | [
"Apache-2.0"
] | null | null | null | cryptocurrencychatbot.py | PriyaShaji/cryptocurrencychatbot | dc8d87e6458ec730e2c3b783af901557484f3b1f | [
"Apache-2.0"
] | null | null | null | cryptocurrencychatbot.py | PriyaShaji/cryptocurrencychatbot | dc8d87e6458ec730e2c3b783af901557484f3b1f | [
"Apache-2.0"
] | null | null | null |
# coding: utf-8
# In[1]:
# Example 1: sets up service wrapper, sends initial message, and
# receives response.
import watson_developer_cloud
# Set up Conversation service.
conversation = watson_developer_cloud.ConversationV1(
username = '531b64f4-1023-4a46-b81a-f289c6e334b4', # replace with username from servic... | 23.438202 | 93 | 0.701342 |
7965e0610ffe50aee25c7ed0b815bd2ed9dd7539 | 12,252 | py | Python | deepforest/utilities.py | Treeconomy/DeepForest | 9fcb82e78cbb467ae810d64402b25e41e3c56913 | [
"MIT"
] | null | null | null | deepforest/utilities.py | Treeconomy/DeepForest | 9fcb82e78cbb467ae810d64402b25e41e3c56913 | [
"MIT"
] | null | null | null | deepforest/utilities.py | Treeconomy/DeepForest | 9fcb82e78cbb467ae810d64402b25e41e3c56913 | [
"MIT"
] | null | null | null | """Utilities model"""
import json
import os
import urllib
import warnings
import geopandas as gpd
import numpy as np
import pandas as pd
import rasterio
import shapely
import xmltodict
import yaml
from tqdm import tqdm
from deepforest import _ROOT
def read_config(config_path):
"""Read config yaml file"""
tr... | 33.939058 | 168 | 0.624714 |
7965e08e176b37d339d1534f9078829d181239ca | 3,062 | py | Python | pyscf/adc/test/test_OH_uadc_ea.py | azag0/pyscf | 1e3e27b61b3cfd22c9679d2c9851c13b3ebc5a1b | [
"Apache-2.0"
] | 2 | 2021-08-03T12:32:25.000Z | 2021-09-29T08:19:02.000Z | pyscf/adc/test/test_OH_uadc_ea.py | azag0/pyscf | 1e3e27b61b3cfd22c9679d2c9851c13b3ebc5a1b | [
"Apache-2.0"
] | null | null | null | pyscf/adc/test/test_OH_uadc_ea.py | azag0/pyscf | 1e3e27b61b3cfd22c9679d2c9851c13b3ebc5a1b | [
"Apache-2.0"
] | 2 | 2020-06-01T05:31:38.000Z | 2022-02-08T02:38:33.000Z | # Copyright 2014-2019 The PySCF Developers. 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 appl... | 31.56701 | 78 | 0.668517 |
7965e1a05e8ded2f837056d94a49134c95c1f038 | 429 | py | Python | src/pybullet_planning/interfaces/planner_interface/utils.py | ripl-ttic/pybullet_planning | 52ca8d9d5b48f660d16448b24f7bdda42b4b5622 | [
"MIT"
] | null | null | null | src/pybullet_planning/interfaces/planner_interface/utils.py | ripl-ttic/pybullet_planning | 52ca8d9d5b48f660d16448b24f7bdda42b4b5622 | [
"MIT"
] | null | null | null | src/pybullet_planning/interfaces/planner_interface/utils.py | ripl-ttic/pybullet_planning | 52ca8d9d5b48f660d16448b24f7bdda42b4b5622 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import functools
import pybullet as p
from pybullet_planning.utils import CLIENT
def preserve_state(func):
@functools.wraps(func)
def wrapper_preserve_pos_and_vel(*args, **kwargs):
state_id = p.saveState(physicsClientId=CLIENT)
ret = func(*args, **kwargs)
p.resto... | 28.6 | 64 | 0.731935 |
7965e26d849d5a294c1e82b6988e23a620a2e4cf | 3,907 | py | Python | image/systems/default.py | ndlib/marble-images | 4a98bad976ee38554ac62f8400084e7f323a0e2d | [
"Apache-2.0"
] | null | null | null | image/systems/default.py | ndlib/marble-images | 4a98bad976ee38554ac62f8400084e7f323a0e2d | [
"Apache-2.0"
] | null | null | null | image/systems/default.py | ndlib/marble-images | 4a98bad976ee38554ac62f8400084e7f323a0e2d | [
"Apache-2.0"
] | null | null | null | import os
from queue import Queue
import time
import threading
from pyvips import Image, Error
import shared.config as config
import shared.logger as logger
import shared.graphql_utility as gql
import shared.aws_utility as aws_utility
import shared.uri_utility as uri_utility
import shared.google_utility as google_utili... | 39.464646 | 110 | 0.675454 |
7965e286c0f3105c290abccb4ca98fcbdcaafa4f | 406 | py | Python | plotly/validators/layout/scene/annotation/_x.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 2 | 2020-03-24T11:41:14.000Z | 2021-01-14T07:59:43.000Z | plotly/validators/layout/scene/annotation/_x.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | null | null | null | plotly/validators/layout/scene/annotation/_x.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 4 | 2019-06-03T14:49:12.000Z | 2022-01-06T01:05:12.000Z | import _plotly_utils.basevalidators
class XValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(
self, plotly_name='x', parent_name='layout.scene.annotation', **kwargs
):
super(XValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | 25.375 | 78 | 0.615764 |
7965e28c36930ce849c2eceb36aad9ef6e1f62ca | 655 | py | Python | asreview/analysis/__init__.py | openefsa/asreview | aec14fcad0532a3989befe577ceb369a9dbba243 | [
"Apache-2.0"
] | 1 | 2021-01-22T15:18:33.000Z | 2021-01-22T15:18:33.000Z | asreview/analysis/__init__.py | openefsa/asreview | aec14fcad0532a3989befe577ceb369a9dbba243 | [
"Apache-2.0"
] | 1 | 2020-04-16T09:01:40.000Z | 2020-04-16T09:01:40.000Z | asreview/analysis/__init__.py | openefsa/asreview | aec14fcad0532a3989befe577ceb369a9dbba243 | [
"Apache-2.0"
] | 1 | 2020-03-04T12:16:53.000Z | 2020-03-04T12:16:53.000Z | # Copyright 2019 The ASReview 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 applicabl... | 40.9375 | 74 | 0.772519 |
7965e46aff4d1677041d0f99a2ee48a254c53319 | 767 | py | Python | fitstudio/polls/migrations/0011_auto_20180201_0849.py | tymion/python_training | 5216788f923031e540bb2781e18a3393be325590 | [
"Apache-2.0"
] | null | null | null | fitstudio/polls/migrations/0011_auto_20180201_0849.py | tymion/python_training | 5216788f923031e540bb2781e18a3393be325590 | [
"Apache-2.0"
] | null | null | null | fitstudio/polls/migrations/0011_auto_20180201_0849.py | tymion/python_training | 5216788f923031e540bb2781e18a3393be325590 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.0.1 on 2018-02-01 08:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('polls', '0010_auto_20180121_1943'),
]
operations = [
migrations.AlterField(
model_name='category',
name='category_te... | 26.448276 | 75 | 0.590613 |
7965e4e581dd7c7ab50d38ddbc7c20209927e19b | 4,745 | py | Python | AutoPokemon/skip_time.py | Ojors/Switch-Fightstick | 7732342a1f2e010f85d2f92f5ce70c7dfcfeeea8 | [
"MIT"
] | 1 | 2020-04-02T04:41:36.000Z | 2020-04-02T04:41:36.000Z | AutoPokemon/skip_time.py | Ojors/Switch-Fightstick | 7732342a1f2e010f85d2f92f5ce70c7dfcfeeea8 | [
"MIT"
] | null | null | null | AutoPokemon/skip_time.py | Ojors/Switch-Fightstick | 7732342a1f2e010f85d2f92f5ce70c7dfcfeeea8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-*-coding:utf-8-*-
import sys
import datetime
sys.path.append("../example")
from NXController import Controller
class TimeSkipper(object):
"""
过帧控制,起始状态要在坑前定位
"""
def __init__(self, startDate, skipFrameNum):
super(TimeSkipper, self).__init__()
self.m_curDate = startDate
self.m_skipF... | 24.713542 | 120 | 0.696523 |
7965e58175e3f2e4cc6d0bf4c3a1761e1f653e99 | 549 | py | Python | PiGPIO/migrations/0013_auto_20190410_1605.py | girisandeep/Django-PiGPIO | 8503407288d780957d4fb00689f2619c931da0ce | [
"MIT"
] | 8 | 2019-04-11T17:04:02.000Z | 2021-10-05T03:31:40.000Z | PiGPIO/migrations/0013_auto_20190410_1605.py | girisandeep/Django-PiGPIO | 8503407288d780957d4fb00689f2619c931da0ce | [
"MIT"
] | 3 | 2019-04-10T21:25:42.000Z | 2019-04-16T21:19:13.000Z | PiGPIO/migrations/0013_auto_20190410_1605.py | girisandeep/Django-PiGPIO | 8503407288d780957d4fb00689f2619c931da0ce | [
"MIT"
] | 1 | 2020-10-11T00:02:45.000Z | 2020-10-11T00:02:45.000Z | # Generated by Django 2.1.7 on 2019-04-10 14:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('PiGPIO', '0012_dashboard'),
]
operations = [
migrations.RenameField(
model_name='dashboard',
old_name='color',
... | 22.875 | 68 | 0.57377 |
7965e60a43191534161d6e8882896718ef162031 | 921 | py | Python | api/v1/views/index.py | RodrigoSierraV/AirBnB_clone_v4 | 314a2f20ea3f1de89255317d0b52a4289b36ccbc | [
"MIT"
] | 5 | 2017-09-12T18:23:55.000Z | 2021-07-27T18:05:37.000Z | api/v1/views/index.py | petehwu/AirBnB_clone_v4 | bf0528c99662285139aa56fe8e752d239e2f7b2a | [
"MIT"
] | 8 | 2019-09-27T17:23:04.000Z | 2019-09-30T23:31:31.000Z | api/v1/views/index.py | petehwu/AirBnB_clone_v4 | bf0528c99662285139aa56fe8e752d239e2f7b2a | [
"MIT"
] | 10 | 2017-09-20T18:50:07.000Z | 2022-02-17T20:58:23.000Z | #!/usr/bin/python3
"""
Flask route that returns json status response
"""
from api.v1.views import app_views
from flask import jsonify, request
from models import storage
@app_views.route('/status', methods=['GET'])
def status():
"""
function for status route that returns the status
"""
if request.meth... | 24.236842 | 53 | 0.560261 |
7965e78e2669c929a1918f7cf87272dfc3a3935c | 1,864 | py | Python | apps/node/tests/database/model_centric/test_fl_process.py | hivecell-io/federated_learning | e251bfa65c32abd83359c2b6847b9d0b62c4f5c3 | [
"Apache-2.0"
] | 1 | 2021-10-05T18:57:02.000Z | 2021-10-05T18:57:02.000Z | apps/node/tests/database/model_centric/test_fl_process.py | hivecell-io/federated_learning | e251bfa65c32abd83359c2b6847b9d0b62c4f5c3 | [
"Apache-2.0"
] | null | null | null | apps/node/tests/database/model_centric/test_fl_process.py | hivecell-io/federated_learning | e251bfa65c32abd83359c2b6847b9d0b62c4f5c3 | [
"Apache-2.0"
] | null | null | null | import sys
from random import randint
import pytest
from src.app.main.model_centric.processes.fl_process import FLProcess
from . import BIG_INT
from .presets.fl_process import (
AVG_PLANS,
CLIENT_CONFIGS,
CYCLES,
MODELS,
PROTOCOLS,
SERVER_CONFIGS,
TRAINING_PLANS,
VALIDATION_PLANS,
)
s... | 22.190476 | 69 | 0.628755 |
7965e7f66dd4ce52aa47a1a3f4967fe2c7bec3ad | 204 | py | Python | Exercicios em python/ex66.py | GabrielSantos25/Python | 208eec0144587aa4e0aa7fa00da29ffa0478eac8 | [
"MIT"
] | null | null | null | Exercicios em python/ex66.py | GabrielSantos25/Python | 208eec0144587aa4e0aa7fa00da29ffa0478eac8 | [
"MIT"
] | null | null | null | Exercicios em python/ex66.py | GabrielSantos25/Python | 208eec0144587aa4e0aa7fa00da29ffa0478eac8 | [
"MIT"
] | null | null | null | tot = s = num = 0
while True:
num = int(input('Digite um valor (999 para parar): '))
if num == 999:
break
tot += 1
s += num
print(f'A soma dos {tot} valores foi {s}')
| 20.4 | 58 | 0.5 |
7965e9629f0749b95621e80e7946b98e17251291 | 6,560 | py | Python | api/tests/test_tenant_tellyourneed.py | smegurus/smegurus-django | 053973b5ff0b997c52bfaca8daf8e07db64a877c | [
"BSD-4-Clause"
] | 1 | 2020-07-16T10:58:23.000Z | 2020-07-16T10:58:23.000Z | api/tests/test_tenant_tellyourneed.py | smegurus/smegurus-django | 053973b5ff0b997c52bfaca8daf8e07db64a877c | [
"BSD-4-Clause"
] | 13 | 2018-11-30T02:29:39.000Z | 2022-03-11T23:35:49.000Z | api/tests/test_tenant_tellyourneed.py | smegurus/smegurus-django | 053973b5ff0b997c52bfaca8daf8e07db64a877c | [
"BSD-4-Clause"
] | null | null | null | import json
from django.db import transaction
from django.core.urlresolvers import resolve, reverse
from django.http import HttpRequest
from django.http import QueryDict
from django.test import TestCase
from django.test import Client
from django.utils import translation
from django.contrib.auth.models import User, Grou... | 37.272727 | 130 | 0.680945 |
7965e97519b787c4e6c027272237fe99237894d6 | 8,031 | py | Python | azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_insights.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_insights.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_insights.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 52.835526 | 123 | 0.698668 |
7965ea317eaa8434e7c38ba1348f89809bc14eba | 30,656 | py | Python | lib/taurus/qt/qtgui/input/qwheel.py | tiagocoutinho/taurus | 7a3f522e5bf4b5f864873618d3eaaeba9fcb8189 | [
"CC-BY-3.0"
] | null | null | null | lib/taurus/qt/qtgui/input/qwheel.py | tiagocoutinho/taurus | 7a3f522e5bf4b5f864873618d3eaaeba9fcb8189 | [
"CC-BY-3.0"
] | null | null | null | lib/taurus/qt/qtgui/input/qwheel.py | tiagocoutinho/taurus | 7a3f522e5bf4b5f864873618d3eaaeba9fcb8189 | [
"CC-BY-3.0"
] | null | null | null | #!/usr/bin/env python
#############################################################################
##
# This file is part of Taurus
##
# http://taurus-scada.org
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Taurus is free software: you can redistribute it and/or modify
# it under the terms of t... | 32.682303 | 141 | 0.604482 |
7965ea82c52a5d8770befbcea9011b4586917849 | 584 | py | Python | backend/shared/shared/audit_log/migrations/0002_auditlogentry_created_at.py | jannetasa/yjdh | 5d86a56c722dfbcee03110f66c7e7ddbea966db9 | [
"MIT"
] | 2 | 2021-05-10T09:28:35.000Z | 2021-05-17T12:15:34.000Z | backend/shared/shared/audit_log/migrations/0002_auditlogentry_created_at.py | jannetasa/yjdh | 5d86a56c722dfbcee03110f66c7e7ddbea966db9 | [
"MIT"
] | 931 | 2021-05-21T15:24:35.000Z | 2022-03-31T20:07:40.000Z | backend/shared/shared/audit_log/migrations/0002_auditlogentry_created_at.py | jannetasa/yjdh | 5d86a56c722dfbcee03110f66c7e7ddbea966db9 | [
"MIT"
] | 6 | 2021-07-06T11:07:02.000Z | 2022-02-07T12:42:21.000Z | # Generated by Django 3.2.4 on 2021-08-20 10:23
import django.utils.timezone
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("audit_log", "0001_initial"),
]
operations = [
migrations.AddField(
model_name="auditlogentry",
... | 23.36 | 50 | 0.57363 |
7965eaf3ebeb109619de0f7821d05f67c02ace4e | 599 | py | Python | exec10/exec10.py | flavio-brusamolin/learning-python | 7cfdd35fe06d72d607131d2620b865d0cfa4781a | [
"MIT"
] | null | null | null | exec10/exec10.py | flavio-brusamolin/learning-python | 7cfdd35fe06d72d607131d2620b865d0cfa4781a | [
"MIT"
] | null | null | null | exec10/exec10.py | flavio-brusamolin/learning-python | 7cfdd35fe06d72d607131d2620b865d0cfa4781a | [
"MIT"
] | null | null | null | def division():
try:
number1 = int(input('Entre com um número inteiro: '))
number2 = int(input('Entre com outro número inteiro: '))
result = number1 // number2
except ValueError:
print('Insira somente números inteiros')
except ZeroDivisionError:
print('Divisão por 0 n... | 29.95 | 78 | 0.632721 |
7965eb3d005f447a18964bf8bb806623e5803310 | 621 | py | Python | application/laboratoire/website_stats/__init__.py | Vahen/VahenWebsite | 19a0f0f923874d66d8229e20e0df5b7916da5595 | [
"MIT"
] | null | null | null | application/laboratoire/website_stats/__init__.py | Vahen/VahenWebsite | 19a0f0f923874d66d8229e20e0df5b7916da5595 | [
"MIT"
] | null | null | null | application/laboratoire/website_stats/__init__.py | Vahen/VahenWebsite | 19a0f0f923874d66d8229e20e0df5b7916da5595 | [
"MIT"
] | null | null | null | from flask import Blueprint
import logging
from application.configuration import web_templates_dir, web_static_dir
logger = logging.getLogger('VahenWebsite.laboratoire.website_stats')
# Todo -> Utiliser une variable pour le /laboratoire
website_stats_bp = Blueprint('website_stats_bp', __name__,
... | 47.769231 | 100 | 0.710145 |
7965ec17408b3191f5e6dcc4d0820a629f8ff94a | 4,041 | py | Python | alipay/aop/api/request/MybankCreditGuaranteeWriteoffPayRequest.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/MybankCreditGuaranteeWriteoffPayRequest.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/MybankCreditGuaranteeWriteoffPayRequest.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.MybankCreditGuaranteeWriteoffPayModel import MybankCreditGuaranteeWriteoffPayModel
class MybankCreditGuaranteeWriteoff... | 27.868966 | 166 | 0.648849 |
7965ec4d540b4f03b3bb5976d85e5ab57f2129bf | 6,707 | py | Python | Ellie_Sector_Selector.py | dodobirb/Project_2_ETF_Lex_RoboAdvisor | f8e1a5143e74c0dc6f8bef1ed6d4b4fbd6c66739 | [
"MIT"
] | null | null | null | Ellie_Sector_Selector.py | dodobirb/Project_2_ETF_Lex_RoboAdvisor | f8e1a5143e74c0dc6f8bef1ed6d4b4fbd6c66739 | [
"MIT"
] | null | null | null | Ellie_Sector_Selector.py | dodobirb/Project_2_ETF_Lex_RoboAdvisor | f8e1a5143e74c0dc6f8bef1ed6d4b4fbd6c66739 | [
"MIT"
] | null | null | null | ### Required Libraries ###
from datetime import datetime
from dateutil.relativedelta import relativedelta
from botocore.vendored import requests
###Required libraries to connect to S3 bucket and read json files
import boto3
import json
import uuid
### Functionality Helper Functions ###
def parse_float(n):
... | 33.873737 | 198 | 0.619204 |
7965ed1cb3c3194bf7f5db1311bc7c103584b31d | 1,034 | py | Python | library/contrib/sites/migrations/0003_set_site_domain_and_name.py | buckldav/merit-library | 1e1bf00a955b1d9b9a34bb4ebc95a7ca7df81a19 | [
"MIT"
] | null | null | null | library/contrib/sites/migrations/0003_set_site_domain_and_name.py | buckldav/merit-library | 1e1bf00a955b1d9b9a34bb4ebc95a7ca7df81a19 | [
"MIT"
] | 1 | 2021-11-23T17:56:07.000Z | 2021-11-23T17:56:07.000Z | library/contrib/sites/migrations/0003_set_site_domain_and_name.py | buckldav/merit-library | 1e1bf00a955b1d9b9a34bb4ebc95a7ca7df81a19 | [
"MIT"
] | 2 | 2022-03-03T15:43:50.000Z | 2022-03-31T15:08:29.000Z | """
To understand why this file is here, please read:
http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
"""
from django.conf import settings
from django.db import migrations
def update_site_forward(apps, schema_editor):
"""Set site d... | 29.542857 | 129 | 0.683752 |
7965ee6a115e0d8899378fe759bfe0554e1bc195 | 1,657 | py | Python | prymate/token/token.py | NightShade256/prymate | deeb81ab685854599d803719971e85ead6699a90 | [
"MIT"
] | 6 | 2020-06-22T14:54:55.000Z | 2021-12-13T12:33:21.000Z | prymate/token/token.py | NightShade256/prymate | deeb81ab685854599d803719971e85ead6699a90 | [
"MIT"
] | null | null | null | prymate/token/token.py | NightShade256/prymate | deeb81ab685854599d803719971e85ead6699a90 | [
"MIT"
] | 1 | 2020-10-11T18:31:57.000Z | 2020-10-11T18:31:57.000Z | import enum
__all__ = ["TokenType", "Token", "lookup_ident"]
class TokenType(enum.Enum):
"""The enumeration for different types of tokens."""
ILLEGAL = "ILLEGAL"
EOF = "EOF"
# Identifiers and literals
IDENT = "IDENT"
INT = "INT"
STRING = "STRING"
# Operators
ASSIGN = "="
PL... | 19.045977 | 65 | 0.540133 |
7965eee4a5494cfb592ecfac523a25c9dd538d09 | 3,114 | py | Python | examples/montage-workflow/lambdas/orchestrator.py | JosepSampe/triggerflow | 66d8adcd6b31692663ee861c334608b74fecf884 | [
"Apache-2.0"
] | 38 | 2020-06-11T08:05:21.000Z | 2022-03-17T10:21:18.000Z | examples/montage-workflow/lambdas/orchestrator.py | JosepSampe/triggerflow | 66d8adcd6b31692663ee861c334608b74fecf884 | [
"Apache-2.0"
] | 1 | 2020-07-07T15:47:56.000Z | 2020-07-07T15:47:56.000Z | examples/montage-workflow/lambdas/orchestrator.py | JosepSampe/triggerflow | 66d8adcd6b31692663ee861c334608b74fecf884 | [
"Apache-2.0"
] | 7 | 2020-05-18T16:32:06.000Z | 2021-11-30T17:11:12.000Z | import json
import boto3
import os
import xml.etree.ElementTree as ET
def lambda_handler(event, context):
prefix, dax, branch = event['prefix'], event['dax'], event['branch']
s3 = boto3.client('s3', region_name=os.getenv('REGION'))
req = s3.get_object(Bucket=os.getenv('BUCKET'), Key='/'.join([prefix, dax]... | 39.923077 | 97 | 0.438664 |
7965f05f52ffb2272949c1c00d936aedc8871583 | 1,449 | py | Python | nimpy/tools/make_movie.py | kflana1/nimpy_WiPPL | 79e8028ab10e82ff9b681120d417679dacfe97d8 | [
"MIT"
] | 1 | 2020-12-05T18:20:16.000Z | 2020-12-05T18:20:16.000Z | nimpy/tools/make_movie.py | kflana1/nimpy_WiPPL | 79e8028ab10e82ff9b681120d417679dacfe97d8 | [
"MIT"
] | null | null | null | nimpy/tools/make_movie.py | kflana1/nimpy_WiPPL | 79e8028ab10e82ff9b681120d417679dacfe97d8 | [
"MIT"
] | null | null | null | import argparse
import subprocess
from datetime import date
import os
"""-y overwrites file without asking. I will be doing this."""
def main(folder, file_pattern, name, fps):
if folder is None:
folder = os.getcwd()
else:
folder = os.path.abspath(folder)
if name is None:
today = ... | 39.162162 | 120 | 0.645963 |
7965f0b6d34bc73f0a4ce559d4d21bfe8dd84a2d | 31,632 | py | Python | beembase/operations.py | tiotdev/beem | 231187235d33983721a20c972a96ffd9101ec360 | [
"MIT"
] | 1 | 2019-11-07T00:11:44.000Z | 2019-11-07T00:11:44.000Z | beembase/operations.py | tiotdev/beem | 231187235d33983721a20c972a96ffd9101ec360 | [
"MIT"
] | null | null | null | beembase/operations.py | tiotdev/beem | 231187235d33983721a20c972a96ffd9101ec360 | [
"MIT"
] | 1 | 2019-07-01T12:41:33.000Z | 2019-07-01T12:41:33.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from builtins import int, str
from beemgraphenebase.py23 import bytes_types, integer_types, string_types, text_type
from collections import OrderedDict
import json
from bi... | 38.019231 | 123 | 0.548464 |
7965f1862fdad25dec6f61300ced92953ef41f6f | 290 | py | Python | Tele_Aula 3/modulo_select_dados.py | andrenjunior/Linguagem-de-Programa-o-Python | ebffc440bfde7a4c8752872d9cc00e0f83a91e3b | [
"MIT"
] | null | null | null | Tele_Aula 3/modulo_select_dados.py | andrenjunior/Linguagem-de-Programa-o-Python | ebffc440bfde7a4c8752872d9cc00e0f83a91e3b | [
"MIT"
] | null | null | null | Tele_Aula 3/modulo_select_dados.py | andrenjunior/Linguagem-de-Programa-o-Python | ebffc440bfde7a4c8752872d9cc00e0f83a91e3b | [
"MIT"
] | null | null | null | import sqlite3
conector = sqlite3.connect('conta.db')
cursor = conector.cursor()
sql = 'select * from cadastro'
cursor.execute(sql)
dados = cursor.fetchall()
cursor.close()
conector.close()
for d in dados:
print(d[0], d[1], d[2])
print(f'Encontrados {(len(dados))} registros')
| 17.058824 | 50 | 0.682759 |
7965f1e4ee13fea011f8a58f59ed8fdf125e79a2 | 3,514 | py | Python | tests/sentry/incidents/endpoints/test_organization_incident_stats.py | vaniot-s/sentry | 5c1accadebfaf8baf6863251c05b38ea979ee1c7 | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/incidents/endpoints/test_organization_incident_stats.py | vaniot-s/sentry | 5c1accadebfaf8baf6863251c05b38ea979ee1c7 | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/incidents/endpoints/test_organization_incident_stats.py | vaniot-s/sentry | 5c1accadebfaf8baf6863251c05b38ea979ee1c7 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from datetime import datetime, timedelta
from uuid import uuid4
from django.utils.functional import cached_property
from exam import fixture
from freezegun import freeze_time
from pytz import utc
from sentry.testutils import APITestCase, SnubaTestCase
from sentry.testutils.help... | 35.494949 | 97 | 0.653671 |
7965f3f7e754bec1869642c5298f23fb699c0e8c | 359 | py | Python | app/models/base_model.py | roshanpatell/covid19-api | e78fcc1d823356032c4021a431b8497cbf83eb99 | [
"MIT"
] | null | null | null | app/models/base_model.py | roshanpatell/covid19-api | e78fcc1d823356032c4021a431b8497cbf83eb99 | [
"MIT"
] | null | null | null | app/models/base_model.py | roshanpatell/covid19-api | e78fcc1d823356032c4021a431b8497cbf83eb99 | [
"MIT"
] | null | null | null | """
FILE: base_model.py
DESCRIPTION: Models for General Usage
AUTHOR: Nuttaphat Arunoprayoch
DATE: 01-March-2021
"""
# Import libraries
from typing import Any
from pydantic import BaseModel
#######################################
# ResponseModel
#######################################
class ResponseModel(BaseModel):... | 17.95 | 39 | 0.579387 |
7965f4f177b2a0e10c8fd7d4342fa22797ec1acf | 6,063 | py | Python | tests/test_config_search_path.py | edraizen/hydra | 4170bc6068b50a9b8db4838444de64f68ca21a23 | [
"MIT"
] | null | null | null | tests/test_config_search_path.py | edraizen/hydra | 4170bc6068b50a9b8db4838444de64f68ca21a23 | [
"MIT"
] | 8 | 2021-03-01T21:12:05.000Z | 2022-02-27T04:35:55.000Z | tests/test_config_search_path.py | edraizen/hydra | 4170bc6068b50a9b8db4838444de64f68ca21a23 | [
"MIT"
] | 1 | 2021-04-22T08:47:44.000Z | 2021-04-22T08:47:44.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from os.path import realpath
from typing import List, Optional, Tuple
import pytest
from hydra._internal.config_search_path_impl import ConfigSearchPathImpl
from hydra._internal.utils import compute_search_path_dir
from hydra.core.config_search_pa... | 34.448864 | 101 | 0.536203 |
7965f6444a539cb7c28c57b63fa90a55a3a902ac | 1,587 | py | Python | catkin_ws/build/turtlebot_simulator/turtlebot_stage/catkin_generated/25.turtlebot-stage.sh.installspace.context.py | margrammas/HomeService | fe0f40944398b28a543fd7a72d1734018933244b | [
"RSA-MD"
] | null | null | null | catkin_ws/build/turtlebot_simulator/turtlebot_stage/catkin_generated/25.turtlebot-stage.sh.installspace.context.py | margrammas/HomeService | fe0f40944398b28a543fd7a72d1734018933244b | [
"RSA-MD"
] | null | null | null | catkin_ws/build/turtlebot_simulator/turtlebot_stage/catkin_generated/25.turtlebot-stage.sh.installspace.context.py | margrammas/HomeService | fe0f40944398b28a543fd7a72d1734018933244b | [
"RSA-MD"
] | null | null | null | # generated from catkin/cmake/template/env-hook.context.py.in
DEVELSPACE = False
INSTALLSPACE = True
CATKIN_DEVEL_PREFIX = '/home/workspace/HomeService/catkin_ws/devel'
CATKIN_GLOBAL_BIN_DESTINATION = 'bin'
CATKIN_GLOBAL_ETC_DESTINATION = 'etc'
CATKIN_GLOBAL_INCLUDE_DESTINATION = 'include'
CATKIN_GLOBAL_LIB_DESTINATI... | 46.676471 | 108 | 0.851922 |
7965f6eedee5dc3135db6fcd1ebfe3d716051554 | 400 | py | Python | nlp100/chapter3/Q022.py | laikuaut/lang_100_knock | 359d68cd28cd453f1fe484c56b6381927f513c21 | [
"MIT"
] | null | null | null | nlp100/chapter3/Q022.py | laikuaut/lang_100_knock | 359d68cd28cd453f1fe484c56b6381927f513c21 | [
"MIT"
] | null | null | null | nlp100/chapter3/Q022.py | laikuaut/lang_100_knock | 359d68cd28cd453f1fe484c56b6381927f513c21 | [
"MIT"
] | null | null | null | # coding: utf-8
import re
def Q_022():
""" 22. カテゴリ名の抽出
記事のカテゴリ名を(行単位ではなく名前で)抽出せよ.
"""
regex = re.compile(r'(?<=^\[\[Category:)(.+)(?=\]\]$)')
category_list = []
with open('data/Britain.txt', 'r') as f:
for line in f:
matchObj = regex.search(line)
if matchObj:
... | 22.222222 | 59 | 0.5375 |
7965f7c479cdd2f4f0d13e6ff8a84708b4c92c99 | 4,927 | py | Python | docs/conf.py | iDutchy/SteamStoreFront | b1c0ebb28d049a4b6744ebb3575385db2952a8c9 | [
"MIT"
] | null | null | null | docs/conf.py | iDutchy/SteamStoreFront | b1c0ebb28d049a4b6744ebb3575385db2952a8c9 | [
"MIT"
] | null | null | null | docs/conf.py | iDutchy/SteamStoreFront | b1c0ebb28d049a4b6744ebb3575385db2952a8c9 | [
"MIT"
] | 2 | 2020-03-23T17:19:12.000Z | 2021-06-29T23:08:37.000Z | #!/usr/bin/env python
#
# steam_store_front documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 9 13:47:02 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated fil... | 30.226994 | 80 | 0.690684 |
7965f818a4f3a6d21e1939abd1d0197fdd690f6b | 958 | py | Python | scripts/kafka-push.py | TeamHG-Memex/hh-page-classifier | b72086d22218d849c0cce1ca3d58d97f9723a84a | [
"MIT"
] | 6 | 2017-11-14T10:12:06.000Z | 2021-06-24T03:43:31.000Z | scripts/kafka-push.py | TeamHG-Memex/hh-page-classifier | b72086d22218d849c0cce1ca3d58d97f9723a84a | [
"MIT"
] | null | null | null | scripts/kafka-push.py | TeamHG-Memex/hh-page-classifier | b72086d22218d849c0cce1ca3d58d97f9723a84a | [
"MIT"
] | 6 | 2018-06-14T18:28:24.000Z | 2020-10-13T08:19:01.000Z | #!/usr/bin/env python3
import argparse
import json
import logging
from kafka import KafkaProducer
def main():
parser = argparse.ArgumentParser()
parser.add_argument('topic')
parser.add_argument('filename')
parser.add_argument('--kafka-host')
parser.add_argument('--validate', action='store_true')
... | 25.210526 | 64 | 0.654489 |
7965f9a944b0115e3c008ff64f1daddc08cda9d8 | 32 | py | Python | try6.py | aka-bla/sh1904work | 5d3842a4bb2fbedbdfc56c2f03af3629540c8fe4 | [
"Apache-2.0"
] | null | null | null | try6.py | aka-bla/sh1904work | 5d3842a4bb2fbedbdfc56c2f03af3629540c8fe4 | [
"Apache-2.0"
] | null | null | null | try6.py | aka-bla/sh1904work | 5d3842a4bb2fbedbdfc56c2f03af3629540c8fe4 | [
"Apache-2.0"
] | null | null | null | print("zheshiyigeceshiwenjian")
| 16 | 31 | 0.84375 |
7965fa61d563d5a7c4dcfb8480deca003dcb7ba2 | 1,658 | py | Python | setup.py | janash/fomms_integrate | 1283769ce62935bc59b58d0341e2c0ca55b57e7a | [
"BSD-3-Clause"
] | null | null | null | setup.py | janash/fomms_integrate | 1283769ce62935bc59b58d0341e2c0ca55b57e7a | [
"BSD-3-Clause"
] | null | null | null | setup.py | janash/fomms_integrate | 1283769ce62935bc59b58d0341e2c0ca55b57e7a | [
"BSD-3-Clause"
] | null | null | null | """
fomms_integrate
Integrate package for MolSSI workshop at FOMMS 2018
"""
from setuptools import setup
import versioneer
DOCLINES = __doc__.split("\n")
setup(
# Self-descriptive entries which should always be present
name='fomms_integrate',
author='Jessica A. Nash',
description=DOCLINES[0],
long... | 36.043478 | 118 | 0.664053 |
7965fc4ca5b865269e1510d8d12d66abce9443da | 2,912 | py | Python | Part 3 - Classification/Section 15 - Random Forest Classification/Hao_RandomForest.py | HaoLiangPao/MachineLearningA-Z | 6cf1bf0243aa20847a66270683f0d1e7683a07f9 | [
"MIT"
] | null | null | null | Part 3 - Classification/Section 15 - Random Forest Classification/Hao_RandomForest.py | HaoLiangPao/MachineLearningA-Z | 6cf1bf0243aa20847a66270683f0d1e7683a07f9 | [
"MIT"
] | null | null | null | Part 3 - Classification/Section 15 - Random Forest Classification/Hao_RandomForest.py | HaoLiangPao/MachineLearningA-Z | 6cf1bf0243aa20847a66270683f0d1e7683a07f9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 27 11:22:56 2019
@author: lianghao
"""
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 25 10:37:14 2019
@author: lianghao
"""
# Random Forest
# Importing the libraries
import numpy as np
import matplotlib.pyplot as plt
impor... | 34.666667 | 105 | 0.672734 |
7965fd154222833ec0b1ae1313e945eb956db922 | 401 | py | Python | scraping/migrations/0016_auto_20190307_1049.py | ThibaultRizzo/car-scraping | ca108a9c90319d8a935c58b30394a34f88e3d7df | [
"MIT"
] | null | null | null | scraping/migrations/0016_auto_20190307_1049.py | ThibaultRizzo/car-scraping | ca108a9c90319d8a935c58b30394a34f88e3d7df | [
"MIT"
] | 3 | 2020-02-11T23:48:07.000Z | 2021-03-31T19:01:48.000Z | scraping/migrations/0016_auto_20190307_1049.py | ThibaultRizzo/car-scraping | ca108a9c90319d8a935c58b30394a34f88e3d7df | [
"MIT"
] | 1 | 2019-02-25T13:40:36.000Z | 2019-02-25T13:40:36.000Z | # Generated by Django 2.1.5 on 2019-03-07 10:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('scraping', '0015_auto_20190307_1048'),
]
operations = [
migrations.AlterField(
model_name='car',
name='vendor_link',... | 21.105263 | 62 | 0.605985 |
7965fd24d6a5281754d5629063aaf0a65636f072 | 7,998 | py | Python | cross_validation.py | riz4d/credit_card-XPL | e69bc03425d821cd4124d0e0866a696a5d5d7bb2 | [
"Unlicense"
] | 6 | 2021-09-20T11:32:44.000Z | 2021-11-22T10:22:58.000Z | cross_validation.py | riz4d/credit_card-XPL | e69bc03425d821cd4124d0e0866a696a5d5d7bb2 | [
"Unlicense"
] | null | null | null | cross_validation.py | riz4d/credit_card-XPL | e69bc03425d821cd4124d0e0866a696a5d5d7bb2 | [
"Unlicense"
] | 1 | 2021-10-17T18:50:50.000Z | 2021-10-17T18:50:50.000Z | import sys
import csv
import numpy as np
from classifier import *
from sklearn.cross_validation import KFold
from sklearn.decomposition import PCA
from sklearn.metrics import confusion_matrix, roc_curve, auc
from ROC import print_error_rate
def KNN_cross_validation(data_sets, folds):
kf = KFold(30000, n_folds=fold... | 33.464435 | 78 | 0.601025 |
7965fddcba9a22e6abc069074289fc7c1d54a16b | 734 | py | Python | GPIO/gpioinput.py | tscloud/PiGoSemiPro | 5b692f98d1226dec5af9f722ffce5e7f84d4d728 | [
"MIT"
] | null | null | null | GPIO/gpioinput.py | tscloud/PiGoSemiPro | 5b692f98d1226dec5af9f722ffce5e7f84d4d728 | [
"MIT"
] | 16 | 2015-02-11T20:37:12.000Z | 2015-05-14T20:39:29.000Z | GPIO/gpioinput.py | tscloud/PiGoSemiPro | 5b692f98d1226dec5af9f722ffce5e7f84d4d728 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
import RPi.GPIO as GPIO
import sys, time
GPIO.setmode(GPIO.BOARD)
# GPIO.setup(12, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(12, GPIO.IN, pull_up_down=GPIO.PUD_UP)
try:
while True:
input_value = GPIO.input(12)
print 'input_value: %s' % input_val... | 22.9375 | 51 | 0.574932 |
7965fe359855db1ab947df1dfff2c05f9a4fc6c5 | 40,929 | py | Python | reconcile/queries.py | BumbleFeng/qontract-reconcile | a9f5bb221df5f92727d0582c5aa1a99822883782 | [
"Apache-2.0"
] | null | null | null | reconcile/queries.py | BumbleFeng/qontract-reconcile | a9f5bb221df5f92727d0582c5aa1a99822883782 | [
"Apache-2.0"
] | null | null | null | reconcile/queries.py | BumbleFeng/qontract-reconcile | a9f5bb221df5f92727d0582c5aa1a99822883782 | [
"Apache-2.0"
] | null | null | null | import logging
import itertools
from textwrap import indent
from jinja2 import Template
from reconcile.utils import gql
APP_INTERFACE_SETTINGS_QUERY = """
{
settings: app_interface_settings_v1 {
vault
kubeBinary
mergeRequestGateway
saasDeployJobTemplate
hashLength
dependencies {
typ... | 17.025374 | 79 | 0.49256 |
7965ff066684d1c3a78a06bfd935a8c757ba8885 | 7,734 | py | Python | my_vim_files/python27/Lib/bsddb/test/test_early_close.py | satsaeid/dotfiles | 401c3213b31dd941b44e553c6f0441187b01c19a | [
"MIT"
] | null | null | null | my_vim_files/python27/Lib/bsddb/test/test_early_close.py | satsaeid/dotfiles | 401c3213b31dd941b44e553c6f0441187b01c19a | [
"MIT"
] | null | null | null | my_vim_files/python27/Lib/bsddb/test/test_early_close.py | satsaeid/dotfiles | 401c3213b31dd941b44e553c6f0441187b01c19a | [
"MIT"
] | null | null | null | """TestCases for checking that it does not segfault when a DBEnv object
is closed before its DB objects.
"""
import os, sys
import unittest
from test_all import db, test_support, verbose, get_new_environment_path, get_new_database_path
# We're going to get warnings in this module about trying to close the d... | 35.640553 | 96 | 0.553918 |
79660037abbf45798f4cea43b2d31855f11f16be | 2,154 | py | Python | setup.py | vistec-AI/thai2transformers | 974fb53b5ebac633be8ef5b139933431de147d52 | [
"Apache-2.0"
] | 64 | 2020-02-28T04:15:23.000Z | 2022-03-13T16:01:21.000Z | setup.py | vistec-AI/thai2bert | 55dd20507db1d84e9305171e2a53332cfb837357 | [
"Apache-2.0"
] | 28 | 2021-01-27T04:43:30.000Z | 2022-01-26T10:27:47.000Z | setup.py | vistec-AI/thai2bert | 55dd20507db1d84e9305171e2a53332cfb837357 | [
"Apache-2.0"
] | 17 | 2020-06-11T07:54:44.000Z | 2021-11-24T07:45:22.000Z | # -*- coding: utf-8 -*-
from setuptools import find_packages, setup
with open('README.md', 'r') as f:
readme = f.read()
requirements = [
"torch>=1.5.0",
"transformers==3.5.0",
"sentencepiece==0.1.91",
"emoji",
"pythainlp>=2.2.4",
"tqdm",
"datasets>=1.2.1",
"sefr_cut",
"seqeval",... | 30.338028 | 109 | 0.620241 |
7966004901c3556ca1bf0214cd65fa001bdbf939 | 483 | py | Python | config/hooks/tk-multi-publish2/python/__init__.py | JoanAzpeitia/lp_sg | e0ee79555e419dd2ae3a5f31e5515b3f40b22a62 | [
"MIT"
] | null | null | null | config/hooks/tk-multi-publish2/python/__init__.py | JoanAzpeitia/lp_sg | e0ee79555e419dd2ae3a5f31e5515b3f40b22a62 | [
"MIT"
] | null | null | null | config/hooks/tk-multi-publish2/python/__init__.py | JoanAzpeitia/lp_sg | e0ee79555e419dd2ae3a5f31e5515b3f40b22a62 | [
"MIT"
] | 1 | 2020-02-15T10:42:56.000Z | 2020-02-15T10:42:56.000Z | # Copyright (c) 2017 Shotgun Software Inc.
#
# CONFIDENTIAL AND PROPRIETARY
#
# This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit
# Source Code License included in this distribution package. See LICENSE.
# By accessing, using, copying or modifying this work you indicate your
# agreement to t... | 43.909091 | 76 | 0.786749 |
7966009a86e2095d994b25b6b98561b0102c3e98 | 24,944 | py | Python | pyOCD/debug/semihost.py | 0xc0170/pyOCD | 01da97e346d4f52cad01d46949903f2a4d096345 | [
"Apache-2.0"
] | null | null | null | pyOCD/debug/semihost.py | 0xc0170/pyOCD | 01da97e346d4f52cad01d46949903f2a4d096345 | [
"Apache-2.0"
] | null | null | null | pyOCD/debug/semihost.py | 0xc0170/pyOCD | 01da97e346d4f52cad01d46949903f2a4d096345 | [
"Apache-2.0"
] | null | null | null | """
mbed CMSIS-DAP debugger
Copyright (c) 2015 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law o... | 35.132394 | 104 | 0.611249 |
7966027585e0a4c105e1ff917767b7cdb45f1344 | 223 | py | Python | _solved/_solutions/visualization_02_seaborn19.py | jorisvandenbossche/ICES-python-data | 63864947657f37cb26cb4e2dcd67ff106dffe9cd | [
"BSD-3-Clause"
] | 1 | 2022-03-02T17:41:46.000Z | 2022-03-02T17:41:46.000Z | notebooks/_solutions/visualization_02_seaborn19.py | jorisvandenbossche/ICES-python-data | 63864947657f37cb26cb4e2dcd67ff106dffe9cd | [
"BSD-3-Clause"
] | 1 | 2022-03-14T15:15:53.000Z | 2022-03-14T15:15:53.000Z | notebooks/_solutions/visualization_02_seaborn19.py | jorisvandenbossche/ICES-python-data | 63864947657f37cb26cb4e2dcd67ff106dffe9cd | [
"BSD-3-Clause"
] | null | null | null | fig, (ax0, ax1) = plt.subplots(1, 2, figsize=(15, 5))
sns.ecdfplot(data=weekly_victim_dead_lc, x="dead_prop", hue="light_conditions", ax=ax0)
sns.ecdfplot(data=weekly_victim_dead_rt, x="dead_prop", hue="road_type", ax=ax1) | 55.75 | 87 | 0.73991 |
796602fce4ec224e7488e1a702eabf61e6b33b78 | 1,221 | py | Python | HLTriggerOffline/Exotica/python/analyses/hltExoticaHighPtPhoton_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 6 | 2017-09-08T14:12:56.000Z | 2022-03-09T23:57:01.000Z | HLTriggerOffline/Exotica/python/analyses/hltExoticaHighPtPhoton_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 545 | 2017-09-19T17:10:19.000Z | 2022-03-07T16:55:27.000Z | HLTriggerOffline/Exotica/python/analyses/hltExoticaHighPtPhoton_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 14 | 2017-10-04T09:47:21.000Z | 2019-10-23T18:04:45.000Z | import FWCore.ParameterSet.Config as cms
HighPtPhotonPSet = cms.PSet(
hltPathsToCheck = cms.vstring(
"HLT_Photon175_v", # Run2 proposal
"HLT_Photon165_HE10_v", # Run2 proposal
"HLT_Photon36_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon31_AND_HE10_R9Id65_Mass10_v", # Run2 proposal
"HLT_... | 45.222222 | 107 | 0.644554 |
7966034f63b9a65963c0ca3ccdbc1f4ff32e8490 | 19,065 | py | Python | tests/resolver_t.py | rogerhoward/loris | bf509cdc539c26f4bd8ab318870b8daaede9b1fe | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | tests/resolver_t.py | rogerhoward/loris | bf509cdc539c26f4bd8ab318870b8daaede9b1fe | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2017-12-01T20:02:32.000Z | 2017-12-01T20:02:32.000Z | tests/resolver_t.py | rogerhoward/loris | bf509cdc539c26f4bd8ab318870b8daaede9b1fe | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | #-*- coding: utf-8 -*-
from __future__ import absolute_import
import copy
from os.path import dirname
from os.path import isfile
from os.path import join
from os.path import realpath
from os.path import exists
import unittest
try:
from urllib.parse import quote_plus, unquote
except ImportError: # Python 2
f... | 38.206413 | 101 | 0.636979 |
7966036dae7232356f23be03c34ad685cb7eb096 | 224 | py | Python | examples/pillow.py | captcha-api/keptcha-py | fcd64db98417eb66425cdd8526a6398a9ae9b634 | [
"MIT"
] | 1 | 2022-01-19T04:22:00.000Z | 2022-01-19T04:22:00.000Z | examples/pillow.py | captcha-api/keptcha-py | fcd64db98417eb66425cdd8526a6398a9ae9b634 | [
"MIT"
] | null | null | null | examples/pillow.py | captcha-api/keptcha-py | fcd64db98417eb66425cdd8526a6398a9ae9b634 | [
"MIT"
] | null | null | null | from keptcha import Captcha
from PIL import Image
from io import BytesIO
captcha = Captcha.new(height=250, width=500, circles=150, length=10)
captcha.decode()
img = Image.open(BytesIO(captcha.captcha_decoded))
img.show()
| 20.363636 | 68 | 0.776786 |
796603d37c5c976c3a4c8618b7ec85d785ea6753 | 342 | py | Python | examples/quantum_random_numbers.py | kevin-teddy/ProjectQ | 22828daca975cebed92f946ba2625f295cfa70e9 | [
"Apache-2.0"
] | 3 | 2021-11-08T11:46:42.000Z | 2021-12-27T10:13:38.000Z | examples/quantum_random_numbers.py | kevin-teddy/ProjectQ | 22828daca975cebed92f946ba2625f295cfa70e9 | [
"Apache-2.0"
] | 2 | 2021-11-09T14:57:09.000Z | 2022-01-12T12:35:58.000Z | examples/quantum_random_numbers.py | kevin-teddy/ProjectQ | 22828daca975cebed92f946ba2625f295cfa70e9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# pylint: skip-file
from projectq.ops import H, Measure
from projectq import MainEngine
# create a main compiler engine
eng = MainEngine()
# allocate one qubit
q1 = eng.allocate_qubit()
# put it in superposition
H | q1
# measure
Measure | q1
eng.flush()
# print the result:
print("Measured:... | 15.545455 | 37 | 0.69883 |
7966050bd87036e076fdc6f214d68378aefa5cd8 | 3,659 | py | Python | src/models/A2C_SharedCNN.py | brianmcera/DRL_ObservationalDropout | 2d6b7c88700b3de455cc2ca70ccde5fc7b52c490 | [
"MIT"
] | 1 | 2020-03-19T22:01:01.000Z | 2020-03-19T22:01:01.000Z | src/models/A2C_SharedCNN.py | brianmcera/DRL_ObservationalDropout | 2d6b7c88700b3de455cc2ca70ccde5fc7b52c490 | [
"MIT"
] | null | null | null | src/models/A2C_SharedCNN.py | brianmcera/DRL_ObservationalDropout | 2d6b7c88700b3de455cc2ca70ccde5fc7b52c490 | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
import random
from tensorflow.keras import Model, layers
from tensorflow.keras import regularizers
from tensorflow.keras.layers import Dense, Flatten, Conv2D, Dropout, MaxPool2D, ReLU
class ProbabilityDistribution(Model):
def call(self, logits, **kwargs):
# sample... | 41.579545 | 128 | 0.651544 |
796605c6d81da81c12178449110d7c56822b9244 | 14,313 | py | Python | Code/odooerp/odoo-8.0/openerp/tests/common.py | zhupangithub/WEBERP | 714512082ec5c6db07cbf6af0238ceefe2d2c1a5 | [
"MIT"
] | null | null | null | Code/odooerp/odoo-8.0/openerp/tests/common.py | zhupangithub/WEBERP | 714512082ec5c6db07cbf6af0238ceefe2d2c1a5 | [
"MIT"
] | null | null | null | Code/odooerp/odoo-8.0/openerp/tests/common.py | zhupangithub/WEBERP | 714512082ec5c6db07cbf6af0238ceefe2d2c1a5 | [
"MIT"
] | 3 | 2020-10-08T14:42:10.000Z | 2022-01-28T14:12:29.000Z | # -*- coding: utf-8 -*-
"""
The module :mod:`openerp.tests.common` provides unittest2 test cases and a few
helpers and classes to write tests.
"""
import errno
import glob
import json
import logging
import os
import select
import subprocess
import threading
import time
import itertools
import unittest2
import urllib2
... | 35.253695 | 121 | 0.615524 |
7966063308f751daa0c739d7b66f2a27f2f0b3af | 11,023 | py | Python | boardfarm/lib/bft_logging.py | mattsm/boardfarm | 100521fde1fb67536682cafecc2f91a6e2e8a6f8 | [
"BSD-3-Clause-Clear"
] | 40 | 2018-03-23T14:17:13.000Z | 2022-02-05T05:59:41.000Z | boardfarm/lib/bft_logging.py | mattsm/boardfarm | 100521fde1fb67536682cafecc2f91a6e2e8a6f8 | [
"BSD-3-Clause-Clear"
] | 1 | 2020-04-17T01:20:12.000Z | 2020-04-20T20:42:00.000Z | boardfarm/lib/bft_logging.py | mattsm/boardfarm | 100521fde1fb67536682cafecc2f91a6e2e8a6f8 | [
"BSD-3-Clause-Clear"
] | 9 | 2018-04-11T08:31:14.000Z | 2020-08-06T14:55:35.000Z | # Copyright (c) 2015
#
# All rights reserved.
#
# This file is distributed under the Clear BSD license.
# The full text can be found in LICENSE in the root directory.
import os
import re
import time
import types
from functools import wraps
from termcolor import colored
def now_short(_format="%Y%m%d-%H%M%S"):
""... | 36.5 | 133 | 0.540053 |
79660673dee39b782e5bd56cd8b645cb8f0a7138 | 7,832 | py | Python | explorations/question_type/main_VAE_barebones_optim.py | saikrishnarallabandi/compositionality-expts | 98da8dff150db2b1d68560dd3f875f57142254e8 | [
"Apache-2.0"
] | 2 | 2018-12-05T22:38:34.000Z | 2019-03-30T17:16:54.000Z | explorations/question_type/main_VAE_barebones_optim.py | saikrishnarallabandi/compositionality-expts | 98da8dff150db2b1d68560dd3f875f57142254e8 | [
"Apache-2.0"
] | 11 | 2018-10-03T14:52:56.000Z | 2018-11-03T15:34:55.000Z | explorations/question_type/main_VAE_barebones_optim.py | saikrishnarallabandi/compositionality-expts | 98da8dff150db2b1d68560dd3f875f57142254e8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import argparse
import time
import math
import os
import torch
import torch.nn as nn
import torch.onnx
from torch.autograd import Variable
from data_loader_barebones_optim import *
import model_VAE_barebones as model
import generation_VAE_barebones as generation
from logger import *
import logging
par... | 34.350877 | 252 | 0.619127 |
796606e7f26246c07d5c6d31d78bc6e5c53ce0d9 | 239 | py | Python | com/LimePencil/Q15651/Main.py | LimePencil/baekjoonProblems | 61eeeeb875585d165d9e39ecdb3d905b4ba6aa87 | [
"MIT"
] | 2 | 2021-07-17T13:05:42.000Z | 2021-09-12T09:14:24.000Z | com/LimePencil/Q15651/Main.py | LimePencil/baekjoonProblems | 61eeeeb875585d165d9e39ecdb3d905b4ba6aa87 | [
"MIT"
] | null | null | null | com/LimePencil/Q15651/Main.py | LimePencil/baekjoonProblems | 61eeeeb875585d165d9e39ecdb3d905b4ba6aa87 | [
"MIT"
] | null | null | null | import sys
from itertools import product
n, m = list(map(int,sys.stdin.readline().strip('\n').split(" ")))
ls = list(product(range(1,n+1),repeat=m))
ans = ""
for x in ls:
ans += " ".join(list(map(str,x))) + "\n"
sys.stdout.write(ans) | 23.9 | 65 | 0.623431 |
79660708538a45a7f8337e45c0a6191ccc57f7a3 | 1,288 | py | Python | mripy/scripts/report_parameters.py | herrlich10/mripy | df9a8e57a21163579af49c59a9dcd2da279cb9fa | [
"MIT"
] | 3 | 2020-08-05T10:18:59.000Z | 2022-01-19T08:28:16.000Z | mripy/scripts/report_parameters.py | herrlich10/mripy | df9a8e57a21163579af49c59a9dcd2da279cb9fa | [
"MIT"
] | null | null | null | mripy/scripts/report_parameters.py | herrlich10/mripy | df9a8e57a21163579af49c59a9dcd2da279cb9fa | [
"MIT"
] | 4 | 2020-08-19T05:06:16.000Z | 2021-02-03T09:53:33.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
if __name__ == '__main__':
import argparse, textwrap
import script_utils # Append mripy to Python path
from mripy import dicom_report, utils
parser = argparse.ArgumentParse... | 49.538462 | 168 | 0.690994 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.