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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1ea6959c71f84b4fbb20cdee1843fe3bbf5d0e59 | 4,169 | py | Python | ImageProcessingScripts/Automated Pixel Sorting/automated_pixel_sorting.py | rafaelapcruz/Awesome_Python_Scripts | 6493ce989c1bcd707a10836f09462916388476a1 | [
"MIT"
] | 1 | 2021-12-07T17:37:56.000Z | 2021-12-07T17:37:56.000Z | ImageProcessingScripts/Automated Pixel Sorting/automated_pixel_sorting.py | rafaelapcruz/Awesome_Python_Scripts | 6493ce989c1bcd707a10836f09462916388476a1 | [
"MIT"
] | null | null | null | ImageProcessingScripts/Automated Pixel Sorting/automated_pixel_sorting.py | rafaelapcruz/Awesome_Python_Scripts | 6493ce989c1bcd707a10836f09462916388476a1 | [
"MIT"
] | null | null | null | import os
import sys
import getopt
import random as r
from PIL import Image
from pixelsort import pixelsort
if __name__ == "__main__":
Main()
| 32.317829 | 84 | 0.562725 |
1ea73bdb618160f1e19273aa3d6ae48a8b2062e6 | 1,434 | py | Python | curl-monitor.py | geekvikas/hello-kubernetes | cdb94ef83adcb9ab4169f67137638aadc3d7509c | [
"MIT"
] | null | null | null | curl-monitor.py | geekvikas/hello-kubernetes | cdb94ef83adcb9ab4169f67137638aadc3d7509c | [
"MIT"
] | null | null | null | curl-monitor.py | geekvikas/hello-kubernetes | cdb94ef83adcb9ab4169f67137638aadc3d7509c | [
"MIT"
] | null | null | null | import requests
import time
import subprocess as sp
start_time = 0
running_instances = {}
errCount = 0
reqCount = 0
if __name__ == '__main__':
main() | 26.072727 | 139 | 0.608787 |
1ea74131c12620ae3e193010c7e32820c125cd7c | 2,835 | py | Python | training/argparser.py | mlcruw/covid-news-analyzer | 76c6a906de20633ff0e325f1ebe669c1e0eac325 | [
"MIT"
] | 8 | 2020-04-11T23:13:58.000Z | 2021-05-06T02:39:45.000Z | training/argparser.py | mlcruw/covid-news-analyzer | 76c6a906de20633ff0e325f1ebe669c1e0eac325 | [
"MIT"
] | null | null | null | training/argparser.py | mlcruw/covid-news-analyzer | 76c6a906de20633ff0e325f1ebe669c1e0eac325 | [
"MIT"
] | 1 | 2020-05-26T01:56:24.000Z | 2020-05-26T01:56:24.000Z | import argparse
# Parse command line args
| 35.886076 | 133 | 0.479718 |
1ea7b89e8805b8150979e44b372cf9c7862d376d | 4,352 | py | Python | utils/test_utils.py | kedartatwawadi/stanford_compression_library | a472a81c71aeb81e181421e42aed75971a1cf4be | [
"MIT"
] | 2 | 2022-01-10T06:18:47.000Z | 2022-01-10T06:18:55.000Z | utils/test_utils.py | kedartatwawadi/stanford_compression_library | a472a81c71aeb81e181421e42aed75971a1cf4be | [
"MIT"
] | 20 | 2021-10-17T23:40:52.000Z | 2022-03-08T04:35:42.000Z | utils/test_utils.py | kedartatwawadi/stanford_compression_library | a472a81c71aeb81e181421e42aed75971a1cf4be | [
"MIT"
] | null | null | null | """
Utility functions useful for testing
"""
import filecmp
from typing import Tuple
from core.data_block import DataBlock
from core.data_stream import TextFileDataStream
from core.data_encoder_decoder import DataDecoder, DataEncoder
from core.prob_dist import ProbabilityDist
from utils.bitarray_utils import BitArray,... | 36.881356 | 136 | 0.735064 |
1ea81ca38b70040f597d87185746d3648aaa4910 | 25,332 | py | Python | melodic/lib/python2.7/dist-packages/mavros_msgs/msg/_CommandCode.py | Dieptranivsr/Ros_Diep | d790e75e6f5da916701b11a2fdf3e03b6a47086b | [
"MIT"
] | 10 | 2021-03-15T03:58:06.000Z | 2021-12-30T15:33:38.000Z | devel/.private/mavros_msgs/lib/python2.7/dist-packages/mavros_msgs/msg/_CommandCode.py | arijitnoobstar/UAVProjectileCatcher | 3c1bed80df167192cb4b971b58c891187628142e | [
"Apache-2.0"
] | 1 | 2021-09-09T15:29:31.000Z | 2021-09-09T15:29:31.000Z | melodic/lib/python2.7/dist-packages/mavros_msgs/msg/_CommandCode.py | Dieptranivsr/Ros_Diep | d790e75e6f5da916701b11a2fdf3e03b6a47086b | [
"MIT"
] | 4 | 2021-03-06T09:35:58.000Z | 2021-05-24T14:34:11.000Z | # This Python file uses the following encoding: utf-8
"""autogenerated by genpy from mavros_msgs/CommandCode.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
_struct_I = genpy.struct_I
| 60.748201 | 516 | 0.702195 |
1ea982d48261ba22b7efd1730632578e34e4f859 | 337 | py | Python | notes/admin.py | hamidrezakp/Simple-Django-notes-app | 70e7b575e90740b8c12a7aa7761d9e3e2e52e02c | [
"MIT"
] | null | null | null | notes/admin.py | hamidrezakp/Simple-Django-notes-app | 70e7b575e90740b8c12a7aa7761d9e3e2e52e02c | [
"MIT"
] | null | null | null | notes/admin.py | hamidrezakp/Simple-Django-notes-app | 70e7b575e90740b8c12a7aa7761d9e3e2e52e02c | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Note
admin.site.register(Note, NoteAdmin)
| 25.923077 | 59 | 0.712166 |
1ea9efb4fb19e24813db0928c0ed0206e678e2ed | 2,605 | py | Python | accounts/tests/test_password_change_done.py | chrstsrs/ToDoList | 8e13c5a8f6cabad0cf3f715ba9134dd82a46cc3e | [
"MIT"
] | 1 | 2019-01-18T07:47:04.000Z | 2019-01-18T07:47:04.000Z | accounts/tests/test_password_change_done.py | chrstsrs/ToDoList | 8e13c5a8f6cabad0cf3f715ba9134dd82a46cc3e | [
"MIT"
] | 6 | 2020-02-11T23:33:32.000Z | 2022-03-11T23:38:01.000Z | accounts/tests/test_password_change_done.py | chrstsrs/todolist | 8e13c5a8f6cabad0cf3f715ba9134dd82a46cc3e | [
"MIT"
] | null | null | null | from django.contrib.auth import views as auth_views
from django.contrib.auth.models import User
from django.urls import resolve, reverse
from django.test import TestCase
| 47.363636 | 83 | 0.732438 |
1eab2801fa3a5a8256f44b1bd99c1e958db0f033 | 3,094 | py | Python | objects/classical_storage.py | h-oll/QuNetSim | e3647e512182eda2a303085ded30c7d1e55a4e01 | [
"MIT"
] | null | null | null | objects/classical_storage.py | h-oll/QuNetSim | e3647e512182eda2a303085ded30c7d1e55a4e01 | [
"MIT"
] | 4 | 2021-02-02T23:10:37.000Z | 2022-02-11T03:47:21.000Z | objects/classical_storage.py | h-oll/QuNetSim | e3647e512182eda2a303085ded30c7d1e55a4e01 | [
"MIT"
] | null | null | null | import components.protocols as protocols
| 33.268817 | 94 | 0.616031 |
1eabccfd77a86f3f295b6a683297245028bed3b7 | 4,331 | py | Python | build.py | sug0/libgoimg | 46545f2a9a68a1063579e8b15c09fa8600128986 | [
"MIT"
] | 3 | 2019-02-26T13:41:46.000Z | 2019-05-02T16:43:13.000Z | build.py | sugoiuguu/libgoimg | 46545f2a9a68a1063579e8b15c09fa8600128986 | [
"MIT"
] | 1 | 2019-02-04T22:07:56.000Z | 2019-02-04T22:07:56.000Z | build.py | sugoiuguu/libgoimg | 46545f2a9a68a1063579e8b15c09fa8600128986 | [
"MIT"
] | null | null | null | import re
import os
from sys import exit, argv
from platform import machine
from functools import reduce
# https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
# https://stackoverflow.com/questions/661338/sse-sse2-and-sse3-for-gnu-c/662250
# https://gist.github.com/fm4dd/c663217935dc17f0fc73c9c81b0aa845
# https://en.w... | 27.585987 | 98 | 0.529439 |
1eac22c7615b08f822c855110b5fa481a819bff8 | 273 | py | Python | sisbp_cat.py | naotohori/cafysis | 9d8534121c01ea75ae965cf39a1e307052ff8523 | [
"MIT"
] | 2 | 2022-02-25T17:32:41.000Z | 2022-03-31T14:38:55.000Z | sisbp_cat.py | naotohori/cafysis | 9d8534121c01ea75ae965cf39a1e307052ff8523 | [
"MIT"
] | 2 | 2020-05-03T08:36:10.000Z | 2021-01-27T12:40:50.000Z | sisbp_cat.py | naotohori/life-of-py | 9d8534121c01ea75ae965cf39a1e307052ff8523 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from cafysis.file_io.sisbp import SisbpFile
import sys
f = SisbpFile(sys.argv[1])
f.open_to_read()
while f.has_more_data():
pairs = f.read_onestep()
for p in pairs:
print(f" ({p[0]:d}, {p[1]:d})", end='')
print("")
f.close()
| 15.166667 | 47 | 0.611722 |
1eac32e0121b7c0cf9d2b404b91b0f2a824ee7a2 | 535 | py | Python | sendemail.py | kenelite/pypractise | ef79ca760533096e6da89846e2974fa47a060440 | [
"MIT"
] | null | null | null | sendemail.py | kenelite/pypractise | ef79ca760533096e6da89846e2974fa47a060440 | [
"MIT"
] | null | null | null | sendemail.py | kenelite/pypractise | ef79ca760533096e6da89846e2974fa47a060440 | [
"MIT"
] | null | null | null | #/usr/bin/env python
import smtplib
mail_server = 'localhost'
mail_server_port = 25
from_addr = 'sender@devcentos.example.com'
to_addr = 'root@devcentos.example.com'
from_header = 'From: %s\r\n' % from_addr
to_header = 'To: %s\r\n\r\n' % to_addr
subject_header = 'Subject: nothing interesting'
body = 'This is not... | 22.291667 | 84 | 0.73271 |
1ead0b0255a3ba3da34a217fdcc1371caa46d76d | 717 | py | Python | factioncli/commands/log.py | s3b4stian/CLI | 057e4e9e2bff7bdce0f60106a0c61938386f7d01 | [
"BSD-3-Clause"
] | null | null | null | factioncli/commands/log.py | s3b4stian/CLI | 057e4e9e2bff7bdce0f60106a0c61938386f7d01 | [
"BSD-3-Clause"
] | null | null | null | factioncli/commands/log.py | s3b4stian/CLI | 057e4e9e2bff7bdce0f60106a0c61938386f7d01 | [
"BSD-3-Clause"
] | null | null | null | import logging
from cliff.command import Command
from factioncli.processing.docker.logs import get_logs | 34.142857 | 63 | 0.559275 |
1eae734936bb5f5f20b1a21628c6561d92b1f27b | 82 | py | Python | python_modules/dagster/dagster/core/launcher/__init__.py | JPeer264/dagster-fork | 32cc87a36134be7c442fa85d6867eb1d3301aea0 | [
"Apache-2.0"
] | 1 | 2020-09-19T16:35:59.000Z | 2020-09-19T16:35:59.000Z | python_modules/dagster/dagster/core/launcher/__init__.py | JPeer264/dagster-fork | 32cc87a36134be7c442fa85d6867eb1d3301aea0 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/core/launcher/__init__.py | JPeer264/dagster-fork | 32cc87a36134be7c442fa85d6867eb1d3301aea0 | [
"Apache-2.0"
] | null | null | null | from .base import RunLauncher
from .cli_api_run_launcher import CliApiRunLauncher
| 27.333333 | 51 | 0.878049 |
1eaeeb70f4d3820cedf81ea0c740713a9b0641c3 | 10,097 | py | Python | delfick_project/option_merge/path.py | delfick/delfick_project | 4b49209639dd10cff6f48b4f5617cb7874481aaa | [
"MIT"
] | 1 | 2020-12-01T21:11:24.000Z | 2020-12-01T21:11:24.000Z | delfick_project/option_merge/path.py | delfick/delfick_project | 4b49209639dd10cff6f48b4f5617cb7874481aaa | [
"MIT"
] | 2 | 2019-11-18T05:28:19.000Z | 2019-11-18T07:12:24.000Z | delfick_project/option_merge/path.py | delfick/delfick_project | 4b49209639dd10cff6f48b4f5617cb7874481aaa | [
"MIT"
] | 2 | 2019-11-18T05:35:39.000Z | 2021-01-06T18:48:37.000Z | """
Option_merge uses this Path object to encapsulate the idea of a path and the
converters that are available to use.
We are able to use this to store a reference to the root of the configuration
as well as whether the converters should be ignored or not.
It's purpose is to behave like a string regardless of whether... | 31.751572 | 95 | 0.571754 |
1eaf0d7cba39f6baabe80e6ccc1b07ab55100c68 | 7,468 | py | Python | test/helpers/acmeair_utils.py | cloudant-labs/spark-cloudant | 07f772eb21ec268f2e013a65dc2f21e01232f82b | [
"Apache-2.0"
] | 25 | 2015-11-02T16:50:47.000Z | 2020-11-07T13:41:36.000Z | test/helpers/acmeair_utils.py | cloudant-labs/spark-cloudant | 07f772eb21ec268f2e013a65dc2f21e01232f82b | [
"Apache-2.0"
] | 80 | 2015-10-14T11:08:00.000Z | 2018-03-26T01:30:20.000Z | test/helpers/acmeair_utils.py | cloudant-labs/spark-cloudant | 07f772eb21ec268f2e013a65dc2f21e01232f82b | [
"Apache-2.0"
] | 30 | 2015-10-13T19:14:13.000Z | 2020-11-08T07:23:30.000Z | #*******************************************************************************
# Copyright (c) 2015 IBM Corp.
#
# 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/li... | 32.611354 | 115 | 0.684922 |
1eaff492508ad7fb7bb92e8d684b7499f0632a98 | 596 | py | Python | hackerrank-python/py-collections-namedtuple.py | fmelihh/competitive-programming-solutions | c15c2f7d90153f35f9bd9ffcea20ac921564eacf | [
"MIT"
] | 2 | 2021-09-06T22:13:12.000Z | 2021-11-22T08:50:04.000Z | hackerrank-python/py-collections-namedtuple.py | fmelihh/competitive-programming-solutions | c15c2f7d90153f35f9bd9ffcea20ac921564eacf | [
"MIT"
] | null | null | null | hackerrank-python/py-collections-namedtuple.py | fmelihh/competitive-programming-solutions | c15c2f7d90153f35f9bd9ffcea20ac921564eacf | [
"MIT"
] | null | null | null |
# https://www.hackerrank.com/challenges/py-collections-namedtuple/problem
from collections import namedtuple
if __name__ == '__main__':
test_cases = int(input())
length = test_cases
sum_marks = 0
colums = input().split()
while(test_cases > 0):
attributes = input().split... | 14.9 | 79 | 0.580537 |
1eb018ba89293cb747d6c0136e0a017d5a47aefe | 2,898 | py | Python | package/cloudshell/cm/customscript/domain/script_downloader.py | qualidan/CustomScript-Shell | 672ee31fe52edfce94ebc795172df76eae1d19a7 | [
"Apache-2.0"
] | null | null | null | package/cloudshell/cm/customscript/domain/script_downloader.py | qualidan/CustomScript-Shell | 672ee31fe52edfce94ebc795172df76eae1d19a7 | [
"Apache-2.0"
] | null | null | null | package/cloudshell/cm/customscript/domain/script_downloader.py | qualidan/CustomScript-Shell | 672ee31fe52edfce94ebc795172df76eae1d19a7 | [
"Apache-2.0"
] | null | null | null | import urllib
from logging import Logger
import re
import requests
from cloudshell.cm.customscript.domain.cancellation_sampler import CancellationSampler
from cloudshell.cm.customscript.domain.script_file import ScriptFile
| 38.64 | 120 | 0.640442 |
1eb38cc7954053068f5d059c1327bd8c4d8d37be | 4,365 | py | Python | starling_sim/basemodel/algorithms/dispatcher.py | tellae/starling | 56121c728eb5de3dfc77cdf08da89548f3315c87 | [
"CECILL-B"
] | 19 | 2021-02-16T12:32:22.000Z | 2022-01-06T11:16:44.000Z | starling_sim/basemodel/algorithms/dispatcher.py | tellae/starling | 56121c728eb5de3dfc77cdf08da89548f3315c87 | [
"CECILL-B"
] | 20 | 2021-01-13T20:58:07.000Z | 2022-03-21T15:53:07.000Z | starling_sim/basemodel/algorithms/dispatcher.py | tellae/starling | 56121c728eb5de3dfc77cdf08da89548f3315c87 | [
"CECILL-B"
] | null | null | null | import numpy as np
from abc import ABC
| 27.980769 | 121 | 0.635052 |
1eb6aa4e2227819f8ee6cee396c7d5b44ecaa7f9 | 2,147 | py | Python | 0.5.12/ui_tweak/dashcamd.py | eFiniLan/openpilot-patches | ec8f1552651c17e6e0d1821d958412b6fa049228 | [
"MIT"
] | 9 | 2019-03-02T14:54:48.000Z | 2021-09-06T13:48:08.000Z | 0.5.12/ui_tweak/dashcamd.py | eFiniLan/openpilot-patches | ec8f1552651c17e6e0d1821d958412b6fa049228 | [
"MIT"
] | null | null | null | 0.5.12/ui_tweak/dashcamd.py | eFiniLan/openpilot-patches | ec8f1552651c17e6e0d1821d958412b6fa049228 | [
"MIT"
] | 9 | 2019-02-28T18:48:08.000Z | 2021-11-07T20:12:54.000Z | #!/usr/bin/env python2.7
#
# courtesy of pjlao307 (https://github.com/pjlao307/)
# this is just his original implementation but
# in openpilot service form so it's always on
#
# with the highest bit rates, the video is approx. 0.5MB per second
# the default value is set to 2.56Mbps = 0.32MB per second
#
import os
impor... | 35.783333 | 123 | 0.695855 |
1eb6f6fcdd74e9a025f3ed02c6d00363deabff53 | 666 | py | Python | tests/integration/flask_endpoints_test.py | HelloMorrisMoss/mahlo_popup | e4b657f93aa8b46f354f0d9d95b81c22c797e6d3 | [
"MIT"
] | null | null | null | tests/integration/flask_endpoints_test.py | HelloMorrisMoss/mahlo_popup | e4b657f93aa8b46f354f0d9d95b81c22c797e6d3 | [
"MIT"
] | null | null | null | tests/integration/flask_endpoints_test.py | HelloMorrisMoss/mahlo_popup | e4b657f93aa8b46f354f0d9d95b81c22c797e6d3 | [
"MIT"
] | null | null | null | from tests.base_test import BaseTest
| 28.956522 | 64 | 0.647147 |
1eb741324553de85b65c74694b1a8e5d44149bad | 989 | py | Python | cms/views.py | lemur-cms/lemur-cms | 6dfa087f9c16f1452c0af935855abfedd73fa239 | [
"BSD-2-Clause"
] | null | null | null | cms/views.py | lemur-cms/lemur-cms | 6dfa087f9c16f1452c0af935855abfedd73fa239 | [
"BSD-2-Clause"
] | 2 | 2022-02-12T23:03:18.000Z | 2022-02-26T19:08:27.000Z | cms/views.py | lemur-cms/lemur-cms | 6dfa087f9c16f1452c0af935855abfedd73fa239 | [
"BSD-2-Clause"
] | 1 | 2019-10-19T22:21:33.000Z | 2019-10-19T22:21:33.000Z | from django.shortcuts import render
from django.http import HttpResponse
from rest_framework import viewsets, filters, generics
from rest_framework.views import APIView
from django_filters.rest_framework import DjangoFilterBackend
from rest_framework.pagination import PageNumberPagination
from cms.models import Page
fr... | 35.321429 | 96 | 0.772497 |
1eb775eefae8b7ad81e9c1edc49fc135b3659d88 | 1,196 | py | Python | Problems/Study Plans/Data Structure/Data Structure II/66_find_the_winner_of_the_circular_game.py | andor2718/LeetCode | 59874f49085818e6da751f1cc26867b31079d35d | [
"BSD-3-Clause"
] | 1 | 2022-01-17T19:51:15.000Z | 2022-01-17T19:51:15.000Z | Problems/Study Plans/Data Structure/Data Structure II/66_find_the_winner_of_the_circular_game.py | andor2718/LeetCode | 59874f49085818e6da751f1cc26867b31079d35d | [
"BSD-3-Clause"
] | null | null | null | Problems/Study Plans/Data Structure/Data Structure II/66_find_the_winner_of_the_circular_game.py | andor2718/LeetCode | 59874f49085818e6da751f1cc26867b31079d35d | [
"BSD-3-Clause"
] | null | null | null | # https://leetcode.com/problems/find-the-winner-of-the-circular-game/
| 34.171429 | 75 | 0.579431 |
1eb7c03290fb08e39908cee05b1cbf3161290e22 | 1,237 | py | Python | gmql/dataset/parsers/__init__.py | DEIB-GECO/PyGMQL | c7582b916c985a1521276a3e7eaba010b7902687 | [
"Apache-2.0"
] | 12 | 2017-06-10T13:18:32.000Z | 2021-05-06T12:19:07.000Z | gmql/dataset/parsers/__init__.py | DEIB-GECO/PyGMQL | c7582b916c985a1521276a3e7eaba010b7902687 | [
"Apache-2.0"
] | 28 | 2017-05-09T13:38:17.000Z | 2021-09-29T11:54:23.000Z | gmql/dataset/parsers/__init__.py | DEIB-GECO/PyGMQL | c7582b916c985a1521276a3e7eaba010b7902687 | [
"Apache-2.0"
] | 5 | 2017-10-11T13:53:57.000Z | 2020-02-28T06:21:21.000Z | # -*- coding: utf-8 -*-
# strings to recognize as NaN
NULL = "null"
INF = ""
UNDEFINED = ""
null_values = [NULL, INF, UNDEFINED]
GTF = "gtf"
TAB = "tab"
VCF = "vcf"
string_aliases = ['string', 'char']
int_aliases = ['long', 'int', 'integer']
float_aliases = ['double', 'float']
bool_aliases = ['bool', 'boolean']
allo... | 22.907407 | 74 | 0.662894 |
1eb85d0b0b100f5bb627dcd79ecd47d9d0502716 | 15,321 | py | Python | src/atomicfileio/__init__.py | sammck/python-atomicfileio | 23ec410815cf5f825e49cf18cb822b352943b758 | [
"MIT"
] | null | null | null | src/atomicfileio/__init__.py | sammck/python-atomicfileio | 23ec410815cf5f825e49cf18cb822b352943b758 | [
"MIT"
] | null | null | null | src/atomicfileio/__init__.py | sammck/python-atomicfileio | 23ec410815cf5f825e49cf18cb822b352943b758 | [
"MIT"
] | null | null | null | """Support for safely atomically updating files
This module provides tools for overwriting files in such a way that a reader will never see a partially written file.
Portions borrowed from https://code.activestate.com/recipes/579097-safely-and-atomically-write-to-a-file/,
also under the MIT license.
"""
__version__ =... | 46.427273 | 140 | 0.685595 |
1eb9591fd39a90fbd8bda4b94d081bf78a89b3dc | 213,087 | py | Python | 3algo/homo/c6_7_7datap.py | allengrr/deadlock_project | 933878077c45a7df04daa087407bb2620c064617 | [
"MIT"
] | null | null | null | 3algo/homo/c6_7_7datap.py | allengrr/deadlock_project | 933878077c45a7df04daa087407bb2620c064617 | [
"MIT"
] | null | null | null | 3algo/homo/c6_7_7datap.py | allengrr/deadlock_project | 933878077c45a7df04daa087407bb2620c064617 | [
"MIT"
] | 1 | 2021-03-21T17:54:26.000Z | 2021-03-21T17:54:26.000Z |
timely6_7_7 = 2972
untimely6_7_7 = 52
record7 = [[({'t4.110.126.0': {'wcet': 1, 'period': 10, 'deadline': 9}, 't2.110.126.0': {'wcet': 1, 'period': 5, 'deadline': 4}}, {'t4.110.126.0': [0.326, 1.6], 't2.110.126.0': [0.415, 1.6]}), 'osboxes-0'], [({'t5.113.126.1': {'wcet': 3, 'period': 15, 'deadline': 12}}, {'t5.113.1... | 16,391.307692 | 175,533 | 0.558786 |
1eba6e10d003d68291fee67453a429a61abfe604 | 794 | py | Python | examples/coupled_cavity.py | joebentley/simba | dd1b7bc6d22ad96566898dd1851cfa210462cb00 | [
"MIT"
] | 8 | 2020-03-19T10:59:25.000Z | 2022-01-22T22:33:07.000Z | examples/coupled_cavity.py | joebentley/simba | dd1b7bc6d22ad96566898dd1851cfa210462cb00 | [
"MIT"
] | 1 | 2022-01-22T11:24:45.000Z | 2022-01-22T11:24:45.000Z | examples/coupled_cavity.py | joebentley/simba | dd1b7bc6d22ad96566898dd1851cfa210462cb00 | [
"MIT"
] | 1 | 2020-03-19T13:27:41.000Z | 2020-03-19T13:27:41.000Z |
from simba import transfer_function_to_graph, tf2rss
from sympy import symbols
# passive realisation (g = 0)
s = symbols('s')
gamma_f, omega_s = symbols('gamma_f omega_s', real=True, positive=True)
tf = (s**2 + s * gamma_f + omega_s**2) / (s**2 - s * gamma_f + omega_s**2)
h_int = tf2rss(tf).to_slh().split().interac... | 30.538462 | 74 | 0.717884 |
1ebaa882aa44892e3a1918f92d6f8a028a36933a | 2,259 | py | Python | iv_plan/examples/hironxsys_hand_ar.py | ryhanai/iv-plan-hironx | 2f89293a55df4608cb35e6a9676db97b9e486e7d | [
"BSD-3-Clause"
] | null | null | null | iv_plan/examples/hironxsys_hand_ar.py | ryhanai/iv-plan-hironx | 2f89293a55df4608cb35e6a9676db97b9e486e7d | [
"BSD-3-Clause"
] | null | null | null | iv_plan/examples/hironxsys_hand_ar.py | ryhanai/iv-plan-hironx | 2f89293a55df4608cb35e6a9676db97b9e486e7d | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import roslib; roslib.load_manifest('iv_plan')
from ivutils import *
from hironxsys import *
import rospy
from ar_pose.msg import ARMarkers
from tf.transformations import *
import operator
from setup_rtchandle import *
robotframe = [1,0,0,-150, 0,1,0,0, 0,0,1,0, 0,0,0,1]
# rr.connect()
#... | 32.271429 | 104 | 0.660912 |
1ebb910855fd59083774495a20a52d1eeadfcf75 | 1,513 | py | Python | tests/test_randomvariablelist.py | ralfrost/probnum | 6b0988009a9dd7ecda87ba28c9d5c0b8019981b6 | [
"MIT"
] | null | null | null | tests/test_randomvariablelist.py | ralfrost/probnum | 6b0988009a9dd7ecda87ba28c9d5c0b8019981b6 | [
"MIT"
] | null | null | null | tests/test_randomvariablelist.py | ralfrost/probnum | 6b0988009a9dd7ecda87ba28c9d5c0b8019981b6 | [
"MIT"
] | null | null | null | import unittest
import numpy as np
from probnum._randomvariablelist import _RandomVariableList
from probnum.random_variables import Dirac
if __name__ == "__main__":
unittest.main()
| 29.666667 | 73 | 0.623265 |
1ebbb91a70ab0433fe37a2b4712f72a2b687acc4 | 416 | py | Python | simple.py | julia2288-cmis/julia2288-cmis-cs2 | a6925b34bad8e46f2e437d3e174ba1fa2942791f | [
"CC0-1.0"
] | null | null | null | simple.py | julia2288-cmis/julia2288-cmis-cs2 | a6925b34bad8e46f2e437d3e174ba1fa2942791f | [
"CC0-1.0"
] | null | null | null | simple.py | julia2288-cmis/julia2288-cmis-cs2 | a6925b34bad8e46f2e437d3e174ba1fa2942791f | [
"CC0-1.0"
] | null | null | null | #Defines the critical functions.
#Defines the output.
main()
#Defines the main fuction.
| 18.909091 | 44 | 0.622596 |
1ebbf6764706c37fc954f30837690895994c3e65 | 1,759 | py | Python | example_code/python/plot_curve_fit.py | NicoJG/PraktikumPhysikRepoVorlage | b29a4302958edc6205e2b107f7253f614cea0181 | [
"MIT"
] | 1 | 2021-08-21T17:08:39.000Z | 2021-08-21T17:08:39.000Z | example_code/python/plot_curve_fit.py | NicoJG/PraktikumPhysikRepoVorlage | b29a4302958edc6205e2b107f7253f614cea0181 | [
"MIT"
] | null | null | null | example_code/python/plot_curve_fit.py | NicoJG/PraktikumPhysikRepoVorlage | b29a4302958edc6205e2b107f7253f614cea0181 | [
"MIT"
] | null | null | null | # Erstelle aus gegebnen Daten eine Ausgleichskurve
# Und Plotte diese Kurve + die Daten
# wechsle die Working Directory zum Versuchsordner, damit das Python-Script von berall ausgefhrt werden kann
import os,pathlib
project_path = pathlib.Path(__file__).absolute().parent.parent
os.chdir(project_path)
# benutze die matp... | 30.859649 | 110 | 0.728823 |
1ebc01631e08d866baf1828fd8f7817027107805 | 2,547 | py | Python | pachicounter/util.py | yukkeorg/PachiCounter | 764526874e9ec03e06e7b61b136b20100e32d471 | [
"MIT"
] | null | null | null | pachicounter/util.py | yukkeorg/PachiCounter | 764526874e9ec03e06e7b61b136b20100e32d471 | [
"MIT"
] | null | null | null | pachicounter/util.py | yukkeorg/PachiCounter | 764526874e9ec03e06e7b61b136b20100e32d471 | [
"MIT"
] | null | null | null | # vim: ts=4 sts=4 sw=4 et
#####################################################################
# Pachi Counter
# Copyright (c) 2011-2020, Yusuke Ohshima All rights reserved.
#
# License: MIT.
# For details, please see LICENSE file.
#####################################################################
| 26.53125 | 74 | 0.505693 |
1ebea48b67d5622f6da1e6d92ac82373b246ae19 | 309 | py | Python | Prediction.py | neerajgupta2407/Fake-News-Foe | 394c83be8ea98caa60af7fdca2c8ec34af67c33f | [
"Apache-2.0"
] | 9 | 2020-03-26T12:22:57.000Z | 2021-05-01T20:07:55.000Z | Prediction.py | neerajgupta2407/Fake-News-Foe | 394c83be8ea98caa60af7fdca2c8ec34af67c33f | [
"Apache-2.0"
] | 4 | 2020-10-20T15:13:44.000Z | 2022-02-10T01:46:36.000Z | Prediction.py | neerajgupta2407/Fake-News-Foe | 394c83be8ea98caa60af7fdca2c8ec34af67c33f | [
"Apache-2.0"
] | 5 | 2020-03-25T15:26:14.000Z | 2020-12-03T20:07:23.000Z | import pickle
#function to run for prediction
| 28.090909 | 65 | 0.734628 |
1ec140a711eadb53834529c9948538cfabdd7acf | 9,058 | py | Python | chapter01/tic_tac_toe.py | TomaszGolan/rl-intro | 1676bfaea0c1661f931c160ed9ae104ee0b7b968 | [
"MIT"
] | null | null | null | chapter01/tic_tac_toe.py | TomaszGolan/rl-intro | 1676bfaea0c1661f931c160ed9ae104ee0b7b968 | [
"MIT"
] | null | null | null | chapter01/tic_tac_toe.py | TomaszGolan/rl-intro | 1676bfaea0c1661f931c160ed9ae104ee0b7b968 | [
"MIT"
] | null | null | null | import re
import random
import numpy as np
from itertools import product
from enum import Enum, unique
from abc import ABC, abstractmethod
from typing import Iterator, Dict, List
SIZE = 3 # board size (represented by numpy.array SIZExSIZE)
# for human player
KEYS = {'q': (0, 0), 'w': (0, 1), 'e': (0, 2),
'a'... | 31.894366 | 80 | 0.593729 |
1ec1f348503a6ddff54e195931bc4015e263f684 | 2,034 | py | Python | run/make_cal_sinograms.py | TysonReimer/itDAS | d4b4313afe253186b12e1e8eda5ef55bada0c764 | [
"Apache-2.0"
] | 8 | 2020-04-27T05:43:33.000Z | 2021-12-05T14:48:09.000Z | run/make_cal_sinograms.py | TysonReimer/itDAS | d4b4313afe253186b12e1e8eda5ef55bada0c764 | [
"Apache-2.0"
] | null | null | null | run/make_cal_sinograms.py | TysonReimer/itDAS | d4b4313afe253186b12e1e8eda5ef55bada0c764 | [
"Apache-2.0"
] | 2 | 2021-02-16T11:07:07.000Z | 2021-12-05T14:48:27.000Z | """
Tyson Reimer
University of Manitoba
January 28th, 2020
"""
import os
from umbms import get_proj_path, get_script_logger
from umbms.loadsave import load_pickle, save_pickle
from umbms.beamform.sigproc import iczt
###############################################################################
__DA... | 30.358209 | 80 | 0.576696 |
1ec58569c44771c682f58f8e09b37bae0d7d95c2 | 5,477 | py | Python | waveform_analysis/tests/test_ITU_R_468_weighting.py | pirun/waveform_analysis | 66809614b1fc985e694af1720341035316a5ac8e | [
"MIT"
] | 125 | 2017-08-27T01:48:02.000Z | 2022-01-20T10:47:13.000Z | waveform_analysis/tests/test_ITU_R_468_weighting.py | pirun/waveform_analysis | 66809614b1fc985e694af1720341035316a5ac8e | [
"MIT"
] | 13 | 2017-06-25T14:57:43.000Z | 2022-03-18T19:54:19.000Z | waveform_analysis/tests/test_ITU_R_468_weighting.py | pirun/waveform_analysis | 66809614b1fc985e694af1720341035316a5ac8e | [
"MIT"
] | 48 | 2017-06-25T10:42:10.000Z | 2022-03-09T18:13:55.000Z | import pytest
from scipy import signal
from scipy.interpolate import interp1d
import numpy as np
from numpy import pi
# This package must first be installed with `pip install -e .` or similar
from waveform_analysis import (ITU_R_468_weighting_analog,
ITU_R_468_weighting, ITU_R_468_weight... | 34.88535 | 75 | 0.606171 |
1ec6ee8435e7b21f5ea4fab4d3b576dbdb55a35f | 14,154 | py | Python | src/ride.py | yuanmingqi/RISE | 95577ac03c91937e5ddc22a8596270ad3e9d5e49 | [
"MIT"
] | null | null | null | src/ride.py | yuanmingqi/RISE | 95577ac03c91937e5ddc22a8596270ad3e9d5e49 | [
"MIT"
] | null | null | null | src/ride.py | yuanmingqi/RISE | 95577ac03c91937e5ddc22a8596270ad3e9d5e49 | [
"MIT"
] | null | null | null | import torch
from torch import nn, optim
from torch.nn import functional as F
from torch.utils import data
import os
import time
from collections import deque
import numpy as np
import torch
from a2c_ppo_acktr import algo
from a2c_ppo_acktr import utils
from a2c_ppo_acktr.envs import make_vec_envs
from a2c_ppo_acktr... | 37.84492 | 145 | 0.608026 |
1ec708f7c7d52019396b6d58f4230f1d5dfb0d4a | 57 | py | Python | nexinfosys/__init__.py | MAGIC-nexus/nis-python-client | f8ac51514ce3ef8249b06189c0d489aed956b5c0 | [
"BSD-3-Clause"
] | 1 | 2020-04-28T23:30:53.000Z | 2020-04-28T23:30:53.000Z | nexinfosys/__init__.py | MAGIC-nexus/nis-python-client | f8ac51514ce3ef8249b06189c0d489aed956b5c0 | [
"BSD-3-Clause"
] | null | null | null | nexinfosys/__init__.py | MAGIC-nexus/nis-python-client | f8ac51514ce3ef8249b06189c0d489aed956b5c0 | [
"BSD-3-Clause"
] | null | null | null |
from .client import NISClient, display_visjs_jupyterlab
| 19 | 55 | 0.859649 |
1ec73c33d161f5986058bec7dbdd80972b054c47 | 957 | py | Python | contents/monte_carlo_integration/code/python/monte_carlo.py | hybrideagle/algorithm-archive | f94e22021dce5bda08b74dbc42d19da0b530e068 | [
"MIT"
] | null | null | null | contents/monte_carlo_integration/code/python/monte_carlo.py | hybrideagle/algorithm-archive | f94e22021dce5bda08b74dbc42d19da0b530e068 | [
"MIT"
] | null | null | null | contents/monte_carlo_integration/code/python/monte_carlo.py | hybrideagle/algorithm-archive | f94e22021dce5bda08b74dbc42d19da0b530e068 | [
"MIT"
] | null | null | null | # submitted by hybrideagle
from random import random
from math import pi
def monte_carlo(n):
"""
Computes PI using the monte carlo method using `n` points
"""
pi_count = 0
for i in range(n):
x = random()
y = random()
if in_circle(x, y):
pi_count += 1
# T... | 25.864865 | 74 | 0.61442 |
1ec8250d4bb968d047bd4b22e1b37d8786d787f0 | 4,703 | py | Python | crawler/crawlerhelpers/efa_beta.py | jenerous/vvs-delay | cb02813552422392b88fe64dd57a880e1a726025 | [
"MIT"
] | null | null | null | crawler/crawlerhelpers/efa_beta.py | jenerous/vvs-delay | cb02813552422392b88fe64dd57a880e1a726025 | [
"MIT"
] | null | null | null | crawler/crawlerhelpers/efa_beta.py | jenerous/vvs-delay | cb02813552422392b88fe64dd57a880e1a726025 | [
"MIT"
] | null | null | null | from time import strftime
| 41.991071 | 107 | 0.512439 |
1ecae2e0cdf0ce7ac01b4920249b41f67edaa21f | 1,075 | py | Python | 2019/d22/d22.py | pravin/advent-2016 | ecb0f72b9152c13e9c05d3ed2510bf7b8aa0907c | [
"Apache-2.0"
] | null | null | null | 2019/d22/d22.py | pravin/advent-2016 | ecb0f72b9152c13e9c05d3ed2510bf7b8aa0907c | [
"Apache-2.0"
] | null | null | null | 2019/d22/d22.py | pravin/advent-2016 | ecb0f72b9152c13e9c05d3ed2510bf7b8aa0907c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
if __name__ == '__main__':
d = Day22()
d.partA()
print(d.deck.index(2019))
| 28.289474 | 54 | 0.476279 |
1ecc0290eeff6784236144e86f30d69d20b84f0f | 4,567 | py | Python | node_master.py | exosite-garage/synapse_nodes | 06a6942e2558e854b946c08e69c444d03c124d4c | [
"BSD-3-Clause"
] | 1 | 2017-11-03T15:32:33.000Z | 2017-11-03T15:32:33.000Z | node_master.py | exosite-garage/synapse_nodes | 06a6942e2558e854b946c08e69c444d03c124d4c | [
"BSD-3-Clause"
] | null | null | null | node_master.py | exosite-garage/synapse_nodes | 06a6942e2558e854b946c08e69c444d03c124d4c | [
"BSD-3-Clause"
] | null | null | null | #==============================================================================
# node_master.py
# SNAP Master Node code that interacts with other nodes on the SNAP network
# to receive their data and forward it onto a serial-to-Internet gateway for
# remote monitoring purposes. This is part of an Exosite-compatible S... | 47.082474 | 90 | 0.597986 |
1ed18e3a5bc3e56a30a5c177a3d61fd5dbe77a14 | 3,373 | py | Python | scripts/utils/MatlabUtils.py | Vants/stampsreplacer | a61d5174e1ee1d840a327ce6ec059a3a9f84a13b | [
"MIT"
] | 18 | 2019-02-04T11:22:25.000Z | 2022-02-15T10:02:14.000Z | scripts/utils/MatlabUtils.py | Vants/stampsreplacer | a61d5174e1ee1d840a327ce6ec059a3a9f84a13b | [
"MIT"
] | 1 | 2019-02-12T11:19:41.000Z | 2019-06-01T14:46:48.000Z | scripts/utils/MatlabUtils.py | Vants/stampsreplacer | a61d5174e1ee1d840a327ce6ec059a3a9f84a13b | [
"MIT"
] | 5 | 2019-11-27T16:22:12.000Z | 2021-04-14T11:10:44.000Z | import scipy.interpolate
import scipy.signal
from builtins import staticmethod
import numpy as np
from scripts.utils.ArrayUtils import ArrayUtils
| 33.068627 | 140 | 0.631782 |
1ed1ace2d823b49a93272f810565d84a9f472fcc | 1,185 | py | Python | Data Structures/Week1/Program1.py | ChanchalKumarMaji/Data-Structures-and-Algorithms-Specialization | 8eed0b4f01f2ab122c75707b15d4d2d7d0f56d38 | [
"MIT"
] | 4 | 2020-04-01T01:09:15.000Z | 2021-12-28T09:22:59.000Z | Data Structures/Week1/Program1.py | ChanchalKumarMaji/Data-Structures-and-Algorithms-Specialization | 8eed0b4f01f2ab122c75707b15d4d2d7d0f56d38 | [
"MIT"
] | null | null | null | Data Structures/Week1/Program1.py | ChanchalKumarMaji/Data-Structures-and-Algorithms-Specialization | 8eed0b4f01f2ab122c75707b15d4d2d7d0f56d38 | [
"MIT"
] | 3 | 2019-10-26T18:05:10.000Z | 2021-06-15T06:07:58.000Z | # python3
if __name__ == '__main__':
S = input()
print(solve(S))
| 20.084746 | 86 | 0.316456 |
1ed2ac907fbfedb11ec7c3978dc0e38575801a04 | 476 | py | Python | libalgs-py/sorting/insertion_sort.py | tdudz/libalgs-py | 9b2610de66217c0564193096702c47478de5db5e | [
"MIT"
] | null | null | null | libalgs-py/sorting/insertion_sort.py | tdudz/libalgs-py | 9b2610de66217c0564193096702c47478de5db5e | [
"MIT"
] | null | null | null | libalgs-py/sorting/insertion_sort.py | tdudz/libalgs-py | 9b2610de66217c0564193096702c47478de5db5e | [
"MIT"
] | null | null | null | """
Insertion Sort
--------------
Builds the sorted array by inserting one at a time.
Time Complexity: O(n^2)
Space Complexity: O(n)
Stable: Yes
"""
def insertion_sort(A):
"""
Takes a list of integers and sorts them in ascending order, then returns it.
Args:
A (arr): A list of integers
Returns:
arr: A li... | 14.875 | 77 | 0.596639 |
1ed5accf155e250073bc7bdf2bd30e6dea3370a8 | 428 | py | Python | src/infi/app_repo/errors.py | pombredanne/infi.app_repo | 6ef53d2b33080dd2a187fbb52b932440646ca05c | [
"BSD-3-Clause"
] | null | null | null | src/infi/app_repo/errors.py | pombredanne/infi.app_repo | 6ef53d2b33080dd2a187fbb52b932440646ca05c | [
"BSD-3-Clause"
] | null | null | null | src/infi/app_repo/errors.py | pombredanne/infi.app_repo | 6ef53d2b33080dd2a187fbb52b932440646ca05c | [
"BSD-3-Clause"
] | 2 | 2016-02-12T14:52:40.000Z | 2020-08-18T12:53:39.000Z | from infi.rpc.errors import RPCUserException
| 14.266667 | 46 | 0.78972 |
1ed6fb3058696a7fab8ff068f87872a50fb687c5 | 2,001 | py | Python | vespa/simulation/dialog_experiment_list.py | vespa-mrs/vespa | 6d3e84a206ec427ac1304e70c7fadf817432956b | [
"BSD-3-Clause"
] | null | null | null | vespa/simulation/dialog_experiment_list.py | vespa-mrs/vespa | 6d3e84a206ec427ac1304e70c7fadf817432956b | [
"BSD-3-Clause"
] | 4 | 2021-04-17T13:58:31.000Z | 2022-01-20T14:19:57.000Z | vespa/simulation/dialog_experiment_list.py | vespa-mrs/vespa | 6d3e84a206ec427ac1304e70c7fadf817432956b | [
"BSD-3-Clause"
] | 3 | 2021-06-05T16:34:57.000Z | 2022-01-19T16:13:22.000Z | # Python modules
# 3rd party modules
import wx
# Our modules
import vespa.simulation.auto_gui.experiment_list as gui_experiment_list
import vespa.common.wx_gravy.common_dialogs as common_dialogs
import vespa.common.wx_gravy.util as wx_util
#---------------------------------------------------------------------------... | 32.274194 | 79 | 0.668666 |
1ed76eae61cc1ae67ed7991861d56ea74fb9b976 | 696 | py | Python | Practice/Problem Solving/CutTheSticks.py | avantikasharma/HackerRank-Solutions | a980859ac352688853fcbcf3c7ec6d95685f99ea | [
"MIT"
] | 1 | 2018-07-08T15:44:15.000Z | 2018-07-08T15:44:15.000Z | Practice/Problem Solving/CutTheSticks.py | avantikasharma/HackerRank-Solutions | a980859ac352688853fcbcf3c7ec6d95685f99ea | [
"MIT"
] | null | null | null | Practice/Problem Solving/CutTheSticks.py | avantikasharma/HackerRank-Solutions | a980859ac352688853fcbcf3c7ec6d95685f99ea | [
"MIT"
] | 2 | 2018-08-10T06:49:34.000Z | 2020-10-01T04:50:59.000Z | #!/bin/python3
import math
import os
import random
import re
import sys
# Complete the cutTheSticks function below.
if __name__ == '__main__':
n = int(input())
arr = list(map(int, input().rstrip().split()))
cutTheSticks(arr)
| 19.333333 | 50 | 0.586207 |
1eda1c5ec3fa4c66e9bfd290be0bda0294371158 | 12,713 | py | Python | anella/tenor_client/tenor_nsi.py | Fundacio-i2CAT/ai4.0-tenor | cafb6127f0c9c4f0a8df1eb48cd4fa1a0ee1aed1 | [
"curl",
"Vim",
"Ruby",
"Apache-2.0"
] | null | null | null | anella/tenor_client/tenor_nsi.py | Fundacio-i2CAT/ai4.0-tenor | cafb6127f0c9c4f0a8df1eb48cd4fa1a0ee1aed1 | [
"curl",
"Vim",
"Ruby",
"Apache-2.0"
] | null | null | null | anella/tenor_client/tenor_nsi.py | Fundacio-i2CAT/ai4.0-tenor | cafb6127f0c9c4f0a8df1eb48cd4fa1a0ee1aed1 | [
"curl",
"Vim",
"Ruby",
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""TeNOR Network Service Instance Class and Client"""
import requests
import json
import uuid
from tenor_vnfi import TenorVNFI
from template_management import create_ssh_client
from template_management import render_template
from models.instance_configuration import InstanceCo... | 38.641337 | 112 | 0.526154 |
1eda3ffb7cd59c6c60967f92603c29ba38922e8a | 5,054 | py | Python | ODS - Staging - Illuminate/loadTables.py | achievementfirst/af-edfi-shared | 996a201a23b56d498eee75251bb2455201c17308 | [
"Apache-2.0"
] | 2 | 2020-10-06T22:06:52.000Z | 2020-12-24T17:27:48.000Z | ODS - Staging - Illuminate/loadTables.py | achievementfirst/af-edfi-shared | 996a201a23b56d498eee75251bb2455201c17308 | [
"Apache-2.0"
] | null | null | null | ODS - Staging - Illuminate/loadTables.py | achievementfirst/af-edfi-shared | 996a201a23b56d498eee75251bb2455201c17308 | [
"Apache-2.0"
] | 1 | 2020-10-07T18:43:17.000Z | 2020-10-07T18:43:17.000Z | """
Name: loadTables.py
Description: Script extracts data (specific to Illuminate assessments) from the edfi ODS and loads
it into the AWS Aurora db
Note:
The following code can be run locally or as a lambda function by converting the main function
to a lambda handler.
"""
import argparse
import configparser
import... | 31.197531 | 98 | 0.641472 |
1eda6198db3d13f656d2b6dfb7c8f3b811602a4d | 6,788 | py | Python | tst/schedulers/bayesopt/gpautograd/test_gp.py | awslabs/syne-tune | 1dd8e157477b86db01047a9a7821780ea04389bc | [
"ECL-2.0",
"Apache-2.0"
] | 97 | 2021-11-18T17:14:30.000Z | 2022-03-29T00:33:12.000Z | tst/schedulers/bayesopt/gpautograd/test_gp.py | awslabs/syne-tune | 1dd8e157477b86db01047a9a7821780ea04389bc | [
"ECL-2.0",
"Apache-2.0"
] | 54 | 2021-11-18T17:14:12.000Z | 2022-03-22T08:11:48.000Z | tst/schedulers/bayesopt/gpautograd/test_gp.py | awslabs/syne-tune | 1dd8e157477b86db01047a9a7821780ea04389bc | [
"ECL-2.0",
"Apache-2.0"
] | 9 | 2021-11-29T11:47:32.000Z | 2022-02-24T15:28:11.000Z | # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license... | 38.568182 | 161 | 0.725692 |
1edfdd935af453f5e2a4d99084ce76fa471248d6 | 975 | py | Python | demystifying/feature_extraction/random_feature_extractor.py | delemottelab/demystifying | e8527b52d5fbe0570cd391921ecda5aefceb797a | [
"MIT"
] | 16 | 2020-01-04T14:46:03.000Z | 2021-07-10T05:54:05.000Z | demystifying/feature_extraction/random_feature_extractor.py | delemottelab/demystifying | e8527b52d5fbe0570cd391921ecda5aefceb797a | [
"MIT"
] | 11 | 2020-01-10T16:18:17.000Z | 2022-03-20T09:53:33.000Z | demystifying/feature_extraction/random_feature_extractor.py | delemottelab/demystifying | e8527b52d5fbe0570cd391921ecda5aefceb797a | [
"MIT"
] | 3 | 2020-03-16T04:35:01.000Z | 2022-02-10T12:39:01.000Z | from __future__ import absolute_import, division, print_function
import logging
import sys
logging.basicConfig(
stream=sys.stdout,
format='%(asctime)s %(name)s-%(levelname)s: %(message)s',
datefmt='%Y-%m-%d %H:%M:%S')
import numpy as np
from .feature_extractor import FeatureExtractor
logger = logging.get... | 27.857143 | 65 | 0.594872 |
1ee382a0125a89f5fdc7cff849261c133ebb7a31 | 692 | py | Python | config.py | bruce30262/ghidra-dark | ee955a8afa3c4d28bdefe3db7970b762254b3411 | [
"MIT"
] | null | null | null | config.py | bruce30262/ghidra-dark | ee955a8afa3c4d28bdefe3db7970b762254b3411 | [
"MIT"
] | null | null | null | config.py | bruce30262/ghidra-dark | ee955a8afa3c4d28bdefe3db7970b762254b3411 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import yaml
""" Get flatlaf config """
flatlaf_version, flatlaf_style = None, None
font_decomp, font_ld = {}, {}
try:
with open("config.yml", "r") as f:
config = yaml.load(f, Loader=yaml.FullLoader)
flatlaf_version = config['flatlaf']['version']
flatlaf_style = confi... | 30.086957 | 140 | 0.66185 |
1ee4ad6117c78e893b5821384c2ff01a4418bed8 | 1,310 | py | Python | sysopt/HSV/inertia.py | andrewjlock/sysopt | b9ef17e4532f3a3327afc696ec698eb5dd365350 | [
"Apache-2.0"
] | null | null | null | sysopt/HSV/inertia.py | andrewjlock/sysopt | b9ef17e4532f3a3327afc696ec698eb5dd365350 | [
"Apache-2.0"
] | null | null | null | sysopt/HSV/inertia.py | andrewjlock/sysopt | b9ef17e4532f3a3327afc696ec698eb5dd365350 | [
"Apache-2.0"
] | null | null | null | """Collection of blocks needed for 3-DoF vehicle model.
"""
from sysopt import Block, Metadata
from sysopt.backends import heaviside
import numpy as np
| 29.111111 | 81 | 0.622137 |
1ee51c35bc679d160d7d39ce6956fbb88b6ed8ad | 1,531 | py | Python | 2015/solutions/20.py | adtok/advent-of-code | df1f61759bd8f3bfd7995b7e2a124d7f6e97ba01 | [
"MIT"
] | null | null | null | 2015/solutions/20.py | adtok/advent-of-code | df1f61759bd8f3bfd7995b7e2a124d7f6e97ba01 | [
"MIT"
] | null | null | null | 2015/solutions/20.py | adtok/advent-of-code | df1f61759bd8f3bfd7995b7e2a124d7f6e97ba01 | [
"MIT"
] | null | null | null | """Advent of Code 2015: Day 20"""
from itertools import count
from typing import Callable, List
if __name__ == "__main__":
main()
| 24.301587 | 84 | 0.606793 |
1ee540097c32429348fbeb504278fb986bd3a9e7 | 1,864 | py | Python | python/examples/bert/test_multi_fetch_client.py | hysunflower/Serving | 50d0c2900f3385b049f76b91e38cc69d8e8a102d | [
"Apache-2.0"
] | 789 | 2019-04-05T09:20:46.000Z | 2022-03-31T13:43:54.000Z | python/examples/bert/test_multi_fetch_client.py | hysunflower/Serving | 50d0c2900f3385b049f76b91e38cc69d8e8a102d | [
"Apache-2.0"
] | 1,195 | 2019-04-08T10:05:28.000Z | 2022-03-31T03:43:42.000Z | python/examples/bert/test_multi_fetch_client.py | hysunflower/Serving | 50d0c2900f3385b049f76b91e38cc69d8e8a102d | [
"Apache-2.0"
] | 229 | 2019-04-05T09:20:57.000Z | 2022-03-30T06:21:22.000Z | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 34.518519 | 77 | 0.67221 |
948fa3226659c8d5d08bc6395c25891bde4c906c | 23,434 | py | Python | gs_quant/markets/core.py | alexanu/gs-quant | fbb8d88d570aee545ed3a8601d9052c281ecca19 | [
"Apache-2.0"
] | 1 | 2020-05-18T02:09:39.000Z | 2020-05-18T02:09:39.000Z | gs_quant/markets/core.py | atefar2/gs-quant | d31ae3204d5421861897bac49383bc213d5497a2 | [
"Apache-2.0"
] | null | null | null | gs_quant/markets/core.py | atefar2/gs-quant | d31ae3204d5421861897bac49383bc213d5497a2 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2019 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software di... | 41.996416 | 120 | 0.622856 |
949098c824cfbd3da37cadae478a4ffc0d23053a | 4,553 | py | Python | DjangoECom/products/migrations/0001_initial.py | MostafaSamyFayez/E-Commerce-Sys | 95ed3cb65b238866e336d43422dfb1737bfd7993 | [
"Unlicense"
] | 2 | 2021-04-01T00:23:44.000Z | 2021-04-01T00:23:48.000Z | DjangoECom/products/migrations/0001_initial.py | MostafaSamyFayez/E-Commerce-Sys | 95ed3cb65b238866e336d43422dfb1737bfd7993 | [
"Unlicense"
] | null | null | null | DjangoECom/products/migrations/0001_initial.py | MostafaSamyFayez/E-Commerce-Sys | 95ed3cb65b238866e336d43422dfb1737bfd7993 | [
"Unlicense"
] | 1 | 2021-01-23T13:06:25.000Z | 2021-01-23T13:06:25.000Z | # Generated by Django 3.1.4 on 2020-12-21 17:04
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| 53.564706 | 141 | 0.595212 |
949348fb8fb9c95b02cdfcf92957d20bc4c5574a | 898 | py | Python | tests/test_c_evluater.py | jiamo/pcc | fde1173e3ba81a41b4f901780711cffb7934107e | [
"Unlicense"
] | 4 | 2018-06-20T16:32:30.000Z | 2018-09-15T15:12:38.000Z | tests/test_c_evluater.py | jiamo/pcc | fde1173e3ba81a41b4f901780711cffb7934107e | [
"Unlicense"
] | 5 | 2018-05-19T08:35:06.000Z | 2021-10-13T05:23:57.000Z | tests/test_c_evluater.py | jiamo/pcc | fde1173e3ba81a41b4f901780711cffb7934107e | [
"Unlicense"
] | null | null | null | import sys
import os
this_dir = os.path.dirname(__file__)
parent_dir = os.path.dirname(this_dir)
sys.path.insert(0, parent_dir)
from pcc.evaluater.c_evaluator import CEvaluator
import unittest
import unittest
if __name__ == '__main__':
# Evaluate some code
# if __name__ == '__main__':
unittest.main()
| 21.902439 | 49 | 0.544543 |
9499935e046ef24294dc0f8b1d160b07bb4cedd9 | 15,621 | py | Python | tests/datasets/test_mnist.py | dbcollection/dbcollection | a36f57a11bc2636992e26bba4406914162773dd9 | [
"MIT"
] | 23 | 2017-09-20T19:23:26.000Z | 2022-01-09T16:18:11.000Z | tests/datasets/test_mnist.py | dbcollection/dbcollection | a36f57a11bc2636992e26bba4406914162773dd9 | [
"MIT"
] | 148 | 2017-07-23T14:28:28.000Z | 2022-01-13T00:35:17.000Z | tests/datasets/test_mnist.py | dbcollection/dbcollection | a36f57a11bc2636992e26bba4406914162773dd9 | [
"MIT"
] | 6 | 2018-01-12T15:47:57.000Z | 2021-02-09T06:32:39.000Z | """
Test the base classes for managing datasets and tasks.
"""
import os
import sys
import pytest
import numpy as np
from numpy.testing import assert_array_equal
from dbcollection.utils.string_ascii import convert_str_to_ascii as str2ascii
from dbcollection.utils.pad import pad_list
from dbcollection.datasets.mnist.... | 39.150376 | 151 | 0.679534 |
9499bf696b293047856ed9f2ec46e452e8a7ad7f | 669 | py | Python | apps/stringbyte/stringbyte.py | jeonghoonkang/BerePi | e04283a94a6a0487ab0049dc3e514d6c5dda39cc | [
"BSD-2-Clause"
] | 22 | 2015-06-03T06:28:27.000Z | 2022-03-18T08:02:45.000Z | apps/stringbyte/stringbyte.py | jeonghoonkang/BerePi | e04283a94a6a0487ab0049dc3e514d6c5dda39cc | [
"BSD-2-Clause"
] | 14 | 2015-06-08T01:31:53.000Z | 2020-08-30T02:19:15.000Z | apps/stringbyte/stringbyte.py | jeonghoonkang/BerePi | e04283a94a6a0487ab0049dc3e514d6c5dda39cc | [
"BSD-2-Clause"
] | 26 | 2015-05-12T09:33:55.000Z | 2021-08-30T05:41:00.000Z | # -*- coding: utf-8 -*-
# Author : Jeonghoonkang, github.com/jeonghoonkang
hexstr = '123456'
# 1) [ for ... ]
hlist = [hexstr[i:i+2] for i in range(0,len(hexstr),2)]
#2) re.findall
hlist = re.findall(r'..',hexstr)
#3) map, zip, iter
hlist = map(''.join, zip(*[iter(hexstr)]*2))
'''
iter(hxstr)
[ 'a' ] * 2 ... | 23.068966 | 55 | 0.566517 |
949a575e64bb72e464301f15610f9e5cb6055022 | 760 | py | Python | statuscake/apis/__init__.py | StatusCakeDev/statuscake-py | 267f485e6c18a6ed6e17667ceaddfce6271ec4af | [
"MIT"
] | null | null | null | statuscake/apis/__init__.py | StatusCakeDev/statuscake-py | 267f485e6c18a6ed6e17667ceaddfce6271ec4af | [
"MIT"
] | null | null | null | statuscake/apis/__init__.py | StatusCakeDev/statuscake-py | 267f485e6c18a6ed6e17667ceaddfce6271ec4af | [
"MIT"
] | null | null | null |
# flake8: noqa
# Import all APIs into this package.
# If you have many APIs here with many many models used in each API this may
# raise a `RecursionError`.
# In order to avoid this, import only the API that you directly need like:
#
# from .api.contact_groups_api import ContactGroupsApi
#
# or import this package,... | 33.043478 | 76 | 0.803947 |
949b48cef09179339869e0e0e398444e8cad808f | 3,383 | py | Python | coronastat/utils.py | theNocturnalGuy/coronastat | a5f6ee1ad59a709c48f18d09413ba89b39572b97 | [
"MIT"
] | 1 | 2020-07-29T21:05:20.000Z | 2020-07-29T21:05:20.000Z | coronastat/utils.py | thenocturnalguy/coronastat | a5f6ee1ad59a709c48f18d09413ba89b39572b97 | [
"MIT"
] | null | null | null | coronastat/utils.py | thenocturnalguy/coronastat | a5f6ee1ad59a709c48f18d09413ba89b39572b97 | [
"MIT"
] | null | null | null | ########### IMPORTING THE REQURIED LIBRARIES ###########
from __future__ import print_function
from terminaltables import AsciiTable
import sys, time
########## DECLARING THE GLOBAL VARIABLES #############
WORLD_URL = "https://www.worldometers.info/coronavirus"
INDIA_URL = "https://www.mohfw.gov.in/"
MAX_TIMEOUT = 3... | 31.324074 | 111 | 0.514336 |
949c67ffc18b5f1e8255608fad78da04a4deef69 | 4,744 | py | Python | host/function/send_files.py | zadjii/nebula | 50c4ec019c9f7eb15fe105a6c53a8a12880e281c | [
"MIT"
] | 2 | 2020-04-15T11:20:59.000Z | 2021-05-12T13:01:36.000Z | host/function/send_files.py | zadjii/nebula | 50c4ec019c9f7eb15fe105a6c53a8a12880e281c | [
"MIT"
] | 1 | 2018-06-05T04:48:56.000Z | 2018-06-05T04:48:56.000Z | host/function/send_files.py | zadjii/nebula | 50c4ec019c9f7eb15fe105a6c53a8a12880e281c | [
"MIT"
] | 1 | 2018-08-15T06:45:46.000Z | 2018-08-15T06:45:46.000Z | import os
import shutil
from stat import S_ISDIR
from datetime import datetime
from common_util import Error, Success
from host.util import mylog
from messages import HostFileTransferMessage
__author__ = 'Mike'
def send_tree(db, other_id, cloud, requested_root, connection):
"""
Note: This can't be used to ... | 34.376812 | 99 | 0.638702 |
949c84290c5d2af0d114a3443ba14a44a3e3161b | 1,174 | py | Python | config.py | RobertStuartUalberta/CMPUT355 | 82502446552bb09dfa6d680649ae2b4646a4c4dc | [
"Apache-2.0"
] | null | null | null | config.py | RobertStuartUalberta/CMPUT355 | 82502446552bb09dfa6d680649ae2b4646a4c4dc | [
"Apache-2.0"
] | null | null | null | config.py | RobertStuartUalberta/CMPUT355 | 82502446552bb09dfa6d680649ae2b4646a4c4dc | [
"Apache-2.0"
] | null | null | null | from io import open
from importlib import import_module
from app.Exceptions.exceptions import *
# TODO Ask user if they would like to install the package with pip
| 30.894737 | 94 | 0.581772 |
949ea06e98739eef69309f8bebfeb873270bebd7 | 795 | py | Python | mrobpy/tests/point_cloud_test.py | miloserdova-l/mrob | 48bef772ba3158d2122991069196d6efd4a39f8c | [
"Apache-2.0"
] | 12 | 2020-09-22T15:33:48.000Z | 2022-03-02T17:27:39.000Z | mrobpy/tests/point_cloud_test.py | MobileRoboticsSkoltech/mrob | 7668a3ee35345c4878aa86fff082cc017992d205 | [
"Apache-2.0"
] | 46 | 2020-09-22T15:47:08.000Z | 2022-01-22T10:56:44.000Z | mrobpy/tests/point_cloud_test.py | MobileRoboticsSkoltech/mrob | 7668a3ee35345c4878aa86fff082cc017992d205 | [
"Apache-2.0"
] | 9 | 2020-09-22T15:59:33.000Z | 2021-12-20T20:15:16.000Z | import numpy as np
import mrob
import pytest
| 28.392857 | 68 | 0.583648 |
949f8b0b268ad53be3b2e03a7886ed9475f6d1c0 | 1,698 | py | Python | src/pyams_utils/attr.py | Py-AMS/pyams-utils | 65b166596a8b9f66fb092a69ce5d53ac6675685e | [
"ZPL-2.1"
] | null | null | null | src/pyams_utils/attr.py | Py-AMS/pyams-utils | 65b166596a8b9f66fb092a69ce5d53ac6675685e | [
"ZPL-2.1"
] | null | null | null | src/pyams_utils/attr.py | Py-AMS/pyams-utils | 65b166596a8b9f66fb092a69ce5d53ac6675685e | [
"ZPL-2.1"
] | null | null | null | #
# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRAN... | 33.96 | 98 | 0.732627 |
94a23063115af6a9b0dee607fd43ac955b2fab32 | 794 | py | Python | examples/tutorials/tutorial_1.py | tgolsson/appJar | 5e2f8bff44e927e7c2bae17fccddc6dbf79952f0 | [
"Apache-2.0"
] | 666 | 2016-11-14T18:17:40.000Z | 2022-03-29T03:53:22.000Z | examples/tutorials/tutorial_1.py | tgolsson/appJar | 5e2f8bff44e927e7c2bae17fccddc6dbf79952f0 | [
"Apache-2.0"
] | 598 | 2016-10-20T21:04:09.000Z | 2022-03-15T22:44:49.000Z | examples/tutorials/tutorial_1.py | tgolsson/appJar | 5e2f8bff44e927e7c2bae17fccddc6dbf79952f0 | [
"Apache-2.0"
] | 95 | 2017-01-19T12:23:58.000Z | 2022-03-06T18:16:21.000Z | import sys
sys.path.append("../../")
from appJar import gui
count = 0
app = gui("Demo GUI")
app.setBg("yellow")
app.setFg("red")
app.setFont(15)
app.addLabel("title", "Hello World")
app.addMessage("info", "This is a simple demo of appJar")
app.addButton("PRESS", press)
app.addButton("PRESS ME TOO", press)
app.addB... | 20.358974 | 59 | 0.596977 |
94a3721f1a6e647e0a04fb6c974da5b5a1d53263 | 2,024 | py | Python | Hash Table/811. Subdomain Visit Count.py | beckswu/Leetcode | 480e8dc276b1f65961166d66efa5497d7ff0bdfd | [
"MIT"
] | 138 | 2020-02-08T05:25:26.000Z | 2021-11-04T11:59:28.000Z | Hash Table/811. Subdomain Visit Count.py | beckswu/Leetcode | 480e8dc276b1f65961166d66efa5497d7ff0bdfd | [
"MIT"
] | null | null | null | Hash Table/811. Subdomain Visit Count.py | beckswu/Leetcode | 480e8dc276b1f65961166d66efa5497d7ff0bdfd | [
"MIT"
] | 24 | 2021-01-02T07:18:43.000Z | 2022-03-20T08:17:54.000Z | """
811. Subdomain Visit Count
Example 1:
Input:
["9001 discuss.leetcode.com"]
Output:
["9001 discuss.leetcode.com", "9001 leetcode.com", "9001 com"]
Explanation:
We only have one website domain: "discuss.leetcode.com". As discussed above, the subdomain "leetcode.com" and "com" will also be visited. So the... | 36.142857 | 228 | 0.552372 |
94a51cb03cd32d86e85ab731f06b185ae8faa39d | 1,223 | py | Python | timeslotsAPI/app/demo/v1/routes.py | NeilBaksi/Dental-Appointment-Bot | 414c34a696977257d1e7fc327206282eb42dd3ea | [
"MIT"
] | null | null | null | timeslotsAPI/app/demo/v1/routes.py | NeilBaksi/Dental-Appointment-Bot | 414c34a696977257d1e7fc327206282eb42dd3ea | [
"MIT"
] | null | null | null | timeslotsAPI/app/demo/v1/routes.py | NeilBaksi/Dental-Appointment-Bot | 414c34a696977257d1e7fc327206282eb42dd3ea | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
###
### DO NOT CHANGE THIS FILE
###
### The code is auto generated, your change will be overwritten by
### code generating.
###
from __future__ import absolute_import
from .api.timeslots_dentistID import TimeslotsDentistid
from .api.timeslots import Timeslots
from .api.timeslots_dentistID_ti... | 50.958333 | 168 | 0.800491 |
94a6826e247a30c899f1dfbebb5660a35c3394dc | 1,523 | py | Python | src/control_single.py | RidgeX/zenwheels-python | 83804281f09bb1b3947715f11bd61611283cfc14 | [
"MIT"
] | 2 | 2017-08-11T05:17:59.000Z | 2018-02-19T06:29:25.000Z | src/control_single.py | RidgeX/zenwheels-python | 83804281f09bb1b3947715f11bd61611283cfc14 | [
"MIT"
] | null | null | null | src/control_single.py | RidgeX/zenwheels-python | 83804281f09bb1b3947715f11bd61611283cfc14 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from bluetooth import *
from protocol import *
import sys
import threading
# MAC address to connect to
address = '00:06:66:61:AC:9E' # MicroCar-58
# Whether the processing thread is running
running = True
if __name__ == '__main__':
main()
| 22.397059 | 64 | 0.621799 |
94a709bea76252538506a491da154f22aa286fe8 | 15,383 | py | Python | analysis/202102--dither_pattern_ghost/13_removal_test.py | rsiverd/ultracool | cbeb2e0e4aee0acc9f8ed2bde7ecdf8be5fa85a1 | [
"BSD-2-Clause"
] | null | null | null | analysis/202102--dither_pattern_ghost/13_removal_test.py | rsiverd/ultracool | cbeb2e0e4aee0acc9f8ed2bde7ecdf8be5fa85a1 | [
"BSD-2-Clause"
] | null | null | null | analysis/202102--dither_pattern_ghost/13_removal_test.py | rsiverd/ultracool | cbeb2e0e4aee0acc9f8ed2bde7ecdf8be5fa85a1 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# vim: set fileencoding=utf-8 ts=4 sts=4 sw=4 et tw=80 :
#
# Attempt removal of fading residual ghost image from image set.
#
# Rob Siverd
# Created: 2021-02-16
# Last modified: 2021-02-16
#--------------------------------------------------------------------------
#**************************... | 37.703431 | 79 | 0.593512 |
94a7c591d47067f6549e87406e4215a9225d03db | 647 | py | Python | fsu/__main__.py | jamesabel/fsu | 652e9f37a83e4df545dc785ea807c818ee04104a | [
"MIT"
] | null | null | null | fsu/__main__.py | jamesabel/fsu | 652e9f37a83e4df545dc785ea807c818ee04104a | [
"MIT"
] | null | null | null | fsu/__main__.py | jamesabel/fsu | 652e9f37a83e4df545dc785ea807c818ee04104a | [
"MIT"
] | null | null | null | import os
import argparse
from fsu import __application_name__, longest_path, longest_path_command
if __name__ == "__main__":
fsu()
| 28.130435 | 98 | 0.658423 |
94a92c7220f442afdf93bb1104fa4c59061bf49f | 3,914 | py | Python | authors/apps/follows/views.py | andela/ah-the-jedi-backend | ba429dfcec577bd6d52052673c1c413835f65988 | [
"BSD-3-Clause"
] | 1 | 2019-12-25T18:59:34.000Z | 2019-12-25T18:59:34.000Z | authors/apps/follows/views.py | katherine95/ah-the-jedi-backend | ba429dfcec577bd6d52052673c1c413835f65988 | [
"BSD-3-Clause"
] | 26 | 2019-04-23T11:20:35.000Z | 2022-03-11T23:45:54.000Z | authors/apps/follows/views.py | katherine95/ah-the-jedi-backend | ba429dfcec577bd6d52052673c1c413835f65988 | [
"BSD-3-Clause"
] | 8 | 2019-05-21T06:54:34.000Z | 2019-11-18T19:45:22.000Z | from django.shortcuts import render
from rest_framework import status
from rest_framework.generics import (
RetrieveAPIView, CreateAPIView, DestroyAPIView)
from rest_framework.response import Response
from .models import UserFollow
from .utils import Utilities
from .serializers import FollowsSerializer, FollowersS... | 26.268456 | 70 | 0.645631 |
94aaa566c7e8105c57c524e1fcc4322e548e50a4 | 364 | py | Python | tests/conftest.py | goodeggs/dayforce-client | 0e994509482061e7bbde1c602dd1e6c339245d44 | [
"MIT"
] | 3 | 2020-08-05T23:46:45.000Z | 2022-03-14T22:12:23.000Z | tests/conftest.py | goodeggs/dayforce-client | 0e994509482061e7bbde1c602dd1e6c339245d44 | [
"MIT"
] | 5 | 2020-01-29T14:38:00.000Z | 2022-03-14T21:44:03.000Z | tests/conftest.py | goodeggs/dayforce-client | 0e994509482061e7bbde1c602dd1e6c339245d44 | [
"MIT"
] | 1 | 2021-04-03T21:21:53.000Z | 2021-04-03T21:21:53.000Z | import pytest
from dayforce_client.client import Dayforce, DayforceSFTP
| 22.75 | 78 | 0.714286 |
94ab75228b05a2963c183365296413528d246a91 | 92 | py | Python | parameters_8000.py | ayusharora99/E-CollegeBooks | bc9897215a9ed4d17e372a0371318967e3d480eb | [
"BSD-3-Clause"
] | 2 | 2018-12-08T23:59:12.000Z | 2019-02-13T23:04:36.000Z | parameters_8000.py | ayusharora99/E-CollegeBooks | bc9897215a9ed4d17e372a0371318967e3d480eb | [
"BSD-3-Clause"
] | null | null | null | parameters_8000.py | ayusharora99/E-CollegeBooks | bc9897215a9ed4d17e372a0371318967e3d480eb | [
"BSD-3-Clause"
] | 3 | 2018-12-08T23:59:17.000Z | 2019-02-13T23:04:38.000Z | password="pbkdf2(1000,20,sha512)$ba0f5757f7b448ec$d9c2e5887e65f45311047c8ff518f200ee11b98f"
| 46 | 91 | 0.891304 |
94ac6044959d983d47c287f915e389ed8d95187d | 328 | py | Python | src/omfgp/cli.py | miketlk/omfgp | 6e5a0f52f2688d81bde3e5169a37311c9517fe1d | [
"MIT"
] | null | null | null | src/omfgp/cli.py | miketlk/omfgp | 6e5a0f52f2688d81bde3e5169a37311c9517fe1d | [
"MIT"
] | null | null | null | src/omfgp/cli.py | miketlk/omfgp | 6e5a0f52f2688d81bde3e5169a37311c9517fe1d | [
"MIT"
] | 1 | 2021-08-16T10:19:52.000Z | 2021-08-16T10:19:52.000Z | DEFAULT_KEY = {
"ENC": b"\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F",
"MAC": b"\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F",
"DEK": b"\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F",
}
def list(key=DEFAULT_KEY):
"""Lists all applets"""
pr... | 36.444444 | 79 | 0.643293 |
94ad6a21c0e36974f4e1b9968bd669337deebb18 | 3,987 | py | Python | server.py | Chase-Warwick/CMPUT404-Assignment-1 | b224c13309879d4894616267f396494ad37d1a9d | [
"Apache-2.0"
] | null | null | null | server.py | Chase-Warwick/CMPUT404-Assignment-1 | b224c13309879d4894616267f396494ad37d1a9d | [
"Apache-2.0"
] | null | null | null | server.py | Chase-Warwick/CMPUT404-Assignment-1 | b224c13309879d4894616267f396494ad37d1a9d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import socketserver
import os
from HTTP_Parser import HTTP_Parser
# Copyright 2013 Abram Hindle, Eddie Antonio Santos, Chase Warwick
#
# 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 ... | 34.669565 | 127 | 0.651618 |
94ae2a18c46e0824f96fd46435cacfc8f3b0d962 | 3,542 | py | Python | polire/interpolate/idw/idw.py | patel-zeel/ALdeploy | 58212209c4b495db471ada0fd695eab38e2acfe8 | [
"BSD-3-Clause"
] | null | null | null | polire/interpolate/idw/idw.py | patel-zeel/ALdeploy | 58212209c4b495db471ada0fd695eab38e2acfe8 | [
"BSD-3-Clause"
] | null | null | null | polire/interpolate/idw/idw.py | patel-zeel/ALdeploy | 58212209c4b495db471ada0fd695eab38e2acfe8 | [
"BSD-3-Clause"
] | null | null | null | r"""
This is a module for IDW Spatial Interpolation
"""
import numpy as np
from ...utils.distance import haversine, euclidean
from ..base import Base
from copy import deepcopy
| 34.057692 | 106 | 0.627329 |
94ae725011a08e4c8517cf30bebcb0c980693e6f | 306 | py | Python | rucken_todo/helpers/jwt_utils.py | site15/rucken-todo-django | bf30d4ad43be22bd8383447e07b151d6dc99da72 | [
"MIT"
] | 3 | 2018-06-04T07:36:59.000Z | 2019-10-07T05:33:56.000Z | rucken_todo/helpers/jwt_utils.py | site15/rucken-todo-django-example | bf30d4ad43be22bd8383447e07b151d6dc99da72 | [
"MIT"
] | 428 | 2017-11-24T20:19:39.000Z | 2022-03-26T04:13:25.000Z | rucken_todo/helpers/jwt_utils.py | rucken/todo-django | bf30d4ad43be22bd8383447e07b151d6dc99da72 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from rucken_todo.serializers import AccountSerializer
| 27.818182 | 69 | 0.732026 |
94ae9dc93f1afd0836d68bb47efd279b23b7bf97 | 4,464 | py | Python | Bitrate/bitrate_api.py | AnirudhJanagam/Applied-Network-Management | 95ceac895976ef55dd1889660920de70d1f53012 | [
"Apache-2.0"
] | 1 | 2021-01-21T06:15:29.000Z | 2021-01-21T06:15:29.000Z | Bitrate/bitrate_api.py | AnirudhJanagam/Applied-Network-Management | 95ceac895976ef55dd1889660920de70d1f53012 | [
"Apache-2.0"
] | null | null | null | Bitrate/bitrate_api.py | AnirudhJanagam/Applied-Network-Management | 95ceac895976ef55dd1889660920de70d1f53012 | [
"Apache-2.0"
] | null | null | null | import os, sys
import subprocess
from subprocess import Popen
from bitrate_db import influx
from flask import Flask
from flask import request, Response, make_response
from functools import wraps
import threading
from threading import Thread
dpmi = Flask(__name__)
interface="ens4"
directory="/home/ajheartnett/consume... | 25.363636 | 144 | 0.691084 |
94af70908d2b3dd85709ae398d03903d5cfe364f | 3,438 | py | Python | tutorials/ot-oti-find-tree.py | mtholder/peyotl | bbbe0e828c0cd706a11cd1b25a739d4603cbbe63 | [
"BSD-2-Clause"
] | 6 | 2015-01-11T06:24:38.000Z | 2017-11-23T17:18:12.000Z | tutorials/ot-oti-find-tree.py | OpenTreeOfLife/peyotl | bbbe0e828c0cd706a11cd1b25a739d4603cbbe63 | [
"BSD-2-Clause"
] | 60 | 2015-01-09T10:30:58.000Z | 2020-05-20T17:08:36.000Z | tutorials/ot-oti-find-tree.py | OpenTreeOfLife/peyotl | bbbe0e828c0cd706a11cd1b25a739d4603cbbe63 | [
"BSD-2-Clause"
] | 3 | 2015-09-03T15:29:00.000Z | 2015-10-08T20:03:30.000Z | #!/usr/bin/env python
from __future__ import print_function
'''Simple command-line tool that wraps OTI to get trees for an argument which is a property value pair
e.g. python ot-oti-find-tree.py '{"ot:ottTaxonName": "Bos"}'
which is described at https://github.com/OpenTreeOfLife/opentree/wiki/Open-Tree-of-Life-... | 45.236842 | 159 | 0.670157 |
94af9687241b62e54f2ba2743065ae7f38faf540 | 5,817 | py | Python | negmgan/model_Imeans.py | junzhuang-code/NEGMGAN | aae8912cf03e3590abc81f66a255b891cee4443d | [
"MIT"
] | null | null | null | negmgan/model_Imeans.py | junzhuang-code/NEGMGAN | aae8912cf03e3590abc81f66a255b891cee4443d | [
"MIT"
] | null | null | null | negmgan/model_Imeans.py | junzhuang-code/NEGMGAN | aae8912cf03e3590abc81f66a255b891cee4443d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@title: Non-Exhaustive Gaussian Mixture Generative Adversarial Networks (NE-GM-GAN)
@topic: I-means Model
@author: Jun Zhuang, Mohammad Al Hasan
@ref:
https://math.stackexchange.com/questions/20593/calculate-variance-from-a-stream-of-sample-values
"""
import numpy... | 48.882353 | 121 | 0.552347 |
94afc3801ad33ac542a38c7c118aaf3297b38ae2 | 64 | py | Python | matrix/__init__.py | exted/matrix | 365421e8e462872087173e41c63adee96f76d207 | [
"MIT"
] | null | null | null | matrix/__init__.py | exted/matrix | 365421e8e462872087173e41c63adee96f76d207 | [
"MIT"
] | null | null | null | matrix/__init__.py | exted/matrix | 365421e8e462872087173e41c63adee96f76d207 | [
"MIT"
] | null | null | null | from . import nodes
from . import algos
from . import simulation | 21.333333 | 24 | 0.78125 |
94b2972116bf954df018e058f59806dfa116f612 | 9,733 | py | Python | board.py | jimages/Surakarta-AI-Core | 6b6e5ddde7337676212cff0ee9f5c7ac2cb01f06 | [
"MIT"
] | 1 | 2021-01-04T12:08:29.000Z | 2021-01-04T12:08:29.000Z | board.py | jimages/Surakarta-AI-Core | 6b6e5ddde7337676212cff0ee9f5c7ac2cb01f06 | [
"MIT"
] | null | null | null | board.py | jimages/Surakarta-AI-Core | 6b6e5ddde7337676212cff0ee9f5c7ac2cb01f06 | [
"MIT"
] | null | null | null | from status import Chess, GameStatus, Direction
def get_chess(self, x, y):
'''
Get the status of specific chess on board.
'''
if x not in range(6) or y not in range(6):
return Chess.Null
return self.__board[y][x]
def can_move(self, x, y, direction):
... | 32.228477 | 115 | 0.494606 |
94b31dcd01a9c5b2acc1e8e7cd78ecaf4e1b79f0 | 1,422 | py | Python | plotting/plot_seed_variation/prepare_data_for_r.py | kienpt/site_discovery_public | 61440a8400bcc018c4dd9f8d2a810971ef548d8e | [
"Apache-1.1"
] | 4 | 2020-10-12T14:26:36.000Z | 2021-08-19T17:26:00.000Z | plotting/plot_seed_variation/prepare_data_for_r.py | kienpt/site_discovery_public | 61440a8400bcc018c4dd9f8d2a810971ef548d8e | [
"Apache-1.1"
] | null | null | null | plotting/plot_seed_variation/prepare_data_for_r.py | kienpt/site_discovery_public | 61440a8400bcc018c4dd9f8d2a810971ef548d8e | [
"Apache-1.1"
] | null | null | null | import argparse
import sys
if __name__=='__main__':
main()
| 33.069767 | 100 | 0.600563 |
94b49ac2ff944d6a036aac4514f2d4f0959b3e08 | 12,058 | py | Python | code/pre_processing/pre_processing_utils.py | brainML/great-apes | 293195c6b1274a5e9b5c5f7e30ac963292efeab1 | [
"BSD-3-Clause"
] | 4 | 2022-02-16T20:57:06.000Z | 2022-03-23T01:32:58.000Z | code/pre_processing/pre_processing_utils.py | brainML/great-apes | 293195c6b1274a5e9b5c5f7e30ac963292efeab1 | [
"BSD-3-Clause"
] | null | null | null | code/pre_processing/pre_processing_utils.py | brainML/great-apes | 293195c6b1274a5e9b5c5f7e30ac963292efeab1 | [
"BSD-3-Clause"
] | null | null | null | import h5py
import pandas as pd
import numpy as np
import json
import scipy as sp
import nibabel as nib
from glob import glob
import fnmatch
import os
run_name_dict = {
"REST1": "REST1_7T_PA",
"REST2": "REST2_7T_AP",
"REST3": "REST3_7T_PA",
"REST4": "REST4_7T_AP",
"MOVIE1": 'MOVIE1_CC1',
"MOV... | 45.674242 | 170 | 0.637917 |
94b49b9436654c2b1de48f28ac3c2c9ba73a4771 | 722 | py | Python | python/baekjoon/step/19-divide-and-conquer/quad-tree.py | bum12ark/algorithm | b6e262b0c29a8b5fb551db5a177a40feebc411b4 | [
"MIT"
] | 1 | 2022-03-06T03:49:31.000Z | 2022-03-06T03:49:31.000Z | python/baekjoon/step/19-divide-and-conquer/quad-tree.py | bum12ark/algorithm | b6e262b0c29a8b5fb551db5a177a40feebc411b4 | [
"MIT"
] | null | null | null | python/baekjoon/step/19-divide-and-conquer/quad-tree.py | bum12ark/algorithm | b6e262b0c29a8b5fb551db5a177a40feebc411b4 | [
"MIT"
] | null | null | null | """
: https://yabmoons.tistory.com/450
"""
import sys
N = int(sys.stdin.readline())
M = [
list(map(int, sys.stdin.readline().rstrip())) for _ in range(N)
]
DFS(0, 0, N)
| 21.878788 | 67 | 0.409972 |
94b613e3ba422d9c83b2ae27a15a0f42577f4efe | 124 | py | Python | zemfrog/tasks.py | aprilahijriyan/zemfrog | 0a4ebc303caa8fadf89ca0cc8569de60c61f3252 | [
"MIT"
] | null | null | null | zemfrog/tasks.py | aprilahijriyan/zemfrog | 0a4ebc303caa8fadf89ca0cc8569de60c61f3252 | [
"MIT"
] | 5 | 2021-03-08T05:07:37.000Z | 2021-03-12T08:00:41.000Z | zemfrog/tasks.py | aprilahijriyan/zemfrog | 0a4ebc303caa8fadf89ca0cc8569de60c61f3252 | [
"MIT"
] | null | null | null | from zemfrog.globals import celery, mail
| 17.714286 | 40 | 0.717742 |
94b68aa576df42be03802058351d5dc93499d16b | 10,568 | py | Python | actors/aga.py | TACC-Cloud/abaco | 9e7bb2f7aed45db62cce3124d4638cde860c5095 | [
"BSD-3-Clause"
] | 27 | 2015-07-24T16:54:38.000Z | 2022-01-07T04:36:47.000Z | actors/aga.py | TACC-Cloud/abaco | 9e7bb2f7aed45db62cce3124d4638cde860c5095 | [
"BSD-3-Clause"
] | 68 | 2015-10-05T16:08:58.000Z | 2022-02-07T15:59:27.000Z | actors/aga.py | TACC-Cloud/abaco | 9e7bb2f7aed45db62cce3124d4638cde860c5095 | [
"BSD-3-Clause"
] | 13 | 2015-10-01T21:38:34.000Z | 2021-05-26T00:19:07.000Z | """
Python3 compatible agave binding. WARNING -- only the token and clients service are supported.
NOTE -- This is a temporary module!
once python3 support is properly added to agavepy this module will be removed.
"""
from urllib.parse import urlparse, urljoin
import requests
import time
from agaveflask.logs ... | 43.489712 | 116 | 0.581472 |
94b81133f944f81c4a396de00a4f4cef01d9f74a | 3,760 | py | Python | prep/make_database.py | radinformatics/wordfish-standard | 678235806d97b0c4cec6637900fa636541d3b730 | [
"MIT"
] | 1 | 2017-05-24T15:14:39.000Z | 2017-05-24T15:14:39.000Z | prep/make_database.py | vsoch/wordfish-standard | 678235806d97b0c4cec6637900fa636541d3b730 | [
"MIT"
] | null | null | null | prep/make_database.py | vsoch/wordfish-standard | 678235806d97b0c4cec6637900fa636541d3b730 | [
"MIT"
] | null | null | null | from glob import glob
import os
import shutil
import simplejson
import xmltodict
pwd = os.getcwd()
output_dir = "%s/collection" %(pwd)
if not os.path.exists(output_dir):
os.mkdir(output_dir)
cookies = glob("%s/matched/img/*.png" %(pwd))
def read_xml(xml_file):
'''read_xml reads an xml file and returns a ... | 31.333333 | 90 | 0.647606 |
94b9d72016da799bcd01548327582926fcff7b04 | 1,094 | py | Python | utils/util.py | dliu18/rawlsnet | 84441fa140fc00d965ff7b63c628140cc975ede4 | [
"MIT"
] | 3 | 2021-05-25T15:23:27.000Z | 2021-11-24T22:54:34.000Z | utils/util.py | dliu18/rawlsnet | 84441fa140fc00d965ff7b63c628140cc975ede4 | [
"MIT"
] | null | null | null | utils/util.py | dliu18/rawlsnet | 84441fa140fc00d965ff7b63c628140cc975ede4 | [
"MIT"
] | null | null | null | import numpy as np
import itertools
def generate_binary_truth_table(num_variables):
'''
Returns a binary truth table
Inputs :
num_variables : Number of variables to consider in constructing the table.
Can be a single number or a list of cardinalities.
If input is a single number, a cardinali... | 21.038462 | 77 | 0.620658 |
94bd39f7b280d5e41bc80e6c9d2c2a8db8614c19 | 4,103 | py | Python | jabble/dataset.py | mdd423/wobble_jax | 8923eac67529d92d670d38a02d409cf16dad4d7a | [
"BSD-3-Clause"
] | null | null | null | jabble/dataset.py | mdd423/wobble_jax | 8923eac67529d92d670d38a02d409cf16dad4d7a | [
"BSD-3-Clause"
] | null | null | null | jabble/dataset.py | mdd423/wobble_jax | 8923eac67529d92d670d38a02d409cf16dad4d7a | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
# import matplotlib.pyplot as plt
import astropy.table as at
import astropy.units as u
import astropy.coordinates as coord
import astropy.constants as const
import astropy.time as atime
import scipy.ndimage as ndimage
import numpy.polynomial as polynomial
# import jabble.model as wobble_model
impor... | 30.169118 | 97 | 0.61126 |
94be50fa7e9c1cc2a5aae187eda3eb1b5858641b | 137 | py | Python | tests/conftest.py | hpgem/nanomesh | f395640bb784da531677f193766dbd9f69b61a67 | [
"Apache-2.0"
] | 4 | 2021-07-12T20:00:16.000Z | 2022-02-27T10:14:02.000Z | tests/conftest.py | hpgem/nanomesh | f395640bb784da531677f193766dbd9f69b61a67 | [
"Apache-2.0"
] | 136 | 2020-11-24T16:58:28.000Z | 2022-03-23T14:19:25.000Z | tests/conftest.py | hpgem/nanomesh | f395640bb784da531677f193766dbd9f69b61a67 | [
"Apache-2.0"
] | 1 | 2022-01-25T10:13:13.000Z | 2022-01-25T10:13:13.000Z | # https://github.com/matplotlib/matplotlib/issues/18168#issuecomment-670211108
from matplotlib.testing.conftest import mpl_test_settings
| 45.666667 | 78 | 0.861314 |
94c1134d670b16674cc4abd8161470411f0363bf | 660 | py | Python | ietf/name/migrations/0009_add_verified_errata_to_doctagname.py | hassanakbar4/ietfdb | cabee059092ae776015410640226064331c293b7 | [
"BSD-3-Clause"
] | 25 | 2022-03-05T08:26:52.000Z | 2022-03-30T15:45:42.000Z | ietf/name/migrations/0009_add_verified_errata_to_doctagname.py | hassanakbar4/ietfdb | cabee059092ae776015410640226064331c293b7 | [
"BSD-3-Clause"
] | 219 | 2022-03-04T17:29:12.000Z | 2022-03-31T21:16:14.000Z | ietf/name/migrations/0009_add_verified_errata_to_doctagname.py | hassanakbar4/ietfdb | cabee059092ae776015410640226064331c293b7 | [
"BSD-3-Clause"
] | 22 | 2022-03-04T15:34:34.000Z | 2022-03-28T13:30:59.000Z | # Copyright The IETF Trust 2020, All Rights Reserved
# -*- coding: utf-8 -*-
from django.db import migrations
| 27.5 | 117 | 0.7 |
94c1ced1ea38485e911b3147cf9aaf5954001d87 | 429 | py | Python | 2020/examples-in-class-2020-11-12/helper_numbers.py | ati-ozgur/course-python | 38237d120043c07230658b56dc3aeb01c3364933 | [
"Apache-2.0"
] | 1 | 2021-02-04T16:59:11.000Z | 2021-02-04T16:59:11.000Z | 2020/examples-in-class-2020-11-12/helper_numbers.py | ati-ozgur/course-python | 38237d120043c07230658b56dc3aeb01c3364933 | [
"Apache-2.0"
] | null | null | null | 2020/examples-in-class-2020-11-12/helper_numbers.py | ati-ozgur/course-python | 38237d120043c07230658b56dc3aeb01c3364933 | [
"Apache-2.0"
] | 1 | 2019-10-30T14:37:48.000Z | 2019-10-30T14:37:48.000Z |
assert get_first_digit(12021) == 1
assert get_first_digit(92021) == 9
assert get_first_digit(72003443) == 7
assert get_last_digit(12021) == 1
assert get_last_digit(92021) == 1
assert get_last_digit(72003443) == 3
| 20.428571 | 37 | 0.759907 |
94c275106d2338f72c37c61390adc86cd0cf7bba | 3,635 | py | Python | src/morle/modules/compile.py | maciejjan/morle | a56a3371e403568b6b7abc63e08f6a111e0b5fee | [
"MIT"
] | 1 | 2021-03-04T16:23:02.000Z | 2021-03-04T16:23:02.000Z | src/morle/modules/compile.py | maciejjan/morle | a56a3371e403568b6b7abc63e08f6a111e0b5fee | [
"MIT"
] | null | null | null | src/morle/modules/compile.py | maciejjan/morle | a56a3371e403568b6b7abc63e08f6a111e0b5fee | [
"MIT"
] | null | null | null | import morle.algorithms.fst as FST
from morle.datastruct.lexicon import LexiconEntry
from morle.datastruct.rules import Rule
from morle.utils.files import file_exists, read_tsv_file
import morle.shared as shared
import hfst
import logging
import math
from operator import itemgetter
from typing import List, Tuple
# T... | 35.990099 | 81 | 0.638514 |
94c29179afdca3ff89eaa0d1a46d602e67dacea5 | 1,214 | py | Python | deck_berry_py/repl_db.py | curtjen/deck-berry-py | e0fbf79ca1b0e3b6a1455093abee207bba6b3561 | [
"MIT"
] | null | null | null | deck_berry_py/repl_db.py | curtjen/deck-berry-py | e0fbf79ca1b0e3b6a1455093abee207bba6b3561 | [
"MIT"
] | null | null | null | deck_berry_py/repl_db.py | curtjen/deck-berry-py | e0fbf79ca1b0e3b6a1455093abee207bba6b3561 | [
"MIT"
] | null | null | null | import requests
import os
import json
db_url = os.getenv('REPLIT_DB_URL')
def list(key):
"List db entries that start with [key]"
try:
resp = requests.get('{0}?prefix={1}'.format(db_url, key))
resp_list = resp.text.split('\n')
return resp_list
except:
return({'error': { 'message': 'There was an ... | 28.232558 | 96 | 0.632619 |
94c6b1592bca5f3373def4f76b7cbd242408647d | 263 | py | Python | get_api_token.py | maksimbulva/sc2streamhelper_info | e99fd0e86b4b9ba3bb5495d2e3c5184f60f7160e | [
"MIT"
] | null | null | null | get_api_token.py | maksimbulva/sc2streamhelper_info | e99fd0e86b4b9ba3bb5495d2e3c5184f60f7160e | [
"MIT"
] | null | null | null | get_api_token.py | maksimbulva/sc2streamhelper_info | e99fd0e86b4b9ba3bb5495d2e3c5184f60f7160e | [
"MIT"
] | null | null | null | from subprocess import call
from sc2streamhelper.passwords import *
call([
"curl",
"--user " + SC2STREAMHELPER_APIKEY + ":" + SC2STREAMHELPER_APISECRET,
"--data-urlencode ""grant_type=client_credentials"" ""http://us.battle.net/oauth/token"""
])
| 29.222222 | 93 | 0.695817 |
94c773fca152e7ec57a6379987b78b8654f7764e | 221 | py | Python | test.py | MohamedAliRashad/EfficientDet.Pytorch | 9b8b5f029fab125371b275687f2449990ce53daa | [
"MIT"
] | null | null | null | test.py | MohamedAliRashad/EfficientDet.Pytorch | 9b8b5f029fab125371b275687f2449990ce53daa | [
"MIT"
] | null | null | null | test.py | MohamedAliRashad/EfficientDet.Pytorch | 9b8b5f029fab125371b275687f2449990ce53daa | [
"MIT"
] | null | null | null | import torch
from models import EfficientDet
if __name__ == '__main__':
inputs = torch.randn(4, 3, 512, 512)
model = EfficientDet(levels=3)
output = model(inputs)
for p in output:
print(p.size()) | 24.555556 | 40 | 0.651584 |
94caca45c876379996eb1e5fe7824c3b1a2b7f26 | 7,978 | py | Python | doozer/client.py | ActiveState/pydoozer | d9b165ed9aafe6ed5feaca5a6fc08cbefd9be51b | [
"MIT"
] | 1 | 2017-08-29T14:52:05.000Z | 2017-08-29T14:52:05.000Z | doozer/client.py | ActiveState/pydoozer | d9b165ed9aafe6ed5feaca5a6fc08cbefd9be51b | [
"MIT"
] | null | null | null | doozer/client.py | ActiveState/pydoozer | d9b165ed9aafe6ed5feaca5a6fc08cbefd9be51b | [
"MIT"
] | null | null | null | import os
import struct
import gevent
import gevent.event
import gevent.socket
import google.protobuf.message
from msg_pb2 import Response
from msg_pb2 import Request
CONNECT_TIMEOUT = 5.0
REQUEST_TIMEOUT = 2.0
DEFAULT_URI = "doozer:?%s" % "&".join([
"ca=127.0.0.1:8046",
"ca=127.0.0.1:8041",
"ca=127.0.0.... | 32.563265 | 84 | 0.586488 |