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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7c2b65379c3bd0e388f419a0d07e73a9770aad35 | 48,787 | py | Python | visnav/algo/orig/tools.py | oknuutti/hw_visnav | 5254b8bdd146548413554c00e6e76264a2540e8b | [
"MIT"
] | null | null | null | visnav/algo/orig/tools.py | oknuutti/hw_visnav | 5254b8bdd146548413554c00e6e76264a2540e8b | [
"MIT"
] | null | null | null | visnav/algo/orig/tools.py | oknuutti/hw_visnav | 5254b8bdd146548413554c00e6e76264a2540e8b | [
"MIT"
] | null | null | null | import math
import time
import numpy as np
import numba as nb
import quaternion # adds to numpy # noqa # pylint: disable=unused-import
import sys
import scipy
from astropy.coordinates import SkyCoord
from scipy.interpolate import RectBivariateSpline
from scipy.interpolate import NearestNDInterpolator
# from scipy.s... | 33.576738 | 130 | 0.579335 |
7c2bf254c4e2082b3c9d6ed73d3f8891d0fa09df | 4,245 | py | Python | cirtorch/filters/sobel.py | Tarekbouamer/Image-Retrieval-for-Image-Based-Localization | fcad9af4f558bebb3cbec1d08e49603a452f439d | [
"BSD-3-Clause"
] | 3 | 2021-01-15T13:58:22.000Z | 2021-01-22T00:03:34.000Z | cirtorch/filters/sobel.py | Tarekbouamer/Image-Retrieval-for-Image-Based-Localization | fcad9af4f558bebb3cbec1d08e49603a452f439d | [
"BSD-3-Clause"
] | null | null | null | cirtorch/filters/sobel.py | Tarekbouamer/Image-Retrieval-for-Image-Based-Localization | fcad9af4f558bebb3cbec1d08e49603a452f439d | [
"BSD-3-Clause"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from .kernels import (
get_spatial_gradient_kernel2d,
get_spatial_gradient_kernel3d,
normalize_kernel2d
)
def spatial_gradient(input, mode='sobel', order=1, normalized=True):
"""
Computes the first order image derivative in bo... | 28.877551 | 103 | 0.627562 |
7c2c03c407ba0a2ba9a613836bc2fb4601d6b4a8 | 896 | py | Python | PythonCookbook/concurrent_test/findrobots.py | xu6148152/Binea_Python_Project | d943eb5f4685d08f080b372dcf1a7cbd5d63efed | [
"MIT"
] | null | null | null | PythonCookbook/concurrent_test/findrobots.py | xu6148152/Binea_Python_Project | d943eb5f4685d08f080b372dcf1a7cbd5d63efed | [
"MIT"
] | null | null | null | PythonCookbook/concurrent_test/findrobots.py | xu6148152/Binea_Python_Project | d943eb5f4685d08f080b372dcf1a7cbd5d63efed | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
import gzip
import io
import glob
from concurrent import futures
def find_robots(filename):
'''
Find all of the hosts that access robots.txt in a single log file
'''
robots = set()
with gzip.open(filename) as f:
for line in io.TextIOWrapper(f, encoding='ascii'):
... | 23.578947 | 69 | 0.618304 |
7c2c2ee21f857be97b79a37957d75b5c80b83234 | 421 | py | Python | docker/setup.py | sreynit02/RunestoneServer | 2d72fd1c26264a8d7d88e2bccfe9bfbb4d8b9a98 | [
"MIT"
] | null | null | null | docker/setup.py | sreynit02/RunestoneServer | 2d72fd1c26264a8d7d88e2bccfe9bfbb4d8b9a98 | [
"MIT"
] | null | null | null | docker/setup.py | sreynit02/RunestoneServer | 2d72fd1c26264a8d7d88e2bccfe9bfbb4d8b9a98 | [
"MIT"
] | null | null | null | # ******************************************************************
# |docname| - Provide `docker_tools.py` as the script `docker-tools`
# ******************************************************************
from setuptools import setup
setup(
name="runestone-docker-tools",
version="0.1",
install_requires=[... | 30.071429 | 68 | 0.444181 |
7c2c549754955b919f978ac6624f7aa2371b569a | 19,500 | py | Python | PS12/api2.py | AbhinavSingh-21f1002369/AFKZenCoders | 344475e7d5d60c09637b0bec28c5dab1befe2b65 | [
"MIT"
] | null | null | null | PS12/api2.py | AbhinavSingh-21f1002369/AFKZenCoders | 344475e7d5d60c09637b0bec28c5dab1befe2b65 | [
"MIT"
] | null | null | null | PS12/api2.py | AbhinavSingh-21f1002369/AFKZenCoders | 344475e7d5d60c09637b0bec28c5dab1befe2b65 | [
"MIT"
] | 2 | 2021-10-11T09:28:00.000Z | 2021-10-14T10:30:11.000Z | from flask import Flask, render_template, request, jsonify,send_file, redirect,session, url_for
from werkzeug import secure_filename
import os
import utilities, queries
import logger
from flask_cors import CORS, cross_origin
from datetime import timedelta
app = Flask(__name__)
CORS(app)
cors = CORS(app, resources={r"/*... | 38.16047 | 182 | 0.655385 |
7c2c664c7e1b0b10556e368192b5c6b6dfeac1d6 | 13,634 | py | Python | cnnblstm_with_adabn/cnnblstm_with_adabn.py | Fassial/Air-Writing-with-TL | 9b9047c5bd5aef3a869e2d5166be1c0cf0c5ccf0 | [
"MIT"
] | 1 | 2021-06-16T16:45:01.000Z | 2021-06-16T16:45:01.000Z | cnnblstm_with_adabn/cnnblstm_with_adabn.py | Fassial/Air-Writing-with-TL | 9b9047c5bd5aef3a869e2d5166be1c0cf0c5ccf0 | [
"MIT"
] | null | null | null | cnnblstm_with_adabn/cnnblstm_with_adabn.py | Fassial/Air-Writing-with-TL | 9b9047c5bd5aef3a869e2d5166be1c0cf0c5ccf0 | [
"MIT"
] | 1 | 2020-04-21T01:31:26.000Z | 2020-04-21T01:31:26.000Z | import os
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
import matplotlib.pyplot as plt
# local model
import sys
sys.path.append("../network")
import Coral
from lstm import LSTMHardSigmoid
from AdaBN import AdaBN
sys.path.append("../network/Aut... | 36.068783 | 211 | 0.710943 |
7c2d2c77ae28e087d253ce05110db6593a6b0fcc | 26,658 | py | Python | src/emmental/model.py | woffett/emmental | 87884fcd89662cca45f0ea0f78cff73380cc47c8 | [
"MIT"
] | null | null | null | src/emmental/model.py | woffett/emmental | 87884fcd89662cca45f0ea0f78cff73380cc47c8 | [
"MIT"
] | null | null | null | src/emmental/model.py | woffett/emmental | 87884fcd89662cca45f0ea0f78cff73380cc47c8 | [
"MIT"
] | null | null | null | """Emmental model."""
import itertools
import logging
import os
from collections import defaultdict
from collections.abc import Iterable
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union
import numpy as np
import torch
from numpy import ndarray
from torch import Tensor, nn as nn
from torch.nn i... | 38.028531 | 88 | 0.534249 |
7c2daa2465bd8777ef8940cbc518e195f59d4ad9 | 4,578 | py | Python | server/ws_server.py | jangxx/OVRT_Soundpad | 2f9b2cd19421bc7b5586a3dcded2998d381ba688 | [
"MIT"
] | 1 | 2021-09-29T01:45:35.000Z | 2021-09-29T01:45:35.000Z | server/ws_server.py | jangxx/OVRT_Soundpad | 2f9b2cd19421bc7b5586a3dcded2998d381ba688 | [
"MIT"
] | 2 | 2021-09-28T08:53:09.000Z | 2021-10-20T01:06:15.000Z | server/ws_server.py | jangxx/OVRT_Soundpad | 2f9b2cd19421bc7b5586a3dcded2998d381ba688 | [
"MIT"
] | null | null | null | import asyncio, json
from config import Config
from soundpad_manager import SoundpadManager
from version import BRIDGE_VERSION
import websockets
from sanic.log import logger
# yes I know that it's very lazy to run a separate WS and HTTP server, when both could be run on the same port
# I don't like sanics ... | 33.661765 | 140 | 0.668633 |
7c2db7d1e1ec02302af64420555ad08513981b88 | 18,565 | py | Python | tests/route_generator_test.py | CityPulse/dynamic-bus-scheduling | 7516283be5a374fe0a27715f4facee11c847f39f | [
"MIT"
] | 14 | 2016-09-24T11:42:48.000Z | 2021-06-11T08:06:23.000Z | tests/route_generator_test.py | CityPulse/CityPulse-Dynamic-Bus-Scheduler | 7516283be5a374fe0a27715f4facee11c847f39f | [
"MIT"
] | 1 | 2016-07-08T09:16:42.000Z | 2016-07-08T09:16:42.000Z | tests/route_generator_test.py | CityPulse/dynamic-bus-scheduling | 7516283be5a374fe0a27715f4facee11c847f39f | [
"MIT"
] | 5 | 2016-06-17T12:46:28.000Z | 2021-09-25T19:04:37.000Z | #!/usr/local/bin/python
# -*- coding: utf-8 -*-
"""
- LICENCE
The MIT License (MIT)
Copyright (c) 2016 Eleftherios Anagnostopoulos for Ericsson AB (EU FP7 CityPulse Project)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software... | 43.579812 | 119 | 0.649609 |
7c2f595fee4e21dc84c6666b03b2174e6d5731e0 | 8,108 | py | Python | tensorforce/tests/test_model_save_restore.py | gian1312/suchen | df863140fd8df1ac2e195cbdfa4756f09f962270 | [
"Apache-2.0"
] | null | null | null | tensorforce/tests/test_model_save_restore.py | gian1312/suchen | df863140fd8df1ac2e195cbdfa4756f09f962270 | [
"Apache-2.0"
] | null | null | null | tensorforce/tests/test_model_save_restore.py | gian1312/suchen | df863140fd8df1ac2e195cbdfa4756f09f962270 | [
"Apache-2.0"
] | 1 | 2019-11-29T12:28:33.000Z | 2019-11-29T12:28:33.000Z | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import unittest
import pytest
from tensorforce import TensorForceError
from tensorforce.core.networks import LayeredNetwork
from tensorforce.models import DistributionModel
from tensorforce.tests.minimal_test ... | 39.940887 | 119 | 0.662309 |
7c2f74f5570ad8ece2d2a501cd63b62951484c2c | 844 | py | Python | guid.py | lihuiba/SoftSAN | 1b8ab2cae92b7aac34211909b27d4ebe595275d7 | [
"Apache-2.0"
] | 1 | 2015-08-02T09:53:18.000Z | 2015-08-02T09:53:18.000Z | guid.py | lihuiba/SoftSAN | 1b8ab2cae92b7aac34211909b27d4ebe595275d7 | [
"Apache-2.0"
] | null | null | null | guid.py | lihuiba/SoftSAN | 1b8ab2cae92b7aac34211909b27d4ebe595275d7 | [
"Apache-2.0"
] | 2 | 2018-03-21T04:59:50.000Z | 2019-12-03T15:54:17.000Z | import random
import messages_pb2 as msg
| 19.181818 | 55 | 0.562796 |
7c30b20fb26e70f99e3a1516c799910198cc11b1 | 17,421 | py | Python | mango/__init__.py | kronael/mango-explorer | 6292c089c2a3d1ff2cf0b50b815849451a50ec39 | [
"MIT"
] | null | null | null | mango/__init__.py | kronael/mango-explorer | 6292c089c2a3d1ff2cf0b50b815849451a50ec39 | [
"MIT"
] | null | null | null | mango/__init__.py | kronael/mango-explorer | 6292c089c2a3d1ff2cf0b50b815849451a50ec39 | [
"MIT"
] | null | null | null | # In --strict mode, mypy complains about imports unless they're done this way.
#
# It complains 'Module has no attribute ABC' or 'Module "mango" does not explicitly export
# attribute "XYZ"; implicit reexport disabled'. We could dial that back by using the
# --implicit-reexport parameter, but let's keep things strict.
... | 66.747126 | 126 | 0.89306 |
7c30ba325b9fb817b1364d8d7e3e057255111d8c | 259 | py | Python | letters_of_sherlock.py | MariannaJan/LettersOfSherlock | cf356c002078d4e0e6bcf1a669bc8b358680460f | [
"FTL"
] | null | null | null | letters_of_sherlock.py | MariannaJan/LettersOfSherlock | cf356c002078d4e0e6bcf1a669bc8b358680460f | [
"FTL"
] | null | null | null | letters_of_sherlock.py | MariannaJan/LettersOfSherlock | cf356c002078d4e0e6bcf1a669bc8b358680460f | [
"FTL"
] | null | null | null | import lettercounter as lc
#Books form Gutenberg Project: https://www.gutenberg.org/ebooks/author/69
lc.showPlots(text_directory_pathname="./Books/",
title="Sir Arthur Conan Doyle's favourite letters",
legend_label_main="in Doyle's stories") | 37 | 73 | 0.749035 |
7c31ff3f832fdd4d6ba0dc485287be931476d8a3 | 1,017 | py | Python | BB/bbObjects/items/bbTurret.py | mwaitzman/GOF2BountyBot | b66026228b752b07ac4734ca74b60730dbd74995 | [
"MIT"
] | null | null | null | BB/bbObjects/items/bbTurret.py | mwaitzman/GOF2BountyBot | b66026228b752b07ac4734ca74b60730dbd74995 | [
"MIT"
] | null | null | null | BB/bbObjects/items/bbTurret.py | mwaitzman/GOF2BountyBot | b66026228b752b07ac4734ca74b60730dbd74995 | [
"MIT"
] | null | null | null | from .bbItem import bbItem
from ...bbConfig import bbData
| 36.321429 | 145 | 0.66765 |
7c32d21e81a25b4bfc714d53125ce26089327176 | 263 | py | Python | what_can_i_cook/urls.py | s-maibuecher/what_can_i_cook | 07d0eb1e1862fad299477b800654e895d7f8829a | [
"MIT"
] | null | null | null | what_can_i_cook/urls.py | s-maibuecher/what_can_i_cook | 07d0eb1e1862fad299477b800654e895d7f8829a | [
"MIT"
] | null | null | null | what_can_i_cook/urls.py | s-maibuecher/what_can_i_cook | 07d0eb1e1862fad299477b800654e895d7f8829a | [
"MIT"
] | null | null | null | from django.urls import path
from what_can_i_cook.views import WCICFilterView, WCICResultView
app_name = "wcic"
urlpatterns = [
path("", WCICFilterView.as_view(), name="wcic-start"),
path("results/", WCICResultView.as_view(), name="wcic-results"),
]
| 20.230769 | 68 | 0.722433 |
7c32daa41ae2a8f92a0d91d061b5264ea9984602 | 436 | py | Python | shared/templates/grub2_bootloader_argument/template.py | justchris1/scap-security-guide | 030097afa80041fcdffc537a49c09896efedadca | [
"BSD-3-Clause"
] | 1,138 | 2018-09-05T06:31:44.000Z | 2022-03-31T03:38:24.000Z | shared/templates/grub2_bootloader_argument/template.py | justchris1/scap-security-guide | 030097afa80041fcdffc537a49c09896efedadca | [
"BSD-3-Clause"
] | 4,743 | 2018-09-04T15:14:04.000Z | 2022-03-31T23:17:57.000Z | shared/templates/grub2_bootloader_argument/template.py | justchris1/scap-security-guide | 030097afa80041fcdffc537a49c09896efedadca | [
"BSD-3-Clause"
] | 400 | 2018-09-08T20:08:49.000Z | 2022-03-30T20:54:32.000Z | import ssg.utils
| 36.333333 | 83 | 0.623853 |
7c34376a6bdd5ec8372f4490b569f441abff9288 | 3,598 | py | Python | preprocess.py | NNDEV1/NMTWithLuongAttention | e6f11d9e8c5f999d413fa0dc51219e979a8f975c | [
"MIT"
] | 4 | 2021-07-09T19:17:47.000Z | 2022-01-04T14:54:11.000Z | preprocess.py | NNDEV1/NMTWithLuongAttention | e6f11d9e8c5f999d413fa0dc51219e979a8f975c | [
"MIT"
] | null | null | null | preprocess.py | NNDEV1/NMTWithLuongAttention | e6f11d9e8c5f999d413fa0dc51219e979a8f975c | [
"MIT"
] | null | null | null | import tensorflow as tf
import os
import contractions
import tensorflow as tf
import pandas as pd
import numpy as np
import time
import rich
from rich.progress import track
import spacy
from config import params
#Preprocessing Text
| 32.414414 | 106 | 0.644525 |
7c3462f9e646dbe27aad64fea0cc1723870ee413 | 1,665 | py | Python | setup.py | johannesulf/dsigma | 729337c94669f4a0fdacb51b175df1e13e26304c | [
"MIT"
] | 4 | 2020-06-09T01:09:58.000Z | 2021-09-26T16:39:16.000Z | setup.py | johannesulf/dsigma | 729337c94669f4a0fdacb51b175df1e13e26304c | [
"MIT"
] | null | null | null | setup.py | johannesulf/dsigma | 729337c94669f4a0fdacb51b175df1e13e26304c | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
from distutils.extension import Extension
from distutils.command.sdist import sdist
try:
from Cython.Build import cythonize
USE_CYTHON = True
except ImportError:
USE_CYTHON = False
ext = 'pyx' if USE_CYTHON else 'c'
extensions = [Extension(
'dsigma.precomput... | 30.272727 | 76 | 0.667868 |
7c34972839ffa0fc13d463ba6725ab4c70743477 | 1,967 | py | Python | face_detector/modules/mod_faceDetection.py | jtfan3/face_detection | 82e3bc839bf12c956f3166c07012912a0638048f | [
"MIT"
] | null | null | null | face_detector/modules/mod_faceDetection.py | jtfan3/face_detection | 82e3bc839bf12c956f3166c07012912a0638048f | [
"MIT"
] | null | null | null | face_detector/modules/mod_faceDetection.py | jtfan3/face_detection | 82e3bc839bf12c956f3166c07012912a0638048f | [
"MIT"
] | null | null | null | import cv2
import mediapipe as mp
| 40.979167 | 154 | 0.620234 |
7c3522929deb4bb2524b97c1af2b5f08df9a050e | 5,585 | py | Python | backend/0_publish_audio.py | bmj-hackathon/ethberlinzwei-babelfish_3_0 | e986ad1b9fa896f20d7cdd296d130d804f55ecfa | [
"Apache-2.0"
] | 1 | 2019-08-28T12:12:09.000Z | 2019-08-28T12:12:09.000Z | backend/0_publish_audio.py | bmj-hackathon/ethberlinzwei-babelfish_3_0 | e986ad1b9fa896f20d7cdd296d130d804f55ecfa | [
"Apache-2.0"
] | 8 | 2020-09-07T01:00:44.000Z | 2022-03-02T05:19:32.000Z | backend/0_publish_audio.py | bmj-hackathon/ethberlinzwei-babelfish_3_0 | e986ad1b9fa896f20d7cdd296d130d804f55ecfa | [
"Apache-2.0"
] | 3 | 2019-08-24T20:36:08.000Z | 2021-02-18T20:28:11.000Z | import sys
import logging
# loggers_dict = logging.Logger.manager.loggerDict
#
# logger = logging.getLogger()
# logger.handlers = []
#
# # Set level
# logger.setLevel(logging.DEBUG)
#
# # FORMAT = "%(asctime)s - %(levelno)s - %(module)-15s - %(funcName)-15s - %(message)s"
# # FORMAT = "%(asctime)s %(levelno)s: %(modul... | 36.986755 | 128 | 0.708684 |
7c3538aced9958f0470322c0f12570121760b4ab | 593 | py | Python | src/pyRofex/components/messages.py | guillerminaamorin/pyRofex | 14fd623ab1f1a3213e51a9454485ed478912075f | [
"MIT"
] | 2 | 2020-12-15T22:30:40.000Z | 2020-12-15T22:30:51.000Z | src/pyRofex/components/messages.py | guillerminaamorin/pyRofex | 14fd623ab1f1a3213e51a9454485ed478912075f | [
"MIT"
] | null | null | null | src/pyRofex/components/messages.py | guillerminaamorin/pyRofex | 14fd623ab1f1a3213e51a9454485ed478912075f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
pyRofex.components.messages
Defines APIs messages templates
"""
# Template for a Market Data Subscription message
MARKET_DATA_SUBSCRIPTION = '{{"type":"smd","level":1, "entries":[{entries}],"products":[{symbols}]}}'
# Template for an Order Subscription message
ORDER_SUBSCRIPTION = ... | 37.0625 | 101 | 0.689713 |
7c3550de30b723134e6acdc5e3a7cc90bba86785 | 405 | py | Python | course/task_6/flask_app.py | duboviy/async | 5055daddc66e5335fb772aeb59493cc63e4a2739 | [
"MIT"
] | 6 | 2016-10-05T16:12:55.000Z | 2019-04-22T11:43:21.000Z | course/task_6/flask_app.py | duboviy/async | 5055daddc66e5335fb772aeb59493cc63e4a2739 | [
"MIT"
] | null | null | null | course/task_6/flask_app.py | duboviy/async | 5055daddc66e5335fb772aeb59493cc63e4a2739 | [
"MIT"
] | 2 | 2016-11-01T21:32:27.000Z | 2016-12-24T14:00:43.000Z | #!/usr/bin/env python3.4
from flask import Flask
import requests
from fibonacci import fibonacci as fib
app = Flask(__name__)
if __name__ == "__main__":
app.run(host='0.0.0.0', port=8082, debug=True)
| 18.409091 | 74 | 0.671605 |
7c359f84b8ac8bafab4c67c76d69bd091361babb | 3,613 | py | Python | nexpose/nexpose_vulnerabilityexception.py | Patralos/nexpose-client-python | bec81da29883b1b004046e29a9e7f7a6686467c1 | [
"BSD-3-Clause"
] | 29 | 2017-06-27T04:44:03.000Z | 2021-11-29T15:04:00.000Z | nexpose/nexpose_vulnerabilityexception.py | Patralos/nexpose-client-python | bec81da29883b1b004046e29a9e7f7a6686467c1 | [
"BSD-3-Clause"
] | 40 | 2017-06-21T18:00:49.000Z | 2018-06-06T21:13:34.000Z | nexpose/nexpose_vulnerabilityexception.py | Patralos/nexpose-client-python | bec81da29883b1b004046e29a9e7f7a6686467c1 | [
"BSD-3-Clause"
] | 23 | 2017-07-18T16:40:57.000Z | 2021-01-26T09:58:53.000Z | # Future Imports for py2/3 backwards compat.
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from builtins import object
from .xml_utils import get_attribute, get_content_of
from future import standard_library
standard_library.install_aliases()
| 42.011628 | 164 | 0.715749 |
7c36efe3001b7afd18524c2fd69ee073ca3d2a5c | 144 | py | Python | myproject/IND_Project/backend/signup/apps.py | captainTOKIO/Premchand_Aug2022_fullstack_august_python1 | 5fbbdd106a764c2f862cf933fdcd69d6bf4ebdf0 | [
"MIT"
] | 4 | 2021-06-30T07:14:22.000Z | 2021-08-16T04:52:35.000Z | myproject/IND_Project/backend/signup/apps.py | captainTOKIO/Premchand_Aug2022_fullstack_august_python1 | 5fbbdd106a764c2f862cf933fdcd69d6bf4ebdf0 | [
"MIT"
] | 1 | 2022-03-28T21:14:05.000Z | 2022-03-28T21:14:05.000Z | signup/apps.py | ericu-u/GirlHacks | 4e800ab8ab3e33a490dc771759ca8b9be08e1441 | [
"MIT"
] | 4 | 2021-06-27T04:26:21.000Z | 2021-08-13T13:00:56.000Z | from django.apps import AppConfig
| 20.571429 | 56 | 0.756944 |
7c378f7b0a34c442460ca831372ef84873f73309 | 768 | py | Python | pymc/mc_enum.py | cherish-web/pymc | 9c322abfdcceca0a78b633d85da23e1290c036c8 | [
"Apache-2.0"
] | 4 | 2021-05-01T12:43:24.000Z | 2022-01-25T03:44:32.000Z | pymc/mc_enum.py | cherish-web/pymc | 9c322abfdcceca0a78b633d85da23e1290c036c8 | [
"Apache-2.0"
] | null | null | null | pymc/mc_enum.py | cherish-web/pymc | 9c322abfdcceca0a78b633d85da23e1290c036c8 | [
"Apache-2.0"
] | 2 | 2021-07-10T03:56:08.000Z | 2021-09-30T14:59:35.000Z | # _*_ coding: utf-8 _*_
# @Time : 2021/3/29 08:57
# @Author : cherish_peng
# @Email : 1058386071@qq.com
# @File : cmd.py
# @Software : PyCharm
from enum import Enum
| 13.714286 | 36 | 0.584635 |
7c3807604ed0426c85cf8213a4cc8c2bb059e44c | 214 | py | Python | py/sentry_data_schemas/__init__.py | getsentry/sentry-data-schemas | 6b49188a66a24663737c4f5cf4708fe992d011c2 | [
"MIT"
] | 7 | 2020-08-07T18:26:29.000Z | 2021-08-02T18:31:53.000Z | py/sentry_data_schemas/__init__.py | getsentry/sentry-data-schemas | 6b49188a66a24663737c4f5cf4708fe992d011c2 | [
"MIT"
] | 2 | 2020-12-10T17:28:39.000Z | 2021-09-16T13:52:07.000Z | py/sentry_data_schemas/__init__.py | getsentry/sentry-data-schemas | 6b49188a66a24663737c4f5cf4708fe992d011c2 | [
"MIT"
] | 4 | 2020-09-10T18:10:06.000Z | 2021-03-02T11:07:37.000Z | from importlib.resources import path
from jsonschema_typed import JSONSchema
with path("sentry_data_schemas", "event.schema.json") as schema_path:
EventData = JSONSchema["var:sentry_data_schemas:schema_path"]
| 35.666667 | 69 | 0.817757 |
7c381806df4f9a8daef26e21cae152813d0d29b1 | 1,548 | py | Python | predict.py | faroit/deep-fireball | b37d08cb5b15359c363e7816fc7c163c1709a5ac | [
"MIT"
] | null | null | null | predict.py | faroit/deep-fireball | b37d08cb5b15359c363e7816fc7c163c1709a5ac | [
"MIT"
] | null | null | null | predict.py | faroit/deep-fireball | b37d08cb5b15359c363e7816fc7c163c1709a5ac | [
"MIT"
] | null | null | null | # elsewhere...
import pandas as pd
from keras.models import model_from_json
import random
import sys
import numpy as np
maxlen = 15
step = 3
df = pd.read_pickle('articles.pandas')
text = str.join(' ', df.text.tolist())
chars = set(text)
print('total chars:', len(chars))
char_indices = dict((c, i) for i, c in enumer... | 25.8 | 67 | 0.646641 |
7c3890eac8b3049a655feef5c632c8c9d2d8f1d4 | 4,200 | py | Python | tests/simulation/test_container.py | Zavioer/SIR-simulation-IBM-ESI | 45a7b1d4f0e3cec8dcd8284e00f25386b6e77c58 | [
"MIT"
] | null | null | null | tests/simulation/test_container.py | Zavioer/SIR-simulation-IBM-ESI | 45a7b1d4f0e3cec8dcd8284e00f25386b6e77c58 | [
"MIT"
] | 37 | 2020-05-19T20:11:53.000Z | 2020-06-19T11:26:41.000Z | tests/simulation/test_container.py | Zavioer/SIR-simulation-IBM-ESI | 45a7b1d4f0e3cec8dcd8284e00f25386b6e77c58 | [
"MIT"
] | 1 | 2020-05-25T08:10:21.000Z | 2020-05-25T08:10:21.000Z | import unittest
from simulation import container
from simulation import person
if __name__ == '__main__':
unittest.main()
| 49.411765 | 87 | 0.627143 |
7c38a782a768dd6c26c320e977f3ea8c8bc5e836 | 1,403 | py | Python | pontoon/base/migrations/0007_auto_20150710_0944.py | Tratty/pontoon | ecb903d72f9274f02137b16669cc3c5859f6329c | [
"BSD-3-Clause"
] | 3 | 2020-01-27T12:26:20.000Z | 2022-02-03T09:56:02.000Z | pontoon/base/migrations/0007_auto_20150710_0944.py | texnoman/pontoon-src | 6b40ac229605e99966c3bdd1510b772c89d4de24 | [
"BSD-3-Clause"
] | 1 | 2021-03-24T12:33:03.000Z | 2021-03-24T12:50:19.000Z | pontoon/base/migrations/0007_auto_20150710_0944.py | texnoman/pontoon-src | 6b40ac229605e99966c3bdd1510b772c89d4de24 | [
"BSD-3-Clause"
] | 4 | 2020-01-26T21:28:43.000Z | 2021-06-10T15:25:19.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import pontoon.base.models
| 28.06 | 63 | 0.459729 |
7c3b77cba219a97b12762ac1a37f632c5f68d380 | 11,331 | py | Python | platformio/project/commands/init.py | ufo2011/platformio-core | 0ceae62701731f8b32c34d7993a34dea34aea59c | [
"Apache-2.0"
] | null | null | null | platformio/project/commands/init.py | ufo2011/platformio-core | 0ceae62701731f8b32c34d7993a34dea34aea59c | [
"Apache-2.0"
] | null | null | null | platformio/project/commands/init.py | ufo2011/platformio-core | 0ceae62701731f8b32c34d7993a34dea34aea59c | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 31.828652 | 119 | 0.662519 |
7c3b8f8f699a46823b3a538245f3bafebd9b481d | 56 | py | Python | 12_module_release/message/__init__.py | DeveloperLY/Python-practice | 85062afee1dc6b60b7011b0e3800b65fc9b9e9b2 | [
"MIT"
] | null | null | null | 12_module_release/message/__init__.py | DeveloperLY/Python-practice | 85062afee1dc6b60b7011b0e3800b65fc9b9e9b2 | [
"MIT"
] | null | null | null | 12_module_release/message/__init__.py | DeveloperLY/Python-practice | 85062afee1dc6b60b7011b0e3800b65fc9b9e9b2 | [
"MIT"
] | null | null | null | from . import send_message
from . import receive_message | 28 | 29 | 0.839286 |
7c3d1d7e925f2c1752e9865895938aea4dee29d9 | 6,830 | py | Python | guardian/decorators.py | peopledoc/django-guardian | 459827c2329975113cbf0d11f4fd476b5689a055 | [
"BSD-2-Clause"
] | null | null | null | guardian/decorators.py | peopledoc/django-guardian | 459827c2329975113cbf0d11f4fd476b5689a055 | [
"BSD-2-Clause"
] | null | null | null | guardian/decorators.py | peopledoc/django-guardian | 459827c2329975113cbf0d11f4fd476b5689a055 | [
"BSD-2-Clause"
] | null | null | null | from django.conf import settings
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.core.exceptions import PermissionDenied
from django.http import HttpResponseForbidden, HttpResponseRedirect
from django.utils.functional import wraps
from django.utils.http import urlquote
from django.db.models import Model... | 47.762238 | 80 | 0.630893 |
7c3f32514a25840c1ebcbe049a42682f11ad8a25 | 160 | py | Python | images/forms.py | mpgarate/OST-fauxra | d2aa554a082b14268c72220a0b19f2a306deb4d2 | [
"MIT"
] | 1 | 2019-11-24T09:13:00.000Z | 2019-11-24T09:13:00.000Z | images/forms.py | ikechukwuhenry/OST-fauxra | d2aa554a082b14268c72220a0b19f2a306deb4d2 | [
"MIT"
] | null | null | null | images/forms.py | ikechukwuhenry/OST-fauxra | d2aa554a082b14268c72220a0b19f2a306deb4d2 | [
"MIT"
] | 1 | 2018-08-15T16:03:29.000Z | 2018-08-15T16:03:29.000Z | from django import forms
from django.forms import ModelForm
from images.models import Image
| 17.777778 | 34 | 0.75 |
7c3f358dbfca775c5fb0e3b7866f5656395f8320 | 8,749 | py | Python | WebIOPi-0.7.1/python/webiopi/devices/analog/__init__.py | MORIMOTO520212/Arm-crawler | 95dca0ea9485e4c20a0910687362010604331b55 | [
"MIT"
] | 1 | 2020-04-25T00:55:45.000Z | 2020-04-25T00:55:45.000Z | WebIOPi-0.7.1/python/webiopi/devices/analog/__init__.py | MORIMOTO520212/Arm-crawler | 95dca0ea9485e4c20a0910687362010604331b55 | [
"MIT"
] | 4 | 2015-05-28T23:20:13.000Z | 2015-05-28T23:24:01.000Z | services/webiopi/src/python/webiopi/devices/analog/__init__.py | creative-workflow/pi-setup | d6d28cb8d34ef71b1e8ac95dd94099bfad08837a | [
"MIT"
] | 1 | 2022-03-29T01:58:02.000Z | 2022-03-29T01:58:02.000Z | # Copyright 2012-2013 Eric Ptak - trouch.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 32.403704 | 100 | 0.606927 |
7c3f8ea43badcc3a68b54f56814ef9f940a1de25 | 3,142 | py | Python | osc_choochoo/tests/v1/test_train.py | dtroyer/osc-loco | 57119ab84528933da9cbcd57dcd4f5b842a58186 | [
"Apache-2.0"
] | 1 | 2019-01-15T10:02:06.000Z | 2019-01-15T10:02:06.000Z | osc_choochoo/tests/v1/test_train.py | dtroyer/osc-loco | 57119ab84528933da9cbcd57dcd4f5b842a58186 | [
"Apache-2.0"
] | 1 | 2018-03-03T13:28:09.000Z | 2018-03-03T13:28:09.000Z | osc_choochoo/tests/v1/test_train.py | dtroyer/osc-loco | 57119ab84528933da9cbcd57dcd4f5b842a58186 | [
"Apache-2.0"
] | 1 | 2018-03-03T12:31:24.000Z | 2018-03-03T12:31:24.000Z | # Copyright 2013 Nebula Inc.
#
# 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... | 29.092593 | 77 | 0.624761 |
7c4069a9b6ece4c3708be4cbcbdf02893a94dc6d | 1,134 | py | Python | scripts/firefox-wrapper.py | darioncassel/OmniCrawl | 62317e07340df7eb758a1b8de80679b6d4293d49 | [
"MIT"
] | 2 | 2021-12-02T20:30:23.000Z | 2022-01-05T01:38:45.000Z | scripts/firefox-wrapper.py | darioncassel/OmniCrawl | 62317e07340df7eb758a1b8de80679b6d4293d49 | [
"MIT"
] | null | null | null | scripts/firefox-wrapper.py | darioncassel/OmniCrawl | 62317e07340df7eb758a1b8de80679b6d4293d49 | [
"MIT"
] | 4 | 2021-09-16T01:28:05.000Z | 2022-03-20T21:38:06.000Z | #!/usr/bin/env python3
import sys
from os.path import dirname, abspath, join
import subprocess
# Note this does not resolve symbolic links
# https://stackoverflow.com/a/17806123
FIREFOX_BINARY = join(dirname(abspath(__file__)), 'firefox')
argvs = list(sys.argv)
argvs[0] = FIREFOX_BINARY
# geckdriver will run `firef... | 30.648649 | 83 | 0.686067 |
7c409487091269b7e314c05627f47667f44be8cd | 37,177 | py | Python | src/pretix/base/payment.py | whiteyhat/pretix | 34d1fcf077a92765cd796d81d1aa6695d4801a9a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/pretix/base/payment.py | whiteyhat/pretix | 34d1fcf077a92765cd796d81d1aa6695d4801a9a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/pretix/base/payment.py | whiteyhat/pretix | 34d1fcf077a92765cd796d81d1aa6695d4801a9a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import json
import logging
from collections import OrderedDict
from decimal import ROUND_HALF_UP, Decimal
from typing import Any, Dict, Union
import pytz
from django import forms
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.dispatch import receiver
from django.fo... | 42.536613 | 124 | 0.63047 |
7c41415e2c7a8ce5f2d75904be89b903c2cdfef0 | 633 | py | Python | tests/AssertFail/run.py | sag-tgo/EPL_assert_demo | a43541e4472dfab7da6538ae9f220b5e042d158c | [
"Apache-2.0"
] | null | null | null | tests/AssertFail/run.py | sag-tgo/EPL_assert_demo | a43541e4472dfab7da6538ae9f220b5e042d158c | [
"Apache-2.0"
] | null | null | null | tests/AssertFail/run.py | sag-tgo/EPL_assert_demo | a43541e4472dfab7da6538ae9f220b5e042d158c | [
"Apache-2.0"
] | null | null | null | from pysys.basetest import BaseTest
from apama.correlator import CorrelatorHelper
import os
| 33.315789 | 77 | 0.737757 |
7c419b5717a91fec1bbd9b0db3fdfc3ceb131303 | 1,231 | py | Python | src/beast/python/beast/env/ReadEnvFile_test.py | Ziftr/stellard | 626514cbbb2c6c2b6844315ca98a2bfcbca0b43d | [
"BSL-1.0"
] | 58 | 2015-01-07T09:10:59.000Z | 2019-07-15T14:34:01.000Z | src/beast/python/beast/env/ReadEnvFile_test.py | Ziftr/stellard | 626514cbbb2c6c2b6844315ca98a2bfcbca0b43d | [
"BSL-1.0"
] | 12 | 2015-01-02T00:01:45.000Z | 2018-04-25T12:35:02.000Z | src/beast/python/beast/env/ReadEnvFile_test.py | Ziftr/stellard | 626514cbbb2c6c2b6844315ca98a2bfcbca0b43d | [
"BSL-1.0"
] | 23 | 2015-01-04T00:13:27.000Z | 2019-02-15T18:01:17.000Z | from __future__ import absolute_import, division, print_function, unicode_literals
from unittest import TestCase
from beast.env.ReadEnvFile import read_env_file
from beast.util import Terminal
Terminal.CAN_CHANGE_COLOR = False
JSON = """
{
"FOO": "foo",
"BAR": "bar bar bar",
"CPPFLAGS": "-std=c++11 -frtti -fno... | 23.673077 | 82 | 0.680747 |
7c42dc9f24c848eb5660235f34da5faf02dd1e33 | 2,192 | py | Python | signin/tests.py | pptnz/swa_team2 | 253ae83d73c00245d359574d6a16f4eba9830950 | [
"MIT"
] | null | null | null | signin/tests.py | pptnz/swa_team2 | 253ae83d73c00245d359574d6a16f4eba9830950 | [
"MIT"
] | 3 | 2018-06-07T17:18:16.000Z | 2021-06-10T20:19:27.000Z | signin/tests.py | pptnz/swa_team2 | 253ae83d73c00245d359574d6a16f4eba9830950 | [
"MIT"
] | 1 | 2018-06-25T23:52:57.000Z | 2018-06-25T23:52:57.000Z | import json
from django.test import TestCase
from django.contrib.auth.models import User
from .models import CustomUser
from django.apps import apps
from .apps import SigninConfig
| 39.142857 | 124 | 0.696624 |
7c44dd7ee7dcb34a8c6b443486c1190c2f8b538a | 707 | py | Python | tree/list/BinaryNode.py | EliHar/BinaryTree-ADT | bf220eb8ccb04f6fee7d7a67ef7e9cd00cc6a4c1 | [
"MIT"
] | null | null | null | tree/list/BinaryNode.py | EliHar/BinaryTree-ADT | bf220eb8ccb04f6fee7d7a67ef7e9cd00cc6a4c1 | [
"MIT"
] | null | null | null | tree/list/BinaryNode.py | EliHar/BinaryTree-ADT | bf220eb8ccb04f6fee7d7a67ef7e9cd00cc6a4c1 | [
"MIT"
] | null | null | null | __author__ = 'Elias Haroun'
| 19.108108 | 52 | 0.589816 |
7c46086ba91c653227726b101b253bd36be2a7f4 | 5,963 | py | Python | boolean2/tokenizer.py | AbrahmAB/booleannet | a07124047d18a5b7265e050a234969ac58970c7a | [
"MIT"
] | null | null | null | boolean2/tokenizer.py | AbrahmAB/booleannet | a07124047d18a5b7265e050a234969ac58970c7a | [
"MIT"
] | null | null | null | boolean2/tokenizer.py | AbrahmAB/booleannet | a07124047d18a5b7265e050a234969ac58970c7a | [
"MIT"
] | null | null | null | """
Main tokenizer.
"""
from itertools import *
import sys, random
import util
import ply.lex as lex
def init_tokens( tokenlist ):
"""
Returns elments of the list that are initializers
"""
return filter( cond, tokenlist)
def label_tokens( tokenlist ):
"""
Returns elements where the first toke... | 25.374468 | 171 | 0.528928 |
7c46de4fdbd3dc2c58b659d8b01a5d17658d1622 | 14,736 | py | Python | aiida/cmdline/params/options/test_interactive.py | tomzhang/aiida_core | 949810e9f3daff0f748c5c9aa1dde4f5222bb49b | [
"BSD-2-Clause"
] | 1 | 2019-04-29T12:39:31.000Z | 2019-04-29T12:39:31.000Z | aiida/cmdline/params/options/test_interactive.py | tomzhang/aiida_core | 949810e9f3daff0f748c5c9aa1dde4f5222bb49b | [
"BSD-2-Clause"
] | null | null | null | aiida/cmdline/params/options/test_interactive.py | tomzhang/aiida_core | 949810e9f3daff0f748c5c9aa1dde4f5222bb49b | [
"BSD-2-Clause"
] | null | null | null | """Unit tests for the InteractiveOption."""
from __future__ import absolute_import
import unittest
import click
from click.testing import CliRunner
from click.types import IntParamType
from aiida.cmdline.params.options.interactive import InteractiveOption
from aiida.cmdline.params.options import NON_INTERACTIVE
| 38.984127 | 106 | 0.636401 |
7c4747750d4783fac45721046885fc982b92a07c | 3,195 | py | Python | scripts/migration/migrate_registered_meta.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | null | null | null | scripts/migration/migrate_registered_meta.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | null | null | null | scripts/migration/migrate_registered_meta.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | null | null | null | """
Changes existing registered_meta on a node to new schema layout
required for the prereg-prize
"""
import json
import sys
import logging
from modularodm import Q
from framework.mongo import database as db
from framework.mongo.utils import from_mongo
from framework.transactions.context import TokuTransaction
from ... | 29.859813 | 111 | 0.576526 |
7c478777d84107b3217342ab649b11b3244e8389 | 7,606 | py | Python | pyec/distribution/bayes/structure/basic.py | hypernicon/pyec | 7072835c97d476fc45ffc3b34f5c3ec607988e6d | [
"MIT"
] | 2 | 2015-03-16T21:18:27.000Z | 2017-10-09T19:59:24.000Z | pyec/distribution/bayes/structure/basic.py | hypernicon/pyec | 7072835c97d476fc45ffc3b34f5c3ec607988e6d | [
"MIT"
] | null | null | null | pyec/distribution/bayes/structure/basic.py | hypernicon/pyec | 7072835c97d476fc45ffc3b34f5c3ec607988e6d | [
"MIT"
] | null | null | null | """
Copyright (C) 2012 Alan J Lockett
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute,... | 35.050691 | 460 | 0.620431 |
7c484eb9bf609790d2ba9c1adb147528492648ab | 2,108 | py | Python | graph/tsp.py | pingrunhuang/CodeChallenge | a8e5274e04c47d851836197907266418af4f1a22 | [
"MIT"
] | null | null | null | graph/tsp.py | pingrunhuang/CodeChallenge | a8e5274e04c47d851836197907266418af4f1a22 | [
"MIT"
] | null | null | null | graph/tsp.py | pingrunhuang/CodeChallenge | a8e5274e04c47d851836197907266418af4f1a22 | [
"MIT"
] | null | null | null | """
given a fully connected undirected graph(If no path exists between two cities, adding an arbitrarily long edge will complete the graph without affecting the optimal tour),
find the path with the lowest cost in total for a salesman to travel from a given start vertex
"""
import time
if __name__ == "__main__"... | 29.690141 | 171 | 0.576376 |
7c486bb219145330aa050e526b0e111823623d51 | 620 | py | Python | projects/code_combat/8_Cloudrip_Mountain/471-Distracting_Dungeon/distracting_dungeon.py | only-romano/junkyard | b60a25b2643f429cdafee438d20f9966178d6f36 | [
"MIT"
] | null | null | null | projects/code_combat/8_Cloudrip_Mountain/471-Distracting_Dungeon/distracting_dungeon.py | only-romano/junkyard | b60a25b2643f429cdafee438d20f9966178d6f36 | [
"MIT"
] | null | null | null | projects/code_combat/8_Cloudrip_Mountain/471-Distracting_Dungeon/distracting_dungeon.py | only-romano/junkyard | b60a25b2643f429cdafee438d20f9966178d6f36 | [
"MIT"
] | null | null | null |
peasant = hero.findNearest(hero.findFriends())
while True:
hero.command(peasant, "buildXY", "decoy", peasant.pos.x + 2, peasant.pos.y)
var nextPoint = {"x": hero.pos.x, "y": hero.pos.y + 28}
moveBothTo(nextPoint)
nextPoint = {"x": hero.pos.x + 28, "y": hero.pos.y}
var enemy = hero.findNe... | 31 | 80 | 0.606452 |
7c487be5e97c4669f698df37e679a53c19c84c61 | 515 | py | Python | firstBadVersion.py | pflun/learningAlgorithms | 3101e989488dfc8a56f1bf256a1c03a837fe7d97 | [
"MIT"
] | null | null | null | firstBadVersion.py | pflun/learningAlgorithms | 3101e989488dfc8a56f1bf256a1c03a837fe7d97 | [
"MIT"
] | null | null | null | firstBadVersion.py | pflun/learningAlgorithms | 3101e989488dfc8a56f1bf256a1c03a837fe7d97 | [
"MIT"
] | null | null | null | # The isBadVersion API is already defined for you.
# @param version, an integer
# @return a bool
# def isBadVersion(version):
| 22.391304 | 50 | 0.524272 |
7c48ecfa52411dc6356f3fa1289a95505f086e55 | 2,599 | py | Python | issues/migrations/0001_initial.py | QizaiMing/ergo-project-manager | 2b02b2ab6d9e48bfccbbca8c05180b07177dcb77 | [
"MIT"
] | null | null | null | issues/migrations/0001_initial.py | QizaiMing/ergo-project-manager | 2b02b2ab6d9e48bfccbbca8c05180b07177dcb77 | [
"MIT"
] | 3 | 2020-11-01T22:08:38.000Z | 2022-03-12T00:49:00.000Z | issues/migrations/0001_initial.py | QizaiMing/ergo-project-manager | 2b02b2ab6d9e48bfccbbca8c05180b07177dcb77 | [
"MIT"
] | 2 | 2021-01-03T07:17:16.000Z | 2021-05-29T17:27:11.000Z | # Generated by Django 2.2.12 on 2020-05-01 03:34
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| 50.960784 | 157 | 0.614852 |
7c4a4e05ac30862172f332ac22daa59c8c1ecce1 | 2,764 | py | Python | com/binghe/hacker/tools/script/ak/check_virus.py | ffffff0x/python-hacker | a2dc7f9031669a86bd2c87892c0a8c1e54bb2a79 | [
"Apache-2.0"
] | 52 | 2019-02-11T13:02:20.000Z | 2022-02-06T07:43:55.000Z | com/binghe/hacker/tools/script/ak/check_virus.py | sunshinelyz/python-hacker | a2dc7f9031669a86bd2c87892c0a8c1e54bb2a79 | [
"Apache-2.0"
] | null | null | null | com/binghe/hacker/tools/script/ak/check_virus.py | sunshinelyz/python-hacker | a2dc7f9031669a86bd2c87892c0a8c1e54bb2a79 | [
"Apache-2.0"
] | 15 | 2019-02-25T03:04:50.000Z | 2021-10-19T02:13:52.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- coding: gbk -*-
# Date: 2019/2/22
# Created by
# Description bindshell.exevscan.novirusthanks.org
# python check_virus.py -f bindshell.exe
# https://blog.csdn.net/l1028386804
import re
import httplib
import time
import os
import optparse
from urlparse ... | 29.72043 | 67 | 0.599132 |
7c4ae67259cc4af329dd35bc62e3ceddb69e3a57 | 7,190 | py | Python | cogs/remind.py | LoganHaug/reminder-bot | 1bb1853b79e0299240a214e947e8bc29ed34e46e | [
"MIT"
] | 2 | 2021-01-02T04:30:54.000Z | 2021-01-02T04:30:54.000Z | cogs/remind.py | LoganHaug/reminder-bot | 1bb1853b79e0299240a214e947e8bc29ed34e46e | [
"MIT"
] | 8 | 2021-01-02T02:06:04.000Z | 2021-03-15T06:05:50.000Z | cogs/remind.py | LoganHaug/reminder-bot | 1bb1853b79e0299240a214e947e8bc29ed34e46e | [
"MIT"
] | 2 | 2021-01-02T01:50:06.000Z | 2021-01-02T20:02:58.000Z | import asyncio
from typing import Union
import datetime
import time
from discord.ext import commands
import yaml
from cogs import checks
import database
import utils
# Loads the repeating interval dictionary
with open("conversions.yml", "r") as conversion_file:
conversion_dict = yaml.load(conversion_file, Loade... | 36.683673 | 362 | 0.568985 |
7c4b0703a1999f5fa6b05313d2f3c64b1a7c6c84 | 948 | py | Python | setup.py | csengor/toraman_py | 5cb7b39ae073ecc2adcb7cea83b79492ac5aa485 | [
"MIT"
] | 2 | 2020-02-01T08:21:11.000Z | 2021-03-12T13:58:26.000Z | setup.py | csengor/toraman_py | 5cb7b39ae073ecc2adcb7cea83b79492ac5aa485 | [
"MIT"
] | null | null | null | setup.py | csengor/toraman_py | 5cb7b39ae073ecc2adcb7cea83b79492ac5aa485 | [
"MIT"
] | null | null | null | import setuptools
from toraman.version import __version__
with open('README.md', 'r') as input_file:
long_description = input_file.read()
setuptools.setup(
name='toraman',
version=__version__,
author='aatay Onur engr',
author_email='contact@csengor.com',
description='A computer-assisted trans... | 30.580645 | 116 | 0.667722 |
7c4b2f5648b8aa2f586e693897cf20f646266eed | 457 | py | Python | declarations_site/cms_pages/migrations/0015_auto_20150615_0201.py | li-ar/declarations.com.ua | 343cd86cc5a4bd895f2859ed896728f6416ac223 | [
"MIT"
] | 32 | 2015-04-01T15:17:35.000Z | 2021-05-02T20:46:33.000Z | declarations_site/cms_pages/migrations/0015_auto_20150615_0201.py | li-ar/declarations.com.ua | 343cd86cc5a4bd895f2859ed896728f6416ac223 | [
"MIT"
] | 52 | 2015-03-23T21:37:04.000Z | 2022-02-10T07:27:13.000Z | declarations_site/cms_pages/migrations/0015_auto_20150615_0201.py | li-ar/declarations.com.ua | 343cd86cc5a4bd895f2859ed896728f6416ac223 | [
"MIT"
] | 18 | 2015-03-16T22:10:44.000Z | 2021-11-01T12:56:12.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
| 21.761905 | 67 | 0.608315 |
7c4b6fc1c38e59243da6f002769c9090efca9c53 | 4,112 | py | Python | tests/models/test_grad_norm.py | nightlessbaron/pytorch-lightning | 239bea5c29cef0d1a0cfb319de5dbc9227aa2a53 | [
"Apache-2.0"
] | 3 | 2021-01-28T14:04:17.000Z | 2021-09-08T12:00:11.000Z | tests/models/test_grad_norm.py | nightlessbaron/pytorch-lightning | 239bea5c29cef0d1a0cfb319de5dbc9227aa2a53 | [
"Apache-2.0"
] | 8 | 2020-10-27T22:39:24.000Z | 2021-01-24T16:41:34.000Z | tests/models/test_grad_norm.py | nightlessbaron/pytorch-lightning | 239bea5c29cef0d1a0cfb319de5dbc9227aa2a53 | [
"Apache-2.0"
] | 1 | 2022-03-21T18:37:54.000Z | 2022-03-21T18:37:54.000Z | # Copyright The PyTorch Lightning team.
#
# 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 i... | 35.756522 | 115 | 0.674611 |
7c4b72df2d2012d9d79281852a5cd3bef3ea8e8d | 48,507 | py | Python | tensorflow/tools/compatibility/renames_v2.py | junjun315/tensorflow | 40b800fc24e1eea8642b79087925939121e8e25f | [
"Apache-2.0"
] | null | null | null | tensorflow/tools/compatibility/renames_v2.py | junjun315/tensorflow | 40b800fc24e1eea8642b79087925939121e8e25f | [
"Apache-2.0"
] | null | null | null | tensorflow/tools/compatibility/renames_v2.py | junjun315/tensorflow | 40b800fc24e1eea8642b79087925939121e8e25f | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 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 required by applica... | 64.935743 | 128 | 0.744284 |
7c4b952636f3e94167bbd00880673a8dc5635803 | 2,278 | py | Python | deep_speech_2/decoder.py | Canpio/models | 72874de98fba93592edee42b776e3d876b1d5504 | [
"Apache-2.0"
] | 1 | 2020-11-19T14:47:28.000Z | 2020-11-19T14:47:28.000Z | deep_speech_2/decoder.py | JiayiFeng/models | 72874de98fba93592edee42b776e3d876b1d5504 | [
"Apache-2.0"
] | null | null | null | deep_speech_2/decoder.py | JiayiFeng/models | 72874de98fba93592edee42b776e3d876b1d5504 | [
"Apache-2.0"
] | null | null | null | """
CTC-like decoder utilitis.
"""
from itertools import groupby
import numpy as np
def ctc_best_path_decode(probs_seq, vocabulary):
"""
Best path decoding, also called argmax decoding or greedy decoding.
Path consisting of the most probable tokens are further post-processed to
remove consecutive... | 37.344262 | 79 | 0.68525 |
7c4bb1688cf1e8399ddcf1585b39fc36418f8801 | 827 | py | Python | modules/gitbox/files/asfgit/hooks/sync.py | Humbedooh/infrastructure-puppet | a85f797d847b80e877cd5b7c66513970f6f80703 | [
"Apache-2.0"
] | 1 | 2019-06-09T10:25:04.000Z | 2019-06-09T10:25:04.000Z | modules/gitbox/files/asfgit/hooks/sync.py | Humbedooh/infrastructure-puppet | a85f797d847b80e877cd5b7c66513970f6f80703 | [
"Apache-2.0"
] | 1 | 2020-05-08T07:07:43.000Z | 2020-05-08T07:07:43.000Z | modules/gitbox/files/asfgit/hooks/sync.py | Humbedooh/infrastructure-puppet | a85f797d847b80e877cd5b7c66513970f6f80703 | [
"Apache-2.0"
] | 1 | 2019-12-31T07:28:19.000Z | 2019-12-31T07:28:19.000Z | #!/usr/local/bin/python
import json
import socket
import sys
import asfgit.cfg as cfg
import asfgit.git as git
import asfgit.log as log
import asfgit.util as util
import subprocess, os, time
| 30.62963 | 98 | 0.613059 |
7c4c2493de449c01316f5bf624115a0a13bde60f | 9,598 | py | Python | rosimport/_rosdef_loader.py | asmodehn/rosimport | c63e4769650b1cf19f23fbaa65a356ffae20a536 | [
"MIT"
] | 5 | 2017-11-11T18:26:28.000Z | 2019-06-12T08:47:58.000Z | rosimport/_rosdef_loader.py | asmodehn/rosimport | c63e4769650b1cf19f23fbaa65a356ffae20a536 | [
"MIT"
] | 8 | 2017-06-30T08:28:46.000Z | 2017-07-18T04:50:18.000Z | rosimport/_rosdef_loader.py | pyros-dev/rosimport | c63e4769650b1cf19f23fbaa65a356ffae20a536 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
import contextlib
import importlib
import site
import tempfile
import shutil
from rosimport import genrosmsg_py, genrossrv_py
"""
A module to setup custom importer for .msg and .srv files
Upon import, it will first find the .msg file, then generate t... | 44.435185 | 137 | 0.620025 |
7c4c786476fcedafe44d921c5dfd79a0be6d09a1 | 1,093 | py | Python | PyLeague/logger.py | Ahuge/PyLeague | ee8a14061c44c1c26a5102a05e33ad820f2b1b63 | [
"MIT"
] | null | null | null | PyLeague/logger.py | Ahuge/PyLeague | ee8a14061c44c1c26a5102a05e33ad820f2b1b63 | [
"MIT"
] | null | null | null | PyLeague/logger.py | Ahuge/PyLeague | ee8a14061c44c1c26a5102a05e33ad820f2b1b63 | [
"MIT"
] | null | null | null | import sys
log = NotALogger()
__all__ = ["log"]
| 19.175439 | 47 | 0.426349 |
7c4d61daea2ec370e51d0a70c14c812f08cd827f | 1,491 | py | Python | setup.py | swtwsk/dbt-airflow-manifest-parser | fae0049fb8ff3bc7a78488a48a31023f67fbeef3 | [
"Apache-2.0"
] | null | null | null | setup.py | swtwsk/dbt-airflow-manifest-parser | fae0049fb8ff3bc7a78488a48a31023f67fbeef3 | [
"Apache-2.0"
] | null | null | null | setup.py | swtwsk/dbt-airflow-manifest-parser | fae0049fb8ff3bc7a78488a48a31023f67fbeef3 | [
"Apache-2.0"
] | null | null | null | """dbt_airflow_factory module."""
from setuptools import find_packages, setup
with open("README.md") as f:
README = f.read()
# Runtime Requirements.
INSTALL_REQUIRES = ["pytimeparse==1.1.8"]
# Dev Requirements
EXTRA_REQUIRE = {
"tests": [
"pytest>=6.2.2, <7.0.0",
"pytest-cov>=2.8.0, <3.0.0",... | 28.132075 | 78 | 0.613011 |
7c4e547145402a4cf7056e9aeb596f38cf59e239 | 173 | py | Python | nightlightpi/errorstrings.py | jmb/NightLightPi | 82f5d37a35e3457e31ca100524011908e5b33c4d | [
"MIT"
] | 2 | 2018-10-01T21:45:22.000Z | 2020-07-26T09:07:09.000Z | nightlightpi/errorstrings.py | jmb/NightLightPi | 82f5d37a35e3457e31ca100524011908e5b33c4d | [
"MIT"
] | 4 | 2017-09-29T19:19:07.000Z | 2019-10-08T05:15:29.000Z | nightlightpi/errorstrings.py | jmb/NightLightPi | 82f5d37a35e3457e31ca100524011908e5b33c4d | [
"MIT"
] | 4 | 2017-10-08T22:08:25.000Z | 2019-10-20T06:03:47.000Z | # -*- coding: utf-8; -*-
"""Define error strings raised by the application."""
MISSING_CONFIG_VALUE = """
'{0}' is not specified or invalid in the config file!
""".strip()
| 24.714286 | 53 | 0.65896 |
7c4f383bc1d3e78bec978541f8102910be2e6494 | 1,489 | py | Python | karabo_bridge/tests/test_serialize.py | European-XFEL/karabo-bridge-py | c4b2847b837ae7156640cb8f787fcf96ac7f632e | [
"BSD-3-Clause"
] | 6 | 2018-01-23T15:20:43.000Z | 2022-02-28T13:20:50.000Z | karabo_bridge/tests/test_serialize.py | European-XFEL/karabo-bridge | a56f2bb57eecd49ebcdc9077234df8e76e725a6f | [
"BSD-3-Clause"
] | 43 | 2018-01-24T16:12:49.000Z | 2021-05-27T14:56:42.000Z | karabo_bridge/tests/test_serialize.py | European-XFEL/karabo-bridge | a56f2bb57eecd49ebcdc9077234df8e76e725a6f | [
"BSD-3-Clause"
] | 4 | 2018-03-04T10:09:43.000Z | 2018-05-03T14:49:27.000Z | import numpy as np
import pytest
from karabo_bridge import serialize, deserialize
from .utils import compare_nested_dict
| 31.020833 | 87 | 0.715917 |
7c4fc346cb91cacd807ee64d79b21152c687d93c | 2,029 | py | Python | indico/testing/fixtures/util.py | bpedersen2/indico | 8410ee5f8f8530a8692f3dd2d4015c3074b0aa30 | [
"MIT"
] | 1 | 2021-12-27T17:51:27.000Z | 2021-12-27T17:51:27.000Z | indico/testing/fixtures/util.py | bpedersen2/indico | 8410ee5f8f8530a8692f3dd2d4015c3074b0aa30 | [
"MIT"
] | 5 | 2021-04-08T19:26:47.000Z | 2022-01-24T16:30:18.000Z | indico/testing/fixtures/util.py | bpedersen2/indico | 8410ee5f8f8530a8692f3dd2d4015c3074b0aa30 | [
"MIT"
] | 2 | 2019-02-24T17:29:10.000Z | 2021-04-08T19:23:27.000Z | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
import inspect
from datetime import datetime
import freezegun
import pytest
from sqlalchemy import DateTi... | 32.725806 | 80 | 0.706752 |
7c508b5e90ac0bb6b42082e2791baf6ee6cd6d24 | 704 | py | Python | config.py | RomashkaGang/Update_Checker | 1763ec5d8110462a72f5015abdc5c5be3e3c9498 | [
"MIT"
] | null | null | null | config.py | RomashkaGang/Update_Checker | 1763ec5d8110462a72f5015abdc5c5be3e3c9498 | [
"MIT"
] | null | null | null | config.py | RomashkaGang/Update_Checker | 1763ec5d8110462a72f5015abdc5c5be3e3c9498 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# encoding: utf-8
import os
#
#
DEBUG_ENABLE = False
# SQLite
SQLITE_FILE = "saved.db"
#
LOG_FILE = "log.txt"
#
ENABLE_LOGGER = True
# (: 180)
LOOP_CHECK_INTERVAL = 180 * 60
#
PROXIES = "127.0.0.1:1080"
#
TIMEOUT = 20
# Socks5
IS_SOCKS = False
# TG BOT
ENABLE_SENDMESSAGE =... | 16 | 88 | 0.681818 |
7c51d040f9ea88aa996e0a5f03d0e36f5bd442f2 | 1,692 | py | Python | cmdb-compliance/biz/handlers/asset_hipaa_data.py | zjj1002/aws-cloud-cmdb-system | 47982007688e5db1272435891cb654ab11d0d60a | [
"Apache-2.0"
] | null | null | null | cmdb-compliance/biz/handlers/asset_hipaa_data.py | zjj1002/aws-cloud-cmdb-system | 47982007688e5db1272435891cb654ab11d0d60a | [
"Apache-2.0"
] | 1 | 2022-01-04T13:53:16.000Z | 2022-01-04T13:53:16.000Z | cmdb-compliance/biz/handlers/asset_hipaa_data.py | zjj1002/aws-cloud-cmdb-system | 47982007688e5db1272435891cb654ab11d0d60a | [
"Apache-2.0"
] | null | null | null | from sqlalchemy import or_
from websdk.db_context import DBContext
from libs.base_handler import BaseHandler
from libs.pagination import pagination_util
from models.hipaa_data import HipaaData, model_to_dict
hipaa_data_host_urls = [
(r"/v1/cmdb/hipaa_data/", HipaaDataHandler),
]
if __name__ == '__main__':
... | 36.782609 | 72 | 0.544326 |
7c51d615d63f8eb8639b0e23a11927b8ddf8f7ce | 567 | py | Python | scripts/count.py | hellocit/kadai2 | 896acc2394ea522d4b0d32db31321aea5b5f5dbd | [
"BSD-3-Clause"
] | null | null | null | scripts/count.py | hellocit/kadai2 | 896acc2394ea522d4b0d32db31321aea5b5f5dbd | [
"BSD-3-Clause"
] | null | null | null | scripts/count.py | hellocit/kadai2 | 896acc2394ea522d4b0d32db31321aea5b5f5dbd | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import rospy
from std_msgs.msg import Int32
import time
rospy.init_node('count') # count
pub = rospy.Publisher('count_up', Int32, queue_size=1) # count_up
rate = rospy.Rate(10) # 10Hz
n = 0
time.sleep(2)
while not rospy.is_shutd... | 24.652174 | 77 | 0.502646 |
7c5207cb66825a5b72fe13d9cb2fcbddac1440f5 | 412,069 | py | Python | snmp/nav/smidumps/ZyXEL_GS4012F_mib.py | alexanderfefelov/nav-add-ons | c63d6942a9b8b1bf220efd7d33fb6be5f6bbb8af | [
"MIT"
] | null | null | null | snmp/nav/smidumps/ZyXEL_GS4012F_mib.py | alexanderfefelov/nav-add-ons | c63d6942a9b8b1bf220efd7d33fb6be5f6bbb8af | [
"MIT"
] | 17 | 2020-09-17T15:00:31.000Z | 2021-06-05T02:54:34.000Z | snmp/nav/smidumps/ZyXEL_GS4012F_mib.py | alexanderfefelov/nav-add-ons | c63d6942a9b8b1bf220efd7d33fb6be5f6bbb8af | [
"MIT"
] | null | null | null | # python version 1.0 DO NOT EDIT
#
# Generated by smidump version 0.4.8:
#
# smidump -f python ZYXEL-GS4012F-MIB
FILENAME = "mibs/ZyXEL/zyxel-GS4012F.mib"
MIB = {
"moduleName" : "ZYXEL-GS4012F-MIB",
"ZYXEL-GS4012F-MIB" : {
"nodetype" : "module",
"language" : "SMIv2",
"organizat... | 36.095743 | 154 | 0.372015 |
7c52d32a4a5ef2c93209163ebb29e7bf07a94aa5 | 2,028 | py | Python | rx/concurrency/timeoutscheduler.py | yutiansut/RxPY | c3bbba77f9ebd7706c949141725e220096deabd4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-11-16T09:07:13.000Z | 2018-11-16T09:07:13.000Z | rx/concurrency/timeoutscheduler.py | yutiansut/RxPY | c3bbba77f9ebd7706c949141725e220096deabd4 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | rx/concurrency/timeoutscheduler.py | yutiansut/RxPY | c3bbba77f9ebd7706c949141725e220096deabd4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-05-08T08:23:08.000Z | 2020-05-08T08:23:08.000Z | import logging
from threading import Timer
from datetime import timedelta
from rx.core import Scheduler, Disposable
from rx.disposables import SingleAssignmentDisposable, CompositeDisposable
from .schedulerbase import SchedulerBase
log = logging.getLogger("Rx")
timeout_scheduler = TimeoutScheduler()
| 28.971429 | 83 | 0.668146 |
7c53272867356ba8303ec22e79720d622e10756c | 2,330 | py | Python | vgazer/version/custom_checker/inputproto.py | edomin/vgazer | 3ffe64f2517cbfbe0b0292bacc9fbf7391687e76 | [
"CC0-1.0"
] | 2 | 2020-10-09T13:51:04.000Z | 2020-11-11T12:29:41.000Z | vgazer/version/custom_checker/inputproto.py | edomin/vgazer | 3ffe64f2517cbfbe0b0292bacc9fbf7391687e76 | [
"CC0-1.0"
] | null | null | null | vgazer/version/custom_checker/inputproto.py | edomin/vgazer | 3ffe64f2517cbfbe0b0292bacc9fbf7391687e76 | [
"CC0-1.0"
] | null | null | null | import requests
from bs4 import BeautifulSoup
| 40.877193 | 76 | 0.574249 |
7c53ef04b71561a704af8d84b7b218d0cc32e017 | 11,781 | py | Python | src/pandas_profiling/model/summary_helpers.py | briangrahamww/pandas-profiling | 62f8e3fd81720d444041069191c4aacd03d79ad5 | [
"MIT"
] | null | null | null | src/pandas_profiling/model/summary_helpers.py | briangrahamww/pandas-profiling | 62f8e3fd81720d444041069191c4aacd03d79ad5 | [
"MIT"
] | 4 | 2021-11-01T15:17:07.000Z | 2022-01-26T15:22:15.000Z | src/pandas_profiling/model/summary_helpers.py | briangrahamww/pandas-profiling | 62f8e3fd81720d444041069191c4aacd03d79ad5 | [
"MIT"
] | null | null | null | import os
import string
from collections import Counter
from datetime import datetime
from functools import partial
from pathlib import Path
from typing import Optional
import numpy as np
import pandas as pd
from scipy.stats.stats import chisquare
from tangled_up_in_unicode import block, block_abbr, categor... | 31.5 | 88 | 0.641881 |
7c54e5deea62f99049023a90de0d70c094863c10 | 10,143 | py | Python | inverse_warp.py | ZephyrII/competitive_colaboration | a557d1e23ef2c0b8e3794f085a79bfffb860f9df | [
"MIT"
] | 357 | 2019-03-12T07:17:32.000Z | 2022-03-24T14:13:24.000Z | inverse_warp.py | DevLooptt/SJTU-CS386-2021Fall-DIP-Project | 2167e089be80ca01911ba55c07b83c9f26f147e7 | [
"MIT"
] | 27 | 2019-03-11T19:16:11.000Z | 2021-05-30T13:30:19.000Z | inverse_warp.py | DevLooptt/SJTU-CS386-2021Fall-DIP-Project | 2167e089be80ca01911ba55c07b83c9f26f147e7 | [
"MIT"
] | 66 | 2019-03-27T14:16:22.000Z | 2021-11-11T12:40:33.000Z | # Author: Anurag Ranjan
# Copyright (c) 2019, Anurag Ranjan
# All rights reserved.
# based on github.com/ClementPinard/SfMLearner-Pytorch
from __future__ import division
import torch
from torch.autograd import Variable
pixel_coords = None
def cam2pixel(cam_coords, proj_c2p_rot, proj_c2p_tr, padding_mode):
""... | 35.714789 | 136 | 0.602484 |
7c5685982f284836ad84a3186b0e3af7e951a8fa | 7,853 | py | Python | lingvo/core/egdd.py | ramonsanabria/lingvo | f38dc3801d36ed08a4117d4a66e6f1f10f76909d | [
"Apache-2.0"
] | null | null | null | lingvo/core/egdd.py | ramonsanabria/lingvo | f38dc3801d36ed08a4117d4a66e6f1f10f76909d | [
"Apache-2.0"
] | null | null | null | lingvo/core/egdd.py | ramonsanabria/lingvo | f38dc3801d36ed08a4117d4a66e6f1f10f76909d | [
"Apache-2.0"
] | null | null | null | # Lint as: python2, 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
#
... | 42.448649 | 80 | 0.696676 |
7c56c7d2316646a3222e3085d34d2f51b63f5dac | 3,556 | py | Python | examples/nn_cudamat.py | cloudspectatordevelopment/cudamat | d26cf019a7855077b7d4344ae1a3202a156c5170 | [
"BSD-3-Clause"
] | 526 | 2015-01-05T14:33:10.000Z | 2022-03-09T12:41:37.000Z | examples/nn_cudamat.py | cloudspectatordevelopment/cudamat | d26cf019a7855077b7d4344ae1a3202a156c5170 | [
"BSD-3-Clause"
] | 71 | 2015-01-01T01:03:09.000Z | 2021-10-01T06:57:07.000Z | examples/nn_cudamat.py | cloudspectatordevelopment/cudamat | d26cf019a7855077b7d4344ae1a3202a156c5170 | [
"BSD-3-Clause"
] | 139 | 2015-01-13T21:23:38.000Z | 2022-02-24T03:26:34.000Z | # This file shows how to implement a single hidden layer neural network for
# performing binary classification on the GPU using cudamat.
from __future__ import division
import pdb
import time
import numpy as np
import cudamat as cm
from cudamat import learn as cl
import util
# initialize CUDA
cm.cublas_init()
# load... | 26.537313 | 80 | 0.683071 |
7c5785c50891073f1d8d050a467303e1d02503f4 | 5,967 | py | Python | fair/forcing/ozone_tr.py | znicholls/FAIR | 599c44ed140b069968ba7d1ca99de40218e42545 | [
"Apache-2.0"
] | 1 | 2020-11-14T16:09:39.000Z | 2020-11-14T16:09:39.000Z | fair/forcing/ozone_tr.py | znicholls/FAIR | 599c44ed140b069968ba7d1ca99de40218e42545 | [
"Apache-2.0"
] | 1 | 2020-11-02T17:59:02.000Z | 2020-11-02T17:59:02.000Z | fair/forcing/ozone_tr.py | znicholls/FAIR | 599c44ed140b069968ba7d1ca99de40218e42545 | [
"Apache-2.0"
] | 2 | 2020-11-02T16:42:05.000Z | 2020-12-15T16:36:24.000Z | from __future__ import division
import numpy as np
from ..constants import molwt
def regress(emissions,
beta=np.array([2.8249e-4, 1.0695e-4, -9.3604e-4, 99.7831e-4])):
"""Calculates tropospheric ozone forcing from precursor emissions.
Inputs: (nt x 40) emissions array
Keywords:
beta... | 36.384146 | 78 | 0.586224 |
7c57f754fa08c4237dd780441aaf7916aa4b730c | 3,530 | py | Python | tests/test_publish.py | oarepo/oarepo-references-draft | 7e5ad4225c4ace9781d5de952c3765a65b33fd8e | [
"MIT"
] | null | null | null | tests/test_publish.py | oarepo/oarepo-references-draft | 7e5ad4225c4ace9781d5de952c3765a65b33fd8e | [
"MIT"
] | null | null | null | tests/test_publish.py | oarepo/oarepo-references-draft | 7e5ad4225c4ace9781d5de952c3765a65b33fd8e | [
"MIT"
] | null | null | null | import uuid
from invenio_indexer.api import RecordIndexer
from invenio_pidstore.models import PersistentIdentifier, PIDStatus
from invenio_records_draft.api import RecordContext
from invenio_records_draft.proxies import current_drafts
from invenio_search import RecordsSearch, current_search, current_search_client
from... | 40.574713 | 99 | 0.608215 |
7c591440c5e8dee3c070bc7ca52d3ba19f2b4743 | 5,580 | py | Python | examples/ROS/tiscamera.py | xiaotiansf/tiscamera | 8451449788f7429621240e2bbce065d65c5ac10e | [
"Apache-2.0"
] | null | null | null | examples/ROS/tiscamera.py | xiaotiansf/tiscamera | 8451449788f7429621240e2bbce065d65c5ac10e | [
"Apache-2.0"
] | null | null | null | examples/ROS/tiscamera.py | xiaotiansf/tiscamera | 8451449788f7429621240e2bbce065d65c5ac10e | [
"Apache-2.0"
] | null | null | null | import os
import subprocess
from collections import namedtuple
import gi
gi.require_version("Gst", "1.0")
gi.require_version("Tcam", "0.1")
from gi.repository import Tcam, Gst, GLib, GObject
DeviceInfo = namedtuple("DeviceInfo", "status name identifier connection_type")
CameraProperty = namedtuple("CameraProperty", ... | 36.953642 | 170 | 0.624014 |
7c59c1fafc0db31d12d2731c296964f8cac7b7ce | 274 | py | Python | helpers/config.py | bertrand-caron/cv_blog_flask | ce779db31805f0b1a7bbc9a6f09a7d3fe1af74b2 | [
"MIT"
] | null | null | null | helpers/config.py | bertrand-caron/cv_blog_flask | ce779db31805f0b1a7bbc9a6f09a7d3fe1af74b2 | [
"MIT"
] | null | null | null | helpers/config.py | bertrand-caron/cv_blog_flask | ce779db31805f0b1a7bbc9a6f09a7d3fe1af74b2 | [
"MIT"
] | null | null | null | from typing import Dict, Any
from yaml import load
CONFIG = get_config()
| 24.909091 | 72 | 0.671533 |
7c59df650fcdcb09e11e3c4ab2f95de326942e41 | 4,758 | py | Python | raman/unmixing.py | falckt/raman | 8f9fae0e211dd49cebaba98e71787bb663be8fcf | [
"BSD-3-Clause"
] | 1 | 2020-05-21T11:56:32.000Z | 2020-05-21T11:56:32.000Z | raman/unmixing.py | falckt/raman | 8f9fae0e211dd49cebaba98e71787bb663be8fcf | [
"BSD-3-Clause"
] | null | null | null | raman/unmixing.py | falckt/raman | 8f9fae0e211dd49cebaba98e71787bb663be8fcf | [
"BSD-3-Clause"
] | null | null | null | # Author: Tillmann Falck <tf-raman@lucidus.de>
#
# License: BSD 3 clause
#
# SPDX-License-Identifier: BSD-3-Clause
import collections
from itertools import product
import cvxpy as cp
import numpy as np
def sunsal_tv(A, Y, lambda_1, lambda_tv, sweep='prod', tv_type='iso', additional_constraint='none'):
r"""
S... | 34.985294 | 125 | 0.640395 |
7c5bbf4b4ce3af5182a0d6bd6aa48e224f1317d8 | 53 | py | Python | test_stock.py | ucsb-cs48-w19/6pm-stock-trading | daf70b684c15182753d8ca9b820238cf9cd5b75c | [
"MIT"
] | 1 | 2019-04-06T15:44:07.000Z | 2019-04-06T15:44:07.000Z | test_stock.py | ucsb-cs48-w19/6pm-stock-trading | daf70b684c15182753d8ca9b820238cf9cd5b75c | [
"MIT"
] | 35 | 2019-03-07T22:29:04.000Z | 2021-12-13T19:55:51.000Z | test_stock.py | ucsb-cs48-w19/6pm-stock-trading | daf70b684c15182753d8ca9b820238cf9cd5b75c | [
"MIT"
] | 1 | 2019-12-18T23:06:37.000Z | 2019-12-18T23:06:37.000Z | import pytest
| 8.833333 | 18 | 0.622642 |
7c5bc0acf118170063960ef1b43392c65c34384f | 1,421 | py | Python | TM1py/Objects/ElementAttribute.py | damirishpreet/TM1py | 8482d0787fd5a9e5eb05a0288c41b75fc1fc93ac | [
"MIT"
] | 19 | 2016-03-04T19:21:40.000Z | 2021-12-10T02:39:51.000Z | TM1py/Objects/ElementAttribute.py | damirishpreet/TM1py | 8482d0787fd5a9e5eb05a0288c41b75fc1fc93ac | [
"MIT"
] | 11 | 2016-08-24T19:27:11.000Z | 2017-07-30T01:10:28.000Z | TM1py/Objects/ElementAttribute.py | damirishpreet/TM1py | 8482d0787fd5a9e5eb05a0288c41b75fc1fc93ac | [
"MIT"
] | 6 | 2016-08-03T19:28:45.000Z | 2017-01-30T12:25:05.000Z | # -*- coding: utf-8 -*-
import json
from TM1py.Objects.TM1Object import TM1Object
| 25.375 | 75 | 0.655172 |
7c5c4475e9ffb17b4a7ed0975ab0f7646445b8ba | 4,011 | py | Python | account.py | MaherClinc/stockly-bs | 4a2c5741673b85bee9100afef0b404520cb10b5d | [
"MIT"
] | null | null | null | account.py | MaherClinc/stockly-bs | 4a2c5741673b85bee9100afef0b404520cb10b5d | [
"MIT"
] | null | null | null | account.py | MaherClinc/stockly-bs | 4a2c5741673b85bee9100afef0b404520cb10b5d | [
"MIT"
] | null | null | null | from sqlalchemy import exc
from sqlalchemy.sql.expression import func
from models import Watchlist, Portfolio, Activity
from app import db
import metric
| 36.463636 | 126 | 0.667913 |
7c5c6bcf1d0acee591337a1dbb0080fdcf270c1f | 3,175 | py | Python | scripts/addons/kekit/ke_fit2grid.py | Tilapiatsu/blender-custom_conf | 05592fedf74e4b7075a6228b8448a5cda10f7753 | [
"MIT"
] | 2 | 2020-04-16T22:12:40.000Z | 2022-01-22T17:18:45.000Z | scripts/addons/kekit/ke_fit2grid.py | Tilapiatsu/blender-custom_conf | 05592fedf74e4b7075a6228b8448a5cda10f7753 | [
"MIT"
] | null | null | null | scripts/addons/kekit/ke_fit2grid.py | Tilapiatsu/blender-custom_conf | 05592fedf74e4b7075a6228b8448a5cda10f7753 | [
"MIT"
] | 2 | 2019-05-16T04:01:09.000Z | 2020-08-25T11:42:26.000Z | bl_info = {
"name": "ke_fit2grid",
"author": "Kjell Emanuelsson",
"category": "Modeling",
"version": (1, 0, 2),
"blender": (2, 80, 0),
}
import bpy
import bmesh
from .ke_utils import get_loops, correct_normal, average_vector
from mathutils import Vector, Matrix
# ---------------------------------... | 31.75 | 102 | 0.521575 |
7c5d7a1fdf2039a9a74d4beb4a72efeb34b5199f | 201 | py | Python | tests/test_update.py | en0/pyavl3 | c9dad3189da1f18e935e61d13d7c971aceafd895 | [
"MIT"
] | null | null | null | tests/test_update.py | en0/pyavl3 | c9dad3189da1f18e935e61d13d7c971aceafd895 | [
"MIT"
] | null | null | null | tests/test_update.py | en0/pyavl3 | c9dad3189da1f18e935e61d13d7c971aceafd895 | [
"MIT"
] | null | null | null | import unittest
from pyavl3 import AVLTree
| 20.1 | 43 | 0.651741 |
7c5e0af3e6fbbe4ea83ab673bc82739437ec8f74 | 453 | py | Python | python/day5-1.py | Aerdan/adventcode-2020 | 83120aa8c7fc9d1f2d34780610401e3c6d4f583b | [
"BSD-1-Clause"
] | null | null | null | python/day5-1.py | Aerdan/adventcode-2020 | 83120aa8c7fc9d1f2d34780610401e3c6d4f583b | [
"BSD-1-Clause"
] | null | null | null | python/day5-1.py | Aerdan/adventcode-2020 | 83120aa8c7fc9d1f2d34780610401e3c6d4f583b | [
"BSD-1-Clause"
] | null | null | null | #!/usr/bin/env python3
mid = 0
with open('input5.txt') as f:
for line in f.readlines():
line = line[:-1]
row = binary(line[:7], 7, {'F': '0', 'B': '1'})
col = binary(line[7:], 3, {'R': '1', 'L': '0'})
sid = row * 8 + col
mid = sid if sid > mid else mid
print(mid)
| 19.695652 | 55 | 0.487859 |
7c5e5eb731f86fd4dc537483a440f05753a38fab | 600 | py | Python | custom_stocks_py/base.py | baramsalem/Custom-stocks-py | 5beeb7b6f93755ec7c00c25763accf6a52f8bbaf | [
"Unlicense"
] | null | null | null | custom_stocks_py/base.py | baramsalem/Custom-stocks-py | 5beeb7b6f93755ec7c00c25763accf6a52f8bbaf | [
"Unlicense"
] | null | null | null | custom_stocks_py/base.py | baramsalem/Custom-stocks-py | 5beeb7b6f93755ec7c00c25763accf6a52f8bbaf | [
"Unlicense"
] | null | null | null | """
custom_stocks_py base module.
This is the principal module of the custom_stocks_py project.
here you put your main classes and objects.
Be creative! do whatever you want!
If you want to replace this with a Flask application run:
$ make init
and then choose `flask` as template.
"""
def base_function() ->... | 18.181818 | 61 | 0.646667 |
7c5fa2ddc156126b4dccbe0c281c6059666eccf4 | 501 | py | Python | dummy_server.py | dpmkl/heimdall | 184f169f0be9f6b6b708364725f5db8b1f249d9c | [
"MIT"
] | null | null | null | dummy_server.py | dpmkl/heimdall | 184f169f0be9f6b6b708364725f5db8b1f249d9c | [
"MIT"
] | null | null | null | dummy_server.py | dpmkl/heimdall | 184f169f0be9f6b6b708364725f5db8b1f249d9c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import SimpleHTTPServer
import SocketServer
import logging
PORT = 8000
for i in range(4):
Handler = GetHandler
httpd = SocketServer.TCPServer(("", PORT + i), Handler)
httpd.serve_forever() | 25.05 | 64 | 0.682635 |
7c5ff08483bb708102f0397eb8e76c57f5a75cff | 59 | py | Python | cimsparql/__init__.py | nalu-svk/cimsparql | e69b0799a2bbd70027e2c8bb9970574991597ca5 | [
"MIT"
] | null | null | null | cimsparql/__init__.py | nalu-svk/cimsparql | e69b0799a2bbd70027e2c8bb9970574991597ca5 | [
"MIT"
] | null | null | null | cimsparql/__init__.py | nalu-svk/cimsparql | e69b0799a2bbd70027e2c8bb9970574991597ca5 | [
"MIT"
] | null | null | null | """Library for CIM sparql queries"""
__version__ = "1.9.0"
| 19.666667 | 36 | 0.677966 |
7c605332955c4b043be9f4d88d8eb7ca6bb505c8 | 934 | py | Python | scripts/49-cat-logs.py | jmviz/xd | f905e5c61b2835073b19cc3fa0d6917432fa7ece | [
"MIT"
] | 179 | 2016-03-05T03:14:56.000Z | 2022-02-12T22:48:55.000Z | scripts/49-cat-logs.py | jmviz/xd | f905e5c61b2835073b19cc3fa0d6917432fa7ece | [
"MIT"
] | 24 | 2016-02-14T07:43:42.000Z | 2021-12-14T01:09:54.000Z | scripts/49-cat-logs.py | jmviz/xd | f905e5c61b2835073b19cc3fa0d6917432fa7ece | [
"MIT"
] | 25 | 2016-02-19T20:35:03.000Z | 2022-01-31T09:15:44.000Z | #!/usr/bin/env python3
# Usage:
# $0 -o log.txt products/
#
# concatenates .log files (even those in subdirs or .zip) and combines into a single combined.log
from xdfile.utils import find_files_with_time, open_output, get_args
import boto3
# from boto.s3.connection import S3Connection
import os
main()
| 29.1875 | 121 | 0.671306 |
7c606dd98dcd0e38522a604061eae8d10c8862e6 | 1,844 | py | Python | manuscript/link_checker.py | wuyang1002431655/tango_with_django_19 | 42d5878e4a12037daf04d785826357cd4351a16d | [
"Apache-2.0"
] | 244 | 2016-04-12T15:39:47.000Z | 2021-09-10T07:43:55.000Z | manuscript/link_checker.py | wuyang1002431655/tango_with_django_19 | 42d5878e4a12037daf04d785826357cd4351a16d | [
"Apache-2.0"
] | 57 | 2016-03-29T22:12:09.000Z | 2019-08-26T07:50:11.000Z | manuscript/link_checker.py | wuyang1002431655/tango_with_django_19 | 42d5878e4a12037daf04d785826357cd4351a16d | [
"Apache-2.0"
] | 311 | 2016-04-27T04:41:02.000Z | 2021-09-19T14:03:35.000Z | # Checks for broken links in the book chapters, printing the status of each link found to stdout.
# The Python package 'requests' must be installed and available for this simple module to work.
# Author: David Maxwell
# Date: 2017-02-14
import re
import requests
def main(chapters_list_filename, hide_success=True):
""... | 28.369231 | 103 | 0.645879 |
7c607c9719bd98d3bde94fd9eadb9fd81b05f7b7 | 116 | py | Python | service/__init__.py | 2890841438/fast-index.py | fa59f38ed009b4bdf5dbf27d8619d31f8b681118 | [
"MIT"
] | 4 | 2020-09-05T03:18:44.000Z | 2020-09-15T05:56:54.000Z | utils/__init__.py | 2890841438/fast-index.py | fa59f38ed009b4bdf5dbf27d8619d31f8b681118 | [
"MIT"
] | null | null | null | utils/__init__.py | 2890841438/fast-index.py | fa59f38ed009b4bdf5dbf27d8619d31f8b681118 | [
"MIT"
] | null | null | null | # -*- coding = utf-8 -*-
# @Time: 2020/9/4 18:52
# @Author: dimples_yj
# @File: __init__.py.py
# @Software: PyCharm
| 19.333333 | 24 | 0.612069 |
7c62e1ba59e97f238e09a86895f6c890c24d960e | 5,819 | py | Python | CLIP-ViL-Direct/vqa/pythia_clip_grid_feature.py | HermannLiang/CLIP-ViL | 49c28bc5ece1aacfcbfd9c8810db70663ca0516a | [
"MIT"
] | null | null | null | CLIP-ViL-Direct/vqa/pythia_clip_grid_feature.py | HermannLiang/CLIP-ViL | 49c28bc5ece1aacfcbfd9c8810db70663ca0516a | [
"MIT"
] | null | null | null | CLIP-ViL-Direct/vqa/pythia_clip_grid_feature.py | HermannLiang/CLIP-ViL | 49c28bc5ece1aacfcbfd9c8810db70663ca0516a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Grid features extraction script.
"""
import argparse
import os
import torch
import tqdm
from fvcore.common.file_io import PathManager
from detectron2.checkpoint import DetectionCheckpointer
from detectron2.config import get_cfg
from detectron2.engine import default_setup
from detectron2.eva... | 40.978873 | 131 | 0.687231 |
7c6577b07dcade6abb36fc14d4e83aa262bb9bef | 2,514 | py | Python | src/node.py | aerendon/blockchain-basics | e3168afd097b26d23a09fd30e74e07b695e577d1 | [
"MIT"
] | 6 | 2018-08-09T14:36:35.000Z | 2021-03-23T06:53:01.000Z | src/node.py | aerendon/blockchain-basics | e3168afd097b26d23a09fd30e74e07b695e577d1 | [
"MIT"
] | null | null | null | src/node.py | aerendon/blockchain-basics | e3168afd097b26d23a09fd30e74e07b695e577d1 | [
"MIT"
] | null | null | null | from flask import Flask, request
import time
import requests
import json
from blockchain import Blockchain
from block import Block
app = Flask(__name__)
blockchain = Blockchain()
peers = set()
def consensus():
global blockchain
longest_chain = None
current_len = len(blockchain)
for node in peers:... | 25.917526 | 120 | 0.668258 |
7c67194eb5ab82333266efd8ffcbf64d199afeff | 637 | py | Python | Luke 02/02.py | Nilzone-/Knowit-Julekalender-2017 | 66ef8a651277e0fef7d9278f3f129410b5b98ee0 | [
"MIT"
] | null | null | null | Luke 02/02.py | Nilzone-/Knowit-Julekalender-2017 | 66ef8a651277e0fef7d9278f3f129410b5b98ee0 | [
"MIT"
] | null | null | null | Luke 02/02.py | Nilzone-/Knowit-Julekalender-2017 | 66ef8a651277e0fef7d9278f3f129410b5b98ee0 | [
"MIT"
] | null | null | null | import numpy as np
size = 1000
grid = build_grid()
print "Original grid\n"
print grid
visit(grid)
print "\n\nAfter search\n"
print grid
print "\n%d unvisited points in grid" % (size**2 - np.count_nonzero(grid)) | 20.548387 | 104 | 0.620094 |
7c67a7fccb58ad0744513e429cedf4044452005e | 311 | py | Python | databases/music.py | danielicapui/programa-o-avancada | d0e5b876b951ae04a46ffcda0dc0143e3f7114d9 | [
"MIT"
] | null | null | null | databases/music.py | danielicapui/programa-o-avancada | d0e5b876b951ae04a46ffcda0dc0143e3f7114d9 | [
"MIT"
] | null | null | null | databases/music.py | danielicapui/programa-o-avancada | d0e5b876b951ae04a46ffcda0dc0143e3f7114d9 | [
"MIT"
] | null | null | null | from utills import *
conn,cur=start('music')
criarTabela("tracks","title text,plays integer")
music=[('trunder',20),
('my way',15)]
insertInto("tracks","title,plays",music)
#cur.executemany("insert into tracks (title,plays) values (?,?)",music)
buscaTabela("tracks","title")
conn.commit()
conn.close()
| 25.916667 | 71 | 0.691318 |
7c684d5c56bbbdacbeb8612a9b08130a83635f9a | 13,250 | py | Python | video_analysis/code/scene_postprocess.py | pdxcycling/carv.io | cce0f91a76d3ceed714b3625d415131fd9540899 | [
"MIT"
] | null | null | null | video_analysis/code/scene_postprocess.py | pdxcycling/carv.io | cce0f91a76d3ceed714b3625d415131fd9540899 | [
"MIT"
] | null | null | null | video_analysis/code/scene_postprocess.py | pdxcycling/carv.io | cce0f91a76d3ceed714b3625d415131fd9540899 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import re
from collections import Counter
from flow_preprocess import FlowPreprocess
| 35.05291 | 128 | 0.60234 |
7c6a104628420af03301492fef43b77ba98e1a64 | 6,840 | py | Python | examples/pytorch/mnist/plot.py | ThomasRot/rational_activations | 1fa26d1ee5f3c916eda00c899afa96eccb960143 | [
"MIT"
] | null | null | null | examples/pytorch/mnist/plot.py | ThomasRot/rational_activations | 1fa26d1ee5f3c916eda00c899afa96eccb960143 | [
"MIT"
] | null | null | null | examples/pytorch/mnist/plot.py | ThomasRot/rational_activations | 1fa26d1ee5f3c916eda00c899afa96eccb960143 | [
"MIT"
] | null | null | null | import torch
import numpy as np
import pickle
torch.manual_seed(17)
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False
np.random.seed(17)
import argparse
import torch.nn as nn
import torch.nn.functional as F
import matplotlib
import os
from rational.torch import Rational, RecurrentRationa... | 45.90604 | 134 | 0.55424 |
7c6a234a8099f1c0f0c886e2b520d9f41e36c635 | 7,093 | py | Python | fts/fluxrss.py | AetherBlack/Veille-Informatique | e80451c5eb21f43ac1a9baac3342ad0d4102d18b | [
"Linux-OpenIB"
] | null | null | null | fts/fluxrss.py | AetherBlack/Veille-Informatique | e80451c5eb21f43ac1a9baac3342ad0d4102d18b | [
"Linux-OpenIB"
] | null | null | null | fts/fluxrss.py | AetherBlack/Veille-Informatique | e80451c5eb21f43ac1a9baac3342ad0d4102d18b | [
"Linux-OpenIB"
] | null | null | null | #!/usr/bin/python3
from urllib.parse import urlparse
import feedparser
import requests
import asyncio
import discord
import hashlib
import os
from const import CHANNEL_RSS, WAIT_UNTIL_NEW_CHECK, \
SQLITE_FOLDER_NAME, SQLITE_FILE_NAME
from fts.database import Database
from fts.cleandatabase import CleanDatabase
| 36.188776 | 123 | 0.537572 |
7c6a29fe050821e14428d8ec0b7f5f5436d84fcb | 11,691 | py | Python | src/poke_env/player/player_network_interface.py | kiyohiro8/poke-env | 7a1a4b155e8a73bd712d44e70c4192f8032d7e6f | [
"MIT"
] | null | null | null | src/poke_env/player/player_network_interface.py | kiyohiro8/poke-env | 7a1a4b155e8a73bd712d44e70c4192f8032d7e6f | [
"MIT"
] | null | null | null | src/poke_env/player/player_network_interface.py | kiyohiro8/poke-env | 7a1a4b155e8a73bd712d44e70c4192f8032d7e6f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""This module defines a base class for communicating with showdown servers.
"""
import json
import logging
import requests
import websockets # pyre-ignore
from abc import ABC
from abc import abstractmethod
from asyncio import CancelledError
from asyncio import ensure_future
from asyncio impo... | 36.307453 | 88 | 0.610042 |
7c6b5cb13f50ba4f535dc82987b58898ad693a5f | 5,966 | py | Python | data/external/repositories/42139/KDDCup13Track2-master/blocking.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories/42139/KDDCup13Track2-master/blocking.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories/42139/KDDCup13Track2-master/blocking.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | 1 | 2019-12-04T08:23:33.000Z | 2019-12-04T08:23:33.000Z | #!/usr/bin/env python
from common import *
import csv
import argparse
from unidecode import unidecode
from nameparser import constants as npc
from collections import defaultdict
import cPickle as pickle
import re
stopwords_custom = set(['document', 'preparation', 'system', 'consortium', 'committee', 'international', '... | 29.979899 | 703 | 0.632417 |
7c6be61ef0d7cd7c0ad0f76e6b1f86ee30283323 | 1,180 | py | Python | resources/dot_PyCharm/system/python_stubs/-762174762/PySide/QtCore/QAbstractFileEngineIterator.py | basepipe/developer_onboarding | 05b6a776f8974c89517868131b201f11c6c2a5ad | [
"MIT"
] | 1 | 2020-04-20T02:27:20.000Z | 2020-04-20T02:27:20.000Z | resources/dot_PyCharm/system/python_stubs/cache/16012662ddca113c1f50140f9e0d3bd290a511015767475cf362e5267760f062/PySide/QtCore/QAbstractFileEngineIterator.py | basepipe/developer_onboarding | 05b6a776f8974c89517868131b201f11c6c2a5ad | [
"MIT"
] | null | null | null | resources/dot_PyCharm/system/python_stubs/cache/16012662ddca113c1f50140f9e0d3bd290a511015767475cf362e5267760f062/PySide/QtCore/QAbstractFileEngineIterator.py | basepipe/developer_onboarding | 05b6a776f8974c89517868131b201f11c6c2a5ad | [
"MIT"
] | null | null | null | # encoding: utf-8
# module PySide.QtCore
# from C:\Python27\lib\site-packages\PySide\QtCore.pyd
# by generator 1.147
# no doc
# imports
import Shiboken as __Shiboken
| 25.652174 | 77 | 0.644915 |