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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8b3b69c06ca69440a093771d31274d985a796b16 | 27,516 | py | Python | sp_experiment/define_instructions.py | sappelhoff/sp_psychopy | 79cae80eb920b35fb27a52acfde0eda38b9124b1 | [
"BSD-3-Clause"
] | 1 | 2022-03-11T14:05:31.000Z | 2022-03-11T14:05:31.000Z | sp_experiment/define_instructions.py | sappelhoff/sp_psychopy | 79cae80eb920b35fb27a52acfde0eda38b9124b1 | [
"BSD-3-Clause"
] | 8 | 2019-02-12T07:47:47.000Z | 2021-01-25T14:05:05.000Z | sp_experiment/define_instructions.py | sappelhoff/sp_psychopy | 79cae80eb920b35fb27a52acfde0eda38b9124b1 | [
"BSD-3-Clause"
] | 2 | 2019-02-19T17:10:43.000Z | 2022-03-11T14:05:32.000Z | """Functions that either provide an instruction flow or a string to display."""
import os
import os.path as op
import numpy as np
import pandas as pd
import sp_experiment
from sp_experiment.utils import get_final_choice_outcomes
from sp_experiment.define_settings import (txt_color,
... | 54.812749 | 825 | 0.626763 |
8b3ba7884b7496d3798a67dd03266681d387fa73 | 2,435 | py | Python | bareml/machinelearning/supervised/perceptron.py | shotahorii/ml-from-scratch | 10fe8c9d5811bfcb9ee303aba2087524574681e6 | [
"MIT"
] | 3 | 2021-03-21T21:16:42.000Z | 2021-06-27T03:20:04.000Z | bareml/machinelearning/supervised/perceptron.py | shotahorii/ml-from-scratch | 10fe8c9d5811bfcb9ee303aba2087524574681e6 | [
"MIT"
] | null | null | null | bareml/machinelearning/supervised/perceptron.py | shotahorii/ml-from-scratch | 10fe8c9d5811bfcb9ee303aba2087524574681e6 | [
"MIT"
] | null | null | null | """
Perceptron.
A simple implementation of Perceptron classifier algorithm
described in Bishop(2006).
Author: Shota Horii <sh.sinker@gmail.com>
Test: tests/test_perceptron.py
References:
C.M. Bishop (2006). Pattern Recognition and Machine Learning. Springer. 192-196.
"""
import numpy as np
from ..base import Binar... | 24.59596 | 80 | 0.526899 |
8b3bf724c24c7b68522d09b8f7f0a72b85989feb | 283,339 | py | Python | src/service/picture_rc.py | NoOneXXX/magic-wormhole-client | 6b8bebebdf058d66fa4e519092558e8d95090c58 | [
"MIT"
] | null | null | null | src/service/picture_rc.py | NoOneXXX/magic-wormhole-client | 6b8bebebdf058d66fa4e519092558e8d95090c58 | [
"MIT"
] | null | null | null | src/service/picture_rc.py | NoOneXXX/magic-wormhole-client | 6b8bebebdf058d66fa4e519092558e8d95090c58 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.15.2)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x6c\x19\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x02\x00\x... | 65.135402 | 129 | 0.727154 |
8b3cdb0b30dd4dc0f7e827dc6970c3aa9e5b43da | 1,116 | py | Python | dags/hello_world_dag.py | garanin-se/airflow | 1e9b08435be76e3d565b2973809e434243651273 | [
"Apache-2.0"
] | null | null | null | dags/hello_world_dag.py | garanin-se/airflow | 1e9b08435be76e3d565b2973809e434243651273 | [
"Apache-2.0"
] | null | null | null | dags/hello_world_dag.py | garanin-se/airflow | 1e9b08435be76e3d565b2973809e434243651273 | [
"Apache-2.0"
] | null | null | null | from airflow import DAG
from airflow.operators.bash_operator import BashOperator
from datetime import datetime, timedelta
args = {
'owner': 'garanin',
'start_date': datetime(2018, 11, 1),
'provide_context': True} # ,
with DAG("Hello_world", description='Hello_world', schedule_interval='*/1 * * * ... | 31 | 102 | 0.642473 |
8b3ead7d345c8a9ce988d7523c2f9c1577220134 | 2,159 | py | Python | nudging/evaluate_outcome.py | UtrechtUniversity/nudging | 9eb1b77749f36059d0c03e60338308ed2e1ebe3d | [
"MIT"
] | 1 | 2021-11-08T15:14:07.000Z | 2021-11-08T15:14:07.000Z | nudging/evaluate_outcome.py | UtrechtUniversity/nudging | 9eb1b77749f36059d0c03e60338308ed2e1ebe3d | [
"MIT"
] | 6 | 2021-12-07T11:05:19.000Z | 2022-03-21T09:05:52.000Z | nudging/evaluate_outcome.py | UtrechtUniversity/nudging | 9eb1b77749f36059d0c03e60338308ed2e1ebe3d | [
"MIT"
] | null | null | null | """Evaluate outcome (+CATE) of datasets"""
from scipy.stats import spearmanr
import numpy as np
def safe_spearmanr(arr_a, arr_b):
"Compute the spearman-R correlation, but 0 if all equal"
if np.all(arr_a[0] == arr_a) or np.all(arr_b[0] == arr_b):
return 0
return spearmanr(arr_a, arr_b).correlation... | 31.75 | 78 | 0.63409 |
8b403af101b328ab8619171f6a6659dd0ae3aee5 | 2,671 | py | Python | htdocs/json/goes.py | trentford/iem | 7264d24f2d79a3cd69251a09758e6531233a732f | [
"MIT"
] | null | null | null | htdocs/json/goes.py | trentford/iem | 7264d24f2d79a3cd69251a09758e6531233a732f | [
"MIT"
] | null | null | null | htdocs/json/goes.py | trentford/iem | 7264d24f2d79a3cd69251a09758e6531233a732f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Return JSON metadata for GOES Imagery
"""
import cgi
import json
import os
import glob
import datetime
from pyiem.util import ssw
BIRDS = ['EAST', 'WEST']
PRODUCTS = ['WV', 'VIS', 'IR']
def parse_time(text):
"""
Convert ISO something into a datetime
"""
try:
if len(... | 28.72043 | 79 | 0.562336 |
8b409e98d4bcafd53946a98c26955761614abc97 | 216 | py | Python | js/jquery_scrolltofixed/__init__.py | davidjb/js.jquery_scrolltofixed | f5a8606ce8c240334504e43f218c2e8d11d09551 | [
"BSD-3-Clause"
] | 1 | 2016-08-31T19:19:16.000Z | 2016-08-31T19:19:16.000Z | js/jquery_scrolltofixed/__init__.py | davidjb/js.jquery_scrolltofixed | f5a8606ce8c240334504e43f218c2e8d11d09551 | [
"BSD-3-Clause"
] | null | null | null | js/jquery_scrolltofixed/__init__.py | davidjb/js.jquery_scrolltofixed | f5a8606ce8c240334504e43f218c2e8d11d09551 | [
"BSD-3-Clause"
] | null | null | null | from fanstatic import Library, Resource
library = Library('scrolltofixed', 'resources')
scrolltofixed = Resource(library, 'jquery-scrolltofixed.js',
minified='jquery-scrolltofixed-min.js')
| 30.857143 | 64 | 0.699074 |
8b412c78f87a3d4e29fbf54573c78a95f9cd0cfd | 3,114 | py | Python | python/ray/serve/scripts.py | dsctt/ray | 29d94a22114b02adfd3745c4991a3ce70592dd16 | [
"Apache-2.0"
] | 1 | 2022-03-22T11:17:22.000Z | 2022-03-22T11:17:22.000Z | python/ray/serve/scripts.py | dsctt/ray | 29d94a22114b02adfd3745c4991a3ce70592dd16 | [
"Apache-2.0"
] | 32 | 2021-11-06T07:11:42.000Z | 2022-03-19T07:14:00.000Z | python/ray/serve/scripts.py | dsctt/ray | 29d94a22114b02adfd3745c4991a3ce70592dd16 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import json
import os
import click
import ray
from ray.serve.api import Deployment
from ray.serve.config import DeploymentMode
from ray._private.utils import import_attr
from ray import serve
from ray.serve.constants import (
DEFAULT_CHECKPOINT_PATH,
DEFAULT_HTTP_HOST,
DEFAULT_HTTP_P... | 25.317073 | 86 | 0.679512 |
8b42031cc6e298b0e942547748c79b85ecffd293 | 562 | py | Python | Alpha & Beta/Algorithms/wootwoot.py | Mdlkxzmcp/various_python | be4f873c6263e3db11177bbccce2aa465514294d | [
"MIT"
] | null | null | null | Alpha & Beta/Algorithms/wootwoot.py | Mdlkxzmcp/various_python | be4f873c6263e3db11177bbccce2aa465514294d | [
"MIT"
] | null | null | null | Alpha & Beta/Algorithms/wootwoot.py | Mdlkxzmcp/various_python | be4f873c6263e3db11177bbccce2aa465514294d | [
"MIT"
] | null | null | null |
def russian(a, b):
"""
The Russian Peasant Algorithm:
Multiply one integer by the other integer.
Input: a, b: integers
Returns: a*b
"""
c = 0
while a > 0:
if a % 2 == 1:
c = c + b
b = b << 1
a = a >> 1
return c
| 17.5625 | 50 | 0.428826 |
8b438e05322fd68c73974bbc580bd7c882aa4fa3 | 2,314 | py | Python | tuples.py | sumon-dey/PythonConcepts | a014656232ff97161f995bf0124f6ce9daf42496 | [
"Apache-2.0"
] | 6 | 2019-07-21T13:07:31.000Z | 2021-02-24T10:36:06.000Z | tuples.py | sumon-dey/PythonConcepts | a014656232ff97161f995bf0124f6ce9daf42496 | [
"Apache-2.0"
] | null | null | null | tuples.py | sumon-dey/PythonConcepts | a014656232ff97161f995bf0124f6ce9daf42496 | [
"Apache-2.0"
] | 3 | 2021-02-20T11:01:27.000Z | 2021-07-22T10:58:34.000Z | # Python Tuples
# Ordered, Immutable collection of items which allows Duplicate Members
# We can put the data, which will not change throughout the program, in a Tuple
# Tuples can be called as "Immutable Python Lists" or "Constant Python Lists"
employeeTuple = ("Sam", "Sam" "Mike", "John", "Harry", "Tom", "Sean", "Ju... | 33.536232 | 90 | 0.609767 |
8b4494f9af64d71ff00c8c9896f66e6b5599aac3 | 296 | py | Python | dht22_sensor.py | mikrogravitation/humiditemp5000 | 7e5e837b18142333c90eab82a5b46d702654a436 | [
"MIT"
] | null | null | null | dht22_sensor.py | mikrogravitation/humiditemp5000 | 7e5e837b18142333c90eab82a5b46d702654a436 | [
"MIT"
] | null | null | null | dht22_sensor.py | mikrogravitation/humiditemp5000 | 7e5e837b18142333c90eab82a5b46d702654a436 | [
"MIT"
] | null | null | null | import dht
| 22.769231 | 95 | 0.648649 |
8b4884373a3f5043f3c410286a97ab3db710a67f | 26,757 | py | Python | oauth_api/tests/test_authorization_code.py | anobi/django-oauth-api | 95bf9b500dab326553a5a8a17d5c6da1a34f6ac4 | [
"BSD-2-Clause"
] | null | null | null | oauth_api/tests/test_authorization_code.py | anobi/django-oauth-api | 95bf9b500dab326553a5a8a17d5c6da1a34f6ac4 | [
"BSD-2-Clause"
] | null | null | null | oauth_api/tests/test_authorization_code.py | anobi/django-oauth-api | 95bf9b500dab326553a5a8a17d5c6da1a34f6ac4 | [
"BSD-2-Clause"
] | null | null | null | from datetime import timedelta
from django.contrib.auth import get_user_model
from django.utils import timezone
from oauthlib.oauth2 import (InvalidClientIdError, MissingClientIdError,
InvalidRedirectURIError, MismatchingRedirectURIError)
from rest_framework import status
from oauth_api... | 38.443966 | 120 | 0.633554 |
8b49f147c9e56f5dd5097370cc523d4cf407906f | 42,174 | py | Python | example/sockeye/source/sockeye/decoder.py | rah9eu/p3 | 530628be7b7a8dd3e6199c3bebebdbf104005e5f | [
"Apache-2.0"
] | 22 | 2019-02-20T12:42:20.000Z | 2021-12-25T06:09:46.000Z | example/sockeye/source/sockeye/decoder.py | rah9eu/p3 | 530628be7b7a8dd3e6199c3bebebdbf104005e5f | [
"Apache-2.0"
] | 4 | 2019-04-01T07:36:04.000Z | 2022-03-24T03:11:26.000Z | example/sockeye/source/sockeye/decoder.py | rah9eu/p3 | 530628be7b7a8dd3e6199c3bebebdbf104005e5f | [
"Apache-2.0"
] | 7 | 2019-03-20T16:04:37.000Z | 2021-04-28T18:40:11.000Z | # Copyright 2017 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://aws.amazon.com/apache2.0/
#
# or in the "license" file acc... | 49.558167 | 121 | 0.628136 |
8b4b9a54a9e446db94f72c72dbf48b6d43df54c8 | 3,595 | py | Python | dev-language/python/DataWhale/plane_sprite.py | marxlee/dev-record-doc | 197b1ae1c8b692eeb86b8494915840d630414d3a | [
"Apache-2.0"
] | null | null | null | dev-language/python/DataWhale/plane_sprite.py | marxlee/dev-record-doc | 197b1ae1c8b692eeb86b8494915840d630414d3a | [
"Apache-2.0"
] | 1 | 2020-05-14T13:02:24.000Z | 2020-05-14T13:02:24.000Z | dev-language/python/DataWhale/plane_sprite.py | marxlee/dev-record-doc | 197b1ae1c8b692eeb86b8494915840d630414d3a | [
"Apache-2.0"
] | null | null | null | import random
import pygame
#
FRAME_PER_SEC = 60
#
SCREEN_RECT = pygame.Rect(0, 0, 480, 700)
#
CREATE_ENEMY_EVENT = pygame.USEREVENT
#
HERO_FIRE_EVENT = pygame.USEREVENT + 1
| 23.966667 | 64 | 0.551878 |
8c663c96b9101af26692648dfb0ca8488e020977 | 332 | py | Python | stPlus/__init__.py | qiaochen/stPlus | 06294c6cf63d6d81555ffdd4d19c571c49805ff2 | [
"MIT"
] | 7 | 2021-01-23T07:13:21.000Z | 2022-02-19T09:15:20.000Z | stPlus/__init__.py | qiaochen/stPlus | 06294c6cf63d6d81555ffdd4d19c571c49805ff2 | [
"MIT"
] | 1 | 2021-08-22T00:59:03.000Z | 2021-08-22T00:59:03.000Z | stPlus/__init__.py | qiaochen/stPlus | 06294c6cf63d6d81555ffdd4d19c571c49805ff2 | [
"MIT"
] | 6 | 2020-11-29T02:01:01.000Z | 2022-03-26T08:56:50.000Z | #!/usr/bin/env python
"""
# Authors: Shengquan Chen, Boheng Zhang, Xiaoyang Chen
# Created Time : Sat 28 Nov 2020 08:31:29 PM CST
# File Name: utils.py
# Description: stPlus: reference-based enhancement of spatial transcriptomics
"""
__author__ = "Xiaoyang Chen"
__email__ = "xychen20@mails.tsinghua.edu.cn"
from .mod... | 23.714286 | 77 | 0.737952 |
8c677c928edef3da87db9d94101df11d9b713928 | 4,961 | py | Python | PJ/11_liste_registri.py | vedgar/ip | 5ed0773eea4243077f5defb77fb1839661308c83 | [
"Unlicense"
] | 5 | 2017-03-15T11:34:55.000Z | 2021-03-10T13:05:02.000Z | PJ/11_liste_registri.py | vedgar/ip | 5ed0773eea4243077f5defb77fb1839661308c83 | [
"Unlicense"
] | null | null | null | PJ/11_liste_registri.py | vedgar/ip | 5ed0773eea4243077f5defb77fb1839661308c83 | [
"Unlicense"
] | 14 | 2017-01-11T19:11:01.000Z | 2021-05-09T18:42:19.000Z | """Virtualna maina za rad s listama; kolokvij 31. sijenja 2011. (Pulji).
9 registara (L1 do L9) koji dre liste cijelih brojeva (poinju od prazne),
2 naredbe (ubacivanje i izbacivanje elementa po indeksu),
3 upita (duljina i praznost liste, dohvaanje elementa po indeksu)."""
from vepar import *
### Beskonte... | 36.211679 | 81 | 0.626083 |
8c6a4e21298bd22ee6accce6dcffb362757cd105 | 746 | py | Python | devops-console/apps/applications/migrations/0002_auto_20190130_1757.py | lilinghell/devops | 1b2890d3f2d9f6e15e5b32d0910bc4768f065adc | [
"Apache-2.0"
] | 4 | 2019-12-06T06:19:33.000Z | 2021-12-23T13:05:06.000Z | devops-console/apps/applications/migrations/0002_auto_20190130_1757.py | lilinghell/devops | 1b2890d3f2d9f6e15e5b32d0910bc4768f065adc | [
"Apache-2.0"
] | 8 | 2020-03-15T03:40:38.000Z | 2022-03-12T00:50:27.000Z | devops-console/apps/applications/migrations/0002_auto_20190130_1757.py | lilinghell/devops | 1b2890d3f2d9f6e15e5b32d0910bc4768f065adc | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.1.5 on 2019-01-30 09:57
from django.db import migrations, models
| 26.642857 | 62 | 0.580429 |
8c6abb2cc48a060bc29fbb9ab48584013b7a0a33 | 121 | py | Python | trinity/components/builtin/upnp/events.py | onyb/trinity | 347e2beac23c5c1bb4aab136bb44c162467f6ff7 | [
"MIT"
] | null | null | null | trinity/components/builtin/upnp/events.py | onyb/trinity | 347e2beac23c5c1bb4aab136bb44c162467f6ff7 | [
"MIT"
] | null | null | null | trinity/components/builtin/upnp/events.py | onyb/trinity | 347e2beac23c5c1bb4aab136bb44c162467f6ff7 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from lahja import BaseEvent
| 13.444444 | 33 | 0.793388 |
8c6b08f46e1c028699dbaa4278859f6a3882f74c | 6,125 | py | Python | autobreadcrumbs/resolver.py | MtzwOsk/autobreadcrumbs | 75e2fd1cc74db790c5fdc924d6fa9410ee7caa45 | [
"MIT"
] | null | null | null | autobreadcrumbs/resolver.py | MtzwOsk/autobreadcrumbs | 75e2fd1cc74db790c5fdc924d6fa9410ee7caa45 | [
"MIT"
] | null | null | null | autobreadcrumbs/resolver.py | MtzwOsk/autobreadcrumbs | 75e2fd1cc74db790c5fdc924d6fa9410ee7caa45 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Breadcrumb resolving
====================
"""
try:
from django.core.urlresolvers import Resolver404, get_resolver
except ImportError:
from django.urls import Resolver404, get_resolver
from autobreadcrumbs.registry import breadcrumbs_registry
| 29.878049 | 89 | 0.563755 |
8c6cfc38e57f86eab7797d375f99dd296d63319a | 1,276 | py | Python | wrappers/SpellbookWrapper.py | WouterGlorieux/BitcoinSpellbook-v0.2 | 93b5480f87f4dc41c2d71093aa98d1fbdd83625c | [
"MIT"
] | null | null | null | wrappers/SpellbookWrapper.py | WouterGlorieux/BitcoinSpellbook-v0.2 | 93b5480f87f4dc41c2d71093aa98d1fbdd83625c | [
"MIT"
] | null | null | null | wrappers/SpellbookWrapper.py | WouterGlorieux/BitcoinSpellbook-v0.2 | 93b5480f87f4dc41c2d71093aa98d1fbdd83625c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from BlockDataWrapper import BlockDataWrapper
from BlockInputsWrapper import BlockInputsWrapper
from BlockLinkerWrapper import BlockLinkerWrapper
from BlockRandomWrapper import BlockRandomWrapper
from BlockVoterWrapper import BlockVoterWrapper
from BlockForwardWrapper imp... | 27.73913 | 66 | 0.760972 |
8c6d9af9d7f87aa9ba388d3e1cf15c31ce4fbd09 | 2,958 | py | Python | tests/test_encode.py | gruber-sciencelab/SMEAGOL | 966e18a9869e992537605f93e5ee2af1c9e257f2 | [
"MIT"
] | null | null | null | tests/test_encode.py | gruber-sciencelab/SMEAGOL | 966e18a9869e992537605f93e5ee2af1c9e257f2 | [
"MIT"
] | null | null | null | tests/test_encode.py | gruber-sciencelab/SMEAGOL | 966e18a9869e992537605f93e5ee2af1c9e257f2 | [
"MIT"
] | null | null | null | from smeagol.encode import *
import os
import pytest
script_dir = os.path.dirname(__file__)
rel_path = "data"
data_path = os.path.join(script_dir, rel_path)
| 44.149254 | 220 | 0.612576 |
8c6dfa8e7650cca218f10ad2519c965b351b6e94 | 688 | py | Python | tflite/BuiltinOperator.py | erezinman/tflite-flatbuffer-explorer | 0fe1828b80108de3b6b7075de6a66162dfd0d322 | [
"MIT"
] | null | null | null | tflite/BuiltinOperator.py | erezinman/tflite-flatbuffer-explorer | 0fe1828b80108de3b6b7075de6a66162dfd0d322 | [
"MIT"
] | null | null | null | tflite/BuiltinOperator.py | erezinman/tflite-flatbuffer-explorer | 0fe1828b80108de3b6b7075de6a66162dfd0d322 | [
"MIT"
] | null | null | null | # automatically generated by the FlatBuffers compiler, do not modify
# namespace: tflite
| 19.657143 | 68 | 0.638081 |
8c6f69222a4482ea76dc30bd7f2276db4ce44dd7 | 1,080 | py | Python | StegoEncrypt.py | ExaByt3s/hack_scripts | cc801b36ea25f3b5a82d2900f53f5036e7abd8ad | [
"WTFPL"
] | 3 | 2021-01-22T19:32:23.000Z | 2022-01-03T01:06:44.000Z | StegoEncrypt.py | a04512/hack_scripts | cc801b36ea25f3b5a82d2900f53f5036e7abd8ad | [
"WTFPL"
] | null | null | null | StegoEncrypt.py | a04512/hack_scripts | cc801b36ea25f3b5a82d2900f53f5036e7abd8ad | [
"WTFPL"
] | 1 | 2021-12-10T13:18:16.000Z | 2021-12-10T13:18:16.000Z | #!/usr/bin/python
__author__ = 'kilroy'
# (c) 2014, WasHere Consulting, Inc.
# Written for Infinite Skills
# need pycrypto package
from Crypto.Cipher import AES
# need PIL and stepic packages
import Image, stepic
import binascii
# key has to be 16, 24 or 32 bytes long
cryptObj = AES.new("This is my key42", AES.MODE... | 30 | 78 | 0.735185 |
8c7091d977c72cdc7883602372339dbcde6de489 | 256 | py | Python | lib/extensions/navigation_buttons_delayed_popup/startup.py | neurodiverseEsoteric/nimbus | a79a37d6001d84116831c9f3f99f5d9acfa7fd19 | [
"CC-BY-3.0"
] | 3 | 2015-11-04T10:48:12.000Z | 2020-07-12T06:46:27.000Z | lib/extensions/navigation_buttons_delayed_popup/startup.py | esotericDisciple/nimbus | a79a37d6001d84116831c9f3f99f5d9acfa7fd19 | [
"CC-BY-3.0"
] | null | null | null | lib/extensions/navigation_buttons_delayed_popup/startup.py | esotericDisciple/nimbus | a79a37d6001d84116831c9f3f99f5d9acfa7fd19 | [
"CC-BY-3.0"
] | 1 | 2021-05-05T13:56:49.000Z | 2021-05-05T13:56:49.000Z | self.toolBar.widgetForAction(self.backAction).setPopupMode(QToolButton.DelayedPopup)
self.toolBar.widgetForAction(self.forwardAction).setPopupMode(QToolButton.DelayedPopup)
self.toolBar.widgetForAction(self.upAction).setPopupMode(QToolButton.DelayedPopup)
| 64 | 87 | 0.882813 |
8c73ebefbe371ef44942ff7124e0d58fc2510cfb | 13,342 | py | Python | source/rttov_test/profile-datasets-py/div83/073.py | bucricket/projectMAScorrection | 89489026c8e247ec7c364e537798e766331fe569 | [
"BSD-3-Clause"
] | null | null | null | source/rttov_test/profile-datasets-py/div83/073.py | bucricket/projectMAScorrection | 89489026c8e247ec7c364e537798e766331fe569 | [
"BSD-3-Clause"
] | 1 | 2022-03-12T12:19:59.000Z | 2022-03-12T12:19:59.000Z | source/rttov_test/profile-datasets-py/div83/073.py | bucricket/projectMAScorrection | 89489026c8e247ec7c364e537798e766331fe569 | [
"BSD-3-Clause"
] | null | null | null | """
Profile ../profile-datasets-py/div83/073.py
file automaticaly created by prof_gen.py script
"""
self["ID"] = "../profile-datasets-py/div83/073.py"
self["Q"] = numpy.array([ 1.956946, 2.801132, 4.230252, 5.419981, 6.087733,
6.419039, 6.547807, 6.548787, 6.504738, 6.4... | 57.508621 | 92 | 0.559886 |
8c73f2845c9cfc01b2f456edbd27fcd02dab01c0 | 3,204 | py | Python | conf.py | jwustrack/climon | 0fca00a727c39de01c42162d42b193f326705892 | [
"MIT"
] | 3 | 2018-12-22T06:30:46.000Z | 2021-05-05T04:51:22.000Z | conf.py | jwustrack/climon | 0fca00a727c39de01c42162d42b193f326705892 | [
"MIT"
] | null | null | null | conf.py | jwustrack/climon | 0fca00a727c39de01c42162d42b193f326705892 | [
"MIT"
] | null | null | null | '''
>>> c = Conf('climon.conf.test')
>>> list(c.iter_ids('sensor'))
['sine', 'web']
>>> list(c.iter_ids('toggle'))
['fake']
>>> c.get_element('sensor', 'sine') # doctest: +ELLIPSIS
<function sine.<locals>.sine_sensor at ...>
>>> c.get_element('toggle', 'fake') # doctest: +ELLIPSIS
<toggles.FakeToggle object at ...>
... | 33.375 | 88 | 0.650437 |
8c74049dd346defb252e9addc649cada9bb156ac | 1,058 | py | Python | talosblockchain/talosdht/test/protocol_test.py | chunchuan-wang/droplet-engine | 5c2dbac90aa3bde837ed4989ecd78235e5d9ef8e | [
"Apache-2.0"
] | 10 | 2020-10-14T14:22:20.000Z | 2022-03-16T11:33:14.000Z | talosblockchain/talosdht/test/protocol_test.py | chunchuan-wang/droplet-engine | 5c2dbac90aa3bde837ed4989ecd78235e5d9ef8e | [
"Apache-2.0"
] | null | null | null | talosblockchain/talosdht/test/protocol_test.py | chunchuan-wang/droplet-engine | 5c2dbac90aa3bde837ed4989ecd78235e5d9ef8e | [
"Apache-2.0"
] | 4 | 2020-08-30T12:40:40.000Z | 2021-08-03T15:27:12.000Z | # 2017-2020, ETH Zurich, D-INFK, lubu@inf.ethz.ch
import random
import unittest
from kademlia.node import Node
from kademlia.utils import digest
from talosdht.protocolsecurity import generate_secret_key
from talosdht.talosprotocol import TalosSKademliaProtocol
from talosvc.talosclient.restapiclient import TalosVCRes... | 29.388889 | 93 | 0.708885 |
8c7565fa05e188eaf9fcca6bca1db9405321a1a7 | 2,275 | py | Python | tmp_mail/__init__.py | KMikeeU/temp-mail | 257155b60baee8ed8e24776db3e5492f42e2c10b | [
"MIT"
] | 2 | 2018-12-09T18:36:03.000Z | 2019-05-01T12:54:41.000Z | tmp_mail/__init__.py | KMikeeU/temp-mail | 257155b60baee8ed8e24776db3e5492f42e2c10b | [
"MIT"
] | null | null | null | tmp_mail/__init__.py | KMikeeU/temp-mail | 257155b60baee8ed8e24776db3e5492f42e2c10b | [
"MIT"
] | 3 | 2018-12-09T18:36:07.000Z | 2019-10-22T11:35:09.000Z | import requests
from bs4 import BeautifulSoup
import re
import time
import _thread | 27.743902 | 134 | 0.670769 |
8c761a408113359da777a62cae459343ebc003d1 | 187 | py | Python | ros/genpy/src/genpy/msg/__init__.py | numberen/apollo-platform | 8f359c8d00dd4a98f56ec2276c5663cb6c100e47 | [
"Apache-2.0"
] | 742 | 2017-07-05T02:49:36.000Z | 2022-03-30T12:55:43.000Z | ros/genpy/src/genpy/msg/__init__.py | numberen/apollo-platform | 8f359c8d00dd4a98f56ec2276c5663cb6c100e47 | [
"Apache-2.0"
] | 73 | 2017-07-06T12:50:51.000Z | 2022-03-07T08:07:07.000Z | ros/genpy/src/genpy/msg/__init__.py | numberen/apollo-platform | 8f359c8d00dd4a98f56ec2276c5663cb6c100e47 | [
"Apache-2.0"
] | 425 | 2017-07-04T22:03:29.000Z | 2022-03-29T06:59:06.000Z | from ._TestFillEmbedTime import *
from ._TestFillSimple import *
from ._TestManyFields import *
from ._TestMsgArray import *
from ._TestPrimitiveArray import *
from ._TestString import *
| 26.714286 | 34 | 0.807487 |
8c7623c8e92992a9d432cf1310ca2b7d13d8b1c3 | 1,355 | py | Python | code/chapter_04/listing_04_11.py | guinslym/python_earth_science_book | f4dd0115dbbce140c6713989f630a71238daa72c | [
"MIT"
] | 80 | 2021-04-19T10:03:57.000Z | 2022-03-30T15:34:47.000Z | code/chapter_04/listing_04_11.py | guinslym/python_earth_science_book | f4dd0115dbbce140c6713989f630a71238daa72c | [
"MIT"
] | null | null | null | code/chapter_04/listing_04_11.py | guinslym/python_earth_science_book | f4dd0115dbbce140c6713989f630a71238daa72c | [
"MIT"
] | 23 | 2021-04-25T03:50:07.000Z | 2022-03-22T03:06:19.000Z | # Introductory examples
name = 'Maurizio'
surname = 'Petrelli'
print('-------------------------------------------------')
print('My name is {}'.format(name))
print('-------------------------------------------------')
print('My name is {} and my surname is {}'.format(name, surname))
print('------------------------------... | 43.709677 | 71 | 0.451661 |
8c76ebd85af1120266012ad23762034711833042 | 4,405 | py | Python | gamestonk_terminal/etf/financedatabase_view.py | i2infinity/GamestonkTerminal | abf79a5249930e5a9f5d2a1c4ba64590888ecef5 | [
"MIT"
] | 1 | 2021-12-31T04:10:42.000Z | 2021-12-31T04:10:42.000Z | gamestonk_terminal/etf/financedatabase_view.py | greggorrell/GamestonkTerminal | caa2c88c1259967b55a7565c7ce5fb1014f39e68 | [
"MIT"
] | 1 | 2022-03-29T13:45:05.000Z | 2022-03-29T13:45:05.000Z | gamestonk_terminal/etf/financedatabase_view.py | greggorrell/GamestonkTerminal | caa2c88c1259967b55a7565c7ce5fb1014f39e68 | [
"MIT"
] | 1 | 2021-06-20T02:42:40.000Z | 2021-06-20T02:42:40.000Z | """Finance Database view"""
__docformat__ = "numpy"
import os
import pandas as pd
from tabulate import tabulate
from gamestonk_terminal import feature_flags as gtff
from gamestonk_terminal.etf import financedatabase_model
from gamestonk_terminal.helper_funcs import export_data
def display_etf_by_name(
name: str,... | 29.965986 | 108 | 0.613167 |
8c771cbba76c700d1db7d0599ef23c47728f8fc7 | 803 | py | Python | socialnetworks/moves/views.py | gGonz/django-socialnetworks | 3f6c577efafd6ed5eb8b5cb60d9ee6a36920581d | [
"Apache-2.0"
] | 5 | 2015-06-18T03:30:28.000Z | 2017-11-04T21:34:20.000Z | socialnetworks/moves/views.py | gGonz/django-socialnetworks | 3f6c577efafd6ed5eb8b5cb60d9ee6a36920581d | [
"Apache-2.0"
] | 2 | 2015-04-25T00:06:19.000Z | 2015-04-30T22:42:40.000Z | socialnetworks/moves/views.py | gGonz/django-socialnetworks | 3f6c577efafd6ed5eb8b5cb60d9ee6a36920581d | [
"Apache-2.0"
] | 4 | 2015-06-11T18:28:04.000Z | 2016-09-07T15:08:09.000Z | from .clients import MovesAppClient
from .settings import SETUP_URL_NAME
from ..core import views
| 24.333333 | 75 | 0.73599 |
8c7744c90b62e69c9da414a6c169a072df76f52e | 5,638 | py | Python | train.py | JiazeWang/Luna16 | 5ef7f4b539cc1ca72291e93d17cc18f408a3119d | [
"MIT"
] | null | null | null | train.py | JiazeWang/Luna16 | 5ef7f4b539cc1ca72291e93d17cc18f408a3119d | [
"MIT"
] | null | null | null | train.py | JiazeWang/Luna16 | 5ef7f4b539cc1ca72291e93d17cc18f408a3119d | [
"MIT"
] | null | null | null | import random
import torch
import numpy as np
import time
import os
from model.net import Net
from model.loss import Loss
from torch.autograd import Variable
import itertools
import pandas as pd
from main.dataset import LunaDataSet
from torch.utils.data import DataLoader
from configs import VAL_PCT, TOTAL_EPOCHS, DEFA... | 36.849673 | 110 | 0.632671 |
8c782d841174638d4e67981a99536a71f3cb70d3 | 11,765 | py | Python | models/treebased/data/data_generator.py | ziyoujiyi/PaddleRec | bcddcf46e5cd8d4e6b2c5ee8d0d5521e292a2a81 | [
"Apache-2.0"
] | 2,739 | 2020-04-28T05:12:48.000Z | 2022-03-31T16:01:49.000Z | models/treebased/data/data_generator.py | ziyoujiyi/PaddleRec | bcddcf46e5cd8d4e6b2c5ee8d0d5521e292a2a81 | [
"Apache-2.0"
] | 205 | 2020-05-14T13:29:14.000Z | 2022-03-31T13:01:50.000Z | models/treebased/data/data_generator.py | ziyoujiyi/PaddleRec | bcddcf46e5cd8d4e6b2c5ee8d0d5521e292a2a81 | [
"Apache-2.0"
] | 545 | 2020-05-14T13:19:13.000Z | 2022-03-24T07:53:05.000Z | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 34.00289 | 79 | 0.553931 |
8c7850f57aeb0d4dce81c92635baf2b4cf6c6a0c | 530 | py | Python | api/runtime/lambda_function.py | alexpulver/aws-cdk-project-structure-python-simple | 2397b9bc8762b294c26a85913007b139fb656a92 | [
"MIT"
] | 6 | 2021-08-03T06:44:41.000Z | 2022-03-21T05:26:19.000Z | api/runtime/lambda_function.py | alexpulver/aws-cdk-project-structure-python-simple | 2397b9bc8762b294c26a85913007b139fb656a92 | [
"MIT"
] | null | null | null | api/runtime/lambda_function.py | alexpulver/aws-cdk-project-structure-python-simple | 2397b9bc8762b294c26a85913007b139fb656a92 | [
"MIT"
] | null | null | null | import json
from typing import Any, Dict
import requests
| 25.238095 | 85 | 0.633962 |
8c7898329039aa091b78f7b5d1f4171853653e37 | 4,685 | py | Python | dwi/tools/histogram.py | jupito/dwilib | 6655eea21037977ed528b992b3a8471393127b77 | [
"MIT"
] | 9 | 2018-02-02T07:26:06.000Z | 2021-07-28T11:27:38.000Z | dwi/tools/histogram.py | jupito/dwilib | 6655eea21037977ed528b992b3a8471393127b77 | [
"MIT"
] | null | null | null | dwi/tools/histogram.py | jupito/dwilib | 6655eea21037977ed528b992b3a8471393127b77 | [
"MIT"
] | 4 | 2017-02-22T03:23:44.000Z | 2021-12-10T10:32:08.000Z | #!/usr/bin/python3
"""Plot histograms of images. Possible nans and infinities are ignored."""
import argparse
from collections import OrderedDict
import logging
import numpy as np
import pylab as pl
from scipy import interpolate
import dwi.files
import dwi.util
def parse_args():
"""Parse command-line argument... | 34.19708 | 75 | 0.56158 |
8c78b4076ac285387691eaefdc4b2dc0c790be8d | 1,191 | py | Python | app/core/models.py | 108806/drf_adv_test | fe4363e47e65de883fabd551aaf18ca5ff7bee1d | [
"BSD-2-Clause"
] | null | null | null | app/core/models.py | 108806/drf_adv_test | fe4363e47e65de883fabd551aaf18ca5ff7bee1d | [
"BSD-2-Clause"
] | null | null | null | app/core/models.py | 108806/drf_adv_test | fe4363e47e65de883fabd551aaf18ca5ff7bee1d | [
"BSD-2-Clause"
] | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \
PermissionsMixin
| 29.775 | 75 | 0.739715 |
8c7d9e66bf164cf5c44aa06085606f155fa78844 | 13,739 | py | Python | paleocirc/circolari.py | xFranciB/PaleoCirc | bb95abf973342c004c4f84516092a686072bc12e | [
"MIT"
] | 7 | 2021-02-16T15:41:59.000Z | 2021-12-22T19:56:23.000Z | paleocirc/circolari.py | xFranciB/PaleoCirc | bb95abf973342c004c4f84516092a686072bc12e | [
"MIT"
] | 5 | 2021-04-16T13:36:31.000Z | 2021-12-12T17:43:13.000Z | paleocirc/circolari.py | xFranciB/paleocirc | bb95abf973342c004c4f84516092a686072bc12e | [
"MIT"
] | null | null | null | import requests
import bs4
import pdf2image
import os
import glob
import json
import platform
if platform.system() == 'Windows':
import win32com.client #pywin32
| 37.641096 | 341 | 0.483441 |
8c7dbd2d6be5f59ac7452dec291f7f34b860f29f | 596 | py | Python | cuisine/interface/recipe_io.py | j3kstrum/recipe-tweaker | 941d2fed87fc2c568b29d3b3baee3f8ebfe4daca | [
"MIT"
] | null | null | null | cuisine/interface/recipe_io.py | j3kstrum/recipe-tweaker | 941d2fed87fc2c568b29d3b3baee3f8ebfe4daca | [
"MIT"
] | null | null | null | cuisine/interface/recipe_io.py | j3kstrum/recipe-tweaker | 941d2fed87fc2c568b29d3b3baee3f8ebfe4daca | [
"MIT"
] | null | null | null | from data.recipe import Recipe
from data import RecipeGroup
from typing import List
| 22.923077 | 63 | 0.687919 |
8c7fa7533fc54f258e0b5114a55c0d8281434b5f | 5,847 | py | Python | Inventationery/apps/SalesOrder/models.py | alexharmenta/Inventationery | 1bf9ee2c56492ab66947886590b7ec17fa3a6195 | [
"BSD-3-Clause"
] | null | null | null | Inventationery/apps/SalesOrder/models.py | alexharmenta/Inventationery | 1bf9ee2c56492ab66947886590b7ec17fa3a6195 | [
"BSD-3-Clause"
] | null | null | null | Inventationery/apps/SalesOrder/models.py | alexharmenta/Inventationery | 1bf9ee2c56492ab66947886590b7ec17fa3a6195 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: Alex
# @Date: 2015-11-16 19:15:59
# @Last Modified by: Alex
# @Last Modified time: 2015-12-28 22:28:23
from django.db import models
from Inventationery.core.models import TimeStampedModel
from Inventationery.apps.Customer.models import CustomerModel
from Inve... | 33.411429 | 78 | 0.632461 |
8c801a155d630ce0c04e5998293ea5519ef48632 | 444 | py | Python | bookorbooks/account/migrations/0003_alter_customuser_identity_number.py | talhakoylu/SummerInternshipBackend | 4ecedf5c97f73e3d32d5a534769e86aac3e4b6d3 | [
"MIT"
] | 1 | 2021-08-10T22:24:17.000Z | 2021-08-10T22:24:17.000Z | bookorbooks/account/migrations/0003_alter_customuser_identity_number.py | talhakoylu/SummerInternshipBackend | 4ecedf5c97f73e3d32d5a534769e86aac3e4b6d3 | [
"MIT"
] | null | null | null | bookorbooks/account/migrations/0003_alter_customuser_identity_number.py | talhakoylu/SummerInternshipBackend | 4ecedf5c97f73e3d32d5a534769e86aac3e4b6d3 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.5 on 2021-07-13 09:12
from django.db import migrations, models
| 23.368421 | 95 | 0.630631 |
8c805e1adcc6b31a87a479f4115ffa71c7a3bbab | 8,678 | py | Python | Code/Python/ImageProcessing/StereoDepth/featureMatchStereo.py | Nailim/shuttler | a12ea89a1c6b289079ce61ebf8bf3361696f10b2 | [
"MIT"
] | null | null | null | Code/Python/ImageProcessing/StereoDepth/featureMatchStereo.py | Nailim/shuttler | a12ea89a1c6b289079ce61ebf8bf3361696f10b2 | [
"MIT"
] | null | null | null | Code/Python/ImageProcessing/StereoDepth/featureMatchStereo.py | Nailim/shuttler | a12ea89a1c6b289079ce61ebf8bf3361696f10b2 | [
"MIT"
] | null | null | null | # for new opencv
#import os,sys
#os.chdir(os.path.expanduser('~/opencv-2.4.6.1/lib'))
#sys.path.append(os.path.expanduser('~/opencv-2.4.6.1/lib/python2.7/dist-packages'))
# before starting
#export PYTHONPATH=~/opencv-2.4.6.1/lib/python2.7/dist-packages
import os
#import cv
import cv2
import math
import argparse
impor... | 35.276423 | 212 | 0.659484 |
8c80f15de2f13a257021c58138cdb9e639d87869 | 10,472 | py | Python | parser.py | alexkyllo/pycc | 76670dae42274c90f620d9e2bbbdba1deb8ed6bf | [
"MIT"
] | null | null | null | parser.py | alexkyllo/pycc | 76670dae42274c90f620d9e2bbbdba1deb8ed6bf | [
"MIT"
] | null | null | null | parser.py | alexkyllo/pycc | 76670dae42274c90f620d9e2bbbdba1deb8ed6bf | [
"MIT"
] | 1 | 2020-11-10T08:05:44.000Z | 2020-11-10T08:05:44.000Z | from lexer import (
TokenKeyword,
TokenOpenBrace,
TokenCloseBrace,
TokenOpenParen,
TokenCloseParen,
TokenSemicolon,
TokenAssignmentOperator,
TokenAdditionOperator,
TokenMultiplicationOperator,
TokenIncrementOperator,
TokenEqualityOperator,
TokenInequalityOperator,
Tok... | 29.498592 | 92 | 0.652406 |
8c811e483e4d1935487f1175baf6f5786632c952 | 5,983 | py | Python | official/benchmark/unet3d_benchmark.py | gitlost-murali/models | e3135c03429c462f16d298b92315213647e36190 | [
"Apache-2.0"
] | 2 | 2020-07-31T06:02:09.000Z | 2020-07-31T06:05:36.000Z | official/benchmark/unet3d_benchmark.py | gitlost-murali/models | e3135c03429c462f16d298b92315213647e36190 | [
"Apache-2.0"
] | 1 | 2020-07-24T10:47:58.000Z | 2020-07-24T10:47:58.000Z | official/benchmark/unet3d_benchmark.py | gitlost-murali/models | e3135c03429c462f16d298b92315213647e36190 | [
"Apache-2.0"
] | 5 | 2020-10-07T06:11:08.000Z | 2021-12-02T21:24:38.000Z | # Lint as: python3
# Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | 39.361842 | 80 | 0.694802 |
8c8302aacd848814b28c80f3cb7d246d2c41919a | 222 | py | Python | pysge/utils.py | shane-breeze/pysge | 7c8d7f8df5ca7c09c529b01134a0e789a2ba2cbe | [
"MIT"
] | null | null | null | pysge/utils.py | shane-breeze/pysge | 7c8d7f8df5ca7c09c529b01134a0e789a2ba2cbe | [
"MIT"
] | null | null | null | pysge/utils.py | shane-breeze/pysge | 7c8d7f8df5ca7c09c529b01134a0e789a2ba2cbe | [
"MIT"
] | null | null | null | try:
import subprocess32 as sp
except ModuleNotFoundError:
import subprocess as sp
import shlex
| 22.2 | 64 | 0.725225 |
8c842d4db1d85094e333bc85fbb4d227c59d5b6a | 3,556 | py | Python | src/pygerber/API2D.py | Argmaster/pygerber | 4761a5aa60ff1d11512fb44aabd103246d9a3019 | [
"MIT"
] | 3 | 2021-08-30T07:07:59.000Z | 2021-09-29T22:14:43.000Z | src/pygerber/API2D.py | Argmaster/pygerber | 4761a5aa60ff1d11512fb44aabd103246d9a3019 | [
"MIT"
] | 1 | 2021-09-26T13:28:49.000Z | 2021-09-26T13:28:49.000Z | src/pygerber/API2D.py | Argmaster/pygerber | 4761a5aa60ff1d11512fb44aabd103246d9a3019 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from typing import Any, Dict
from PIL import Image
from pygerber.parser.pillow.parser import DEFAULT_COLOR_SET_GREEN, ColorSet
from .parser.pillow.api import PillowProjectSpec, _render_file
def render_from_spec(spec: Dict[str, Any]) -> Image.Image:
"""Render 2D image from specfile alik... | 29.38843 | 114 | 0.692913 |
8c84673cd4c815a8dd356f023b667ff78319d314 | 868 | py | Python | job-orchestrator/tests/transformers/test_model_paths.py | anaai/anaai | fa49ba107e7c6d32aef46796452308334517a224 | [
"MIT"
] | 31 | 2022-01-26T21:47:31.000Z | 2022-03-21T12:22:39.000Z | job-orchestrator/tests/transformers/test_model_paths.py | anaai/anaai | fa49ba107e7c6d32aef46796452308334517a224 | [
"MIT"
] | 3 | 2022-01-24T11:16:05.000Z | 2022-01-28T15:11:19.000Z | job-orchestrator/tests/transformers/test_model_paths.py | anaai/anaai | fa49ba107e7c6d32aef46796452308334517a224 | [
"MIT"
] | 2 | 2022-02-08T12:07:55.000Z | 2022-02-08T19:45:40.000Z | from transformers import model_paths
| 33.384615 | 84 | 0.820276 |
8c8512a0da331af189d40b5652379f72c53f2f93 | 9,244 | py | Python | Omr.py | marlingod/Computer-Vision | dcba53b2437b02186ccff1c748c96880888bef81 | [
"MIT"
] | null | null | null | Omr.py | marlingod/Computer-Vision | dcba53b2437b02186ccff1c748c96880888bef81 | [
"MIT"
] | null | null | null | Omr.py | marlingod/Computer-Vision | dcba53b2437b02186ccff1c748c96880888bef81 | [
"MIT"
] | null | null | null |
from imutils.perspective import four_point_transform
from imutils import contours
import numpy as np
import argparse
import imutils
import cv2
import matplotlib as plt
import os
from itertools import groupby
# the function that an pic, find sqaures and
#return the sqaures and return the x, y, contour, and parenthie... | 35.69112 | 161 | 0.535591 |
8c8584e4a637146aa64ba5592088fa5de2ab6771 | 7,747 | py | Python | examples/scripts/shapelet_transform.py | wilsonify/sktime | 68395d44bd3f46b0801c506e23e889dd54999d29 | [
"BSD-3-Clause"
] | null | null | null | examples/scripts/shapelet_transform.py | wilsonify/sktime | 68395d44bd3f46b0801c506e23e889dd54999d29 | [
"BSD-3-Clause"
] | null | null | null | examples/scripts/shapelet_transform.py | wilsonify/sktime | 68395d44bd3f46b0801c506e23e889dd54999d29 | [
"BSD-3-Clause"
] | null | null | null | # ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.11.1
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# # Shapelets and the Shapelet Transform with sktime
#... | 46.668675 | 1,192 | 0.741448 |
8c860bdb685621ac68461a5e8c8c00340c6b1c45 | 435 | py | Python | tests/test_inchi.py | ginkgobioworks/pychemy | e2da05ff5815aae1465407b4d434afb66117e8da | [
"MIT"
] | 3 | 2016-12-18T20:19:51.000Z | 2020-10-20T01:49:39.000Z | tests/test_inchi.py | ginkgobioworks/pychemy | e2da05ff5815aae1465407b4d434afb66117e8da | [
"MIT"
] | null | null | null | tests/test_inchi.py | ginkgobioworks/pychemy | e2da05ff5815aae1465407b4d434afb66117e8da | [
"MIT"
] | 1 | 2020-03-29T22:55:46.000Z | 2020-03-29T22:55:46.000Z | from __future__ import print_function
import unittest
import six
from pychemy.inchi import InChI
| 29 | 158 | 0.721839 |
8c869595b9f045f630a39964a2bc1bfe046186d9 | 6,332 | py | Python | artap/individual.py | artap-framework/artap | 7e4b01abbe5ca0fce9fa87a1a307ebd11ace36b4 | [
"MIT"
] | 5 | 2021-06-13T17:04:37.000Z | 2022-03-04T17:16:06.000Z | artap/individual.py | artap-framework/artap | 7e4b01abbe5ca0fce9fa87a1a307ebd11ace36b4 | [
"MIT"
] | null | null | null | artap/individual.py | artap-framework/artap | 7e4b01abbe5ca0fce9fa87a1a307ebd11ace36b4 | [
"MIT"
] | 8 | 2021-03-11T18:23:47.000Z | 2022-02-22T11:13:23.000Z | from abc import *
from collections.abc import Iterable
from enum import Enum
| 32.471795 | 121 | 0.543114 |
8c87624e21c73678a29e1978808c53598ef78647 | 471 | py | Python | blox/duplicates_query__1_0/b_duplicates_query.py | mpi-sws-rse/datablox | 93af071e5f8a68dc83df1700ed657bd64aca8849 | [
"Apache-2.0"
] | null | null | null | blox/duplicates_query__1_0/b_duplicates_query.py | mpi-sws-rse/datablox | 93af071e5f8a68dc83df1700ed657bd64aca8849 | [
"Apache-2.0"
] | null | null | null | blox/duplicates_query__1_0/b_duplicates_query.py | mpi-sws-rse/datablox | 93af071e5f8a68dc83df1700ed657bd64aca8849 | [
"Apache-2.0"
] | null | null | null | from block import *
from logging import ERROR, WARN, INFO, DEBUG | 29.4375 | 56 | 0.609342 |
8c87ba42d9c4fcf728e4c4af9e88b377f8f22da4 | 3,405 | py | Python | nodepool/tests/test_shade_integration.py | Juniper/nodepool | 3de0b20faa6f90437eb62c56ec23c59c6e15b5fa | [
"Apache-2.0"
] | null | null | null | nodepool/tests/test_shade_integration.py | Juniper/nodepool | 3de0b20faa6f90437eb62c56ec23c59c6e15b5fa | [
"Apache-2.0"
] | null | null | null | nodepool/tests/test_shade_integration.py | Juniper/nodepool | 3de0b20faa6f90437eb62c56ec23c59c6e15b5fa | [
"Apache-2.0"
] | 2 | 2019-03-19T12:34:13.000Z | 2020-02-05T10:31:48.000Z | # Copyright (C) 2015 Hewlett-Packard Development Company, L.P.
#
# 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... | 37.833333 | 75 | 0.669016 |
8c89c45428c0846d584df54eae048d3cd2046b39 | 1,944 | py | Python | src/pybbox/bboxApiURL.py | BrunoMalard/pybbox | 08a4437fcaa5ab6034cdad2822abf2b7e812ab6e | [
"MIT"
] | null | null | null | src/pybbox/bboxApiURL.py | BrunoMalard/pybbox | 08a4437fcaa5ab6034cdad2822abf2b7e812ab6e | [
"MIT"
] | null | null | null | src/pybbox/bboxApiURL.py | BrunoMalard/pybbox | 08a4437fcaa5ab6034cdad2822abf2b7e812ab6e | [
"MIT"
] | null | null | null | from .bboxConstant import BboxConstant
import netaddr as net
import socket
| 27.771429 | 80 | 0.596708 |
8c8a4300c28e34f4930ae2443042159fc3f83514 | 753 | py | Python | experimental_code/integratedAltAz/keplerianToCartesianOrbital.py | rex-mcall/EST_Internship_2021 | e2281925c0410e10cf779f8da37d2cf0b58c893a | [
"MIT"
] | null | null | null | experimental_code/integratedAltAz/keplerianToCartesianOrbital.py | rex-mcall/EST_Internship_2021 | e2281925c0410e10cf779f8da37d2cf0b58c893a | [
"MIT"
] | null | null | null | experimental_code/integratedAltAz/keplerianToCartesianOrbital.py | rex-mcall/EST_Internship_2021 | e2281925c0410e10cf779f8da37d2cf0b58c893a | [
"MIT"
] | null | null | null | from tletools import TLE
import matplotlib.pyplot as plt
import numpy as np
import math
from math import *
import sys
import datetime as dt
import tleToKeplerianElements as ttke
# uses TLE to return the current distance of the satellite to the focus
# calculates the orbital plane cartesian coordinates for one point ... | 31.375 | 77 | 0.706507 |
8c9004e838a951adb521cb483768cf5772d3c5c5 | 4,091 | py | Python | duovoice.py | dreamingdust/Duolingo | b0aa52d4e2ed5d53ed7a6a12b40f7427df80dd8a | [
"MIT"
] | null | null | null | duovoice.py | dreamingdust/Duolingo | b0aa52d4e2ed5d53ed7a6a12b40f7427df80dd8a | [
"MIT"
] | null | null | null | duovoice.py | dreamingdust/Duolingo | b0aa52d4e2ed5d53ed7a6a12b40f7427df80dd8a | [
"MIT"
] | null | null | null | import re
import json
import random
from duorequest import DuoRequest
| 38.59434 | 118 | 0.599853 |
8c9056fd477bcf10e7708737270959a98f48acf4 | 9,120 | py | Python | vlab_onefs_api/lib/worker/tasks.py | willnx/vlab_onefs | df90738806a5a4800b91e62f79090a11a0b01088 | [
"Apache-2.0"
] | 1 | 2019-04-10T16:17:18.000Z | 2019-04-10T16:17:18.000Z | vlab_onefs_api/lib/worker/tasks.py | willnx/vlab_onefs | df90738806a5a4800b91e62f79090a11a0b01088 | [
"Apache-2.0"
] | 2 | 2018-11-16T19:35:14.000Z | 2019-05-22T19:00:38.000Z | vlab_onefs_api/lib/worker/tasks.py | willnx/vlab_onefs | df90738806a5a4800b91e62f79090a11a0b01088 | [
"Apache-2.0"
] | null | null | null | # -*- coding: UTF-8 -*-
"""
Entry point logic for available backend worker tasks
"""
from celery import Celery
from vlab_api_common import get_task_logger
from vlab_onefs_api.lib import const
from vlab_onefs_api.lib.worker import vmware, setup_onefs
app = Celery('onefs', backend='rpc://', broker=const.VLAB_MESSAGE_BR... | 37.842324 | 121 | 0.641228 |
8c90ef4aca469d1ecba0f7580c5b99291072342e | 1,878 | py | Python | HIN&PairWise/create_dict.py | feast-research/PPGCN | cbc91bb0557f8f1c0beb4cb61804ca86e71d45f3 | [
"MIT"
] | 15 | 2019-05-20T08:34:58.000Z | 2022-03-30T16:43:40.000Z | HIN&PairWise/create_dict.py | feast-research/PPGCN | cbc91bb0557f8f1c0beb4cb61804ca86e71d45f3 | [
"MIT"
] | 1 | 2021-03-04T09:16:41.000Z | 2021-03-04T09:16:41.000Z | HIN&PairWise/create_dict.py | feast-research/PPGCN | cbc91bb0557f8f1c0beb4cb61804ca86e71d45f3 | [
"MIT"
] | 11 | 2019-05-20T08:35:03.000Z | 2022-03-30T16:43:41.000Z |
# coding: utf-8
# In[1]:
import json
import os
import time
if __name__ == "__main__":
start_time = time.time()
events = {}
keywords = {}
fp = 'news/'
# fp = 'Data/'
num_files = 9000000
print('Totally ', num_files)
print('Initializing events dictionary ...')
events = events_di... | 25.04 | 95 | 0.56869 |
8c91071f0ddeb89b2d1a133336badc4c01678885 | 2,550 | py | Python | azure-keyvault/azure/keyvault/key_vault_authentication.py | azuresdkci1x/azure-sdk-for-python-1722 | e08fa6606543ce0f35b93133dbb78490f8e6bcc9 | [
"MIT"
] | 1 | 2018-11-09T06:16:34.000Z | 2018-11-09T06:16:34.000Z | azure-keyvault/azure/keyvault/key_vault_authentication.py | azuresdkci1x/azure-sdk-for-python-1722 | e08fa6606543ce0f35b93133dbb78490f8e6bcc9 | [
"MIT"
] | null | null | null | azure-keyvault/azure/keyvault/key_vault_authentication.py | azuresdkci1x/azure-sdk-for-python-1722 | e08fa6606543ce0f35b93133dbb78490f8e6bcc9 | [
"MIT"
] | 1 | 2018-11-09T06:17:41.000Z | 2018-11-09T06:17:41.000Z | #---------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------... | 43.220339 | 95 | 0.620784 |
8c93bd1c8da21f9f225cc04ad9c6cafa560fe192 | 326 | py | Python | circumcircle.py | mas250/Python3 | 6ac6f0ffe7869cd7520b2ae0debf3650116a97b1 | [
"MIT"
] | 1 | 2019-12-28T12:31:28.000Z | 2019-12-28T12:31:28.000Z | circumcircle.py | mas250/Python3 | 6ac6f0ffe7869cd7520b2ae0debf3650116a97b1 | [
"MIT"
] | null | null | null | circumcircle.py | mas250/Python3 | 6ac6f0ffe7869cd7520b2ae0debf3650116a97b1 | [
"MIT"
] | null | null | null | from math import sqrt
side_a = 4
side_b = 6
side_c = 3
semiperimiter = (side_a + side_b + side_c)/2
diameter = (side_a* side_b* side_c)/ 2*sqrt(semiperimiter * (semiperimiter - side_a) * (semiperimiter - side_b) * (semiperimiter - side_c))
print ('The radius of a circle with sides of length 4, 6 and 3 is', diamet... | 23.285714 | 139 | 0.702454 |
8c9484692f2019ce785b1899db7a88a0eaef612f | 5,757 | py | Python | kl_modes.py | aasensio/unsupervisedMFBD | b83de1d7bd0d00bada5e61a97eff67acc8377432 | [
"MIT"
] | 5 | 2020-06-03T15:00:04.000Z | 2021-05-24T06:37:47.000Z | kl_modes.py | aasensio/unsupervisedMFBD | b83de1d7bd0d00bada5e61a97eff67acc8377432 | [
"MIT"
] | 4 | 2021-01-31T12:06:39.000Z | 2021-06-13T12:00:50.000Z | kl_modes.py | aasensio/unsupervisedMFBD | b83de1d7bd0d00bada5e61a97eff67acc8377432 | [
"MIT"
] | 2 | 2021-03-10T12:00:18.000Z | 2022-01-06T16:28:32.000Z | import numpy as np
import zern
import matplotlib.pyplot as pl
from tqdm import tqdm
import scipy.special as sp
if (__name__ == '__main__'):
tmp = KL()
tmp.precalculate_covariance(npix_image=128, n_modes_max=25, first_noll=3)
f, ax = pl.subplots(nrows=4, ncols=4)
for i in range(16):
ax.... | 31.983333 | 124 | 0.505472 |
8c96804536bf1086747100c71b2281dc17414142 | 677 | py | Python | tf_models/train.py | edding/socal-2019-nlp-complete | d3b5c2d57da06b6682dd6aeec3d4070bf9c1f257 | [
"MIT"
] | 2 | 2020-05-11T21:51:37.000Z | 2021-04-28T16:08:59.000Z | tf_models/train.py | edding/socal-2019-nlp-complete | d3b5c2d57da06b6682dd6aeec3d4070bf9c1f257 | [
"MIT"
] | 1 | 2021-08-25T14:49:12.000Z | 2021-08-25T14:49:12.000Z | tf_models/train.py | edding/socal-2019-nlp-complete | d3b5c2d57da06b6682dd6aeec3d4070bf9c1f257 | [
"MIT"
] | 1 | 2020-04-04T14:25:09.000Z | 2020-04-04T14:25:09.000Z | from tf_models.utils import train, save_model
if __name__ == "__main__":
# Train intent model
# fmt: off
train_and_save(
name="intent",
corpus="intent_corpus.csv",
pos_label="weather",
root="intent"
)
# fmt: on
# Train flow control model
train_and_save(
... | 23.344828 | 75 | 0.612999 |
8c977c91bd1defaf564c46979a1e981f2c71b7b9 | 5,641 | py | Python | docs/conf.py | j-i-l/SoSpCATpy | 9e96a74ab24a727102eb80e1d85ed71ecb11ed76 | [
"BSD-3-Clause"
] | 2 | 2020-12-10T00:08:58.000Z | 2020-12-11T09:37:06.000Z | docs/conf.py | j-i-l/SoSpCAT | 9e96a74ab24a727102eb80e1d85ed71ecb11ed76 | [
"BSD-3-Clause"
] | 1 | 2020-12-10T21:59:53.000Z | 2020-12-19T17:37:14.000Z | docs/conf.py | j-i-l/SoSpCATpy | 9e96a74ab24a727102eb80e1d85ed71ecb11ed76 | [
"BSD-3-Clause"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 39.173611 | 79 | 0.479348 |
8c98128aba9bae2c2828d02f0514de7ab9d43713 | 1,039 | py | Python | migrations/versions/f1896d92dddc_.py | akelshareif/fiscally | ca44ca00537d2b9ef1bca8a3a67b66427394dc72 | [
"MIT"
] | 1 | 2020-09-18T04:18:58.000Z | 2020-09-18T04:18:58.000Z | migrations/versions/f1896d92dddc_.py | akelshareif/fiscally | ca44ca00537d2b9ef1bca8a3a67b66427394dc72 | [
"MIT"
] | null | null | null | migrations/versions/f1896d92dddc_.py | akelshareif/fiscally | ca44ca00537d2b9ef1bca8a3a67b66427394dc72 | [
"MIT"
] | null | null | null | """empty message
Revision ID: f1896d92dddc
Revises: bdd283763bd2
Create Date: 2020-08-21 22:08:42.863607
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'f1896d92dddc'
down_revision = 'bdd283763bd2'
branch_labels = None
depends_on = None
| 29.685714 | 86 | 0.692974 |
8c99299cba6a52cf3dabace97db1a9fc2ccbe36e | 1,969 | py | Python | test/territories_test.py | AColocho/us-states | 1b97d9d4d1784ad6e297ffe1df2927eab3e86546 | [
"BSL-1.0"
] | 3 | 2020-12-31T02:08:01.000Z | 2022-01-11T07:21:22.000Z | test/territories_test.py | AColocho/us-states | 1b97d9d4d1784ad6e297ffe1df2927eab3e86546 | [
"BSL-1.0"
] | 14 | 2020-12-23T00:06:20.000Z | 2022-01-10T16:43:43.000Z | test/territories_test.py | AColocho/us-states | 1b97d9d4d1784ad6e297ffe1df2927eab3e86546 | [
"BSL-1.0"
] | 3 | 2020-12-28T08:47:00.000Z | 2022-01-10T15:27:01.000Z | from states import Territories_Abbreviated
from states import Territories_Full_Name
from states import Uninhabited_Territories
from states import Associated_States
from states import Territories
import unittest
if __name__ == "__main__":
unittest.main() | 39.38 | 133 | 0.705942 |
8c9c1a5711b123bddf619f7dedc40d8269640efe | 714 | py | Python | DataStructures/BinarySerachTree_def/Program.py | luiscarm9/Data-Structures-in-Python | e7eb7e7ece8f3223b8017d25acc76bea3e93e3f6 | [
"MIT"
] | null | null | null | DataStructures/BinarySerachTree_def/Program.py | luiscarm9/Data-Structures-in-Python | e7eb7e7ece8f3223b8017d25acc76bea3e93e3f6 | [
"MIT"
] | null | null | null | DataStructures/BinarySerachTree_def/Program.py | luiscarm9/Data-Structures-in-Python | e7eb7e7ece8f3223b8017d25acc76bea3e93e3f6 | [
"MIT"
] | null | null | null | from BinarySerachTree_def.BinaryTree import BinaryTreeS
binarytree=BinaryTreeS()
#create a binary tree with fibonnaci
binarytree.insert(0)
binarytree.insert(1)
binarytree.insert(1)
binarytree.insert(2)
binarytree.insert(3)
binarytree.insert(5)
binarytree.insert(8)
binarytree.insert(13)
binarytree.getTraverseInOrder... | 22.3125 | 55 | 0.696078 |
8c9fb6efe06b9d7eacf5c439d3879b402a99796e | 3,469 | py | Python | generative_model/generator_test.py | LamUong/Generate-novel-molecules-with-LSTM | a145a70ecd8719681e52b17a21d269c56873bcc3 | [
"CC0-1.0"
] | 19 | 2018-02-17T22:42:38.000Z | 2021-07-16T07:21:46.000Z | generative_model/generator_test.py | LamUong/Generate-novel-molecules-with-LSTM | a145a70ecd8719681e52b17a21d269c56873bcc3 | [
"CC0-1.0"
] | 1 | 2018-11-18T15:05:17.000Z | 2018-11-18T15:05:17.000Z | generative_model/generator_test.py | LamUong/Generate-novel-molecules-with-LSTM | a145a70ecd8719681e52b17a21d269c56873bcc3 | [
"CC0-1.0"
] | 9 | 2018-01-06T11:13:18.000Z | 2021-06-22T12:32:55.000Z | import torch
import torch.nn as nn
from torch.autograd import Variable
from data_loading import *
from rdkit import Chem
'''
the model
'''
data,vocabs=load_data()
data = set(list(data))
vocabs = list(vocabs)
vocabs_size = len(vocabs)
output_size = len(vocabs)
batch_size = 128
cuda = True
hidden_size = 1024
embedding_... | 32.12037 | 93 | 0.677717 |
8ca1def1e3fb9c5420539abd418d03fb101d97fb | 16,206 | py | Python | lib/jnpr/healthbot/swagger/models/hb_graphs_query.py | Juniper/healthbot-py-client | 49f0884b5d01ac8430aa7ed4c9acb4e7a2b717a6 | [
"Apache-2.0"
] | 10 | 2019-10-23T12:54:37.000Z | 2022-02-07T19:24:30.000Z | docs/jnpr_healthbot_swagger/swagger_client/models/hb_graphs_query.py | Juniper/healthbot-py-client | 49f0884b5d01ac8430aa7ed4c9acb4e7a2b717a6 | [
"Apache-2.0"
] | 5 | 2019-09-30T04:29:25.000Z | 2022-02-16T12:21:06.000Z | docs/jnpr_healthbot_swagger/swagger_client/models/hb_graphs_query.py | Juniper/healthbot-py-client | 49f0884b5d01ac8430aa7ed4c9acb4e7a2b717a6 | [
"Apache-2.0"
] | 4 | 2019-09-30T01:17:48.000Z | 2020-08-25T07:27:54.000Z | # coding: utf-8
"""
Paragon Insights APIs
API interface for PI application # noqa: E501
OpenAPI spec version: 4.0.0
Contact: healthbot-feedback@juniper.net
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
def to_str(se... | 31.776471 | 316 | 0.614217 |
8ca1fdcd06877b59b70ea045ebbc727545e90abc | 3,564 | py | Python | unn/models/attentions/factorized_attention.py | zongdaoming/TinyTransformer | 8e64f8816117048c388b4b20e3a56760ce149fe3 | [
"Apache-2.0"
] | 2 | 2021-08-08T11:23:14.000Z | 2021-09-16T04:05:23.000Z | unn/models/attentions/factorized_attention.py | zongdaoming/TinyTransformer | 8e64f8816117048c388b4b20e3a56760ce149fe3 | [
"Apache-2.0"
] | 1 | 2021-08-08T11:25:47.000Z | 2021-08-08T11:26:15.000Z | unn/models/attentions/factorized_attention.py | zongdaoming/TinyTransformer | 8e64f8816117048c388b4b20e3a56760ce149fe3 | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from .position import LearnedEmbedding
| 29.7 | 112 | 0.563692 |
8ca2ffe299e03e4ecdafdc64f945211899c0df0b | 1,029 | py | Python | scripts/py_shell.py | sjl3110/TF-M | 100fa00239e4ddaf895865bdbbeb904a1973cb4a | [
"BSD-3-Clause"
] | null | null | null | scripts/py_shell.py | sjl3110/TF-M | 100fa00239e4ddaf895865bdbbeb904a1973cb4a | [
"BSD-3-Clause"
] | null | null | null | scripts/py_shell.py | sjl3110/TF-M | 100fa00239e4ddaf895865bdbbeb904a1973cb4a | [
"BSD-3-Clause"
] | null | null | null | import subprocess
commit_sha_base = 'c855573fd1acadf2dd3b1cdc1e4581cd49c77f05'
cmake_command = 'cmake -S . -B cmake_build -DTFM_PLATFORM=arm/mps2/an521 \
-DTFM_TOOLCHAIN_FILE=toolchain_GNUARM.cmake \
-DCMAKE_BUILD_TYPE=Release \
-DTFM_PROFILE=profile_small'... | 31.181818 | 74 | 0.655005 |
8ca37f78c357746a315b182aadc2bf8f1ad9a051 | 3,557 | py | Python | Python 2 & 3/class example/sparse_matrix.py | sasasagagaga/Code-examples | 084db5bca241b164a670e303f73048fe4e6dad79 | [
"MIT"
] | null | null | null | Python 2 & 3/class example/sparse_matrix.py | sasasagagaga/Code-examples | 084db5bca241b164a670e303f73048fe4e6dad79 | [
"MIT"
] | null | null | null | Python 2 & 3/class example/sparse_matrix.py | sasasagagaga/Code-examples | 084db5bca241b164a670e303f73048fe4e6dad79 | [
"MIT"
] | null | null | null | from collections import defaultdict
import copy
| 32.045045 | 89 | 0.490863 |
8ca571729a1d490bef3f077d7c0408ec944e7fe6 | 24,209 | py | Python | src/stitcher.py | ahelsing/geni-tools | 0799f715ad88a1a11b069e8208f012abef23cbd8 | [
"MIT"
] | 3 | 2015-05-05T13:03:27.000Z | 2021-11-17T11:16:38.000Z | src/stitcher.py | ahelsing/geni-tools | 0799f715ad88a1a11b069e8208f012abef23cbd8 | [
"MIT"
] | null | null | null | src/stitcher.py | ahelsing/geni-tools | 0799f715ad88a1a11b069e8208f012abef23cbd8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#----------------------------------------------------------------------
# Copyright (c) 2013-2016 Raytheon BBN Technologies
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and/or hardware specification (the "Work") to
# deal in the Work without ... | 50.646444 | 221 | 0.638399 |
8ca7949e5600af676c35fbf996b6b49821a26ed0 | 320 | py | Python | check_db_connection.py | sernote/python_training | 2e2fa1f71b551d12bb303a0abc31bd86a0a7b81d | [
"Apache-2.0"
] | null | null | null | check_db_connection.py | sernote/python_training | 2e2fa1f71b551d12bb303a0abc31bd86a0a7b81d | [
"Apache-2.0"
] | null | null | null | check_db_connection.py | sernote/python_training | 2e2fa1f71b551d12bb303a0abc31bd86a0a7b81d | [
"Apache-2.0"
] | null | null | null | from fixture.orm import ORMFixture
from model.group import Group
from fixture.contact import Contacthelper
db = ORMFixture(host='localhost', name='addressbook', user='root', password='')
try:
l = db.get_contact_list()
for item in l:
print(item.all_phones_from_page)
print(len(l))
finally:
pass
| 22.857143 | 79 | 0.715625 |
8ca80fec6941295983f63bed7954d4de64aa4bfb | 208 | py | Python | csrf/api/v1/urls.py | CredoEducation/edx-drf-extensions | 853fb5ec6392d57693008e1a1c1620b79cb8343b | [
"Apache-2.0"
] | 13 | 2016-08-26T15:33:05.000Z | 2020-12-20T19:12:34.000Z | csrf/api/v1/urls.py | CredoEducation/edx-drf-extensions | 853fb5ec6392d57693008e1a1c1620b79cb8343b | [
"Apache-2.0"
] | 74 | 2016-03-11T21:42:14.000Z | 2021-10-04T05:41:12.000Z | csrf/api/v1/urls.py | CredoEducation/edx-drf-extensions | 853fb5ec6392d57693008e1a1c1620b79cb8343b | [
"Apache-2.0"
] | 13 | 2016-11-21T06:34:17.000Z | 2021-09-07T08:34:28.000Z | """
URL definitions for version 1 of the CSRF API.
"""
from django.conf.urls import url
from .views import CsrfTokenView
urlpatterns = [
url(r'^token$', CsrfTokenView.as_view(), name='csrf_token'),
]
| 16 | 64 | 0.701923 |
8ca834043d6aeb573ae8c09f0baf4e1123118c35 | 1,158 | py | Python | src/zenmake/zm/buildconf/types.py | pustotnik/raven | adb75d04a1ce719266eb34c29b35151dfaf91a8a | [
"BSD-3-Clause"
] | null | null | null | src/zenmake/zm/buildconf/types.py | pustotnik/raven | adb75d04a1ce719266eb34c29b35151dfaf91a8a | [
"BSD-3-Clause"
] | null | null | null | src/zenmake/zm/buildconf/types.py | pustotnik/raven | adb75d04a1ce719266eb34c29b35151dfaf91a8a | [
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
#
"""
Copyright (c) 2020, Alexander Magola. All rights reserved.
license: BSD 3-Clause License, see LICENSE for more details.
"""
from zm.pyutils import struct
ANYSTR_KEY = AnyStrKey()
_PATHS_SCHEME_DICT_VARS = {
'incl' : { 'type': ('str', 'list-of-strs') },
'excl' : { 'type': (... | 24.638298 | 69 | 0.578584 |
8ca83fa54e7394d645fa820ab6dd850bff3aac1f | 832 | py | Python | bokeh/protocol/messages/ok.py | kinghows/bokeh | aeb7abc1dbe2b67ce0f4422838a96fb8362c52c7 | [
"BSD-3-Clause"
] | 4 | 2018-06-03T14:08:15.000Z | 2020-09-09T01:56:29.000Z | bokeh/protocol/messages/ok.py | kinghows/bokeh | aeb7abc1dbe2b67ce0f4422838a96fb8362c52c7 | [
"BSD-3-Clause"
] | 1 | 2021-05-09T02:45:17.000Z | 2021-05-09T02:45:17.000Z | bokeh/protocol/messages/ok.py | kinghows/bokeh | aeb7abc1dbe2b67ce0f4422838a96fb8362c52c7 | [
"BSD-3-Clause"
] | 3 | 2020-04-28T17:47:50.000Z | 2021-04-05T06:11:46.000Z | from __future__ import absolute_import
import logging
log = logging.getLogger(__name__)
from ..message import Message
from . import register
| 23.771429 | 75 | 0.644231 |
8ca9b54baa338723ba065c5a2b4ac0c863288e7a | 973 | py | Python | ranking-jaccardian.py | bharathbs93/Article-Similarity-Search | 32835dbf3e62b93e369b2596d41ad6359c8f1601 | [
"MIT"
] | null | null | null | ranking-jaccardian.py | bharathbs93/Article-Similarity-Search | 32835dbf3e62b93e369b2596d41ad6359c8f1601 | [
"MIT"
] | null | null | null | ranking-jaccardian.py | bharathbs93/Article-Similarity-Search | 32835dbf3e62b93e369b2596d41ad6359c8f1601 | [
"MIT"
] | null | null | null | #Importing libraries that are needed for processing
import pandas as pd
from sklearn import preprocessing
import numpy as np
from sklearn.metrics.pairwise import pairwise_distances
# Reading the csv file of term document frequency generated in R
input_data = pd.read_csv("finamatrix.csv",index_col=0, header =0 )
# N... | 27.027778 | 77 | 0.798561 |
8cab73ff990877e4575d295bcf8d9f79d2c7d6bf | 1,858 | py | Python | 1-Machine-Learning/1-Generative-Models/2D Representation & Reconstruction/2-Encoder-Decoder/Auto-Encoder/AE.py | yzy1996/Artificial-Intelligence | 30a9a2ce1602b9fa9be5981e98885c1c4244cbbd | [
"MIT"
] | 7 | 2019-11-09T02:55:35.000Z | 2021-08-16T12:43:44.000Z | 1-Machine-Learning/1-Generative-Models/2D Representation & Reconstruction/2-Encoder-Decoder/Auto-Encoder/AE.py | yzy1996/Artificial-Intelligence | 30a9a2ce1602b9fa9be5981e98885c1c4244cbbd | [
"MIT"
] | 3 | 2020-10-13T03:12:03.000Z | 2021-03-21T09:03:02.000Z | 1-Machine-Learning/1-Generative-Models/2D Representation & Reconstruction/2-Encoder-Decoder/Auto-Encoder/AE.py | yzy1996/Artificial-Intelligence | 30a9a2ce1602b9fa9be5981e98885c1c4244cbbd | [
"MIT"
] | 6 | 2020-06-07T08:14:15.000Z | 2021-08-02T09:04:31.000Z | import numpy as np
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
import matplotlib.pyplot as plt
# load data
(x_train, _), _ = keras.datasets.mnist.load_data()
x_train = x_train.astype('float32').reshape((-1, 28, 28, 1)) / 255.
# build with tf
encoder_input = keras.Input... | 29.967742 | 76 | 0.681378 |
8cab92e3b65b518844070c4affd32adef9b4c6b0 | 2,327 | py | Python | third_party/liblouis/copy_tables.py | google-ar/chromium | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | third_party/liblouis/copy_tables.py | harrymarkovskiy/WebARonARCore | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | third_party/liblouis/copy_tables.py | harrymarkovskiy/WebARonARCore | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | #!/usr/bin/env python
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
'''Copies the liblouis braille translation tables to a destination.'''
import liblouis_list_tables
import optparse
import os
import sh... | 34.220588 | 79 | 0.653631 |
8cace4ddecdda2eaa7e084fcbbb6b086d90d5173 | 3,199 | py | Python | tools/embed_resource.py | hunamizawa/ESP8266Clock | 4366bac9308b5f13d08300f11a72780bea374091 | [
"MIT"
] | 1 | 2020-09-21T10:57:13.000Z | 2020-09-21T10:57:13.000Z | tools/embed_resource.py | hunamizawa/ESP8266Clock | 4366bac9308b5f13d08300f11a72780bea374091 | [
"MIT"
] | 9 | 2020-07-10T07:05:10.000Z | 2020-10-28T09:06:38.000Z | tools/embed_resource.py | hunamizawa/ESP8266Clock | 4366bac9308b5f13d08300f11a72780bea374091 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
data_dir PGM_P ( = const char * )
Build/Upload
"""
Import("env", "projenv")
import os, glob, re, hashlib
header_file_header = """// auto-generated by script tools/embed_resource.py
// DO NOT EDIT BY HAND
#ifndef ESP8266Clock_resource_data_H_
#define ESP8266Clock_... | 28.061404 | 100 | 0.668646 |
8cad26aa5c9bb0b79790bafff44921d3d31e5198 | 389 | py | Python | rest/migrations/0032_auto_20200819_2057.py | narcotis/Welbot-V2 | 7525216b61036f62d0be0b5ebb6d3476b73323c8 | [
"MIT"
] | 1 | 2021-06-04T03:28:06.000Z | 2021-06-04T03:28:06.000Z | rest/migrations/0032_auto_20200819_2057.py | narcotis/Welbot-V2 | 7525216b61036f62d0be0b5ebb6d3476b73323c8 | [
"MIT"
] | 2 | 2020-09-09T14:19:10.000Z | 2020-09-09T14:20:21.000Z | rest/migrations/0032_auto_20200819_2057.py | narcotis/Welbot-V2 | 7525216b61036f62d0be0b5ebb6d3476b73323c8 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.8 on 2020-08-19 11:57
from django.db import migrations, models
| 20.473684 | 51 | 0.601542 |
8cadc9a1ef987de2247466e14b6dcd5f4aa056a1 | 220 | py | Python | src/utils/pythonSrc/watchFaceParser/elements/weatherElements/icon.py | chm-dev/amazfitGTSwatchfaceBundle | 4cb04be5215de16628418e9b38152a35d5372d3e | [
"MIT"
] | 49 | 2019-12-18T11:24:56.000Z | 2022-03-28T09:56:27.000Z | src/utils/pythonSrc/watchFaceParser/elements/weatherElements/icon.py | chm-dev/amazfitGTSwatchfaceBundle | 4cb04be5215de16628418e9b38152a35d5372d3e | [
"MIT"
] | 6 | 2020-01-08T21:31:15.000Z | 2022-03-25T19:13:26.000Z | src/utils/pythonSrc/watchFaceParser/elements/weatherElements/icon.py | chm-dev/amazfitGTSwatchfaceBundle | 4cb04be5215de16628418e9b38152a35d5372d3e | [
"MIT"
] | 6 | 2019-12-27T17:30:24.000Z | 2021-09-30T08:11:01.000Z | from watchFaceParser.elements.basicElements.imageSet import ImageSet
| 24.444444 | 68 | 0.622727 |
8cae7ac8e5d8109409bea3d890ec721d39341abb | 905 | py | Python | netbox/dcim/migrations/0133_port_colors.py | TheFlyingCorpse/netbox | a226f06b1beb575011d783b202d76cb74d3b1f79 | [
"Apache-2.0"
] | 4,994 | 2019-07-01T13:15:44.000Z | 2022-03-31T19:55:45.000Z | netbox/dcim/migrations/0133_port_colors.py | TheFlyingCorpse/netbox | a226f06b1beb575011d783b202d76cb74d3b1f79 | [
"Apache-2.0"
] | 4,045 | 2019-07-01T14:24:09.000Z | 2022-03-31T16:07:39.000Z | netbox/dcim/migrations/0133_port_colors.py | TheFlyingCorpse/netbox | a226f06b1beb575011d783b202d76cb74d3b1f79 | [
"Apache-2.0"
] | 1,225 | 2019-07-01T15:34:03.000Z | 2022-03-31T16:47:09.000Z | from django.db import migrations
import utilities.fields
| 27.424242 | 72 | 0.577901 |
8caee3dbd16da48114fd3363e6f670aa34f3a008 | 3,456 | py | Python | main.py | victorsevero/sevs-move | 62f513c7184cd56c033bda421dec16b702fb1b04 | [
"MIT"
] | null | null | null | main.py | victorsevero/sevs-move | 62f513c7184cd56c033bda421dec16b702fb1b04 | [
"MIT"
] | null | null | null | main.py | victorsevero/sevs-move | 62f513c7184cd56c033bda421dec16b702fb1b04 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import os
import shutil
import image_slicer
import PIL.Image
from pynput.keyboard import Key, Controller
import subprocess
import pandas as pd
from tkinter import *
import time
# from IPython import embed
PATH_BG = 'icons_with_bg\\'
PATH_SLICES = 'slices\\'
# def interface():
# top ... | 24.167832 | 85 | 0.618634 |
8caf6ff99d80c76a542d8a7fdffc2f654af14a1f | 42 | py | Python | helpers/__init__.py | sspbft/odin | 30681d314748523cfbade15fc365510c78bbc711 | [
"MIT"
] | null | null | null | helpers/__init__.py | sspbft/odin | 30681d314748523cfbade15fc365510c78bbc711 | [
"MIT"
] | null | null | null | helpers/__init__.py | sspbft/odin | 30681d314748523cfbade15fc365510c78bbc711 | [
"MIT"
] | null | null | null | """Package containing various helpers."""
| 21 | 41 | 0.738095 |
8cb1703d69bcca54d3660bd5eb995176d608f088 | 1,790 | py | Python | ch04/ex05.py | lee-hyeonseung/lab_dl | b8906247b6e0e2586f538081e2efaf47dac34972 | [
"MIT"
] | 1 | 2020-01-08T09:14:46.000Z | 2020-01-08T09:14:46.000Z | ch04/ex05.py | lee-hyeonseung/lab_dl | b8906247b6e0e2586f538081e2efaf47dac34972 | [
"MIT"
] | null | null | null | ch04/ex05.py | lee-hyeonseung/lab_dl | b8906247b6e0e2586f538081e2efaf47dac34972 | [
"MIT"
] | null | null | null | import numpy as np
def numerical_diff(fn, x):
""" Numerical Differential
fn x , x fn () """
h = 1e-4 # 0.0001
return (fn(x + h) - fn(x - h)) / (2 * h)
def f1_prime(x):
""" f1 """
return 0.002 * x + 0.01
def f2(x):
"""x = [x0, x1, ... ]"""
return np.sum(x**2) # x0**2 + x1**2 ... | 24.520548 | 68 | 0.520112 |
8cb71fe9be3f0683efa81efd43d2bbd8f86fa89d | 5,628 | py | Python | pureport_client/commands/accounts/audit_log.py | ellievaughn/pureport-python-client | e0c80c7200549723820169da3d137dd771be3f11 | [
"MIT"
] | 4 | 2019-04-29T17:45:41.000Z | 2019-07-24T15:47:04.000Z | pureport_client/commands/accounts/audit_log.py | ellievaughn/pureport-python-client | e0c80c7200549723820169da3d137dd771be3f11 | [
"MIT"
] | 17 | 2019-05-27T23:35:31.000Z | 2020-10-26T11:41:10.000Z | pureport_client/commands/accounts/audit_log.py | ellievaughn/pureport-python-client | e0c80c7200549723820169da3d137dd771be3f11 | [
"MIT"
] | 2 | 2020-07-14T11:40:32.000Z | 2020-09-23T19:51:53.000Z | # -*- coding: utf-8 -*_
#
# Copyright (c) 2020, Pureport, Inc.
# All Rights Reserved
from __future__ import absolute_import
from click import (
option,
Choice
)
from pureport_client.helpers import format_date
from pureport_client.commands import (
CommandBase,
AccountsMixin
)
EVENT_TYPES = ('USER_L... | 43.96875 | 100 | 0.614428 |
8cb73515afe2c119b5f6d38d0a2b556bf02c8217 | 3,694 | py | Python | extras.py | pyaf/severstal-steel-defect-detection | 68a0df4164e84803b6cba78597a079d3736b4e00 | [
"MIT"
] | null | null | null | extras.py | pyaf/severstal-steel-defect-detection | 68a0df4164e84803b6cba78597a079d3736b4e00 | [
"MIT"
] | null | null | null | extras.py | pyaf/severstal-steel-defect-detection | 68a0df4164e84803b6cba78597a079d3736b4e00 | [
"MIT"
] | null | null | null | import os
from tqdm import tqdm
import numpy as np
import pandas as pd
import os
import pdb
import cv2
import time
import json
import torch
import random
import scipy
import logging
import traceback
import numpy as np
from datetime import datetime
# from config import HOME
from tensorboard_logger import log_value, log... | 28.635659 | 78 | 0.636167 |
8cb9d99f25ca4d88bf464b8e38a7ea2815155e6f | 762 | py | Python | polling_stations/apps/data_importers/management/commands/import_scarborough.py | DemocracyClub/UK-Polling-Stations | d5c428fc7fbccf0c13a84fa0045dfd332b2879e7 | [
"BSD-3-Clause"
] | 29 | 2015-03-10T08:41:34.000Z | 2022-01-12T08:51:38.000Z | polling_stations/apps/data_importers/management/commands/import_scarborough.py | DemocracyClub/UK-Polling-Stations | d5c428fc7fbccf0c13a84fa0045dfd332b2879e7 | [
"BSD-3-Clause"
] | 4,112 | 2015-04-01T21:27:38.000Z | 2022-03-31T19:22:11.000Z | polling_stations/apps/data_importers/management/commands/import_scarborough.py | DemocracyClub/UK-Polling-Stations | d5c428fc7fbccf0c13a84fa0045dfd332b2879e7 | [
"BSD-3-Clause"
] | 31 | 2015-03-18T14:52:50.000Z | 2022-02-24T10:31:07.000Z | from data_importers.management.commands import BaseHalaroseCsvImporter
| 30.48 | 87 | 0.620735 |
8cba3acfbc1a50238c1a027941fbc4491ae9149b | 1,178 | py | Python | ccfx/scripts/testthreadingutil.py | ytetsuwo/ccfinder-core | e20f390e8d26f900c68d8656b9cfb9cbaa3716d9 | [
"MIT"
] | 2 | 2019-10-27T08:01:19.000Z | 2021-12-20T07:53:02.000Z | ccfx/scripts/testthreadingutil.py | ytetsuwo/ccfinder-core | e20f390e8d26f900c68d8656b9cfb9cbaa3716d9 | [
"MIT"
] | 5 | 2019-05-02T16:36:39.000Z | 2019-05-12T16:04:45.000Z | ccfx/scripts/testthreadingutil.py | ytetsuwo/ccfinder-core | e20f390e8d26f900c68d8656b9cfb9cbaa3716d9 | [
"MIT"
] | 2 | 2019-08-04T13:21:51.000Z | 2021-03-07T00:18:36.000Z |
import threadingutil
import sys
import random
import time
random.seed(0)
if __name__ == '__main__':
usage = "Usage: testthreadingutil.py [NUMWORKER [INPUTSIZE]]"
numWorker = 4
inputSize = 30
if len(sys.argv) >= 2:
if sys.argv[1] == "-h":
print usage
sys.exit... | 26.772727 | 119 | 0.596774 |
8cbc17eb08f7d57b4a914ccc5109e1694aa14ad8 | 648 | py | Python | src/server.py | openbrisk/brisk-runtime-python | 766cea7749f0f072eb36de1b05751a3e1c761533 | [
"MIT"
] | null | null | null | src/server.py | openbrisk/brisk-runtime-python | 766cea7749f0f072eb36de1b05751a3e1c761533 | [
"MIT"
] | null | null | null | src/server.py | openbrisk/brisk-runtime-python | 766cea7749f0f072eb36de1b05751a3e1c761533 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import logging
import sys
import imp
import os
from flask import Flask, request, abort, g
app = Flask(__name__)
configure_logging(logging.DEBUG)
app.logger.info("Listening port 8080 ...")
app.run(host='0.0.0.0', port=8080) | 24 | 83 | 0.695988 |
8cbee8bc9e37824427f878a582ea24c70d8c204c | 1,400 | py | Python | slybot/slybot/utils.py | rmcwilliams2004/mapping | 55f97e61fc558d243a0806ae8bf4a26b080026de | [
"BSD-3-Clause"
] | 8 | 2015-03-16T20:30:50.000Z | 2021-09-21T13:05:46.000Z | slybot/slybot/utils.py | btomashvili/portia | 9039140269f2cfca588a1feec6cc793cba87f202 | [
"BSD-3-Clause"
] | 1 | 2018-10-24T09:29:00.000Z | 2018-10-24T09:29:00.000Z | slybot/slybot/utils.py | btomashvili/portia | 9039140269f2cfca588a1feec6cc793cba87f202 | [
"BSD-3-Clause"
] | 4 | 2015-02-01T01:17:45.000Z | 2022-03-04T06:07:25.000Z | from urlparse import urlparse
import os
import json
from scrapely.htmlpage import HtmlPage
def iter_unique_scheme_hostname(urls):
"""Return an iterator of tuples (scheme, hostname) over the given urls,
filtering dupes
"""
scheme_hostname = set()
for x in urls:
p = urlparse(x)
schem... | 36.842105 | 96 | 0.638571 |
8cbf9d0c7839d5ffdf3819b9203c774340d2b8a5 | 413 | py | Python | reppy/util.py | PLPeeters/reppy | 7a1aceb273c25b47908a6f81cdd894da72798b45 | [
"MIT"
] | 137 | 2015-02-11T17:39:16.000Z | 2022-03-03T22:04:51.000Z | reppy/util.py | PLPeeters/reppy | 7a1aceb273c25b47908a6f81cdd894da72798b45 | [
"MIT"
] | 73 | 2015-01-05T18:58:45.000Z | 2021-04-16T11:53:19.000Z | reppy/util.py | PLPeeters/reppy | 7a1aceb273c25b47908a6f81cdd894da72798b45 | [
"MIT"
] | 40 | 2015-02-27T17:22:03.000Z | 2022-02-19T16:34:43.000Z | '''Utility functions.'''
import email
def parse_date(string):
'''Return a timestamp for the provided datestring, described by RFC 7231.'''
parsed = email.utils.parsedate_tz(string)
if parsed is None:
raise ValueError("Invalid time.")
parsed = list(parsed)
# Default time zone is GMT/UTC
... | 27.533333 | 80 | 0.682809 |
8cbfb27786acd690d2a47ce15ea1c10002446ef7 | 43,121 | py | Python | bin/design.py | broadinstitute/catch | 2fedca15f921116f580de8b2ae7ac9972932e59e | [
"MIT"
] | 58 | 2018-01-24T16:31:37.000Z | 2022-02-25T07:46:35.000Z | bin/design.py | broadinstitute/catch | 2fedca15f921116f580de8b2ae7ac9972932e59e | [
"MIT"
] | 29 | 2018-04-17T17:36:06.000Z | 2022-02-25T11:48:58.000Z | bin/design.py | broadinstitute/catch | 2fedca15f921116f580de8b2ae7ac9972932e59e | [
"MIT"
] | 16 | 2018-05-23T12:19:41.000Z | 2021-08-09T04:16:00.000Z | #!/usr/bin/env python3
"""Design probes for genome capture.
This is the main executable of CATCH for probe design.
"""
import argparse
import importlib
import logging
import os
import random
from catch import coverage_analysis
from catch import probe
from catch.filter import adapter_filter
from catch.filter import d... | 50.316219 | 91 | 0.616475 |
8cc0682cc0b1ed8dabfc6863bc76066c537d9cd6 | 51 | py | Python | autograd/__init__.py | mattjj/autograd_tutorial | c32947fbd7f130d791ab1e277a0feed05cb3da5f | [
"MIT"
] | 704 | 2018-01-30T16:41:47.000Z | 2022-03-23T02:03:08.000Z | autograd/__init__.py | mattjj/autograd_tutorial | c32947fbd7f130d791ab1e277a0feed05cb3da5f | [
"MIT"
] | 6 | 2018-01-30T20:43:49.000Z | 2020-04-27T13:27:08.000Z | autograd/__init__.py | mattjj/autograd_tutorial | c32947fbd7f130d791ab1e277a0feed05cb3da5f | [
"MIT"
] | 88 | 2018-02-03T16:36:54.000Z | 2022-02-09T04:21:30.000Z | from .differential_operators import make_vjp, grad
| 25.5 | 50 | 0.862745 |
8cc0ae2e9a623354a047f26bbb36e199b6e49eb8 | 2,975 | py | Python | propara/utils/prostruct_predicted_json_to_tsv_grid.py | keisks/propara | 49fa8fe0481291df18b2c7b48e7ba1dafaad48e2 | [
"Apache-2.0"
] | 84 | 2018-06-02T02:00:53.000Z | 2022-03-13T12:17:42.000Z | propara/utils/prostruct_predicted_json_to_tsv_grid.py | keisks/propara | 49fa8fe0481291df18b2c7b48e7ba1dafaad48e2 | [
"Apache-2.0"
] | 3 | 2018-10-31T00:28:31.000Z | 2020-05-12T01:06:53.000Z | propara/utils/prostruct_predicted_json_to_tsv_grid.py | keisks/propara | 49fa8fe0481291df18b2c7b48e7ba1dafaad48e2 | [
"Apache-2.0"
] | 13 | 2018-09-14T20:37:51.000Z | 2021-03-23T09:24:49.000Z | import json
import sys
from pprint import pprint
from processes.data.propara_dataset_reader import Action
# Input: json format generated by ProparaPredictor
# paraid": "1114",
# "sentence_texts": ["Rainwater falls onto the soil.", "The rainwater seeps into the soil.",...."],
# "participants": ["rainwater; water", "... | 43.75 | 139 | 0.644034 |
8cc1bbd922f5bc29a45d3aa2e4e041703bf3da65 | 4,231 | py | Python | impede-app/server/py/filter_library.py | ThatSnail/impede | 126a85a4efc6d6699a383b86ffcef35743cafb33 | [
"MIT"
] | 1 | 2016-02-01T22:54:02.000Z | 2016-02-01T22:54:02.000Z | impede-app/server/py/filter_library.py | ThatSnail/impede | 126a85a4efc6d6699a383b86ffcef35743cafb33 | [
"MIT"
] | null | null | null | impede-app/server/py/filter_library.py | ThatSnail/impede | 126a85a4efc6d6699a383b86ffcef35743cafb33 | [
"MIT"
] | null | null | null |
""" Module that contains some example filters """
import numpy as np
import matplotlib.pyplot as plt
from graph import Node, Edge, Graph
from resistor import Resistor
from capacitor import Capacitor
from diode import Diode
from opamp import Opamp
from wire import Wire
from units import Units
from filter import Filte... | 32.79845 | 90 | 0.676436 |
8cc1d660bbd21361e77d7c6470d18d4cac04510e | 2,493 | py | Python | main_rpi.py | adadesions/AutoWestBin | 3156292693426b627d0b24981e8da557ea58be92 | [
"BSD-3-Clause"
] | null | null | null | main_rpi.py | adadesions/AutoWestBin | 3156292693426b627d0b24981e8da557ea58be92 | [
"BSD-3-Clause"
] | 6 | 2020-09-26T01:05:13.000Z | 2022-03-12T00:29:41.000Z | main_rpi.py | adadesions/AutoWestBin | 3156292693426b627d0b24981e8da557ea58be92 | [
"BSD-3-Clause"
] | null | null | null | from imageai.Prediction import ImagePrediction
import cv2
import os
import time
import RPi.GPIO as gpio
if __name__ == '__main__':
gpio.setwarnings(False)
gpio.setmode(gpio.BOARD)
gpio.setup(11, gpio.IN)
print("AI is processing...")
# Capture an image and save to disk
image_process()
#... | 27.7 | 113 | 0.606097 |
8cc3cf10fda2a01f3a17c60d56fd79e90e75b690 | 1,290 | py | Python | example/mini_mnist/rename_nodes.py | ciandt-d1/tf_image_classification | 76ff4cb9ec35418eb20ea3240221bbfb88970737 | [
"MIT"
] | null | null | null | example/mini_mnist/rename_nodes.py | ciandt-d1/tf_image_classification | 76ff4cb9ec35418eb20ea3240221bbfb88970737 | [
"MIT"
] | null | null | null | example/mini_mnist/rename_nodes.py | ciandt-d1/tf_image_classification | 76ff4cb9ec35418eb20ea3240221bbfb88970737 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
import sys
import os
import argparse
import logging
import tensorflow as tf
from cnn_architecture_inception_v4 import cnn_architecture
tf.logging.set_verbosity(tf.logging.INFO)
# Set default flags for the output directories
FLAGS = tf.app.flags.FLAGS
tf.app.flags.DEFINE_s... | 25.8 | 73 | 0.714729 |
8cc58816df23d3d88b38c25c7d3009e7519f3e78 | 2,458 | py | Python | pyopentsdb/put.py | mikecokina/pyopentsdb | b8d78e8f42aed4ebbd6ac3aff925071de41d6b52 | [
"MIT"
] | 2 | 2018-05-09T08:34:30.000Z | 2018-09-25T22:42:09.000Z | pyopentsdb/put.py | mikecokina/pyopentsdb | b8d78e8f42aed4ebbd6ac3aff925071de41d6b52 | [
"MIT"
] | 2 | 2018-12-24T10:51:30.000Z | 2019-01-21T13:55:11.000Z | pyopentsdb/put.py | mikecokina/pyopentsdb | b8d78e8f42aed4ebbd6ac3aff925071de41d6b52 | [
"MIT"
] | null | null | null | from pyopentsdb.utils import request_post
from pyopentsdb import errors
def put(host, r_session, data, **kwargs):
"""
:param host: str
:param r_session: requests.Session
:param data: list of dicts or dict
:param kwargs: see bellow
:**kwargs options**:
* **summary** * -- bo... | 42.37931 | 114 | 0.603743 |