hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
191840622ba4f376a7f93c8724514c6d2f52d3bb | 1,393 | py | Python | africa/views.py | Mutugiii/Pinstagram | 40436facfb068eea135c6dffcdaf85028ff803c1 | [
"MIT"
] | null | null | null | africa/views.py | Mutugiii/Pinstagram | 40436facfb068eea135c6dffcdaf85028ff803c1 | [
"MIT"
] | 6 | 2021-03-30T13:09:41.000Z | 2021-09-08T01:50:42.000Z | africa/views.py | Mutugiii/Pinstagram | 40436facfb068eea135c6dffcdaf85028ff803c1 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
from django.template import loader
from .models import Location,Category,Image
def index(request):
'''Main view function for the start page'''
images = Image.get_images()
template = loader.get_template('index.html')
context = {
... | 30.955556 | 67 | 0.65542 |
1918493233bb0f6b63771c2685165671159e3808 | 509 | py | Python | src/chapter4/exercise6.py | group6BCS1/BCS-2021 | 272b1117922163cde03901cfdd82f8e0cfab9a67 | [
"MIT"
] | null | null | null | src/chapter4/exercise6.py | group6BCS1/BCS-2021 | 272b1117922163cde03901cfdd82f8e0cfab9a67 | [
"MIT"
] | null | null | null | src/chapter4/exercise6.py | group6BCS1/BCS-2021 | 272b1117922163cde03901cfdd82f8e0cfab9a67 | [
"MIT"
] | null | null | null | x = (input("enters hours"))
y = (input("enters rate"))
def compute_pay(hours, rate):
"""The try block ensures that the user enters a
value between from 0-1 otherwise an error message pops up"""
try:
hours = float(x)
rate = float(y)
if hours <= 40:
pay= float(hours * rate... | 23.136364 | 63 | 0.563851 |
1918ab57423bec266c18fa1bdfea020adfc67165 | 628 | py | Python | front_end/create_data_natalia_icassp.py | adiyoss/DeepVOT | 6bbda01fc5a4f93c92fccba2b9dacee511533244 | [
"MIT"
] | 6 | 2016-10-16T14:23:44.000Z | 2021-05-06T12:00:08.000Z | front_end/create_data_natalia_icassp.py | adiyoss/DeepVOT | 6bbda01fc5a4f93c92fccba2b9dacee511533244 | [
"MIT"
] | 3 | 2019-10-17T19:21:45.000Z | 2020-08-06T10:29:27.000Z | front_end/create_data_natalia_icassp.py | adiyoss/DeepVOT | 6bbda01fc5a4f93c92fccba2b9dacee511533244 | [
"MIT"
] | 8 | 2016-07-02T04:38:07.000Z | 2021-08-31T08:25:19.000Z | # import argparse
#
#
# def main(audio_path, textgrid_path, output_path):
# data = list()
# for
# print(1)
#
# if __name__ == "__main__":
# # -------------MENU-------------- #
# # command line arguments
# parser = argparse.ArgumentParser()
# parser.add_argument("audio_path", help="The path t... | 33.052632 | 83 | 0.638535 |
1918ecc1cb7ed0d73d2876e4710c8c0ffca95358 | 557 | py | Python | phone_numbers.py | EdilOndong/beginner_code | 13b05afb25ec2ba4396f5fbe751febe7cb4bdabb | [
"Unlicense"
] | 1 | 2021-09-19T13:33:33.000Z | 2021-09-19T13:33:33.000Z | phone_numbers.py | EdilOndong/beginner_code | 13b05afb25ec2ba4396f5fbe751febe7cb4bdabb | [
"Unlicense"
] | null | null | null | phone_numbers.py | EdilOndong/beginner_code | 13b05afb25ec2ba4396f5fbe751febe7cb4bdabb | [
"Unlicense"
] | null | null | null | import phonenumbers
from phonenumbers import geocoder, carrier
if __name__ == '__main__':
numbers = input("Please Enter The Target Number : ")
get_information_about_number(numbers) | 39.785714 | 125 | 0.732496 |
191b02340ae1fb3a92d5b7d4ecfd3b82e78caed3 | 3,494 | py | Python | src/templates/camera.py | coherentsolutionsinc/issoft-insights-2019-sdc-carla-ros | f6d3e162888bd79d59b771c82ff028df0f70ae11 | [
"MIT"
] | 8 | 2019-06-04T16:21:07.000Z | 2021-09-05T07:24:20.000Z | src/templates/camera.py | coherentsolutionsinc/issoft-insights-2019-sdc-carla-ros | f6d3e162888bd79d59b771c82ff028df0f70ae11 | [
"MIT"
] | null | null | null | src/templates/camera.py | coherentsolutionsinc/issoft-insights-2019-sdc-carla-ros | f6d3e162888bd79d59b771c82ff028df0f70ae11 | [
"MIT"
] | 1 | 2019-06-21T14:37:18.000Z | 2019-06-21T14:37:18.000Z | # TODO: 1. Add indicator that node should be run by python
# line above indicates that python is responsible for running this node
import os
import csv
import rospy
import numpy as np
import pygame
from utilities import pipline
import cv2
from cv_bridge import CvBridge, CvBridgeError
from sensor_msgs.msg import Im... | 30.920354 | 121 | 0.642244 |
191e560813185fd516419069f86e8ed6f0ccdaf4 | 393 | py | Python | Server APP/epl/rest/migrations/0012_auto_20180201_2304.py | seanjohn85/Premier-League | 61c1406733e9c6fb282f8a4544a2f16cd6ff80a0 | [
"MIT"
] | null | null | null | Server APP/epl/rest/migrations/0012_auto_20180201_2304.py | seanjohn85/Premier-League | 61c1406733e9c6fb282f8a4544a2f16cd6ff80a0 | [
"MIT"
] | null | null | null | Server APP/epl/rest/migrations/0012_auto_20180201_2304.py | seanjohn85/Premier-League | 61c1406733e9c6fb282f8a4544a2f16cd6ff80a0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-02-01 23:04
from __future__ import unicode_literals
from django.db import migrations
| 19.65 | 46 | 0.615776 |
191ea83d06729e5bde9055413df2bd0a44ff8fe7 | 2,669 | py | Python | plugins/beacon/alerta_beacon.py | ernadhalilovic/alerta-contrib | e12b5cf1e7f5913f641758032ca0d426c7eb8a08 | [
"MIT"
] | null | null | null | plugins/beacon/alerta_beacon.py | ernadhalilovic/alerta-contrib | e12b5cf1e7f5913f641758032ca0d426c7eb8a08 | [
"MIT"
] | null | null | null | plugins/beacon/alerta_beacon.py | ernadhalilovic/alerta-contrib | e12b5cf1e7f5913f641758032ca0d426c7eb8a08 | [
"MIT"
] | null | null | null | import logging
import os
import json
import requests
try:
from alerta.plugins import app # alerta >= 5.0
except ImportError:
from alerta.app import app # alerta < 5.0
from alerta.plugins import PluginBase
LOG = logging.getLogger('alerta.plugins.beacon')
BEACON_HEADERS = {
'Content-Type': 'applicati... | 35.118421 | 104 | 0.573248 |
1923272d7be3c0492ef9a0ede3d5a0e3b7f1d272 | 5,542 | py | Python | pyscriptman/hosts/host.py | reap2sow1/pyscriptman | 2020111097e846c3fb6c4669d67de05ee3ef979a | [
"MIT"
] | null | null | null | pyscriptman/hosts/host.py | reap2sow1/pyscriptman | 2020111097e846c3fb6c4669d67de05ee3ef979a | [
"MIT"
] | null | null | null | pyscriptman/hosts/host.py | reap2sow1/pyscriptman | 2020111097e846c3fb6c4669d67de05ee3ef979a | [
"MIT"
] | null | null | null | """The abstract class module for all hosts."""
# Standard Library Imports
from abc import ABC, abstractmethod, abstractclassmethod
# Third Party Imports
# Local Application Imports
from util.helpers import get_typeof_repo_names
from util.message import Message
def __init_subclass__(cls, *args, **kwargs):
... | 28.27551 | 83 | 0.616925 |
192369f557f40b35dc6e1a446089e36a7716438d | 488 | py | Python | discovery-provider/src/models/reward_manager.py | AudiusProject/audius-protocol | 0315c31402121b24faa039e93cea8869d5b80743 | [
"Apache-2.0"
] | 429 | 2019-08-14T01:34:07.000Z | 2022-03-30T06:31:38.000Z | discovery-provider/src/models/reward_manager.py | AudiusProject/audius-protocol | 0315c31402121b24faa039e93cea8869d5b80743 | [
"Apache-2.0"
] | 998 | 2019-08-14T01:52:37.000Z | 2022-03-31T23:17:22.000Z | discovery-provider/src/models/reward_manager.py | AudiusProject/audius-protocol | 0315c31402121b24faa039e93cea8869d5b80743 | [
"Apache-2.0"
] | 73 | 2019-10-04T04:24:16.000Z | 2022-03-24T16:27:30.000Z | from sqlalchemy import (
Column,
Integer,
String,
DateTime,
)
from .models import Base | 25.684211 | 64 | 0.719262 |
1924e772ac06a1b05910f40c7a40911d19ba34ea | 2,326 | py | Python | plugins/roll.py | Cyame/OkayuTweetBot | 5ca257f2faa622f5b88cecc95522f2114e5717fc | [
"MIT"
] | 3 | 2020-04-10T16:47:25.000Z | 2020-05-17T14:44:47.000Z | plugins/roll.py | Cyame/OkayuTweetBot | 5ca257f2faa622f5b88cecc95522f2114e5717fc | [
"MIT"
] | null | null | null | plugins/roll.py | Cyame/OkayuTweetBot | 5ca257f2faa622f5b88cecc95522f2114e5717fc | [
"MIT"
] | 1 | 2020-04-12T09:38:22.000Z | 2020-04-12T09:38:22.000Z | from nonebot import on_command, CommandSession,permission as perm
import asyncio
import traceback
from helper import getlogger,msgSendToBot,CQsessionToStr,data_read,data_save
from module.roll import match_roll
logger = getlogger(__name__)
__plugin_name__ = 'ROLL'
__plugin_usage__ = r"""
roll
"""
#
# on_command | 32.305556 | 87 | 0.602322 |
1925e952156fee34defbc265e2d492362c1470a4 | 384 | py | Python | wip/ray/serve/archive/serve-dag-client.py | nitish-raj/data-science-on-aws | b760805d28f8375094ce83aee849de8b9d3382a2 | [
"Apache-2.0"
] | 42 | 2022-02-27T16:16:57.000Z | 2022-03-30T20:11:05.000Z | wip/ray/serve/archive/serve-dag-client.py | nitish-raj/data-science-on-aws | b760805d28f8375094ce83aee849de8b9d3382a2 | [
"Apache-2.0"
] | null | null | null | wip/ray/serve/archive/serve-dag-client.py | nitish-raj/data-science-on-aws | b760805d28f8375094ce83aee849de8b9d3382a2 | [
"Apache-2.0"
] | 26 | 2022-02-28T18:28:11.000Z | 2022-03-29T13:15:22.000Z | import time
import requests
# Http endpoint
cur = time.time()
print(requests.post("http://127.0.0.1:8000/my-dag", json=["5", [1, 2], "sum"]).text)
print(f"Time spent: {round(time.time() - cur, 2)} secs.")
# Http endpoint
cur = time.time()
print(requests.post("http://127.0.0.1:8000/my-dag", json=["1", [0, 2], "max"]).... | 29.538462 | 84 | 0.630208 |
192684c2fc33a3cff3429a446241736d19388fbe | 697 | py | Python | apps/careeropportunity/migrations/0015_auto_20200426_1109.py | Kpaubert/onlineweb4 | 9ac79f163bc3a816db57ffa8477ea88770d97807 | [
"MIT"
] | 32 | 2017-02-22T13:38:38.000Z | 2022-03-31T23:29:54.000Z | apps/careeropportunity/migrations/0015_auto_20200426_1109.py | Kpaubert/onlineweb4 | 9ac79f163bc3a816db57ffa8477ea88770d97807 | [
"MIT"
] | 694 | 2017-02-15T23:09:52.000Z | 2022-03-31T23:16:07.000Z | apps/careeropportunity/migrations/0015_auto_20200426_1109.py | Kpaubert/onlineweb4 | 9ac79f163bc3a816db57ffa8477ea88770d97807 | [
"MIT"
] | 35 | 2017-09-02T21:13:09.000Z | 2022-02-21T11:30:30.000Z | # Generated by Django 3.0.5 on 2020-04-26 09:09
from django.db import migrations, models
import django.db.models.deletion
| 26.807692 | 60 | 0.604017 |
1928b4ff5a13f2e891c264d668791fc8b69f1469 | 790 | py | Python | Businesslayer/Email_Validate.py | rohitgs28/FindMyEmployer | d4b369eb488f44e40ef371ac09847f8ccc39994c | [
"MIT"
] | null | null | null | Businesslayer/Email_Validate.py | rohitgs28/FindMyEmployer | d4b369eb488f44e40ef371ac09847f8ccc39994c | [
"MIT"
] | null | null | null | Businesslayer/Email_Validate.py | rohitgs28/FindMyEmployer | d4b369eb488f44e40ef371ac09847f8ccc39994c | [
"MIT"
] | null | null | null | import os
import os.path
import logging
import sys
import IValidator
import re
sys.path.append(os.path.abspath(os.path.join('0', '../extensions')))
from extensions_logging import logmyerror | 32.916667 | 73 | 0.640506 |
192a1f5991a077d1bd0f6488cd823461b384cac5 | 188 | py | Python | psmate/apps/blog/admin.py | vgrivtsov/psmate | 10e0279b995d36518e0867e8c5d5125c355a2f00 | [
"MIT"
] | null | null | null | psmate/apps/blog/admin.py | vgrivtsov/psmate | 10e0279b995d36518e0867e8c5d5125c355a2f00 | [
"MIT"
] | null | null | null | psmate/apps/blog/admin.py | vgrivtsov/psmate | 10e0279b995d36518e0867e8c5d5125c355a2f00 | [
"MIT"
] | null | null | null | from django.contrib import admin
from psmate.models import News
admin.site.register(News, BlogAdmin)
| 17.090909 | 46 | 0.75 |
192a9867b561e4cc653889667cda0bafef034b8e | 4,706 | py | Python | Main/APIUsagePatternSearcher.py | SMAT-Lab/APIMatchmaker | 0cc5c68f7f2aba570ad4c583bbc5ec757158c676 | [
"MIT"
] | null | null | null | Main/APIUsagePatternSearcher.py | SMAT-Lab/APIMatchmaker | 0cc5c68f7f2aba570ad4c583bbc5ec757158c676 | [
"MIT"
] | null | null | null | Main/APIUsagePatternSearcher.py | SMAT-Lab/APIMatchmaker | 0cc5c68f7f2aba570ad4c583bbc5ec757158c676 | [
"MIT"
] | null | null | null | # coding:utf-8
import re
from Helper.common import *
| 35.923664 | 116 | 0.563536 |
192b90d17689e6aeda21369042966d2de1a7f460 | 335 | py | Python | Beginner/Ambiguous Permutations (PERMUT2)/permutation.py | anishsingh42/CodeChef | 50f5c0438516210895e513bc4ee959b9d99ef647 | [
"Apache-2.0"
] | 127 | 2020-10-13T18:04:35.000Z | 2022-02-17T10:56:27.000Z | Beginner/Ambiguous Permutations (PERMUT2)/permutation.py | anishsingh42/CodeChef | 50f5c0438516210895e513bc4ee959b9d99ef647 | [
"Apache-2.0"
] | 132 | 2020-10-13T18:06:53.000Z | 2021-10-17T18:44:26.000Z | Beginner/Ambiguous Permutations (PERMUT2)/permutation.py | anishsingh42/CodeChef | 50f5c0438516210895e513bc4ee959b9d99ef647 | [
"Apache-2.0"
] | 364 | 2020-10-13T18:04:52.000Z | 2022-03-04T14:34:53.000Z | while True :
n = int(input())
if n == 0 :
break
else :
arr = input().split()
check = True
for i in range(n) :
if int(arr[int(arr[i]) - 1]) != i + 1 :
check = False
if check :
print('ambiguous')
else :
print('... | 23.928571 | 51 | 0.402985 |
192bad6eff2c66e4ca11db59cd7ea795ca554716 | 2,140 | py | Python | src/voiceassistant/integrations/respeaker.py | vadimtitov/voice-assistant | 9ed6a799f44d5a546eb712195e3e84e6ff10d2fa | [
"Apache-2.0"
] | 1 | 2021-12-19T14:59:31.000Z | 2021-12-19T14:59:31.000Z | src/voiceassistant/integrations/respeaker.py | vadimtitov/voice-assistant | 9ed6a799f44d5a546eb712195e3e84e6ff10d2fa | [
"Apache-2.0"
] | 3 | 2021-09-16T20:47:58.000Z | 2021-12-19T02:45:59.000Z | src/voiceassistant/integrations/respeaker.py | vadimtitov/voice-assistant | 9ed6a799f44d5a546eb712195e3e84e6ff10d2fa | [
"Apache-2.0"
] | null | null | null | """Add-On functions for speech interface."""
from __future__ import annotations
from typing import TYPE_CHECKING, List
from voiceassistant.addons.create import Addon, CoreAttribute, addon_begin, addon_end
from voiceassistant.exceptions import IntegrationError
from .base import Integration
if TYPE_CHECKING:
fro... | 24.883721 | 98 | 0.700935 |
192bfb70b6700b39e9f6c097fb207ffc155ff246 | 4,602 | py | Python | src/driving_curriculum/agents/neural_networks/tf/tf_novelty_detector.py | takeitallsource/pac-simulator | 2c00d878047ec4a0247167e8a7de5aec8b474086 | [
"MIT"
] | 1 | 2018-07-14T07:09:23.000Z | 2018-07-14T07:09:23.000Z | src/driving_curriculum/agents/neural_networks/tf/tf_novelty_detector.py | takeitallsource/pac-simulator | 2c00d878047ec4a0247167e8a7de5aec8b474086 | [
"MIT"
] | null | null | null | src/driving_curriculum/agents/neural_networks/tf/tf_novelty_detector.py | takeitallsource/pac-simulator | 2c00d878047ec4a0247167e8a7de5aec8b474086 | [
"MIT"
] | null | null | null | from math import cos, sin
import numpy as np
import tensorflow as tf
from .....simulator import Agent
# from simulator import Agent
tf.set_random_seed(1234)
| 37.112903 | 100 | 0.634941 |
192c65ff044acb45e1b0a8921920efeebef0c02a | 4,093 | py | Python | setup.py | opalmer/pycffiwin32 | 39210182a92e93c37a9f1c644fd5fcc1aa32f6d1 | [
"MIT"
] | 10 | 2015-11-19T12:39:50.000Z | 2021-02-21T20:15:29.000Z | setup.py | opalmer/pycffiwin32 | 39210182a92e93c37a9f1c644fd5fcc1aa32f6d1 | [
"MIT"
] | 109 | 2015-06-15T05:03:33.000Z | 2018-01-14T10:18:48.000Z | setup.py | opalmer/pycffiwin32 | 39210182a92e93c37a9f1c644fd5fcc1aa32f6d1 | [
"MIT"
] | 8 | 2015-07-29T04:18:27.000Z | 2018-11-02T17:15:40.000Z | from __future__ import print_function
import os
import sys
from errno import ENOENT
from os.path import dirname, abspath, join, isdir
from setuptools import setup, find_packages
from distutils.command.upload import upload
from pywincffi import __version__
try:
WindowsError
except NameError:
WindowsError = ... | 31.728682 | 79 | 0.583435 |
192d556dfe9b06a1468a98d96f04aa0a6fb881ce | 331 | py | Python | data/split.py | manhcuongk55/gender-classification-by-hand | cafc5781f9c0a6476e848239f13d3ddf3a55de59 | [
"MIT"
] | null | null | null | data/split.py | manhcuongk55/gender-classification-by-hand | cafc5781f9c0a6476e848239f13d3ddf3a55de59 | [
"MIT"
] | null | null | null | data/split.py | manhcuongk55/gender-classification-by-hand | cafc5781f9c0a6476e848239f13d3ddf3a55de59 | [
"MIT"
] | 1 | 2020-12-07T06:38:16.000Z | 2020-12-07T06:38:16.000Z | import shutil
with open('test.csv', 'r') as f:
lines = f.readlines()
for line in lines:
image, gender = line.split(",")
print(image)
if 'female' in gender:
shutil.move("test/" + image, "test/female/" + image)
else:
shutil.move("test/" + image, "test/male/... | 27.583333 | 64 | 0.531722 |
192f1d7e5401a66f3ca654feee18cca382797d01 | 2,941 | py | Python | generate.py | fnrcum/dungeon_generator | 7f5d1bd1b612f66e39f2782eac6fcd40abe7f7f0 | [
"MIT"
] | null | null | null | generate.py | fnrcum/dungeon_generator | 7f5d1bd1b612f66e39f2782eac6fcd40abe7f7f0 | [
"MIT"
] | null | null | null | generate.py | fnrcum/dungeon_generator | 7f5d1bd1b612f66e39f2782eac6fcd40abe7f7f0 | [
"MIT"
] | null | null | null | import random
from helpers import Leaf, Rect, RoomList
from renderer import MapRenderer
from typing import List, Any
room_list = RoomList()
tree = BSPTree().generateLevel(64, 128, room_list)
MapRenderer(tree).render_map()
print(room_list.get_rooms()[5].get_random_point_in_room())
| 35.011905 | 82 | 0.550493 |
1930fdebe216693651fdbce0248a0cc3fa01cfe6 | 4,387 | py | Python | src/sima/riflex/crsaxialfrictionmodel.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | src/sima/riflex/crsaxialfrictionmodel.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | src/sima/riflex/crsaxialfrictionmodel.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | # This an autogenerated file
#
# Generated with CRSAxialFrictionModel
from typing import Dict,Sequence,List
from dmt.entity import Entity
from dmt.blueprint import Blueprint
from .blueprints.crsaxialfrictionmodel import CRSAxialFrictionModelBlueprint
from typing import Dict
from sima.sima.moao import MOAO
from sima.si... | 29.641892 | 174 | 0.647367 |
19310709fccc926261a99f530ec7e2d84e44988f | 3,142 | py | Python | Drop7/test/Disk_Test.py | SanderP99/Drop7 | b11c2590d3cc1e311fb34a4635a1f6c075d9cb59 | [
"MIT"
] | null | null | null | Drop7/test/Disk_Test.py | SanderP99/Drop7 | b11c2590d3cc1e311fb34a4635a1f6c075d9cb59 | [
"MIT"
] | null | null | null | Drop7/test/Disk_Test.py | SanderP99/Drop7 | b11c2590d3cc1e311fb34a4635a1f6c075d9cb59 | [
"MIT"
] | null | null | null | # import Drop7.Board as Board
import Drop7.Disk as Disk
def test_Is_Proper_Disk__Legal_Case(score, max_score):
"""Function is_proper_disk: given disk is proper disk."""
max_score.value += 1
try:
assert Disk.is_proper_disk(4, Disk.init_disk(Disk.VISIBLE, 4))
assert Disk.is_proper_disk(4, Dis... | 26.854701 | 74 | 0.638765 |
19340df43351011be81d21c8afe59df9e5f9d483 | 1,821 | py | Python | Sensors/MaxSonarTTY.py | paceaux/pi-projects | c9eb1f138868d41f8304c4251382cc4a6d161ba8 | [
"MIT"
] | null | null | null | Sensors/MaxSonarTTY.py | paceaux/pi-projects | c9eb1f138868d41f8304c4251382cc4a6d161ba8 | [
"MIT"
] | null | null | null | Sensors/MaxSonarTTY.py | paceaux/pi-projects | c9eb1f138868d41f8304c4251382cc4a6d161ba8 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# Filename: maxSonarTTY.py
# Reads serial data from Maxbotix ultrasonic rangefinders
# Gracefully handles most common serial data glitches
# Use as an importable module with "import MaxSonarTTY"
# Returns an integer value representing distance to target in millimeters
from time import time
from ser... | 33.109091 | 84 | 0.556837 |
1935e935a94ea899193f63cf6a01d898e2f578ec | 2,577 | py | Python | tests/output/TestFile.py | dstore-dbap/LumberMill | b7cbadc209a83386871735b8ad88b61da917a6ab | [
"Apache-2.0"
] | 15 | 2015-12-14T19:07:28.000Z | 2022-02-28T13:32:11.000Z | tests/output/TestFile.py | dstore-dbap/LumberMill | b7cbadc209a83386871735b8ad88b61da917a6ab | [
"Apache-2.0"
] | null | null | null | tests/output/TestFile.py | dstore-dbap/LumberMill | b7cbadc209a83386871735b8ad88b61da917a6ab | [
"Apache-2.0"
] | 4 | 2017-02-08T10:49:55.000Z | 2019-03-19T18:47:46.000Z | import sys
import os
import io
import gzip
import mock
import tempfile
import lumbermill.utils.DictUtils as DictUtils
from tests.ModuleBaseTestCase import ModuleBaseTestCase
from lumbermill.output import File
| 37.347826 | 128 | 0.629414 |
19368974491b6add6e004f6c293a6ac67a000708 | 4,517 | py | Python | user_scripts/decode_logits.py | DavidHribek/pero-ocr | 8d274282813878b3e31dd560563a36b3f02e5c33 | [
"BSD-3-Clause"
] | null | null | null | user_scripts/decode_logits.py | DavidHribek/pero-ocr | 8d274282813878b3e31dd560563a36b3f02e5c33 | [
"BSD-3-Clause"
] | null | null | null | user_scripts/decode_logits.py | DavidHribek/pero-ocr | 8d274282813878b3e31dd560563a36b3f02e5c33 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import argparse
import pickle
import time
import sys
from safe_gpu.safe_gpu import GPUOwner
from pero_ocr.decoding import confusion_networks
from pero_ocr.decoding.decoding_itf import prepare_dense_logits, construct_lm, get_ocr_charset, BLANK_SYMBOL
import pero_ocr.decoding.decoders as decoder... | 34.480916 | 150 | 0.651317 |
1936ec832cd585d63cf22975d9e0473abed83035 | 1,608 | py | Python | PiCN/Layers/ICNLayer/ContentStore/ContentStoreMemoryExact.py | NikolaiRutz/PiCN | 7775c61caae506a88af2e4ec34349e8bd9098459 | [
"BSD-3-Clause"
] | null | null | null | PiCN/Layers/ICNLayer/ContentStore/ContentStoreMemoryExact.py | NikolaiRutz/PiCN | 7775c61caae506a88af2e4ec34349e8bd9098459 | [
"BSD-3-Clause"
] | 5 | 2020-07-15T09:01:42.000Z | 2020-09-28T08:45:21.000Z | PiCN/Layers/ICNLayer/ContentStore/ContentStoreMemoryExact.py | NikolaiRutz/PiCN | 7775c61caae506a88af2e4ec34349e8bd9098459 | [
"BSD-3-Clause"
] | null | null | null | """ An in-memory content store with exact matching"""
import time
from PiCN.Packets import Content, Name
from PiCN.Layers.ICNLayer.ContentStore import BaseContentStore, ContentStoreEntry
| 34.212766 | 83 | 0.65796 |
193ab624d131e849acb875b0bc59e01faf091e1d | 279 | py | Python | texaslan/slack/pipelines/on_success.py | hsmeans/texaslan.org | a981e7835381e77320e39536a619981ba9d03451 | [
"MIT"
] | 2 | 2018-02-06T06:24:03.000Z | 2018-03-20T03:32:13.000Z | texaslan/slack/pipelines/on_success.py | hsmeans/texaslan.org | a981e7835381e77320e39536a619981ba9d03451 | [
"MIT"
] | 32 | 2017-02-21T20:01:43.000Z | 2020-02-08T21:52:16.000Z | texaslan/slack/pipelines/on_success.py | hsmeans/texaslan.org | a981e7835381e77320e39536a619981ba9d03451 | [
"MIT"
] | 6 | 2017-03-21T21:16:40.000Z | 2020-02-08T20:46:20.000Z | from django_slack_oauth.models import SlackOAuthRequest | 27.9 | 55 | 0.749104 |
193b0ac325ef43006df164a8a14a3f901439a20c | 185 | py | Python | main_app/forms.py | reeshabhkumarranjan/SocPay | ba3f3ea0b7b814e1ca40293b14f192b6d40adbbd | [
"MIT"
] | null | null | null | main_app/forms.py | reeshabhkumarranjan/SocPay | ba3f3ea0b7b814e1ca40293b14f192b6d40adbbd | [
"MIT"
] | null | null | null | main_app/forms.py | reeshabhkumarranjan/SocPay | ba3f3ea0b7b814e1ca40293b14f192b6d40adbbd | [
"MIT"
] | null | null | null | from django.forms import ModelForm
# class add_money_form(ModelForm):
# class Meta:
# model = Transaction
# fields = ['transaction_user_2', 'transaction_amount']
| 20.555556 | 63 | 0.675676 |
193c6a68a587626a9b404a216a915daaf939afcb | 7,187 | py | Python | leetcode_python/Design/first-unique-number.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Design/first-unique-number.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Design/first-unique-number.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | """
1429. First Unique Number
# https://leetcode.ca/all/1429.html
You have a queue of integers, you need to retrieve the first unique integer in the queue.
Implement the FirstUnique class:
FirstUnique(int[] nums) Initializes the object with the numbers in the queue.
int showFirstUnique() returns the value of the f... | 27.856589 | 125 | 0.579797 |
193cb661b098c4c5b452e6a65209cb9479f364c3 | 4,326 | py | Python | get_git/github_client.py | alanahanson/get-git | a3b078a64ce8f4bb7103fcd46a0eee80cd35f87c | [
"MIT"
] | null | null | null | get_git/github_client.py | alanahanson/get-git | a3b078a64ce8f4bb7103fcd46a0eee80cd35f87c | [
"MIT"
] | null | null | null | get_git/github_client.py | alanahanson/get-git | a3b078a64ce8f4bb7103fcd46a0eee80cd35f87c | [
"MIT"
] | null | null | null | import os
from get_git.utils import make_request
GH_URL = 'https://api.github.com/graphql'
TOKEN=os.environ.get('GH_API_TOKEN')
| 35.170732 | 100 | 0.487286 |
193eb2395e6afc892c407dab660196002686ac81 | 15,517 | py | Python | Naluno/model.py | dstarrago/Naluno | de2a498b65ac7e10599f797e41c77d0ceae56c3e | [
"MIT"
] | null | null | null | Naluno/model.py | dstarrago/Naluno | de2a498b65ac7e10599f797e41c77d0ceae56c3e | [
"MIT"
] | null | null | null | Naluno/model.py | dstarrago/Naluno | de2a498b65ac7e10599f797e41c77d0ceae56c3e | [
"MIT"
] | null | null | null |
from __future__ import division, print_function, unicode_literals
from config import *
__all__ = ['Map', 'Vertex', 'Edge', 'State']
class Edge:
def __init__(self):
self._port = [State.FREE, State.FREE, State.FREE]
self._num_cards = 0
self._contact_number = 0
def u... | 32.875 | 98 | 0.569827 |
194088485187df0c1ce817432f67940ecca472cb | 1,035 | py | Python | combo/search/score.py | yanpei18345156216/COMBO_Python3 | 666a116dfece71e6236291e89ea2ab4d6db0ead9 | [
"MIT"
] | 139 | 2016-02-18T02:31:04.000Z | 2022-02-18T10:38:06.000Z | combo/search/score.py | yanpei18345156216/COMBO_Python3 | 666a116dfece71e6236291e89ea2ab4d6db0ead9 | [
"MIT"
] | 8 | 2016-04-18T08:10:44.000Z | 2020-12-30T08:49:33.000Z | combo/search/score.py | yanpei18345156216/COMBO_Python3 | 666a116dfece71e6236291e89ea2ab4d6db0ead9 | [
"MIT"
] | 50 | 2016-05-21T01:17:23.000Z | 2022-02-18T01:27:41.000Z | import numpy as np
import scipy.stats
| 24.069767 | 67 | 0.656039 |
19414c412df3d7fe628fab1103ed1b978f8a57d8 | 1,528 | py | Python | dags/calculating_google_ads_network.py | BjMrq/Python-AirflowReportPipeline | 261812488d661580cb0f41808d94249cc8e0951b | [
"MIT"
] | 2 | 2019-06-28T20:08:56.000Z | 2021-03-30T15:24:10.000Z | dags/calculating_google_ads_network.py | BjMrq/Python-AirflowReportPipeline | 261812488d661580cb0f41808d94249cc8e0951b | [
"MIT"
] | null | null | null | dags/calculating_google_ads_network.py | BjMrq/Python-AirflowReportPipeline | 261812488d661580cb0f41808d94249cc8e0951b | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
LOCAL_DIR = '/tmp/'
if __name__ == '__main__':
main()
| 27.781818 | 78 | 0.621073 |
1941b9b85d89dbfd9a868d046110eb8fc8e84d5a | 1,401 | py | Python | src/auditor/org_checker.py | agrc/agol-validator | b17f3fee55bf0b1f7d2ed21ae86b1556072da4d8 | [
"MIT"
] | null | null | null | src/auditor/org_checker.py | agrc/agol-validator | b17f3fee55bf0b1f7d2ed21ae86b1556072da4d8 | [
"MIT"
] | 21 | 2020-01-29T22:03:54.000Z | 2020-07-29T17:55:44.000Z | src/auditor/org_checker.py | agrc/agol-validator | b17f3fee55bf0b1f7d2ed21ae86b1556072da4d8 | [
"MIT"
] | null | null | null | """
Holds an OrgChecker object that runs checks at the organization level (instead of at the item level)
"""
| 29.808511 | 117 | 0.628837 |
1941f729283db4adc38960fd6ecd423a78269f4b | 994 | py | Python | create_post.py | schlop/blog | 74fe7d5ce4e1c00942cb033710720098ac493844 | [
"MIT"
] | null | null | null | create_post.py | schlop/blog | 74fe7d5ce4e1c00942cb033710720098ac493844 | [
"MIT"
] | null | null | null | create_post.py | schlop/blog | 74fe7d5ce4e1c00942cb033710720098ac493844 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from datetime import datetime
import sys
if __name__ == '__main__':
if len(sys.argv):
create_blog_post(sys.argv[1])
else:
create_blog_post()
| 26.157895 | 80 | 0.573441 |
194306ac920374768433626240e00df6f0b039ac | 1,436 | py | Python | src/python/procyon/py3.py | orbea/procyon | 469d94427d3b6e7cc2ab93606bdf968717a49150 | [
"Apache-2.0"
] | null | null | null | src/python/procyon/py3.py | orbea/procyon | 469d94427d3b6e7cc2ab93606bdf968717a49150 | [
"Apache-2.0"
] | null | null | null | src/python/procyon/py3.py | orbea/procyon | 469d94427d3b6e7cc2ab93606bdf968717a49150 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2017 The Procyon Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | 29.306122 | 74 | 0.664345 |
1943cab210caf1760efe3b398e0efc3f17bdc7ab | 693 | py | Python | interlens/criterions/criterion.py | cctien/bimultialign | d0dad62651c25545fb7539639cb72fc8ea2570aa | [
"MIT"
] | null | null | null | interlens/criterions/criterion.py | cctien/bimultialign | d0dad62651c25545fb7539639cb72fc8ea2570aa | [
"MIT"
] | null | null | null | interlens/criterions/criterion.py | cctien/bimultialign | d0dad62651c25545fb7539639cb72fc8ea2570aa | [
"MIT"
] | null | null | null | from allennlp.common import Registrable
import torch
# Losses = Dict[str, Dict[str, Union[float, Loss]]]
| 23.896552 | 51 | 0.572872 |
1944d33ab633803b83a02f71e2b185489b6751ce | 2,180 | py | Python | week10_classes/seminar/generator_widgets.py | fortminors/msai-python | 1dfe19c132cd59125ef64164cce007845ffb6cf8 | [
"MIT"
] | 9 | 2021-03-12T06:59:10.000Z | 2022-01-21T20:23:31.000Z | week10_classes/seminar/generator_widgets.py | fortminors/msai-python | 1dfe19c132cd59125ef64164cce007845ffb6cf8 | [
"MIT"
] | null | null | null | week10_classes/seminar/generator_widgets.py | fortminors/msai-python | 1dfe19c132cd59125ef64164cce007845ffb6cf8 | [
"MIT"
] | 14 | 2021-03-25T15:23:19.000Z | 2022-02-05T14:34:40.000Z | # Form implementation generated from reading ui file 'generator.ui'
#
# Created by: PyQt6 UI code generator 6.2.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt6 import QtCore, QtGui, QtWidgets
| 45.416667 | 86 | 0.707798 |
19455519ed74bb43e4ac991488c150b0c157ddd6 | 5,247 | py | Python | sportradar/NFL.py | scrambldchannel/SportradarAPIs | e42e128313647d51784b6f1f3aa201b07fca0a08 | [
"MIT"
] | 33 | 2018-07-05T17:07:06.000Z | 2022-02-05T16:32:19.000Z | sportradar/NFL.py | scrambldchannel/SportradarAPIs | e42e128313647d51784b6f1f3aa201b07fca0a08 | [
"MIT"
] | 6 | 2018-11-16T15:53:33.000Z | 2021-06-26T23:04:33.000Z | sportradar/NFL.py | scrambldchannel/SportradarAPIs | e42e128313647d51784b6f1f3aa201b07fca0a08 | [
"MIT"
] | 17 | 2018-08-08T08:10:49.000Z | 2021-10-06T00:25:21.000Z | # Sportradar APIs
# Copyright 2018 John W. Miller
# See LICENSE for details.
from sportradar.api import API
| 45.232759 | 90 | 0.658853 |
1945a3089e1f6313c2cc75593bf5a6b3e3eaea61 | 4,767 | py | Python | rain/models/posemb_transformer.py | qq1418381215/caat | 1422707bef7a2aeca272fa085f410bff07ced760 | [
"MIT"
] | 14 | 2021-09-15T02:49:18.000Z | 2022-03-15T06:00:54.000Z | rain/models/posemb_transformer.py | qq1418381215/caat | 1422707bef7a2aeca272fa085f410bff07ced760 | [
"MIT"
] | 11 | 2021-09-17T03:17:07.000Z | 2022-02-08T03:12:41.000Z | rain/models/posemb_transformer.py | qq1418381215/caat | 1422707bef7a2aeca272fa085f410bff07ced760 | [
"MIT"
] | 2 | 2021-11-06T19:22:29.000Z | 2022-03-24T11:56:11.000Z | import torch
import os
from torch import Tensor
import torch.nn as nn
from fairseq import options, utils, checkpoint_utils
from fairseq.dataclass import ChoiceEnum, FairseqDataclass
from fairseq.models import (
transformer,
FairseqLanguageModel,
register_model,
register_model_architecture,
FairseqEn... | 42.5625 | 102 | 0.680092 |
1946122a44cafe21fe0a3f27b222402b8e3d88b9 | 6,345 | py | Python | ensembl_map/symbol.py | mattdoug604/ensembl_map | 5edb8a48943df4b53effe3cd7ddf4d461fdd4bae | [
"MIT"
] | null | null | null | ensembl_map/symbol.py | mattdoug604/ensembl_map | 5edb8a48943df4b53effe3cd7ddf4d461fdd4bae | [
"MIT"
] | 1 | 2020-03-24T18:20:15.000Z | 2020-03-25T22:56:06.000Z | ensembl_map/symbol.py | mattdoug604/ensembl_map | 5edb8a48943df4b53effe3cd7ddf4d461fdd4bae | [
"MIT"
] | null | null | null | from .ensembl import Ensembl
from .util import is_ensembl_id
##########
## Exon ##
##########
##########
## Gene ##
##########
#############
## Protein ##
#############
#################
## Transcripts ##
#################
#####################
## Query functions ##
#####################
| 35.446927 | 96 | 0.695035 |
194675cce0a60e3494b3def09e1010cda20f0f00 | 1,113 | py | Python | MiGRIDS/InputHandler/readAllTimeSeries.py | mmuellerstoffels/GBSTools | aebd8aa6667a2284aaa16424f9b9d22ca3a2a375 | [
"MIT"
] | 8 | 2019-02-18T14:18:55.000Z | 2022-03-04T12:34:24.000Z | MiGRIDS/InputHandler/readAllTimeSeries.py | mmuellerstoffels/GBSTools | aebd8aa6667a2284aaa16424f9b9d22ca3a2a375 | [
"MIT"
] | 3 | 2018-09-01T00:30:19.000Z | 2018-09-01T01:09:50.000Z | MiGRIDS/InputHandler/readAllTimeSeries.py | acep-uaf/GBSTools | aebd8aa6667a2284aaa16424f9b9d22ca3a2a375 | [
"MIT"
] | 3 | 2019-06-10T19:49:22.000Z | 2021-05-08T08:42:57.000Z | from MiGRIDS.InputHandler.readCsv import readCsv
def readAllTimeSeries(inputDict):
'''
Cycles through a list of files in the AVEC format and imports them into a single dataframe.
:param inputDict:
:return: pandas.DataFrame with data from all input files.
'''
df = None
for i in range(len(inp... | 33.727273 | 95 | 0.591195 |
1946a0c16887bdd25321c997aa98e68109542c3a | 12,725 | py | Python | tests/test_dryruns.py | gmcgoldr/pyteal_utils | 6dc33d1f18b73ce26163040e37fb145ccd5c1de8 | [
"MIT"
] | 2 | 2021-12-16T15:43:46.000Z | 2022-01-11T13:24:50.000Z | tests/test_dryruns.py | gmcgoldr/pyteal_utils | 6dc33d1f18b73ce26163040e37fb145ccd5c1de8 | [
"MIT"
] | null | null | null | tests/test_dryruns.py | gmcgoldr/pyteal_utils | 6dc33d1f18b73ce26163040e37fb145ccd5c1de8 | [
"MIT"
] | 1 | 2022-01-11T13:25:03.000Z | 2022-01-11T13:25:03.000Z | import algosdk as ag
import pyteal as tl
import pytest
from algosdk.future.transaction import OnComplete
from algosdk.v2client.algod import AlgodClient
from algosdk.v2client.models.application_local_state import ApplicationLocalState
from algosdk.v2client.models.application_state_schema import ApplicationStateSchema
f... | 36.048159 | 88 | 0.691473 |
19476d50e68179e3181c58bfc67d757bccf5c292 | 6,191 | py | Python | aatrn.py | kmkurn/uxtspwsd | ea4da18cec023d0dc487ee061861e6715edc2e85 | [
"MIT"
] | null | null | null | aatrn.py | kmkurn/uxtspwsd | ea4da18cec023d0dc487ee061861e6715edc2e85 | [
"MIT"
] | null | null | null | aatrn.py | kmkurn/uxtspwsd | ea4da18cec023d0dc487ee061861e6715edc2e85 | [
"MIT"
] | null | null | null | # Copyright (c) 2021 Kemal Kurniawan
from typing import Optional
import math
from einops import rearrange
from torch import BoolTensor, Tensor
from crf import DepTreeCRF, LinearCRF
def compute_ambiguous_arcs_mask(
scores: Tensor,
threshold: float = 0.95,
projective: bool = False,
multiroot: bool =... | 37.295181 | 95 | 0.709255 |
1947c38029e5b214e95d735bbab912cedc55ad7e | 5,151 | py | Python | wildlifelicensing/apps/returns/models.py | jawaidm/wildlifelicensing | 87e8e9ab163e0d7bbb0c7a654a13ce8a4d8fcf82 | [
"Apache-2.0"
] | null | null | null | wildlifelicensing/apps/returns/models.py | jawaidm/wildlifelicensing | 87e8e9ab163e0d7bbb0c7a654a13ce8a4d8fcf82 | [
"Apache-2.0"
] | 11 | 2019-03-19T02:03:11.000Z | 2019-05-31T07:20:59.000Z | wildlifelicensing/apps/returns/models.py | jawaidm/wildlifelicensing | 87e8e9ab163e0d7bbb0c7a654a13ce8a4d8fcf82 | [
"Apache-2.0"
] | 2 | 2020-08-10T10:17:10.000Z | 2021-10-31T23:20:53.000Z | from __future__ import unicode_literals
from django.db import models
from django.contrib.postgres.fields.jsonb import JSONField
from django.core.exceptions import ValidationError
import datapackage
import jsontableschema
from ledger.accounts.models import RevisionedMixin, EmailUser
from wildlifelicensing.apps.main.m... | 34.57047 | 113 | 0.664143 |
194979bac6f323e9a28bd3fab05ed2877e60ddea | 605 | py | Python | CE_to_AE_enemy_converter.py | Plouni/mari0_se_ce_to_ae_level_converter | 9aa0d0ebffac4df1b5d541ff003bd9abeb187a0a | [
"MIT"
] | 1 | 2022-02-03T23:07:20.000Z | 2022-02-03T23:07:20.000Z | CE_to_AE_enemy_converter.py | Plouni/mari0_se_ce_to_ae_level_converter | 9aa0d0ebffac4df1b5d541ff003bd9abeb187a0a | [
"MIT"
] | null | null | null | CE_to_AE_enemy_converter.py | Plouni/mari0_se_ce_to_ae_level_converter | 9aa0d0ebffac4df1b5d541ff003bd9abeb187a0a | [
"MIT"
] | null | null | null | import os
import json
import logging
cwd = os.getcwd()
list_enemy = [file for file in os.listdir(cwd) if '.json' in file[-5:]]
for enemy in list_enemy:
try:
with open(cwd + '\\' + enemy, 'r') as f:
enemy_txt = f.read()
enemy_txt = enemy_txt.replace('offsetx','offsetX').... | 26.304348 | 194 | 0.591736 |
1949bf476b27ab37588853e2472ecb87a7d25778 | 5,485 | py | Python | tests/python/tensor_graph/test/test_internal/correctness/grad-op-test/te-cat-case2.py | QinHan-Erin/AMOS | 634bf48edf4015e4a69a8c32d49b96bce2b5f16f | [
"Apache-2.0"
] | 22 | 2022-03-18T07:29:31.000Z | 2022-03-23T14:54:32.000Z | tests/python/tensor_graph/test/test_internal/correctness/grad-op-test/te-cat-case2.py | QinHan-Erin/AMOS | 634bf48edf4015e4a69a8c32d49b96bce2b5f16f | [
"Apache-2.0"
] | null | null | null | tests/python/tensor_graph/test/test_internal/correctness/grad-op-test/te-cat-case2.py | QinHan-Erin/AMOS | 634bf48edf4015e4a69a8c32d49b96bce2b5f16f | [
"Apache-2.0"
] | 2 | 2022-03-18T08:26:34.000Z | 2022-03-20T06:02:48.000Z | from tvm import testing
from tvm from tvm import topi
import tvm
import numpy as np
import torch
dim0 = 3
dim1 = 4
dim2 = 1
shape_size1 = [dim0, dim1, dim2]
shape_size2 = [dim0, dim1, dim2 * 8]
dtype = "float32"
cap0 = tvm.te.placeholder(shape_size1, dtype=dtype, name="cap0")
cap1 = tvm.te.placeholder(shape_size1, ... | 43.531746 | 95 | 0.699909 |
194c38c24bff2dd1b26d3bd458a2d3f23f28316b | 121 | py | Python | controle_de_estoque/app.py | rodrigo-labs/controle_estoque | 890acefef2c3dace68723d086a0d40f27ff20476 | [
"MIT"
] | 6 | 2020-09-20T21:38:47.000Z | 2021-11-15T10:45:02.000Z | controle_de_estoque/app.py | rodrigo-labs/controle_estoque | 890acefef2c3dace68723d086a0d40f27ff20476 | [
"MIT"
] | null | null | null | controle_de_estoque/app.py | rodrigo-labs/controle_estoque | 890acefef2c3dace68723d086a0d40f27ff20476 | [
"MIT"
] | 6 | 2019-06-27T18:15:51.000Z | 2022-02-17T19:31:59.000Z | from controle_de_estoque.controllers import controllers
if __name__ == "__main__":
controllers.principal_controle()
| 24.2 | 55 | 0.809917 |
194c851ed5bb33eaa2cf355799844f072e6955b4 | 2,334 | py | Python | pagewalker/pagewalker/analyzer/devtools/devtools_protocol.py | rafal-qa/page-walker | 8940a819d436d46f729c9307effc5118d692cad0 | [
"MIT"
] | 16 | 2018-07-08T19:20:15.000Z | 2021-01-08T22:08:49.000Z | pagewalker/pagewalker/analyzer/devtools/devtools_protocol.py | rafal-qa/page-walker | 8940a819d436d46f729c9307effc5118d692cad0 | [
"MIT"
] | null | null | null | pagewalker/pagewalker/analyzer/devtools/devtools_protocol.py | rafal-qa/page-walker | 8940a819d436d46f729c9307effc5118d692cad0 | [
"MIT"
] | 5 | 2018-10-26T13:08:10.000Z | 2020-06-20T21:03:17.000Z | from .connector import websocket_connector, http_connector
| 33.342857 | 86 | 0.653385 |
194c8b5cc1cd58612c803208f1241b2813f11d98 | 9,523 | py | Python | pysnmp/CISCO-IETF-PW-FR-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/CISCO-IETF-PW-FR-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/CISCO-IETF-PW-FR-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module CISCO-IETF-PW-FR-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-IETF-PW-FR-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:43:46 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (defau... | 119.0375 | 1,132 | 0.748609 |
195261959efe1d29efc067b8292d053eeea3aa60 | 1,639 | py | Python | Chapter05/non-model-view_code.py | trappn/Mastering-GUI-Programming-with-Python | 14392c06dd3b9cf655420d09853bce6bfe8fe16d | [
"MIT"
] | 138 | 2018-12-06T15:48:07.000Z | 2022-03-28T12:23:12.000Z | Chapter05/non-model-view_code.py | thema27/Mastering-GUI-Programming-with-Python | 66f33ff6c07b7e22a396a982a5502bd93c20d785 | [
"MIT"
] | 16 | 2019-11-21T08:17:42.000Z | 2020-08-19T06:56:48.000Z | Chapter05/non-model-view_code.py | thema27/Mastering-GUI-Programming-with-Python | 66f33ff6c07b7e22a396a982a5502bd93c20d785 | [
"MIT"
] | 116 | 2018-12-08T18:13:02.000Z | 2022-03-22T14:30:57.000Z | import sys
from os import path
from PyQt5 import QtWidgets as qtw
from PyQt5 import QtGui as qtg
from PyQt5 import QtCore as qtc
if __name__ == '__main__':
app = qtw.QApplication(sys.argv)
# it's required to save a reference to MainWindow.
# if it goes out of scope, it will be destroyed.
mw = MainWin... | 27.779661 | 60 | 0.583282 |
195268ef4f0f6c79ac3ca7cf1356d6b54616df26 | 31 | py | Python | src/__init__.py | abdelsamea/DeTraC | 2c94d55908285fc9cbb24086da63078ee917525a | [
"MIT"
] | 1 | 2020-09-17T14:17:50.000Z | 2020-09-17T14:17:50.000Z | src/__init__.py | arkkhanu/DeTraC_COVId19 | ab03719b49a1a048f74f08600a6670f6757bbe60 | [
"MIT"
] | null | null | null | src/__init__.py | arkkhanu/DeTraC_COVId19 | ab03719b49a1a048f74f08600a6670f6757bbe60 | [
"MIT"
] | 1 | 2021-04-14T08:52:36.000Z | 2021-04-14T08:52:36.000Z | import tools
import frameworks
| 10.333333 | 17 | 0.870968 |
19536799d88c875ad08a6f5696624ad8dc96acf2 | 442,707 | py | Python | data/chars.py | Shadybloom/dnd-mass-combat-simulation | 169bc6cfb967f871290014b342e926b1f71cde81 | [
"MIT"
] | 3 | 2020-05-27T08:36:00.000Z | 2021-11-22T09:04:08.000Z | data/chars.py | Shadybloom/dnd-mass-combat-simulation | 169bc6cfb967f871290014b342e926b1f71cde81 | [
"MIT"
] | null | null | null | data/chars.py | Shadybloom/dnd-mass-combat-simulation | 169bc6cfb967f871290014b342e926b1f71cde81 | [
"MIT"
] | 1 | 2021-11-21T03:57:33.000Z | 2021-11-21T03:57:33.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (soldiers_pack)
from data.items import *
#----
# . squad_generation
metadict_chars = {}
#----
# ( ):
metadict_chars['Commoner 1 lvl (recruit)'] = {
# .
# :
# 100 100 = 100 , 30 .
# 200 100 = 100 .
# 5... | 29.188831 | 133 | 0.551602 |
1953a970695d2673fad8c3f0a83d3f344f3fbfa4 | 5,647 | py | Python | sandbox/kl_div/kl.py | samuelfneumann/RLControl | 71430b1de2e4262483908932eb44579c2ec8216d | [
"Apache-2.0"
] | 9 | 2018-07-30T20:12:47.000Z | 2021-02-05T17:02:04.000Z | sandbox/kl_div/kl.py | samuelfneumann/RLControl | 71430b1de2e4262483908932eb44579c2ec8216d | [
"Apache-2.0"
] | 14 | 2020-01-28T22:38:58.000Z | 2022-02-10T00:11:21.000Z | sandbox/kl_div/kl.py | samuelfneumann/RLControl | 71430b1de2e4262483908932eb44579c2ec8216d | [
"Apache-2.0"
] | 3 | 2018-08-08T14:52:53.000Z | 2021-01-23T18:00:05.000Z | import numpy as np
import scipy as sp
import scipy.stats
import matplotlib.pyplot as plt
if __name__ == '__main__':
main()
| 38.155405 | 168 | 0.64583 |
1953dea348e57ea12a9ad8bb64e5c7842c0eba20 | 37,416 | py | Python | pysnmp-with-texts/CIRCUIT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/CIRCUIT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/CIRCUIT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module CIRCUIT-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CIRCUIT-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:49:40 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 0... | 146.729412 | 3,536 | 0.795836 |
19556d177fed4def9f6818303c33e5aa562c38b8 | 904 | py | Python | SortingAlgorithm/shell_sort.py | hpf0532/algorithms_demo | 4f02444ee634295e5cbf8e5624d4e5b65931897d | [
"MIT"
] | null | null | null | SortingAlgorithm/shell_sort.py | hpf0532/algorithms_demo | 4f02444ee634295e5cbf8e5624d4e5b65931897d | [
"MIT"
] | null | null | null | SortingAlgorithm/shell_sort.py | hpf0532/algorithms_demo | 4f02444ee634295e5cbf8e5624d4e5b65931897d | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
# author: hpf
# create time: 2020/7/16 21:33
# file: shell_sort.py
# IDE: PyCharm
# (Shell Sort)
# DLShell1959
# 1
if __name__ == '__main__':
li = [34, 2, 13, 76, 54, 22, 90, 46, 13]
print(li)
shell_sort(li)
print(li)
#
#
# O(n2)
# | 21.52381 | 67 | 0.535398 |
19557822a163b70d4aa82e704dabbed7f22587fe | 4,273 | py | Python | tests/rl/test_rainbow.py | pocokhc/simple_rl | 765f12f392f87e6897027905d74f1bced6a2b7bf | [
"MIT"
] | 1 | 2022-03-01T09:16:57.000Z | 2022-03-01T09:16:57.000Z | tests/rl/test_rainbow.py | pocokhc/simple_rl | 765f12f392f87e6897027905d74f1bced6a2b7bf | [
"MIT"
] | null | null | null | tests/rl/test_rainbow.py | pocokhc/simple_rl | 765f12f392f87e6897027905d74f1bced6a2b7bf | [
"MIT"
] | null | null | null | import unittest
import srl
from srl.test import TestRL
if __name__ == "__main__":
unittest.main(module=__name__, defaultTest="Test.test_verify_Pendulum", verbosity=2)
# unittest.main(module=__name__, defaultTest="TestGrid.test_verify_Grid_naive", verbosity=2)
| 36.521368 | 101 | 0.670723 |
1955c95ee465de712840c70524c29d14aa03188f | 353 | py | Python | challenge_3/python/bryantpq/find_majority.py | rchicoli/2017-challenges | 44f0b672e5dea34de1dde131b6df837d462f8e29 | [
"Apache-2.0"
] | 271 | 2017-01-01T22:58:36.000Z | 2021-11-28T23:05:29.000Z | challenge_3/python/bryantpq/find_majority.py | AakashOfficial/2017Challenges | a8f556f1d5b43c099a0394384c8bc2d826f9d287 | [
"Apache-2.0"
] | 283 | 2017-01-01T23:26:05.000Z | 2018-03-23T00:48:55.000Z | challenge_3/python/bryantpq/find_majority.py | AakashOfficial/2017Challenges | a8f556f1d5b43c099a0394384c8bc2d826f9d287 | [
"Apache-2.0"
] | 311 | 2017-01-01T22:59:23.000Z | 2021-09-23T00:29:12.000Z |
if __name__ == "__main__":
a = [2,2,3,7,5,7,7,7,4,7,2,7,4,5,6,7,7,8,6,7,7,8,10,12,29,30,19,10,7,7,7,7,7,7,7,7,7]
print(find_majority(a))
| 19.611111 | 89 | 0.413598 |
1956211e1137a8ec3efab729e58887fd70b0e317 | 7,307 | py | Python | data-structures/double-list.py | costincaraivan/cs-refresher | 008fdb2af661310c65f656f017ec34e5df004424 | [
"MIT"
] | 1 | 2018-06-12T12:00:33.000Z | 2018-06-12T12:00:33.000Z | data-structures/double-list.py | costincaraivan/cs-refresher | 008fdb2af661310c65f656f017ec34e5df004424 | [
"MIT"
] | null | null | null | data-structures/double-list.py | costincaraivan/cs-refresher | 008fdb2af661310c65f656f017ec34e5df004424 | [
"MIT"
] | null | null | null | # Completely silly exercises, in real life use:
# Python lists: https://docs.python.org/3/tutorial/datastructures.html
import unittest
import logging
logging.basicConfig(level=logging.INFO)
# - DoublyLinkedListNode class.
#-##
# - DoublyLinkedList class.
# Search method not included, has its own category.
#-##
#... | 26.765568 | 72 | 0.596141 |
19580f1da14543fc46625b13a2d4fdf6ece370dd | 888 | py | Python | Ch. 2/tcp_server.py | Kediel/BHP | b0cd2aa82c95eef58f50d9d7d137fddcb70644cb | [
"MIT"
] | null | null | null | Ch. 2/tcp_server.py | Kediel/BHP | b0cd2aa82c95eef58f50d9d7d137fddcb70644cb | [
"MIT"
] | 4 | 2017-07-27T17:34:24.000Z | 2017-07-31T23:13:03.000Z | Ch. 2/tcp_server.py | Kediel/BHP | b0cd2aa82c95eef58f50d9d7d137fddcb70644cb | [
"MIT"
] | null | null | null | import socket
import threading
bind_ip = "0.0.0.0"
bind_port = 9999
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.bind((bind_ip, bind_port))
server.listen(5)
print "[*] Listening on %s:%d" % (bind_ip, bind_port)
# This is our client-handling thread
while True:
client, addr = ser... | 23.368421 | 79 | 0.614865 |
195b152f91cd032e891708e898116a34b190d47e | 210 | py | Python | setup.py | nycz/ishu | 6596b6e330c3439516dbd6cafe48d99388874aba | [
"MIT"
] | null | null | null | setup.py | nycz/ishu | 6596b6e330c3439516dbd6cafe48d99388874aba | [
"MIT"
] | 40 | 2015-08-14T23:11:08.000Z | 2019-11-11T22:27:29.000Z | setup.py | nycz/ishu | 6596b6e330c3439516dbd6cafe48d99388874aba | [
"MIT"
] | null | null | null | import setuptools
import site
import sys
# This is a workaround to allow --user and -e combined
# See https://github.com/pypa/pip/issues/7953
site.ENABLE_USER_SITE = "--user" in sys.argv[1:]
setuptools.setup()
| 26.25 | 54 | 0.752381 |
195cbcd5dccdd7c73a9db51970b9798eb35a32b9 | 466 | py | Python | Python Programs/guess the number.py | sayanpoddar123/RTU-DigitalLibrary | 658500ce3ee089d622cea0f6b49dfb8b485d0be6 | [
"MIT"
] | null | null | null | Python Programs/guess the number.py | sayanpoddar123/RTU-DigitalLibrary | 658500ce3ee089d622cea0f6b49dfb8b485d0be6 | [
"MIT"
] | null | null | null | Python Programs/guess the number.py | sayanpoddar123/RTU-DigitalLibrary | 658500ce3ee089d622cea0f6b49dfb8b485d0be6 | [
"MIT"
] | null | null | null | #Guess program
n=18
a=0
y = 1
print("Number of guesses is limited to only 4 times")
while a<=3:
z=int(input("Enter your choice="))
if z>n:
print("Please less your number")
a+=1
elif z<n:
print("Please increase your number")
a += 1
else:
print("You win")
... | 16.642857 | 64 | 0.555794 |
195cc099346d6a0faa355accfa24ab213925cda9 | 8,019 | py | Python | src/soundsystem.py | WinterLicht/Chaos-Projectile | 3fffb788b241b7baa4247c1e630d83a7210ddc2e | [
"CC-BY-4.0"
] | 59 | 2015-03-25T21:29:06.000Z | 2022-01-17T22:48:05.000Z | src/soundsystem.py | WinterLicht/Chaos-Projectile | 3fffb788b241b7baa4247c1e630d83a7210ddc2e | [
"CC-BY-4.0"
] | 11 | 2015-07-07T07:10:42.000Z | 2021-11-21T12:47:42.000Z | src/soundsystem.py | WinterLicht/Chaos-Projectile | 3fffb788b241b7baa4247c1e630d83a7210ddc2e | [
"CC-BY-4.0"
] | 19 | 2015-07-13T06:44:44.000Z | 2022-02-05T03:09:27.000Z | """
.. module:: soundsystem
:Platform: Unix, Windows
:Synopsis: Sound system
"""
import os
import pygame
import events
import ai | 43.819672 | 111 | 0.60419 |
195d27bed09f6f47effd9b2ab9128a9b8b6d2db2 | 2,227 | py | Python | hammer/django_bulk/bulk_create_test.py | awolfly9/hammer | 03add3037461154fd764bb3340e68393e16f015f | [
"MIT"
] | null | null | null | hammer/django_bulk/bulk_create_test.py | awolfly9/hammer | 03add3037461154fd764bb3340e68393e16f015f | [
"MIT"
] | null | null | null | hammer/django_bulk/bulk_create_test.py | awolfly9/hammer | 03add3037461154fd764bb3340e68393e16f015f | [
"MIT"
] | null | null | null | # -*- coding=utf-8 -*-
import django
import os
import sys
import datetime
import random
import time
os.environ['DJANGO_SETTINGS_MODULE'] = 'web.settings'
django.setup()
from web.other.models import BilibiliPlay
from .helper import bulk_create
if __name__ == '__main__':
BilibiliPlay.objects.all().delete()
... | 26.511905 | 186 | 0.606646 |
195d837e267b2d3b0b05977370db15211b8d4942 | 37,304 | py | Python | tests/rnacentral/search_export/exporter_test.py | RNAcentral/rnacentral-import-pipeline | 238e573440c72581a051b16c15f56fcd25bece74 | [
"Apache-2.0"
] | 1 | 2018-08-09T14:41:16.000Z | 2018-08-09T14:41:16.000Z | tests/rnacentral/search_export/exporter_test.py | RNAcentral/rnacentral-import-pipeline | 238e573440c72581a051b16c15f56fcd25bece74 | [
"Apache-2.0"
] | 60 | 2015-02-04T16:43:53.000Z | 2022-01-27T10:28:43.000Z | tests/rnacentral/search_export/exporter_test.py | RNAcentral/rnacentral-import-pipeline | 238e573440c72581a051b16c15f56fcd25bece74 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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... | 31.829352 | 134 | 0.562781 |
195f3150d0257121a8dd90bf3f90e35c01b0fa1c | 1,921 | py | Python | misago/threads/tests/test_thread_poll_api.py | HenryChenV/iJiangNan | 68f156d264014939f0302222e16e3125119dd3e3 | [
"MIT"
] | 1 | 2017-07-25T03:04:36.000Z | 2017-07-25T03:04:36.000Z | misago/threads/tests/test_thread_poll_api.py | HenryChenV/iJiangNan | 68f156d264014939f0302222e16e3125119dd3e3 | [
"MIT"
] | null | null | null | misago/threads/tests/test_thread_poll_api.py | HenryChenV/iJiangNan | 68f156d264014939f0302222e16e3125119dd3e3 | [
"MIT"
] | null | null | null | import json
from django.urls import reverse
from misago.acl.testutils import override_acl
from misago.categories.models import Category
from misago.threads import testutils
from misago.users.testutils import AuthenticatedUserTestCase
| 30.015625 | 93 | 0.605934 |
19618fa1e0fd69bf4ce89b6dd9ce0cf4d5bdf4a2 | 33 | py | Python | PosPy/__init__.py | richierh/PointofSalePy | 54fc11b5f167d361c75b6b1cb890c7020393d46c | [
"Apache-2.0"
] | null | null | null | PosPy/__init__.py | richierh/PointofSalePy | 54fc11b5f167d361c75b6b1cb890c7020393d46c | [
"Apache-2.0"
] | null | null | null | PosPy/__init__.py | richierh/PointofSalePy | 54fc11b5f167d361c75b6b1cb890c7020393d46c | [
"Apache-2.0"
] | null | null | null | #!usr/bin/python
import __main__
| 11 | 16 | 0.787879 |
196257af7109744f1d324ddf851e3f43ec9a1048 | 457 | py | Python | __init__.py | patilaja/sqlalchemy-challenge | 96e210106d31beb74d4ec5e42b20f5fd2d60db05 | [
"ADSL"
] | null | null | null | __init__.py | patilaja/sqlalchemy-challenge | 96e210106d31beb74d4ec5e42b20f5fd2d60db05 | [
"ADSL"
] | null | null | null | __init__.py | patilaja/sqlalchemy-challenge | 96e210106d31beb74d4ec5e42b20f5fd2d60db05 | [
"ADSL"
] | null | null | null | #Helper method that implements the logic to look up an application. | 30.466667 | 68 | 0.617068 |
196317379bcca4ea114372256f94af6d980d0618 | 9,717 | py | Python | demisto_sdk/commands/run_test_playbook/test_playbook_runner.py | SergeBakharev/demisto-sdk | 17d00942a1bd33039a8aba9ddffecfd81008d275 | [
"MIT"
] | null | null | null | demisto_sdk/commands/run_test_playbook/test_playbook_runner.py | SergeBakharev/demisto-sdk | 17d00942a1bd33039a8aba9ddffecfd81008d275 | [
"MIT"
] | null | null | null | demisto_sdk/commands/run_test_playbook/test_playbook_runner.py | SergeBakharev/demisto-sdk | 17d00942a1bd33039a8aba9ddffecfd81008d275 | [
"MIT"
] | null | null | null | import os
import re
import time
import demisto_client
from demisto_client.demisto_api.rest import ApiException
from demisto_sdk.commands.common.tools import LOG_COLORS, get_yaml, print_color
from demisto_sdk.commands.upload.uploader import Uploader
SUCCESS_RETURN_CODE = 0
ERROR_RETURN_CODE = 1
ENTRY_TYPE_ERROR = 4
| 41.348936 | 115 | 0.653185 |
19646232e69c582660ce7e5151741a5f639b0987 | 871 | py | Python | procurement_portal/records/migrations/0017_auto_20201024_1438.py | rikusv/procurement-portal-backend | a00eb1d9d9da7737a84d9c495db0f59b26839157 | [
"MIT"
] | null | null | null | procurement_portal/records/migrations/0017_auto_20201024_1438.py | rikusv/procurement-portal-backend | a00eb1d9d9da7737a84d9c495db0f59b26839157 | [
"MIT"
] | 19 | 2020-09-18T17:10:55.000Z | 2020-10-18T09:54:16.000Z | procurement_portal/records/migrations/0017_auto_20201024_1438.py | rikusv/procurement-portal-backend | a00eb1d9d9da7737a84d9c495db0f59b26839157 | [
"MIT"
] | 2 | 2020-10-21T17:58:44.000Z | 2022-02-13T17:21:22.000Z | # Generated by Django 3.1.1 on 2020-10-24 14:38
from django.db import migrations, models
| 30.034483 | 90 | 0.61194 |
19646d9adaadbd2e2fc9af7b3104bea3fb1c2bae | 1,030 | py | Python | docs/examples/template_query.py | Fourcast/flycs_sdk | 4bf206c26f59726d0ce0caa51bd3a893a34fed2a | [
"MIT"
] | 7 | 2020-12-15T13:25:43.000Z | 2021-08-31T14:35:06.000Z | docs/examples/template_query.py | Fourcast/flycs_sdk | 4bf206c26f59726d0ce0caa51bd3a893a34fed2a | [
"MIT"
] | 2 | 2020-11-12T12:46:28.000Z | 2021-12-21T07:26:28.000Z | docs/examples/template_query.py | Fourcast/flycs_sdk | 4bf206c26f59726d0ce0caa51bd3a893a34fed2a | [
"MIT"
] | null | null | null | from datetime import datetime, timezone
from flycs_sdk.entities import Entity
from flycs_sdk.pipelines import Pipeline, PipelineKind
from flycs_sdk.transformations import Transformation
# Define your transformation SQL query using jinja template for the table name and define the list of table on which this transforma... | 27.105263 | 154 | 0.694175 |
1965469fd09240b19440049eb433930a5143a25d | 13,252 | py | Python | try/run_eval.py | CleverShovel/AIJ2020-digital-peter | baf07200e607cd39398fc0db1ba699c7af5cea77 | [
"MIT"
] | null | null | null | try/run_eval.py | CleverShovel/AIJ2020-digital-peter | baf07200e607cd39398fc0db1ba699c7af5cea77 | [
"MIT"
] | null | null | null | try/run_eval.py | CleverShovel/AIJ2020-digital-peter | baf07200e607cd39398fc0db1ba699c7af5cea77 | [
"MIT"
] | null | null | null | import torch.nn.functional as F
import torch.nn as nn
import torch
import torchvision.transforms.functional as VF
from PIL import Image
import numpy as np
import os
from os.path import join
from collections import Counter
# device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
import math
from ct... | 34.066838 | 145 | 0.60821 |
1966ed8573024a45a35bef1db87d4c67dcc7b5bc | 496 | py | Python | phr/ciudadano/migrations/0002_ciudadano_fecha_nacimiento.py | richardqa/django-ex | e5b8585f28a97477150ac5daf5e55c74b70d87da | [
"CC0-1.0"
] | null | null | null | phr/ciudadano/migrations/0002_ciudadano_fecha_nacimiento.py | richardqa/django-ex | e5b8585f28a97477150ac5daf5e55c74b70d87da | [
"CC0-1.0"
] | null | null | null | phr/ciudadano/migrations/0002_ciudadano_fecha_nacimiento.py | richardqa/django-ex | e5b8585f28a97477150ac5daf5e55c74b70d87da | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2017-01-09 09:43
from __future__ import unicode_literals
from django.db import migrations, models
| 24.8 | 94 | 0.633065 |
1967b5cbe9cc4d8e1820eb5ee22aea8355578e45 | 8,306 | py | Python | experiments/track_deep_trial.py | tcstewar/davis_tracking | 4813eeaf66bdfad7b90f17831f6b0946daa8cbdf | [
"MIT"
] | 5 | 2019-06-13T02:38:51.000Z | 2021-07-29T03:32:41.000Z | experiments/track_deep_trial.py | tcstewar/davis_tracking | 4813eeaf66bdfad7b90f17831f6b0946daa8cbdf | [
"MIT"
] | 1 | 2019-08-05T17:30:31.000Z | 2019-08-05T17:30:31.000Z | experiments/track_deep_trial.py | tcstewar/davis_tracking | 4813eeaf66bdfad7b90f17831f6b0946daa8cbdf | [
"MIT"
] | 3 | 2019-06-05T18:42:14.000Z | 2019-06-19T19:36:02.000Z | import pytry
import os
import random
import nengo
import nengo_extras
import numpy as np
import nengo_dl
import tensorflow as tf
import davis_tracking
| 44.655914 | 131 | 0.567903 |
196901465c6a28bf050c45315b7c684ef13a92ea | 1,337 | py | Python | apps/collection/tests/public/test_public_collection_list.py | magocod/django_repository | 660664ba2321499e92c3c5c23719756db2569e90 | [
"MIT"
] | 1 | 2019-10-01T01:39:29.000Z | 2019-10-01T01:39:29.000Z | apps/collection/tests/public/test_public_collection_list.py | magocod/django_repository | 660664ba2321499e92c3c5c23719756db2569e90 | [
"MIT"
] | 7 | 2019-12-04T21:40:40.000Z | 2020-06-26T21:49:51.000Z | apps/collection/tests/public/test_public_collection_list.py | magocod/django_repository | 660664ba2321499e92c3c5c23719756db2569e90 | [
"MIT"
] | 1 | 2020-04-08T02:46:31.000Z | 2020-04-08T02:46:31.000Z | """
...
"""
# Django
from django.conf import settings
# local Django
from apps.collection.models import Collection
from apps.collection.serializers import CollectionSlugSerializer
from apps.tests.fixtures import RepositoryTestCase
PAGE_SIZE = settings.REST_FRAMEWORK["PAGE_SIZE"]
| 31.093023 | 86 | 0.703067 |
196a103d422e501e45fed5d95aa6423587fcbc43 | 2,033 | py | Python | main.py | uditarora/fashion-product-classification | 686f8a6c34c54f2a09baa7fba89fe446582e8408 | [
"MIT"
] | 9 | 2020-04-28T17:26:42.000Z | 2021-07-13T14:47:42.000Z | main.py | uditarora/fashion-product-classification | 686f8a6c34c54f2a09baa7fba89fe446582e8408 | [
"MIT"
] | 2 | 2021-09-08T01:55:51.000Z | 2022-03-12T00:25:38.000Z | main.py | uditarora/fashion-product-classification | 686f8a6c34c54f2a09baa7fba89fe446582e8408 | [
"MIT"
] | 1 | 2020-08-03T15:27:05.000Z | 2020-08-03T15:27:05.000Z | import argparse
import logging
import os
from src.train import setup_top20, setup_ft, setup_bottom
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger('fashion')
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("-d", "--data", help="path to the dataset", require... | 37.648148 | 98 | 0.711264 |
196bb8f934a37aeb286c8e9a73930e525b7e413c | 8,508 | py | Python | src/toil_scripts/transfer_gtex_to_s3/transfer_gtex_to_s3.py | BD2KGenomics/toil-scripts | f878d863defcdccaabb7fe06f991451b7a198fb7 | [
"Apache-2.0"
] | 33 | 2015-10-28T18:26:31.000Z | 2021-10-10T21:19:31.000Z | src/toil_scripts/transfer_gtex_to_s3/transfer_gtex_to_s3.py | BD2KGenomics/toil-scripts | f878d863defcdccaabb7fe06f991451b7a198fb7 | [
"Apache-2.0"
] | 464 | 2015-08-11T04:12:10.000Z | 2018-02-21T21:29:11.000Z | src/toil_scripts/transfer_gtex_to_s3/transfer_gtex_to_s3.py | BD2KGenomics/toil-scripts | f878d863defcdccaabb7fe06f991451b7a198fb7 | [
"Apache-2.0"
] | 21 | 2015-09-08T18:07:49.000Z | 2020-11-24T01:02:08.000Z | #!/usr/bin/env python2.7
"""
Toil script to move TCGA data into an S3 bucket.
Dependencies
Curl: apt-get install curl
Docker: wget -qO- https://get.docker.com/ | sh
Toil: pip install toil
S3AM: pip install --pre s3am
"""
import argparse
import glob
import hashlib
import os
import shutil
import su... | 42.328358 | 118 | 0.629525 |
196bec7ed8b6cf58b1516910c7416d81061dacce | 1,885 | py | Python | tests/metrics/cpu_psutil_tests.py | shareablee/apm-agent-python | 29f12ceb410b3c1a7f933b29dcecccf628dbbb6c | [
"BSD-3-Clause"
] | null | null | null | tests/metrics/cpu_psutil_tests.py | shareablee/apm-agent-python | 29f12ceb410b3c1a7f933b29dcecccf628dbbb6c | [
"BSD-3-Clause"
] | null | null | null | tests/metrics/cpu_psutil_tests.py | shareablee/apm-agent-python | 29f12ceb410b3c1a7f933b29dcecccf628dbbb6c | [
"BSD-3-Clause"
] | null | null | null | import time
import pytest
from elasticapm.utils import compat
cpu_psutil = pytest.importorskip("elasticapm.metrics.sets.cpu_psutil")
pytestmark = pytest.mark.psutil
cpu_linux = pytest.importorskip("elasticapm.metrics.sets.cpu_linux")
| 33.660714 | 97 | 0.658886 |
196e9f2b4480f78817f1f39de8dbbca5da718152 | 3,785 | py | Python | day11/main.py | josteinl/advent2020 | f109f9c1ef4fcb14582cda6b114d7648000decc6 | [
"Apache-2.0"
] | null | null | null | day11/main.py | josteinl/advent2020 | f109f9c1ef4fcb14582cda6b114d7648000decc6 | [
"Apache-2.0"
] | null | null | null | day11/main.py | josteinl/advent2020 | f109f9c1ef4fcb14582cda6b114d7648000decc6 | [
"Apache-2.0"
] | null | null | null | """
Day 11 - Seating
"""
from itertools import chain
import collections
if __name__ == '__main__':
# Part one:
# result = part_one()
# print(f'Result {result}')
result = part_two()
print(f'Result {result}')
| 29.115385 | 91 | 0.57675 |
19709fd1d6df22996971f4e668193dabf3b6aadc | 388 | py | Python | firmware/pipelines.py | armijnhemel/FirmwareScraper | 9684767bfbe076013386f6ee0b466f9282baf587 | [
"MIT"
] | 3 | 2022-02-13T09:12:57.000Z | 2022-03-08T23:41:03.000Z | firmware/pipelines.py | armijnhemel/FirmwareScraper | 9684767bfbe076013386f6ee0b466f9282baf587 | [
"MIT"
] | 4 | 2021-12-22T08:29:50.000Z | 2022-03-02T18:48:53.000Z | firmware/pipelines.py | armijnhemel/FirmwareScraper | 9684767bfbe076013386f6ee0b466f9282baf587 | [
"MIT"
] | 5 | 2019-11-19T06:26:07.000Z | 2022-02-28T06:48:35.000Z | from scrapy.pipelines.files import FilesPipeline
| 16.869565 | 59 | 0.747423 |
1971dea6d61ad931626506926b94703bc0412249 | 2,843 | py | Python | research/cv/yolox/src/boxes.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/yolox/src/boxes.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/yolox/src/boxes.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 30.569892 | 89 | 0.562082 |
19720b08a53678ae7b601ebc496e7b65a4ff6078 | 3,343 | py | Python | main/control/welcome.py | lipis/crypto-pocket | ec40e9f49e521d7b095c9065f89b8888a871313a | [
"MIT"
] | 4 | 2018-01-17T12:41:18.000Z | 2018-01-26T18:59:57.000Z | main/control/welcome.py | lipis/crypto-pocket | ec40e9f49e521d7b095c9065f89b8888a871313a | [
"MIT"
] | 43 | 2018-01-29T06:15:52.000Z | 2018-09-19T02:14:40.000Z | main/control/welcome.py | lipis/crypto-pocket | ec40e9f49e521d7b095c9065f89b8888a871313a | [
"MIT"
] | null | null | null | # coding: utf-8
import flask
from google.appengine.ext import ndb
import auth
import config
import model
from main import app
###############################################################################
# Welcome
###############################################################################
################... | 33.43 | 126 | 0.608436 |
1973e78021509b21a44ae56187ef66052677e85e | 2,029 | py | Python | qa_multi_span/model.py | chunchiehy/musst | 1525f917d8802d18c302720125ef9720b9c743fd | [
"MIT"
] | 14 | 2021-02-26T15:19:21.000Z | 2022-03-31T18:49:12.000Z | qa_multi_span/model.py | chunchiehy/musst | 1525f917d8802d18c302720125ef9720b9c743fd | [
"MIT"
] | null | null | null | qa_multi_span/model.py | chunchiehy/musst | 1525f917d8802d18c302720125ef9720b9c743fd | [
"MIT"
] | 1 | 2021-11-16T07:20:32.000Z | 2021-11-16T07:20:32.000Z | from transformers import AlbertModel
from transformers import AlbertPreTrainedModel
import torch.nn as nn
import torch
import torch.nn.functional as F
| 33.816667 | 73 | 0.667817 |
19753cc35369937ec7625ed05051badbaa38c37c | 1,160 | py | Python | class_one/02_strings.py | nclairesays/intro-python-hackforla | 65ab8584ab9d5082aaa405b40c47cbeacfff610c | [
"MIT"
] | null | null | null | class_one/02_strings.py | nclairesays/intro-python-hackforla | 65ab8584ab9d5082aaa405b40c47cbeacfff610c | [
"MIT"
] | null | null | null | class_one/02_strings.py | nclairesays/intro-python-hackforla | 65ab8584ab9d5082aaa405b40c47cbeacfff610c | [
"MIT"
] | null | null | null | # STRINGS
# https://docs.python.org/3/tutorial/introduction.html#strings
s = str(42)
s # convert another data type into a string (casting)
s = 'I like you'
# examine a string
s[0] # returns 'I'
len(s) # returns 10
# string slicing like lists
s[0:7] # returns 'I like '
s[6:] # returns 'you'
s[-1] # returns... | 22.745098 | 67 | 0.655172 |
1975eb951bcdc39a34c55d4b1e7b13067352c07a | 11,809 | py | Python | amqpy/transport.py | veegee/amqpy | c5346b1f6910b8553ca96769d2c88a7807f83417 | [
"MIT"
] | 32 | 2015-02-04T03:57:28.000Z | 2021-01-17T13:19:02.000Z | amqpy/transport.py | veegee/amqpy | c5346b1f6910b8553ca96769d2c88a7807f83417 | [
"MIT"
] | 33 | 2015-01-12T21:17:16.000Z | 2018-03-14T22:54:13.000Z | amqpy/transport.py | veegee/amqpy | c5346b1f6910b8553ca96769d2c88a7807f83417 | [
"MIT"
] | 9 | 2015-02-17T04:44:31.000Z | 2021-12-09T20:36:29.000Z | from __future__ import absolute_import, division, print_function
__metaclass__ = type
import errno
import six
import socket
import ssl
from abc import ABCMeta, abstractmethod
import logging
from threading import RLock
from ssl import SSLError
import datetime
import time
from . import compat
from .proto import Frame
f... | 32.53168 | 110 | 0.597172 |
197751283e20cfc29bc1ae41f28e04248f1f81be | 2,795 | py | Python | code/aditya.py | nyamako/hacktoberfest-2018 | bf7939d4b0cfb57a854a1644dbbae7ddf8af3c4f | [
"MIT"
] | 67 | 2018-09-25T21:37:23.000Z | 2020-11-03T02:03:22.000Z | code/aditya.py | nyamako/hacktoberfest-2018 | bf7939d4b0cfb57a854a1644dbbae7ddf8af3c4f | [
"MIT"
] | 245 | 2018-09-18T10:07:28.000Z | 2020-09-30T19:00:11.000Z | code/aditya.py | nyamako/hacktoberfest-2018 | bf7939d4b0cfb57a854a1644dbbae7ddf8af3c4f | [
"MIT"
] | 1,192 | 2018-09-18T11:27:55.000Z | 2021-10-17T10:24:37.000Z | import random
import time
#list of words
words = ("python", "india", "japan", "mother", "computer", "watch", "keyboard", "compass",
"bottle", "monitor", "switch", "shoes", "chain", "mobile", "coffee", "alfredo", "mouse",
"stomach", "tablet", "mojito", "halapeneos", "pizza", "nutella", "peanut", "broccoli")
n = 0
#d... | 28.814433 | 105 | 0.608945 |
19775af3ac0af2c8563350d3a05ceb55a427a779 | 639 | py | Python | tracking/urls.py | KolibriSolutions/BepMarketplace | c47d252fd744cde6b927e37c34d7a103c6162be5 | [
"BSD-3-Clause"
] | 1 | 2019-06-29T15:24:24.000Z | 2019-06-29T15:24:24.000Z | tracking/urls.py | KolibriSolutions/BepMarketplace | c47d252fd744cde6b927e37c34d7a103c6162be5 | [
"BSD-3-Clause"
] | 2 | 2020-01-12T17:47:33.000Z | 2020-01-12T17:47:45.000Z | tracking/urls.py | KolibriSolutions/BepMarketplace | c47d252fd744cde6b927e37c34d7a103c6162be5 | [
"BSD-3-Clause"
] | 2 | 2019-06-29T15:24:26.000Z | 2020-01-08T15:15:03.000Z | # Bep Marketplace ELE
# Copyright (c) 2016-2021 Kolibri Solutions
# License: See LICENSE file or https://github.com/KolibriSolutions/BepMarketplace/blob/master/LICENSE
#
from django.urls import path
from . import views
app_name = 'tracking'
urlpatterns = [
path('user/login/', views.list_user_login, name='listu... | 37.588235 | 102 | 0.744914 |
1977d36fe2b99e051c145c78f7a06b38fad7e1e1 | 394 | py | Python | admin_log_entries/settings.py | ataylor32/django-adminlogentries | 6aa99b0444b3747369404bcaee4b50183f8194e0 | [
"MIT"
] | 5 | 2017-12-05T13:44:48.000Z | 2021-07-29T14:04:57.000Z | admin_log_entries/settings.py | ataylor32/django-adminlogentries | 6aa99b0444b3747369404bcaee4b50183f8194e0 | [
"MIT"
] | null | null | null | admin_log_entries/settings.py | ataylor32/django-adminlogentries | 6aa99b0444b3747369404bcaee4b50183f8194e0 | [
"MIT"
] | null | null | null | from django.conf import settings
default_settings = {
'has_module_permission_false': False,
}
ADMIN_LOG_ENTRIES_SETTINGS = {}
compute_settings()
| 21.888889 | 69 | 0.756345 |
1979aba1d17f885ed392d4535bcc74a5d8e636bc | 464 | py | Python | lwrl/optimizers/multistep_optimizer.py | sealday/lwrl | 52bcd67751e605c38db4afa609c58938c7034e8d | [
"MIT"
] | 2 | 2019-04-11T11:55:48.000Z | 2020-05-29T18:09:51.000Z | lwrl/optimizers/multistep_optimizer.py | sealday/lwrl | 52bcd67751e605c38db4afa609c58938c7034e8d | [
"MIT"
] | 6 | 2021-06-01T22:21:00.000Z | 2022-03-11T23:24:36.000Z | lwrl/optimizers/multistep_optimizer.py | sealday/lwrl | 52bcd67751e605c38db4afa609c58938c7034e8d | [
"MIT"
] | 1 | 2019-04-12T03:09:47.000Z | 2019-04-12T03:09:47.000Z | from lwrl.optimizers import MetaOptimizer
| 33.142857 | 69 | 0.709052 |
197a1ef6fa46d979a05f557aa10ddfcfec221a69 | 5,301 | py | Python | saefportal/saef/views/connection_view.py | harry-consulting/SAEF | 12ef43bbcc3178b8a988e21c1bef035881cf6e6d | [
"BSD-2-Clause"
] | 4 | 2020-12-16T13:14:26.000Z | 2022-03-26T08:54:12.000Z | saefportal/saef/views/connection_view.py | harry-consulting/SAEF | 12ef43bbcc3178b8a988e21c1bef035881cf6e6d | [
"BSD-2-Clause"
] | 1 | 2022-03-26T09:09:04.000Z | 2022-03-26T09:09:04.000Z | saefportal/saef/views/connection_view.py | harry-consulting/SAEF | 12ef43bbcc3178b8a988e21c1bef035881cf6e6d | [
"BSD-2-Clause"
] | 1 | 2020-12-16T13:20:17.000Z | 2020-12-16T13:20:17.000Z | from saef.connections import ConnectionFormHelper
from ..models import Connection
from ..forms import ConnectionTypeForm
from saefportal.settings import MSG_SUCCESS_CONNECTION_UPDATE, MSG_SUCCESS_CONNECTION_VALID, \
MSG_ERROR_CONNECTION_INVALID, MSG_SUCCESS_CONNECTION_SAVED, MSG_ERROR_CONNECTION_SELECT_INVALID, \
... | 41.414063 | 105 | 0.716469 |
197a2e031fcb6bc8c3c7153d570a652bf400420f | 6,206 | py | Python | modules/niftitools.py | NeuroSainteAnne/synthFLAIR | ddb083e0ddbb5a7a3131e947c8a84809f25b93a1 | [
"BSD-3-Clause"
] | 2 | 2022-01-09T11:25:40.000Z | 2022-03-24T04:00:11.000Z | modules/niftitools.py | yunfei920406/synthFLAIR | ddb083e0ddbb5a7a3131e947c8a84809f25b93a1 | [
"BSD-3-Clause"
] | null | null | null | modules/niftitools.py | yunfei920406/synthFLAIR | ddb083e0ddbb5a7a3131e947c8a84809f25b93a1 | [
"BSD-3-Clause"
] | 2 | 2022-03-24T04:00:17.000Z | 2022-03-25T00:36:13.000Z | import os
import pydicom
import glob
import numpy as np
import nibabel as nib
from skimage import filters, morphology
from scipy.ndimage.morphology import binary_fill_holes
from scipy.ndimage import label
from dipy.segment.mask import median_otsu
def padvolume(volume):
"Applies a padding/cropping to a volume in or... | 31.502538 | 91 | 0.618595 |
197baac1afa4b35de9d60fc8d92a0d5870b20c39 | 1,937 | py | Python | recognition.py | 1159186649/Raspberry-Car | d1114793dd45be4e60a5d8a8da57b01ae3210f94 | [
"Apache-2.0"
] | 1 | 2020-11-04T02:28:32.000Z | 2020-11-04T02:28:32.000Z | recognition.py | 1159186649/Raspberry-Car | d1114793dd45be4e60a5d8a8da57b01ae3210f94 | [
"Apache-2.0"
] | null | null | null | recognition.py | 1159186649/Raspberry-Car | d1114793dd45be4e60a5d8a8da57b01ae3210f94 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from aip import AipFace
from picamera import PiCamera
import urllib.request
import RPi.GPIO as GPIO
import base64
import time
import Main
#idkey
APP_ID = '*****'
API_KEY = '**********'
SECRET_KEY ='**********'
client = AipFace(APP_ID, API_KEY, SECRET_KEY)#
#... | 25.826667 | 87 | 0.573051 |
197c315cc4fccd63e25903e81134070c4aabf0c5 | 2,939 | py | Python | base/3base.py | chenliangold4j/MyPyDictionnary | 3428333f42249f33732da71e420bdc41a412f594 | [
"Apache-2.0"
] | null | null | null | base/3base.py | chenliangold4j/MyPyDictionnary | 3428333f42249f33732da71e420bdc41a412f594 | [
"Apache-2.0"
] | null | null | null | base/3base.py | chenliangold4j/MyPyDictionnary | 3428333f42249f33732da71e420bdc41a412f594 | [
"Apache-2.0"
] | null | null | null | L = ['Michael', 'Sarah', 'Tracy', 'Bob', 'Jack']
print(L[0:3]);
# L[0:3]0330123
# 0
print(L[:3]);
# PythonL[-1]
print(L[-2:])
L = list(range(100))
# 10
print(L[:10:2])
# [:]list
# tupletuple
#
print('ABCDEFG'[:3])
#
d = {'a': 1, 'b': 2, 'c': 3}
for key in d:
print(key)
# collectionsIterable
from collections.abc ... | 27.726415 | 106 | 0.697856 |
197f119da149ba3627c410ef123a293d7183c17e | 4,986 | py | Python | rssxkcd.py | bkentropy/xkcd-updater | 732b60428a9fdc79c2cd847623c7416cb4b6022d | [
"MIT"
] | null | null | null | rssxkcd.py | bkentropy/xkcd-updater | 732b60428a9fdc79c2cd847623c7416cb4b6022d | [
"MIT"
] | null | null | null | rssxkcd.py | bkentropy/xkcd-updater | 732b60428a9fdc79c2cd847623c7416cb4b6022d | [
"MIT"
] | null | null | null | #!/usr/local/bin/python2
import argparse
import requests
import feedparser
import time
import sys
import sqlite3
import datetime
# Command line args
parser = argparse.ArgumentParser(description='Provide HipChat integration url to post xkcd comics')
parser.add_argument('url', type=str, help='(string) a special url for ... | 33.689189 | 113 | 0.583233 |
197ff79f1f26876a9752bd0bf842c448b0d64426 | 401 | py | Python | Conditional/Lista 1/Thiago/07.py | Vitor-ORB/algorithms-and-programming-1-ufms | 10821e9b580b78b7f78c27e740f3ead9c6b9f0bd | [
"MIT"
] | 7 | 2021-05-25T16:49:20.000Z | 2022-02-17T11:57:32.000Z | Conditional/Lista 1/Thiago/07.py | Vitor-ORB/algorithms-and-programming-1-ufms | 10821e9b580b78b7f78c27e740f3ead9c6b9f0bd | [
"MIT"
] | null | null | null | Conditional/Lista 1/Thiago/07.py | Vitor-ORB/algorithms-and-programming-1-ufms | 10821e9b580b78b7f78c27e740f3ead9c6b9f0bd | [
"MIT"
] | 8 | 2021-05-25T16:49:39.000Z | 2021-09-30T18:02:07.000Z | # Leia 2 valores numricos e um smbolo correspondente a uma das operaes.
# soma (+), subtrao(-), diviso(/) e multiplicao(*)
n1, n2, op = input().split()
n1 = int(n1)
n2 = int(n2)
if op == "+":
print(n1 + n2)
elif op == "-":
print(n1 - n2)
elif op == "/":
print(n1 / n2)
elif op == "*":
pri... | 22.277778 | 76 | 0.55611 |
19822fbb662c35172c55da381ed0906814ac3187 | 2,000 | py | Python | ciphers/caeser_cipher.py | nairraghav/ron-cipher | e7cbac6cd8f0fe30e71b7d7f26fddb8af4d6a88a | [
"MIT"
] | null | null | null | ciphers/caeser_cipher.py | nairraghav/ron-cipher | e7cbac6cd8f0fe30e71b7d7f26fddb8af4d6a88a | [
"MIT"
] | 2 | 2021-02-02T23:46:26.000Z | 2021-04-20T20:09:33.000Z | ciphers/caeser_cipher.py | nairraghav/ron-cipher | e7cbac6cd8f0fe30e71b7d7f26fddb8af4d6a88a | [
"MIT"
] | null | null | null | from ciphers.cipher_helper import get_character_map, flip_dict
| 29.411765 | 66 | 0.607 |
198277b32eac2b22c43af843c0ee4c66623b8afb | 327 | py | Python | instagram/migrations/0020_remove_profile_follow.py | 01king-ori/Kings-instagram | 5e3c523462883879fe33834d68bdf1ebe4b75d8d | [
"MIT"
] | 3 | 2020-06-25T22:35:05.000Z | 2022-01-11T03:50:08.000Z | instagram/migrations/0020_remove_profile_follow.py | 01king-ori/Kings-instagram | 5e3c523462883879fe33834d68bdf1ebe4b75d8d | [
"MIT"
] | 5 | 2020-06-05T23:38:22.000Z | 2021-06-10T19:05:02.000Z | instagram/migrations/0020_remove_profile_follow.py | 01king-ori/Kings-instagram | 5e3c523462883879fe33834d68bdf1ebe4b75d8d | [
"MIT"
] | 5 | 2020-01-07T05:39:10.000Z | 2021-09-14T05:31:08.000Z | # Generated by Django 2.2.6 on 2019-10-14 13:19
from django.db import migrations
| 18.166667 | 47 | 0.590214 |
1982e8dcbffc500675e9501f2db4214567aa2081 | 24,054 | py | Python | boundaries/ca_qc_districts/definition.py | imhangoo/represent-canada-data | 0d9cc818b343079f81a00c15438d79c079a10c9b | [
"OML"
] | null | null | null | boundaries/ca_qc_districts/definition.py | imhangoo/represent-canada-data | 0d9cc818b343079f81a00c15438d79c079a10c9b | [
"OML"
] | null | null | null | boundaries/ca_qc_districts/definition.py | imhangoo/represent-canada-data | 0d9cc818b343079f81a00c15438d79c079a10c9b | [
"OML"
] | null | null | null | # coding: utf-8
import re
from datetime import date
import boundaries
# Noting that the "union" merge strategy fails with:
#
# GEOS_ERROR: TopologyException: found non-noded intersection between
# LINESTRING (...) and LINESTRING (...)
#
# django.contrib.gis.geos.error.GEOSException: Could not initialize G... | 42.877005 | 186 | 0.61204 |
198370b8aa4515542204d0344e7d286fb2f76907 | 1,803 | py | Python | pdbfairy/commands/compare_interactions.py | dannyroberts/pdbfairy | 2cefd4a5e6c40f32e6fa3974ffd595fc336c582b | [
"BSD-3-Clause"
] | null | null | null | pdbfairy/commands/compare_interactions.py | dannyroberts/pdbfairy | 2cefd4a5e6c40f32e6fa3974ffd595fc336c582b | [
"BSD-3-Clause"
] | null | null | null | pdbfairy/commands/compare_interactions.py | dannyroberts/pdbfairy | 2cefd4a5e6c40f32e6fa3974ffd595fc336c582b | [
"BSD-3-Clause"
] | null | null | null | import difflib
import io
import click
from pdbfairy import utils
from pdbfairy.commands import find_interactions
| 33.388889 | 78 | 0.653356 |