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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
813cfc21850f486d6ac29f7b86826c89d492a555 | 41,687 | py | Python | core/models.py | uktrade/great-cms | f13fa335ddcb925bc33a5fa096fe73ef7bdd351a | [
"MIT"
] | 10 | 2020-04-30T12:04:35.000Z | 2021-07-21T12:48:55.000Z | core/models.py | uktrade/great-cms | f13fa335ddcb925bc33a5fa096fe73ef7bdd351a | [
"MIT"
] | 1,461 | 2020-01-23T18:20:26.000Z | 2022-03-31T08:05:56.000Z | core/models.py | uktrade/great-cms | f13fa335ddcb925bc33a5fa096fe73ef7bdd351a | [
"MIT"
] | 3 | 2020-04-07T20:11:36.000Z | 2020-10-16T16:22:59.000Z | import hashlib
import mimetypes
from urllib.parse import unquote
from django.conf import settings
from django.core.exceptions import ValidationError
from django.db import models
from django.http import HttpResponseRedirect
from django.template.loader import render_to_string
from django.urls import reverse
from django.... | 32.491816 | 120 | 0.614052 |
813ec18cfeb4f9f63d67da715da440d160d1cd07 | 9,860 | py | Python | CV/Effective Transformer-based Solution for RSNA Intracranial Hemorrhage Detection/easymia/transforms/transforms.py | dumpmemory/Research | 30fd70ff331b3d9aeede0b71e7a691ed6c2b87b3 | [
"Apache-2.0"
] | null | null | null | CV/Effective Transformer-based Solution for RSNA Intracranial Hemorrhage Detection/easymia/transforms/transforms.py | dumpmemory/Research | 30fd70ff331b3d9aeede0b71e7a691ed6c2b87b3 | [
"Apache-2.0"
] | null | null | null | CV/Effective Transformer-based Solution for RSNA Intracranial Hemorrhage Detection/easymia/transforms/transforms.py | dumpmemory/Research | 30fd70ff331b3d9aeede0b71e7a691ed6c2b87b3 | [
"Apache-2.0"
] | null | null | null | # -*-coding utf-8 -*-
##########################################################################
#
# Copyright (c) 2022 Baidu.com, Inc. 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 th... | 34.840989 | 136 | 0.596349 |
813efba40d450227c03f83890923f36f0af07beb | 1,370 | py | Python | tests/ui/terms/test_views.py | galterlibrary/InvenioRDM-at-NU | 5aff6ac7c428c9a61bdf221627bfc05f2280d1a3 | [
"MIT"
] | 6 | 2019-09-02T00:01:50.000Z | 2021-11-04T08:23:40.000Z | tests/ui/terms/test_views.py | galterlibrary/InvenioRDM-at-NU | 5aff6ac7c428c9a61bdf221627bfc05f2280d1a3 | [
"MIT"
] | 72 | 2019-09-04T18:52:35.000Z | 2020-07-21T19:58:15.000Z | tests/ui/terms/test_views.py | galterlibrary/InvenioRDM-at-NU | 5aff6ac7c428c9a61bdf221627bfc05f2280d1a3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This file is part of menRva.
# Copyright (C) 2018-present NU,FSM,GHSL.
#
# menRva is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Test terms views.py"""
from cd2h_repo_project.modules.terms.views import ... | 28.541667 | 77 | 0.642336 |
813f340b009c015cf7a900f2f532f4b131c3414d | 1,766 | py | Python | main.py | alamin3637k/Searcher | bb948b373d1bd1261930a47c37fa9210a98e9ef3 | [
"MIT"
] | 1 | 2021-12-13T06:30:54.000Z | 2021-12-13T06:30:54.000Z | main.py | alamin3637k/Searcher | bb948b373d1bd1261930a47c37fa9210a98e9ef3 | [
"MIT"
] | null | null | null | main.py | alamin3637k/Searcher | bb948b373d1bd1261930a47c37fa9210a98e9ef3 | [
"MIT"
] | null | null | null | import webbrowser
import wikipedia
import requests
def test_site(search: str):
"""please enter site name with http information"""
try:
r = requests.get(search)
except Exception as error:
print(error)
return "site not working"
if r.status_code == 200:
print("site wo... | 30.448276 | 85 | 0.701586 |
813ffa71bdba0211d608c2b11546d97e7ed15b73 | 9,307 | py | Python | hw1.py | ptsurko/coursera_crypt | ec952800c441a9b07ac427045851285fee8c6543 | [
"MIT"
] | null | null | null | hw1.py | ptsurko/coursera_crypt | ec952800c441a9b07ac427045851285fee8c6543 | [
"MIT"
] | null | null | null | hw1.py | ptsurko/coursera_crypt | ec952800c441a9b07ac427045851285fee8c6543 | [
"MIT"
] | null | null | null | import string
from timeit import itertools
s1 = '315c4eeaa8b5f8aaf9174145bf43e1784b8fa00dc71d885a804e5ee9fa40b16349c146fb778cdf2d3aff021dfff5b403b510d0d0455468aeb98622b137dae857553ccd8883a7bc37520e06e515d22c954eba5025b8cc57ee59418ce7dc6bc41556bdb36bbca3e8774301fbcaa3b83b220809560987815f65286764703de0f3d524400a19b15961... | 44.745192 | 379 | 0.659933 |
81411abc782bf9b1f6f3f22e5119bf12fc73f345 | 5,777 | py | Python | moe/bandit/ucb/ucb_interface.py | dstoeckel/MOE | 5b5a6a2c6c3cf47320126f7f5894e2a83e347f5c | [
"Apache-2.0"
] | 966 | 2015-01-10T05:27:30.000Z | 2022-03-26T21:04:36.000Z | moe/bandit/ucb/ucb_interface.py | dstoeckel/MOE | 5b5a6a2c6c3cf47320126f7f5894e2a83e347f5c | [
"Apache-2.0"
] | 46 | 2015-01-16T22:33:08.000Z | 2019-09-04T16:33:27.000Z | moe/bandit/ucb/ucb_interface.py | dstoeckel/MOE | 5b5a6a2c6c3cf47320126f7f5894e2a83e347f5c | [
"Apache-2.0"
] | 143 | 2015-01-07T03:57:19.000Z | 2022-02-28T01:10:45.000Z | # -*- coding: utf-8 -*-
"""Classes (Python) to compute the Bandit UCB (Upper Confidence Bound) arm allocation and choosing the arm to pull next.
See :mod:`moe.bandit.bandit_interface` for further details on bandit.
"""
import copy
from abc import abstractmethod
from moe.bandit.bandit_interface import BanditInterfac... | 41.561151 | 171 | 0.701229 |
8141278e8aec7ffc16f0909af9f0862c9b9fc0df | 296 | py | Python | Hedge/Shell.py | RonaldoAPSD/Hedge | 2a1550ea38a0384f39ed3541c8a91f9ca57f5a64 | [
"Apache-2.0"
] | 2 | 2020-08-16T01:42:32.000Z | 2020-08-28T21:10:03.000Z | Hedge/Shell.py | RonaldoAPSD/Hedge | 2a1550ea38a0384f39ed3541c8a91f9ca57f5a64 | [
"Apache-2.0"
] | null | null | null | Hedge/Shell.py | RonaldoAPSD/Hedge | 2a1550ea38a0384f39ed3541c8a91f9ca57f5a64 | [
"Apache-2.0"
] | null | null | null | import Hedge
while True:
text = input('Hedge > ')
if text.strip() == "":
continue
result, error = Hedge.run('<stdin>', text)
if (error):
print(error.asString())
elif result:
if len(result.elements) == 1:
print(repr(result.elements[0]))
else:
print(repr(result)) | 19.733333 | 44 | 0.60473 |
81433f45286c6ca7869898f63194549b86792d2f | 14,420 | py | Python | yt/frontends/enzo/io.py | Xarthisius/yt | 321643c3abff64a6f132d98d0747f3558f7552a3 | [
"BSD-3-Clause-Clear"
] | 1 | 2021-05-20T13:03:57.000Z | 2021-05-20T13:03:57.000Z | yt/frontends/enzo/io.py | Xarthisius/yt | 321643c3abff64a6f132d98d0747f3558f7552a3 | [
"BSD-3-Clause-Clear"
] | 31 | 2017-04-19T21:07:18.000Z | 2017-04-20T01:08:43.000Z | yt/frontends/enzo/io.py | Xarthisius/yt | 321643c3abff64a6f132d98d0747f3558f7552a3 | [
"BSD-3-Clause-Clear"
] | 1 | 2021-04-21T07:01:51.000Z | 2021-04-21T07:01:51.000Z | import numpy as np
from yt.geometry.selection_routines import GridSelector
from yt.utilities.io_handler import BaseIOHandler
from yt.utilities.logger import ytLogger as mylog
from yt.utilities.on_demand_imports import _h5py as h5py
_convert_mass = ("particle_mass", "mass")
_particle_position_names = {}
| 38.867925 | 85 | 0.499792 |
81434230700195b62a622200418ac9737e7bcf37 | 1,275 | py | Python | cidr_enum.py | arisada/cidr_enum | 1908f20ac15a83738fc1ff74ff17a7280bec769f | [
"BSD-2-Clause"
] | null | null | null | cidr_enum.py | arisada/cidr_enum | 1908f20ac15a83738fc1ff74ff17a7280bec769f | [
"BSD-2-Clause"
] | null | null | null | cidr_enum.py | arisada/cidr_enum | 1908f20ac15a83738fc1ff74ff17a7280bec769f | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
"""
cidr_enum.py is a very simple tool to help enumerate IP ranges when being used with other tools
"""
import argparse
import netaddr
if __name__ == '__main__':
main()
| 25 | 95 | 0.677647 |
81434e0f75802811d789efae93fbec2c949725b8 | 7,469 | py | Python | configs/k400-fixmatch-tg-alignment-videos-ptv-simclr/8gpu/r3d_r18_8x8x1_45e_k400_rgb_offlinetg_1percent_align0123_1clip_no_contrast_precisebn_ptv.py | lambert-x/video_semisup | 8ff44343bb34485f8ad08d50ca4d8de22e122c1d | [
"Apache-2.0"
] | null | null | null | configs/k400-fixmatch-tg-alignment-videos-ptv-simclr/8gpu/r3d_r18_8x8x1_45e_k400_rgb_offlinetg_1percent_align0123_1clip_no_contrast_precisebn_ptv.py | lambert-x/video_semisup | 8ff44343bb34485f8ad08d50ca4d8de22e122c1d | [
"Apache-2.0"
] | null | null | null | configs/k400-fixmatch-tg-alignment-videos-ptv-simclr/8gpu/r3d_r18_8x8x1_45e_k400_rgb_offlinetg_1percent_align0123_1clip_no_contrast_precisebn_ptv.py | lambert-x/video_semisup | 8ff44343bb34485f8ad08d50ca4d8de22e122c1d | [
"Apache-2.0"
] | null | null | null | # model settings
model = dict(
type='Semi_AppSup_TempSup_SimCLR_Crossclip_PTV_Recognizer3D',
backbone=dict(
type='ResNet3d',
depth=18,
pretrained=None,
pretrained2d=False,
norm_eval=False,
conv_cfg=dict(type='Conv3d'),
norm_cfg=dict(type='SyncBN', requires... | 33.95 | 126 | 0.664078 |
8143df98ebce82100584c4d53ea2d04b4dccafa6 | 3,351 | py | Python | experiments/rpi/gertboard/dtoa.py | willingc/pingo | 0890bf5ed763e9061320093fc3fb5f7543c5cc2c | [
"MIT"
] | null | null | null | experiments/rpi/gertboard/dtoa.py | willingc/pingo | 0890bf5ed763e9061320093fc3fb5f7543c5cc2c | [
"MIT"
] | 1 | 2021-03-20T05:17:03.000Z | 2021-03-20T05:17:03.000Z | experiments/rpi/gertboard/dtoa.py | willingc/pingo | 0890bf5ed763e9061320093fc3fb5f7543c5cc2c | [
"MIT"
] | null | null | null | #!/usr/bin/python2.7
# Python 2.7 version by Alex Eames of http://RasPi.TV
# functionally equivalent to the Gertboard dtoa test by Gert Jan van Loo & Myra VanInwegen
# Use at your own risk - I'm pretty sure the code is harmless, but check it yourself.
# This will not work unless you have installed py-spidev as in the ... | 45.90411 | 110 | 0.664279 |
d48ba98f343e96c0da8c5db735d6d98bd7a3e3d3 | 5,370 | py | Python | modules/statusbar.py | themilkman/GitGutter | 355b4480e7e1507fe1f9ae1ad9eca9649400a76c | [
"MIT"
] | null | null | null | modules/statusbar.py | themilkman/GitGutter | 355b4480e7e1507fe1f9ae1ad9eca9649400a76c | [
"MIT"
] | null | null | null | modules/statusbar.py | themilkman/GitGutter | 355b4480e7e1507fe1f9ae1ad9eca9649400a76c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sublime
from . import blame
from . import templates
| 33.354037 | 78 | 0.570577 |
d48c84bf13aa3330a9778d95947b20e6d95dfadf | 194 | py | Python | polls/tests.py | bunya017/Django-Polls-App | 7b71ac9d1ffb66518e1d0345bc0f11ee5907c1be | [
"MIT"
] | null | null | null | polls/tests.py | bunya017/Django-Polls-App | 7b71ac9d1ffb66518e1d0345bc0f11ee5907c1be | [
"MIT"
] | 4 | 2020-06-05T18:14:33.000Z | 2022-01-13T00:45:05.000Z | polls/tests.py | bunya017/Django-Polls-App | 7b71ac9d1ffb66518e1d0345bc0f11ee5907c1be | [
"MIT"
] | 1 | 2018-05-23T11:36:36.000Z | 2018-05-23T11:36:36.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase
| 14.923077 | 39 | 0.742268 |
d48e8d3a34a96d0df0efeeb8e07e14864978dc32 | 1,115 | py | Python | test.py | LeonHodgesAustin/video_stream_processor | 8014705edc37599716eb1320d46c99136fe3e262 | [
"BSD-3-Clause"
] | null | null | null | test.py | LeonHodgesAustin/video_stream_processor | 8014705edc37599716eb1320d46c99136fe3e262 | [
"BSD-3-Clause"
] | null | null | null | test.py | LeonHodgesAustin/video_stream_processor | 8014705edc37599716eb1320d46c99136fe3e262 | [
"BSD-3-Clause"
] | null | null | null | # import logging
# import hercules.lib.util.hercules_logging as l
# from hercules.lib.util import sso as sso
import opencv2 as cv2
import urllib
import numpy as np
# log = l.setup_logging(__name__)
if __name__ == "__main__":
main()
| 27.875 | 102 | 0.6287 |
d48ee17b3f638f1522292d248a4e2094be89792e | 1,244 | py | Python | ribbon/exceptions.py | cloutiertyler/RibbonGraph | 000864dd0ee33da4ed44af2f4bd1f1a83d5a1ba4 | [
"MIT"
] | 2 | 2017-09-20T17:49:09.000Z | 2017-09-20T17:55:43.000Z | ribbon/exceptions.py | cloutiertyler/RibbonGraph | 000864dd0ee33da4ed44af2f4bd1f1a83d5a1ba4 | [
"MIT"
] | null | null | null | ribbon/exceptions.py | cloutiertyler/RibbonGraph | 000864dd0ee33da4ed44af2f4bd1f1a83d5a1ba4 | [
"MIT"
] | null | null | null | from rest_framework.exceptions import APIException
from rest_framework import status
| 28.272727 | 103 | 0.762058 |
d48f61239e116e08f567623063b6adca1886ef91 | 3,792 | py | Python | kobe-trading-bot/app.py | LeonardoM011/kobe-trading-bot | 83a84ee0fb8dab3d9ae174be91e96de6d5f2d823 | [
"MIT"
] | null | null | null | kobe-trading-bot/app.py | LeonardoM011/kobe-trading-bot | 83a84ee0fb8dab3d9ae174be91e96de6d5f2d823 | [
"MIT"
] | null | null | null | kobe-trading-bot/app.py | LeonardoM011/kobe-trading-bot | 83a84ee0fb8dab3d9ae174be91e96de6d5f2d823 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Crypto trading bot using binance api
# Author: LeonardoM011<Leonardo.leo.201@gmail.com>
# Created on 2021-02-05 21:56
# Set constants here:
DELTA_TIME = 300 # How long can we check for setting up new trade (in seconds)
# ----------------------
# Imports:
import os
import sys... | 36.461538 | 219 | 0.620781 |
d4910ca755a73b263041c7cd3c681f6108d61901 | 13,061 | py | Python | imported_files/plotting_edh01.py | SoumyaShreeram/Locating_AGN_in_DM_halos | 1cfbee69b2c000faee4ecb199d65c3235afbed42 | [
"MIT"
] | null | null | null | imported_files/plotting_edh01.py | SoumyaShreeram/Locating_AGN_in_DM_halos | 1cfbee69b2c000faee4ecb199d65c3235afbed42 | [
"MIT"
] | null | null | null | imported_files/plotting_edh01.py | SoumyaShreeram/Locating_AGN_in_DM_halos | 1cfbee69b2c000faee4ecb199d65c3235afbed42 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Plotting.py for notebook 01_Exploring_DM_Halos
This python file contains all the functions used for plotting graphs and maps in the 1st notebook (.ipynb) of the repository: 01. Exploring parameters in DM halos and sub-halos
Script written by: Soumya Shreeram
Project supervised by Johan Com... | 41.996785 | 193 | 0.674298 |
d49130f40117c9ae1a6661a583616d08186beb75 | 2,239 | py | Python | asv_bench/benchmarks/omnisci/io.py | Rubtsowa/modin | 6550939753c76e896ef2bfd65bb9468d6ad161d7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | asv_bench/benchmarks/omnisci/io.py | Rubtsowa/modin | 6550939753c76e896ef2bfd65bb9468d6ad161d7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | asv_bench/benchmarks/omnisci/io.py | Rubtsowa/modin | 6550939753c76e896ef2bfd65bb9468d6ad161d7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Licensed to Modin Development Team under one or more contributor license agreements.
# See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The Modin Development Team licenses this file to you under the
# Apache License, Version 2.0 (the "License"); you may not u... | 33.924242 | 87 | 0.663243 |
d4913a27e63bc4d452b162e06717cf43b3cf28c7 | 7,730 | py | Python | benchmarks/rotation/rotated_cifar.py | ypeng22/ProgLearn | 671ff6a03c156bab3eedbd9e112705eeabd59da7 | [
"MIT"
] | 1 | 2021-02-02T03:18:46.000Z | 2021-02-02T03:18:46.000Z | benchmarks/rotation/rotated_cifar.py | ypeng22/ProgLearn | 671ff6a03c156bab3eedbd9e112705eeabd59da7 | [
"MIT"
] | null | null | null | benchmarks/rotation/rotated_cifar.py | ypeng22/ProgLearn | 671ff6a03c156bab3eedbd9e112705eeabd59da7 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import random
import pickle
from skimage.transform import rotate
from scipy import ndimage
from skimage.util import img_as_ubyte
from joblib import Parallel, delayed
from sklearn.ensemble.forest import _generate_unsampled_indices
from sklearn.ensemble.forest import _generate_sample_indic... | 40.684211 | 139 | 0.625356 |
d4925b374376cf8c3d1b5d0d5ddbaf90cc28fafd | 3,763 | py | Python | sklearn_pandas/transformers/monitor.py | toddbenanzer/sklearn_pandas | 36e24c55ef4829aa261963201c346869097d4931 | [
"MIT"
] | null | null | null | sklearn_pandas/transformers/monitor.py | toddbenanzer/sklearn_pandas | 36e24c55ef4829aa261963201c346869097d4931 | [
"MIT"
] | null | null | null | sklearn_pandas/transformers/monitor.py | toddbenanzer/sklearn_pandas | 36e24c55ef4829aa261963201c346869097d4931 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from sklearn.base import BaseEstimator, TransformerMixin, clone
from sklearn_pandas.util import validate_dataframe
| 38.010101 | 140 | 0.543981 |
d4928bbc94c4225d834897ba151f5d1146c73aa7 | 10,842 | py | Python | Packs/ProofpointThreatResponse/Integrations/ProofpointThreatResponse/ProofpointThreatResponse_test.py | cbrake1/content | 5b031129f98935c492056675eeee0fefcacbd87b | [
"MIT"
] | 1 | 2020-11-25T00:42:27.000Z | 2020-11-25T00:42:27.000Z | Packs/ProofpointThreatResponse/Integrations/ProofpointThreatResponse/ProofpointThreatResponse_test.py | cbrake1/content | 5b031129f98935c492056675eeee0fefcacbd87b | [
"MIT"
] | 22 | 2022-03-23T10:39:16.000Z | 2022-03-31T11:31:37.000Z | Packs/ProofpointThreatResponse/Integrations/ProofpointThreatResponse/ProofpointThreatResponse_test.py | cbrake1/content | 5b031129f98935c492056675eeee0fefcacbd87b | [
"MIT"
] | null | null | null | import pytest
from CommonServerPython import *
from ProofpointThreatResponse import create_incident_field_context, get_emails_context, pass_sources_list_filter, \
pass_abuse_disposition_filter, filter_incidents, prepare_ingest_alert_request_body, \
get_incidents_batch_by_time_request, get_new_incidents, get_tim... | 32.558559 | 128 | 0.603394 |
d492fd9d00437e877a4501964cd431bb0546c438 | 3,522 | py | Python | macholib/macho_methname.py | l1haoyuan/macholib | 48c59841e2ca5aa308eab67f72faed384a2c0723 | [
"MIT"
] | null | null | null | macholib/macho_methname.py | l1haoyuan/macholib | 48c59841e2ca5aa308eab67f72faed384a2c0723 | [
"MIT"
] | null | null | null | macholib/macho_methname.py | l1haoyuan/macholib | 48c59841e2ca5aa308eab67f72faed384a2c0723 | [
"MIT"
] | null | null | null | import sys
import os
import json
from enum import Enum
from .mach_o import LC_SYMTAB
from macholib import MachO
from macholib import mach_o
from shutil import copy2
from shutil import SameFileError
def replace_methname(macho_file, methname_json, output_dir):
"""
Map method names in Mach-O file with the JSO... | 30.102564 | 111 | 0.635434 |
d493c88653dfc14a4b19dd601e82fe9c227bb1db | 123 | py | Python | archive/data-processing/archive/features/sd1.py | FloFincke/affective-chat | 241c2b555541968f7e5e70b022fdb71102aed510 | [
"MIT"
] | null | null | null | archive/data-processing/archive/features/sd1.py | FloFincke/affective-chat | 241c2b555541968f7e5e70b022fdb71102aed510 | [
"MIT"
] | 10 | 2020-01-28T22:17:46.000Z | 2022-02-09T23:30:57.000Z | archive/data-processing/archive/features/sd1.py | FloFincke/affective-chat | 241c2b555541968f7e5e70b022fdb71102aed510 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import math
import numpy as np | 15.375 | 36 | 0.674797 |
d493cf85a9cb37a46e9d38eab9f5e238cbe228b0 | 1,515 | py | Python | forms/snippets/delete_watch.py | soheilv/python-samples | 4443431261dbcd88408dcc89d5702eeb1ac18ffd | [
"Apache-2.0"
] | 255 | 2020-10-16T16:27:54.000Z | 2022-03-31T14:26:29.000Z | forms/snippets/delete_watch.py | soheilv/python-samples | 4443431261dbcd88408dcc89d5702eeb1ac18ffd | [
"Apache-2.0"
] | 58 | 2020-10-16T14:24:27.000Z | 2022-03-19T13:27:27.000Z | forms/snippets/delete_watch.py | soheilv/python-samples | 4443431261dbcd88408dcc89d5702eeb1ac18ffd | [
"Apache-2.0"
] | 316 | 2020-10-16T17:06:00.000Z | 2022-03-30T19:18:31.000Z | # Copyright 2021 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 36.95122 | 118 | 0.770297 |
d49496c9213106a0918889d0e3a6aa3992ff1641 | 1,829 | py | Python | data_structures/disjoint_set/disjoint_set.py | egagraha/python-algorithm | 07a6a745b4ebddc93ab7c10b205c75b2427ac1fb | [
"MIT"
] | null | null | null | data_structures/disjoint_set/disjoint_set.py | egagraha/python-algorithm | 07a6a745b4ebddc93ab7c10b205c75b2427ac1fb | [
"MIT"
] | null | null | null | data_structures/disjoint_set/disjoint_set.py | egagraha/python-algorithm | 07a6a745b4ebddc93ab7c10b205c75b2427ac1fb | [
"MIT"
] | null | null | null | """
Disjoint set.
Reference: https://en.wikipedia.org/wiki/Disjoint-set_data_structure
"""
def make_set(x: Node) -> None:
"""
Make x as a set.
"""
# rank is the distance from x to its' parent
# root's rank is 0
x.rank = 0
x.parent = x
def union_set(x: Node, y: Node) -> None:
... | 21.517647 | 73 | 0.556042 |
d494b4ecc12674b178766fec7fe530877b75b17d | 1,391 | py | Python | cw_EPR.py | tkeller12/spin_physics | 271f3081bc8ca87b159ed3e3494dbd0ffdea8fa5 | [
"MIT"
] | null | null | null | cw_EPR.py | tkeller12/spin_physics | 271f3081bc8ca87b159ed3e3494dbd0ffdea8fa5 | [
"MIT"
] | null | null | null | cw_EPR.py | tkeller12/spin_physics | 271f3081bc8ca87b159ed3e3494dbd0ffdea8fa5 | [
"MIT"
] | null | null | null | # Timothy Keller
# S = 1/2, I = 1/2
# Spin 1/2 electron coupled to spin 1/2 nuclei
import numpy as np
from scipy.linalg import expm
from matplotlib.pylab import *
from matplotlib import cm
sigma_x = 0.5*np.r_[[[0, 1],[1, 0]]]
sigma_y = 0.5*np.r_[[[0,-1j],[1j, 0]]]
sigma_z = 0.5*np.r_[[[1, 0],[0, -1]]]
Identity = np.e... | 21.075758 | 113 | 0.62473 |
d494b73023a37a848160341332c0ded7a2a24518 | 1,787 | py | Python | V2RaycSpider0825/MiddleKey/VMes_IO.py | TOMJERRY23333/V2RayCloudSpider | 0647db8c7b67e4393d1f65dadc08d7e16c1dc324 | [
"MIT"
] | 1 | 2020-09-16T12:59:32.000Z | 2020-09-16T12:59:32.000Z | V2RaycSpider0825/MiddleKey/VMes_IO.py | TOMJERRY23333/V2RayCloudSpider | 0647db8c7b67e4393d1f65dadc08d7e16c1dc324 | [
"MIT"
] | null | null | null | V2RaycSpider0825/MiddleKey/VMes_IO.py | TOMJERRY23333/V2RayCloudSpider | 0647db8c7b67e4393d1f65dadc08d7e16c1dc324 | [
"MIT"
] | null | null | null | from spiderNest.preIntro import *
path_ = os.path.dirname(os.path.dirname(__file__)) + '/dataBase/log_information.csv'
def save_login_info(VMess, class_):
"""
VMess
class_: ssr or v2ray
"""
now = str(datetime.now()).split('.')[0]
with open(path_, 'a', encoding='utf-8', newline='') as f:
... | 28.365079 | 84 | 0.525462 |
d494cc4fdc66704176b1bdb14e2b8bf08f6d120c | 29,585 | py | Python | paddlespeech/s2t/frontend/audio.py | AK391/PaddleSpeech | 8cdbe3a6c0fe447e54cfbcfd82139d2869f5fc49 | [
"Apache-2.0"
] | null | null | null | paddlespeech/s2t/frontend/audio.py | AK391/PaddleSpeech | 8cdbe3a6c0fe447e54cfbcfd82139d2869f5fc49 | [
"Apache-2.0"
] | null | null | null | paddlespeech/s2t/frontend/audio.py | AK391/PaddleSpeech | 8cdbe3a6c0fe447e54cfbcfd82139d2869f5fc49 | [
"Apache-2.0"
] | null | null | null | # 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... | 41.204735 | 84 | 0.598378 |
d49613fe0b2e81e10d722fc25f0c3fd9aa1b0a51 | 4,119 | py | Python | tornado_debugger/debug.py | bhch/tornado-debugger | 4adeead7a45506eda34fc8d1e91dd32acc8cfe4e | [
"BSD-3-Clause"
] | 1 | 2022-03-21T11:52:30.000Z | 2022-03-21T11:52:30.000Z | tornado_debugger/debug.py | bhch/tornado-debugger | 4adeead7a45506eda34fc8d1e91dd32acc8cfe4e | [
"BSD-3-Clause"
] | null | null | null | tornado_debugger/debug.py | bhch/tornado-debugger | 4adeead7a45506eda34fc8d1e91dd32acc8cfe4e | [
"BSD-3-Clause"
] | null | null | null | import os.path
import re
import sys
import traceback
from pprint import pformat
import tornado
from tornado import template
SENSITIVE_SETTINGS_RE = re.compile(
'api|key|pass|salt|secret|signature|token',
flags=re.IGNORECASE
)
| 31.442748 | 77 | 0.571255 |
d496568fcdd0e4278b5c17076444af1d96c25b39 | 2,426 | py | Python | base/pylib/seq_iter.py | jpolitz/lambda-py-paper | 746ef63fc1123714b4adaf78119028afbea7bd76 | [
"Apache-2.0"
] | 1 | 2017-12-10T00:05:54.000Z | 2017-12-10T00:05:54.000Z | base/pylib/seq_iter.py | jpolitz/lambda-py-paper | 746ef63fc1123714b4adaf78119028afbea7bd76 | [
"Apache-2.0"
] | null | null | null | base/pylib/seq_iter.py | jpolitz/lambda-py-paper | 746ef63fc1123714b4adaf78119028afbea7bd76 | [
"Apache-2.0"
] | null | null | null |
___assign("%SeqIter", SeqIter)
___assign("%iter", iter)
___assign("%next", next)
___assign("%FuncIter", FuncIter)
| 22.462963 | 58 | 0.490107 |
d496c50445b160bee65444aedffd5152e26bcfa5 | 1,542 | py | Python | caseworker/open_general_licences/enums.py | code-review-doctor/lite-frontend-1 | cb3b885bb389ea33ef003c916bea7b03a36d86bb | [
"MIT"
] | null | null | null | caseworker/open_general_licences/enums.py | code-review-doctor/lite-frontend-1 | cb3b885bb389ea33ef003c916bea7b03a36d86bb | [
"MIT"
] | null | null | null | caseworker/open_general_licences/enums.py | code-review-doctor/lite-frontend-1 | cb3b885bb389ea33ef003c916bea7b03a36d86bb | [
"MIT"
] | null | null | null | from lite_content.lite_internal_frontend.open_general_licences import (
OGEL_DESCRIPTION,
OGTCL_DESCRIPTION,
OGTL_DESCRIPTION,
)
from lite_forms.components import Option
| 29.09434 | 117 | 0.647211 |
d496c9cfdd316aad01a20acdae3c9c7e998fb11f | 887 | py | Python | Matrix/Python/rotatematrix.py | pratika1505/DSA-Path-And-Important-Questions | a86a0774f0abf5151c852afd2bbf67a5368125c8 | [
"MIT"
] | 26 | 2021-08-04T17:03:26.000Z | 2022-03-08T08:43:44.000Z | Matrix/Python/rotatematrix.py | pratika1505/DSA-Path-And-Important-Questions | a86a0774f0abf5151c852afd2bbf67a5368125c8 | [
"MIT"
] | 25 | 2021-08-04T16:58:33.000Z | 2021-11-01T05:26:19.000Z | Matrix/Python/rotatematrix.py | pratika1505/DSA-Path-And-Important-Questions | a86a0774f0abf5151c852afd2bbf67a5368125c8 | [
"MIT"
] | 16 | 2021-08-14T20:15:24.000Z | 2022-02-23T11:04:06.000Z | # -*- coding: utf-8 -*-
"""RotateMatrix.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1LX-dZFuQCyBXDNVosTp0MHaZZxoc5T4I
"""
#Function to rotate matrix by 90 degree
if __name__ == '__main__':
#Declaring matrix
mat = [
[1, 2, 3, ... | 19.282609 | 77 | 0.500564 |
d49731577779af0d944350934f9656734de31c66 | 319 | py | Python | sort.py | EYH0602/FP_Workshop | 866b180b411c1ef439e1a2d039c6d6333e91cd39 | [
"MIT"
] | 1 | 2021-10-21T02:15:03.000Z | 2021-10-21T02:15:03.000Z | sort.py | EYH0602/FP_Workshop | 866b180b411c1ef439e1a2d039c6d6333e91cd39 | [
"MIT"
] | null | null | null | sort.py | EYH0602/FP_Workshop | 866b180b411c1ef439e1a2d039c6d6333e91cd39 | [
"MIT"
] | null | null | null |
xs = [1, 3, 2, 4, 5, 2]
sorted_xs = quicksort(xs)
| 17.722222 | 40 | 0.526646 |
d49737aed7a2d03e7911f282302b8766a0010d5f | 9,372 | py | Python | bddtests/steps/bdd_test_util.py | TarantulaTechnology/fabric5 | 6da971177ab7d74f1e1cfa6f7fc73e75768e5686 | [
"Apache-2.0"
] | 4 | 2018-01-02T04:26:16.000Z | 2018-10-25T08:51:06.000Z | bddtests/steps/bdd_test_util.py | TarantulaTechnology/fabric5 | 6da971177ab7d74f1e1cfa6f7fc73e75768e5686 | [
"Apache-2.0"
] | null | null | null | bddtests/steps/bdd_test_util.py | TarantulaTechnology/fabric5 | 6da971177ab7d74f1e1cfa6f7fc73e75768e5686 | [
"Apache-2.0"
] | 9 | 2016-11-17T07:40:04.000Z | 2020-03-16T16:11:39.000Z |
# Copyright IBM Corp. 2016 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 applicable law or a... | 40.747826 | 189 | 0.714789 |
d4973b8aa4822ac46365e7bcf3331ae6bf592f03 | 13,868 | py | Python | 1.0.0/hp/dict.py | cefect/SOFDA0 | 62c5566d0f388a5fd76a070ceb5ee3e38b0d7463 | [
"MIT"
] | null | null | null | 1.0.0/hp/dict.py | cefect/SOFDA0 | 62c5566d0f388a5fd76a070ceb5ee3e38b0d7463 | [
"MIT"
] | null | null | null | 1.0.0/hp/dict.py | cefect/SOFDA0 | 62c5566d0f388a5fd76a070ceb5ee3e38b0d7463 | [
"MIT"
] | null | null | null | '''
Created on Mar 6, 2018
@author: cef
hp functions for workign with dictionaries
'''
import logging, os, sys, math, copy, inspect
from collections import OrderedDict
from weakref import WeakValueDictionary as wdict
import numpy as np
import hp.basic
mod_logger = logging.getLogger(__name__) #... | 36.687831 | 113 | 0.391477 |
d49b6df009b775a63c890cb5c9656357e0580e52 | 3,532 | py | Python | Core/pre.py | Cyber-Dioxide/CyberPhish | bc2e39d8612ef657d481cdd40d676983f7bf190c | [
"Apache-2.0"
] | 9 | 2021-12-28T08:17:41.000Z | 2022-03-20T17:49:21.000Z | Core/pre.py | Cyber-Dioxide/CyberPhish | bc2e39d8612ef657d481cdd40d676983f7bf190c | [
"Apache-2.0"
] | null | null | null | Core/pre.py | Cyber-Dioxide/CyberPhish | bc2e39d8612ef657d481cdd40d676983f7bf190c | [
"Apache-2.0"
] | 1 | 2021-12-27T08:13:50.000Z | 2021-12-27T08:13:50.000Z | import os
import random
try:
from colorama import Fore, Style
except ModuleNotFoundError:
os.system("pip install colorama")
from urllib.request import urlopen
from Core.helper.color import green, white, blue, red, start, alert
Version = "2.2"
yellow = ("\033[1;33;40m")
all_col = [Style.BRIGHT + Fore.RED, Style.... | 49.746479 | 144 | 0.473386 |
d49bc7fba6d65f4ec2d4a29ecf9e4f75e3ad24d1 | 10,163 | py | Python | automatoes/authorize.py | candango/automatoes | fbfd01cfaa2c36e23a7251e333ef3fa86ef4bff9 | [
"Apache-2.0"
] | 13 | 2019-10-08T14:57:19.000Z | 2022-01-12T10:01:30.000Z | automatoes/authorize.py | piraz/automatoes | fc6a20c317a8ac863bfb054c9541e310e0431e5f | [
"Apache-2.0"
] | 125 | 2019-10-08T15:04:17.000Z | 2022-03-29T19:27:12.000Z | automatoes/authorize.py | candango/automatoes | fbfd01cfaa2c36e23a7251e333ef3fa86ef4bff9 | [
"Apache-2.0"
] | 8 | 2019-10-14T15:18:57.000Z | 2021-04-21T10:41:08.000Z | #!/usr/bin/env python
#
# Copyright 2019-2020 Flavio Garcia
# Copyright 2016-2017 Veeti Paananen under MIT License
#
# 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... | 39.239382 | 79 | 0.546394 |
d49c1e0bb83e7c39fdece7542b9e2c9d25d03288 | 5,832 | py | Python | rllib/agents/dqn/simple_q_torch_policy.py | jamesliu/ray | 11ab412db1fa3603a3006e8ed414e80dd1f11c0c | [
"Apache-2.0"
] | 3 | 2020-12-12T05:10:44.000Z | 2021-04-12T21:52:47.000Z | rllib/agents/dqn/simple_q_torch_policy.py | jamesliu/ray | 11ab412db1fa3603a3006e8ed414e80dd1f11c0c | [
"Apache-2.0"
] | 227 | 2021-10-01T08:00:01.000Z | 2021-12-28T16:47:26.000Z | rllib/agents/dqn/simple_q_torch_policy.py | gramhagen/ray | c18caa4db36d466718bdbcb2229aa0b2dc03da1f | [
"Apache-2.0"
] | 1 | 2020-12-02T06:26:20.000Z | 2020-12-02T06:26:20.000Z | """PyTorch policy class used for Simple Q-Learning"""
import logging
from typing import Dict, Tuple
import gym
import ray
from ray.rllib.agents.dqn.simple_q_tf_policy import (
build_q_models, compute_q_values, get_distribution_inputs_and_class)
from ray.rllib.models.modelv2 import ModelV2
from ray.rllib.models.to... | 35.779141 | 79 | 0.710905 |
d49d0bb7116e3f907afff13646fa7b6a2ac9aa13 | 66,873 | py | Python | viphoneme/T2IPA.py | NoahDrisort/ViSV2TTS | bea6fa1f85527c824c85986d8b7bfa3e3efd120a | [
"MIT"
] | 1 | 2021-09-23T15:46:14.000Z | 2021-09-23T15:46:14.000Z | viphoneme/T2IPA.py | v-nhandt21/ViSV2TTS | bea6fa1f85527c824c85986d8b7bfa3e3efd120a | [
"MIT"
] | null | null | null | viphoneme/T2IPA.py | v-nhandt21/ViSV2TTS | bea6fa1f85527c824c85986d8b7bfa3e3efd120a | [
"MIT"
] | null | null | null | #Grapheme
Rime_tone=[ "a","","","e","","i","o","","","u","","y","i","oa","o","oe","oo","u","u","u","u","uy","","uy","y", #blank
"","","","","","","","","","","","","i","a","o","e","o","u","u","u","","y","","uy","y", #grave
"o", "o","o", ... | 56.243061 | 821 | 0.384759 |
d49d9d1e84095417ae691e1ba67e4e09f88e34fb | 505 | py | Python | taskengine/sessions.py | retmas-dv/deftcore | 23052549e8948bbedfb958a96683b84b46820b09 | [
"Apache-2.0"
] | null | null | null | taskengine/sessions.py | retmas-dv/deftcore | 23052549e8948bbedfb958a96683b84b46820b09 | [
"Apache-2.0"
] | 9 | 2019-05-24T08:10:59.000Z | 2020-07-23T13:20:35.000Z | taskengine/sessions.py | retmas-dv/deftcore | 23052549e8948bbedfb958a96683b84b46820b09 | [
"Apache-2.0"
] | null | null | null | __author__ = 'Dmitry Golubkov'
from django.contrib.sessions.base_session import AbstractBaseSession
from django.contrib.sessions.backends.db import SessionStore as DBStore
| 24.047619 | 71 | 0.742574 |
d49e9592c8658910d6180947346f6788ba5fdb29 | 498 | py | Python | tests/assignments/test_assign7.py | acc-cosc-1336/cosc-1336-spring-2018-vcruz350 | 0cee9fde3d4129c51626c4e0c870972aebec9b95 | [
"MIT"
] | null | null | null | tests/assignments/test_assign7.py | acc-cosc-1336/cosc-1336-spring-2018-vcruz350 | 0cee9fde3d4129c51626c4e0c870972aebec9b95 | [
"MIT"
] | 1 | 2018-03-08T19:46:08.000Z | 2018-03-08T20:00:47.000Z | tests/assignments/test_assign7.py | acc-cosc-1336/cosc-1336-spring-2018-vcruz350 | 0cee9fde3d4129c51626c4e0c870972aebec9b95 | [
"MIT"
] | null | null | null | import unittest
#write the import for function for assignment7 sum_list_values
from src.assignments.assignment7 import sum_list_values
#unittest.main(verbosity=2)
| 29.294118 | 71 | 0.736948 |
d49ef05ecf83504c528cca6ff6237271a4f54a56 | 4,957 | py | Python | setec/__init__.py | kgriffs/setec | c6701ffd757cdfe1cfb9c3919b0fd3aa02396f54 | [
"Apache-2.0"
] | null | null | null | setec/__init__.py | kgriffs/setec | c6701ffd757cdfe1cfb9c3919b0fd3aa02396f54 | [
"Apache-2.0"
] | null | null | null | setec/__init__.py | kgriffs/setec | c6701ffd757cdfe1cfb9c3919b0fd3aa02396f54 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 by Kurt Griffiths
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 29.158824 | 86 | 0.656042 |
d49f62cf4c67498959f387338aa3e5ee4e7a2d59 | 382 | py | Python | blender/arm/logicnode/native/LN_detect_mobile_browser.py | niacdoial/armory | 3f9b633fbf772017c576a3f77695a6c28d9956e1 | [
"Zlib"
] | null | null | null | blender/arm/logicnode/native/LN_detect_mobile_browser.py | niacdoial/armory | 3f9b633fbf772017c576a3f77695a6c28d9956e1 | [
"Zlib"
] | null | null | null | blender/arm/logicnode/native/LN_detect_mobile_browser.py | niacdoial/armory | 3f9b633fbf772017c576a3f77695a6c28d9956e1 | [
"Zlib"
] | null | null | null | from arm.logicnode.arm_nodes import * | 34.727273 | 74 | 0.777487 |
d4a074467479872c4d6bb6745cf590f7c740594e | 29,959 | py | Python | corehq/apps/dump_reload/tests/test_sql_dump_load.py | andyasne/commcare-hq | c59a24e57bdd4d2536493f9ecdcc9906f4ae1b88 | [
"BSD-3-Clause"
] | 471 | 2015-01-10T02:55:01.000Z | 2022-03-29T18:07:18.000Z | corehq/apps/dump_reload/tests/test_sql_dump_load.py | andyasne/commcare-hq | c59a24e57bdd4d2536493f9ecdcc9906f4ae1b88 | [
"BSD-3-Clause"
] | 14,354 | 2015-01-01T07:38:23.000Z | 2022-03-31T20:55:14.000Z | corehq/apps/dump_reload/tests/test_sql_dump_load.py | andyasne/commcare-hq | c59a24e57bdd4d2536493f9ecdcc9906f4ae1b88 | [
"BSD-3-Clause"
] | 175 | 2015-01-06T07:16:47.000Z | 2022-03-29T13:27:01.000Z | import inspect
import json
import uuid
from collections import Counter
from datetime import datetime
from io import StringIO
import mock
from django.contrib.admin.utils import NestedObjects
from django.db import transaction, IntegrityError
from django.db.models.signals import post_delete, post_save
from django.test im... | 38.310742 | 124 | 0.647118 |
d4a08e8d4977972540a2be8547db892cc6d2f3ab | 4,561 | py | Python | tests/keras/test_activations.py | the-moliver/keras | 4fa7e5d454dd4f3f33f1d756a2a8659f2e789141 | [
"MIT"
] | 150 | 2017-01-15T15:32:23.000Z | 2021-11-23T15:07:55.000Z | tests/keras/test_activations.py | wdw110/keras | 4fa7e5d454dd4f3f33f1d756a2a8659f2e789141 | [
"MIT"
] | 40 | 2017-01-15T15:41:05.000Z | 2020-11-16T13:15:50.000Z | tests/keras/test_activations.py | wdw110/keras | 4fa7e5d454dd4f3f33f1d756a2a8659f2e789141 | [
"MIT"
] | 38 | 2017-01-15T22:04:06.000Z | 2019-11-01T22:35:35.000Z | import pytest
import numpy as np
from numpy.testing import assert_allclose
from keras import backend as K
from keras import activations
def get_standard_values():
'''
These are just a set of floats used for testing the activation
functions, and are useful in multiple tests.
'''
return np.array([[... | 26.062857 | 79 | 0.635825 |
d4a0dbe903b46f2ac15b321d70b46c5431fada6b | 4,932 | py | Python | scripts/H5toXMF.py | robertsawko/proteus | 6f1e4c2ca1af85a906b35a5162430006f0343861 | [
"NASA-1.3"
] | null | null | null | scripts/H5toXMF.py | robertsawko/proteus | 6f1e4c2ca1af85a906b35a5162430006f0343861 | [
"NASA-1.3"
] | null | null | null | scripts/H5toXMF.py | robertsawko/proteus | 6f1e4c2ca1af85a906b35a5162430006f0343861 | [
"NASA-1.3"
] | null | null | null |
#import numpy
#import os
#from xml.etree.ElementTree import *
import tables
#from Xdmf import *
if __name__ == '__main__':
from optparse import OptionParser
usage = ""
parser = OptionParser(usage=usage)
parser.add_option("-n","--size",
help="number of processors for run",
... | 42.153846 | 172 | 0.491484 |
d4a110091d70cdb8869da346b91adb821033a70e | 102,577 | py | Python | pysnmp-with-texts/CISCO-TRUSTSEC-POLICY-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/CISCO-TRUSTSEC-POLICY-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/CISCO-TRUSTSEC-POLICY-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module CISCO-TRUSTSEC-POLICY-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-TRUSTSEC-POLICY-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:14:36 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.... | 166.79187 | 10,104 | 0.796192 |
d4a19a6793c7b81c31ff51744f9dee445aa534f8 | 1,685 | py | Python | tests/test_cli/test_generate/test_generate.py | lrahmani/agents-aea | 9bd1d51530fc21bf41b5adea031cda19a94b048b | [
"Apache-2.0"
] | null | null | null | tests/test_cli/test_generate/test_generate.py | lrahmani/agents-aea | 9bd1d51530fc21bf41b5adea031cda19a94b048b | [
"Apache-2.0"
] | null | null | null | tests/test_cli/test_generate/test_generate.py | lrahmani/agents-aea | 9bd1d51530fc21bf41b5adea031cda19a94b048b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2019 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the ... | 37.444444 | 80 | 0.665282 |
d4a21ef2eb21f79e91184165f8bb407caaf1dcb1 | 17,126 | py | Python | sphinx/ext/napoleon/__init__.py | PeerHerholz/smobsc | db34d2bb96b80579bd4a3f4c198a6b524c5a134a | [
"BSD-2-Clause"
] | 3 | 2019-06-11T09:42:08.000Z | 2020-03-10T15:57:09.000Z | sphinx/ext/napoleon/__init__.py | PeerHerholz/smobsc | db34d2bb96b80579bd4a3f4c198a6b524c5a134a | [
"BSD-2-Clause"
] | 12 | 2019-01-09T15:43:57.000Z | 2020-01-21T10:46:30.000Z | sphinx/ext/napoleon/__init__.py | PeerHerholz/smobsc | db34d2bb96b80579bd4a3f4c198a6b524c5a134a | [
"BSD-2-Clause"
] | 10 | 2019-02-04T11:49:35.000Z | 2020-03-21T13:32:20.000Z | """
sphinx.ext.napoleon
~~~~~~~~~~~~~~~~~~~
Support for NumPy and Google style docstrings.
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from sphinx import __display_version__ as __version__
from sphinx.application import Sphinx
from ... | 36.515991 | 88 | 0.608782 |
d4a24c39597d568e3ab31f3730cb741839a01aff | 2,390 | py | Python | plugins/similarity/rdkit/tanimoto/lbvs-entry.py | skodapetr/viset | 87863ed6cde63392b2d503ceda53bb2cea367d69 | [
"MIT"
] | 1 | 2018-12-28T19:36:04.000Z | 2018-12-28T19:36:04.000Z | plugins/similarity/rdkit/tanimoto/lbvs-entry.py | skodapetr/viset | 87863ed6cde63392b2d503ceda53bb2cea367d69 | [
"MIT"
] | 14 | 2017-11-15T17:45:58.000Z | 2018-12-10T17:52:23.000Z | plugins/similarity/rdkit/tanimoto/lbvs-entry.py | skodapetr/viset | 87863ed6cde63392b2d503ceda53bb2cea367d69 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from rdkit import DataStructs
import plugin_api
__license__ = "X11"
| 29.506173 | 77 | 0.599582 |
d4a3f90c44e54f8024d6bee8196a0b29bb2aed61 | 2,849 | py | Python | mall_spider/spiders/actions/proxy_service.py | 524243642/taobao_spider | 9cdaed1c7a67fc1f35ee2af2e18313cedf3b1e5e | [
"Unlicense"
] | 12 | 2019-06-06T12:23:08.000Z | 2021-06-15T17:50:07.000Z | mall_spider/spiders/actions/proxy_service.py | 524243642/mall_spider | 9cdaed1c7a67fc1f35ee2af2e18313cedf3b1e5e | [
"Unlicense"
] | 3 | 2021-03-31T19:02:47.000Z | 2022-02-11T03:43:15.000Z | mall_spider/spiders/actions/proxy_service.py | 524243642/taobao_spider | 9cdaed1c7a67fc1f35ee2af2e18313cedf3b1e5e | [
"Unlicense"
] | 5 | 2019-09-17T03:55:56.000Z | 2020-12-18T03:34:03.000Z | # coding: utf-8
import time
from config.config_loader import global_config
from mall_spider.spiders.actions.context import Context
from mall_spider.spiders.actions.direct_proxy_action import DirectProxyAction
__proxy_service = None
| 33.127907 | 208 | 0.601264 |
d4a46b8215ad96def234df7df255d9ac5c89bb08 | 965 | py | Python | app/weather_tests.py | joedanz/flask-weather | fe35aa359da6f5d7f942d97837403e153b5c5ede | [
"Apache-2.0"
] | 1 | 2017-08-25T18:55:11.000Z | 2017-08-25T18:55:11.000Z | app/weather_tests.py | joedanz/flask-weather | fe35aa359da6f5d7f942d97837403e153b5c5ede | [
"Apache-2.0"
] | null | null | null | app/weather_tests.py | joedanz/flask-weather | fe35aa359da6f5d7f942d97837403e153b5c5ede | [
"Apache-2.0"
] | null | null | null | import os
import weather
import datetime
import unittest
import tempfile
if __name__ == '__main__':
unittest.main()
| 26.805556 | 71 | 0.631088 |
d4a58432909af220904a476edcdbf9bcba8bc8c1 | 984 | py | Python | modules/sensors/Activator.py | memristor/mep2 | bc5cddacba3d740f791f3454b8cb51bda83ce202 | [
"MIT"
] | 5 | 2018-11-27T15:15:00.000Z | 2022-02-10T21:44:13.000Z | modules/sensors/Activator.py | memristor/mep2 | bc5cddacba3d740f791f3454b8cb51bda83ce202 | [
"MIT"
] | 2 | 2018-10-20T15:48:40.000Z | 2018-11-20T05:11:33.000Z | modules/sensors/Activator.py | memristor/mep2 | bc5cddacba3d740f791f3454b8cb51bda83ce202 | [
"MIT"
] | 1 | 2020-02-07T12:44:47.000Z | 2020-02-07T12:44:47.000Z | import asyncio
| 24 | 66 | 0.705285 |
d4a5dfe986967f5b7fa8e3f7e5dcaa1ed0f98f18 | 7,779 | py | Python | examples/retrieval/evaluation/sparse/evaluate_deepct.py | ArthurCamara/beir | 2739990b719f2d4814d88473cf9965d92d4f4c18 | [
"Apache-2.0"
] | 24 | 2022-03-20T18:48:52.000Z | 2022-03-31T08:28:42.000Z | examples/retrieval/evaluation/sparse/evaluate_deepct.py | ArthurCamara/beir | 2739990b719f2d4814d88473cf9965d92d4f4c18 | [
"Apache-2.0"
] | 9 | 2022-03-19T14:50:30.000Z | 2022-03-30T17:31:18.000Z | examples/retrieval/evaluation/sparse/evaluate_deepct.py | ArthurCamara/beir | 2739990b719f2d4814d88473cf9965d92d4f4c18 | [
"Apache-2.0"
] | 3 | 2022-03-25T15:45:14.000Z | 2022-03-25T17:51:23.000Z | """
This example shows how to evaluate DeepCT (using Anserini) in BEIR.
For more details on DeepCT, refer here: https://arxiv.org/abs/1910.10687
The original DeepCT repository is not modularised and only works with Tensorflow 1.x (1.15).
We modified the DeepCT repository to work with Tensorflow latest (2.x).
We do not... | 56.781022 | 189 | 0.655354 |
d4a684609779826c5d7b8e2a668f0007ffd391fe | 3,018 | py | Python | Examples/Space Truss - Nodal Load.py | AmirHosseinNamadchi/PyNite | 8cc1fe3262e1efe029c6860394d2436601272e33 | [
"MIT"
] | 2 | 2022-02-26T23:11:19.000Z | 2022-02-26T23:11:21.000Z | Examples/Space Truss - Nodal Load.py | AmirHosseinNamadchi/PyNite | 8cc1fe3262e1efe029c6860394d2436601272e33 | [
"MIT"
] | null | null | null | Examples/Space Truss - Nodal Load.py | AmirHosseinNamadchi/PyNite | 8cc1fe3262e1efe029c6860394d2436601272e33 | [
"MIT"
] | 2 | 2020-08-27T15:36:42.000Z | 2020-10-02T00:29:22.000Z | # Engineering Mechanics: Statics, 4th Edition
# Bedford and Fowler
# Problem 6.64
# Units for this model are meters and kilonewtons
# Import 'FEModel3D' and 'Visualization' from 'PyNite'
from PyNite import FEModel3D
from PyNite import Visualization
# Create a new model
truss = FEModel3D()
# Define the nodes
truss.Ad... | 44.382353 | 142 | 0.674619 |
d4a6c416bd8a2d26fc2585b919cf37090ef128d8 | 322 | py | Python | Using Yagmail to make sending emails easier.py | CodeMaster7000/Sending-Emails-in-Python | 2ec44f6520a6b98508c8adf372a191f2577fbf98 | [
"MIT"
] | 1 | 2021-12-23T15:42:01.000Z | 2021-12-23T15:42:01.000Z | Using Yagmail to make sending emails easier.py | CodeMaster7000/Sending-Emails-in-Python | 2ec44f6520a6b98508c8adf372a191f2577fbf98 | [
"MIT"
] | null | null | null | Using Yagmail to make sending emails easier.py | CodeMaster7000/Sending-Emails-in-Python | 2ec44f6520a6b98508c8adf372a191f2577fbf98 | [
"MIT"
] | null | null | null | import yagmail
receiver = "your@gmail.com" #Receiver's gmail address
body = "Hello there from Yagmail"
filename = "document.pdf"
yag = yagmail.SMTP("my@gmail.com")#Your gmail address
yag.send(
to=receiver,
subject="Yagmail test (attachment included",
contents=body,
attachments=filename,
)... | 23 | 54 | 0.689441 |
d4a6cec9904df1ff0e2230e88f7f8978eeccd5f8 | 5,064 | py | Python | pycad/py_src/transformations.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | pycad/py_src/transformations.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | pycad/py_src/transformations.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null |
##############################################################################
#
# Copyright (c) 2003-2020 by The University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Apache License, version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Development unt... | 29.788235 | 124 | 0.610585 |
d4a6efea0d126676c34a41838cc4fe1e41395646 | 1,116 | py | Python | example/complex_scalar_star_solver.py | ThomasHelfer/BosonStar | 5442a6e6171122a3ba1d6b079e6483ab72aa7338 | [
"MIT"
] | 2 | 2021-04-07T13:20:11.000Z | 2021-04-07T17:11:25.000Z | example/complex_scalar_star_solver.py | ThomasHelfer/BosonStar | 5442a6e6171122a3ba1d6b079e6483ab72aa7338 | [
"MIT"
] | 1 | 2021-06-14T15:40:25.000Z | 2021-06-14T15:40:25.000Z | example/complex_scalar_star_solver.py | ThomasHelfer/BosonStar | 5442a6e6171122a3ba1d6b079e6483ab72aa7338 | [
"MIT"
] | null | null | null | from bosonstar.ComplexBosonStar import Complex_Boson_Star
# =====================
# All imporntnat definitions
# =====================
# Physics defintions
phi0 = 0.40 # centeral phi
D = 5.0 # Dimension (total not only spacial)
Lambda = -0.2 # Cosmological constant
# Solver definitions
Rst... | 24.26087 | 78 | 0.580645 |
d4a71c335f605cc7723cb3705f2699bfe1e1693b | 796 | py | Python | setup.py | ouyhlan/fastNLP | cac13311e28c1e8e3c866d50656173650eb5c7a1 | [
"Apache-2.0"
] | 2,693 | 2018-03-08T03:09:20.000Z | 2022-03-30T07:38:42.000Z | setup.py | ouyhlan/fastNLP | cac13311e28c1e8e3c866d50656173650eb5c7a1 | [
"Apache-2.0"
] | 291 | 2018-07-21T07:43:17.000Z | 2022-03-07T13:06:58.000Z | setup.py | ouyhlan/fastNLP | cac13311e28c1e8e3c866d50656173650eb5c7a1 | [
"Apache-2.0"
] | 514 | 2018-03-09T06:54:25.000Z | 2022-03-26T20:11:44.000Z | #!/usr/bin/env python
# coding=utf-8
from setuptools import setup, find_packages
with open('README.md', encoding='utf-8') as f:
readme = f.read()
with open('LICENSE', encoding='utf-8') as f:
license = f.read()
with open('requirements.txt', encoding='utf-8') as f:
reqs = f.read()
pkgs = [p for p in find_... | 26.533333 | 90 | 0.675879 |
d4a7c3329ad1568f426144783b7f79e1a58585b3 | 855 | py | Python | clients/client/python/ory_client/__init__.py | ory/sdk-generator | 958314d130922ad6f20f439b5230141a832231a5 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/__init__.py | ory/sdk-generator | 958314d130922ad6f20f439b5230141a832231a5 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/__init__.py | ory/sdk-generator | 958314d130922ad6f20f439b5230141a832231a5 | [
"Apache-2.0"
] | null | null | null | # flake8: noqa
"""
Ory APIs
Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501
The version of the OpenAPI document: v0.0.1-alpha.187
Contact: support@ory.sh
... | 29.482759 | 194 | 0.803509 |
d4a7d95a9f223064052da15a9a7a9eecfe46cfa7 | 3,810 | py | Python | atmosphere/custom_activity/base_class.py | ambiata/atmosphere-python-sdk | 48880a8553000cdea59d63b0fba49e1f0f482784 | [
"MIT"
] | null | null | null | atmosphere/custom_activity/base_class.py | ambiata/atmosphere-python-sdk | 48880a8553000cdea59d63b0fba49e1f0f482784 | [
"MIT"
] | 9 | 2021-02-21T21:53:03.000Z | 2021-11-05T06:06:55.000Z | atmosphere/custom_activity/base_class.py | ambiata/atmosphere-python-sdk | 48880a8553000cdea59d63b0fba49e1f0f482784 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from typing import Tuple
from requests import Response
from .pydantic_models import (AppliedExclusionConditionsResponse,
BiasAttributeConfigListResponse,
ComputeRewardResponse, DefaultPredictionResponse,
... | 36.634615 | 87 | 0.684777 |
d4a7f2382cdb35d8940e5dd478b2dac3b5b10bd0 | 752 | py | Python | Module1/file3.py | modulo16/PfNE | 9706afc42c44dcfd1490e5ac074156f41e5515a8 | [
"Unlicense"
] | null | null | null | Module1/file3.py | modulo16/PfNE | 9706afc42c44dcfd1490e5ac074156f41e5515a8 | [
"Unlicense"
] | null | null | null | Module1/file3.py | modulo16/PfNE | 9706afc42c44dcfd1490e5ac074156f41e5515a8 | [
"Unlicense"
] | null | null | null | from __future__ import print_function, unicode_literals
#Ensures Unicode is used for all strings.
my_str = 'whatever'
#Shows the String type, which should be unicode
type(my_str)
#declare string:
ip_addr = '192.168.1.1'
#check it with boolean:(True)
ip_addr == '192.168.1.1'
#(false)
ip_addr == '10.1.1.1'
#is this su... | 18.8 | 76 | 0.731383 |
d4acef5631789f4b877955db52847e8e212a8725 | 10,411 | py | Python | pp_io_plugins/pp_kbddriver_plus.py | arcticmatter/pipresents-beep | e5945f929b47249f19b0cb3433a138e874b592db | [
"CNRI-Python",
"CECILL-B"
] | null | null | null | pp_io_plugins/pp_kbddriver_plus.py | arcticmatter/pipresents-beep | e5945f929b47249f19b0cb3433a138e874b592db | [
"CNRI-Python",
"CECILL-B"
] | null | null | null | pp_io_plugins/pp_kbddriver_plus.py | arcticmatter/pipresents-beep | e5945f929b47249f19b0cb3433a138e874b592db | [
"CNRI-Python",
"CECILL-B"
] | null | null | null | #enhanced keyboard driver
import copy
import os
import configparser
from pp_displaymanager import DisplayManager
if __name__ == '__main__':
from tkinter import *
root = Tk()
w = Label(root, text="pp_kbddriver_plus.py test harness")
w.pack()
idd=pp_kbddriver_plus()
reason,message=idd... | 41.979839 | 134 | 0.589761 |
d4ade5ab9af89265fbd2d849b58156e138f3d82c | 452 | py | Python | grocery/migrations/0003_alter_item_comments.py | akshay-kapase/shopping | 7bf3bac4a78d07bca9a9f9d44d85e11bb826a366 | [
"MIT"
] | null | null | null | grocery/migrations/0003_alter_item_comments.py | akshay-kapase/shopping | 7bf3bac4a78d07bca9a9f9d44d85e11bb826a366 | [
"MIT"
] | null | null | null | grocery/migrations/0003_alter_item_comments.py | akshay-kapase/shopping | 7bf3bac4a78d07bca9a9f9d44d85e11bb826a366 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.6 on 2021-09-03 15:48
from django.db import migrations, models
| 22.6 | 79 | 0.606195 |
d4ae07ad4070643d0ba3b0f74c8b5ba6215fad3c | 2,770 | py | Python | projects/objects/buildings/protos/textures/colored_textures/textures_generator.py | yjf18340/webots | 60d441c362031ab8fde120cc0cd97bdb1a31a3d5 | [
"Apache-2.0"
] | 1 | 2019-11-13T08:12:02.000Z | 2019-11-13T08:12:02.000Z | projects/objects/buildings/protos/textures/colored_textures/textures_generator.py | chinakwy/webots | 7c35a359848bafe81fe0229ac2ed587528f4c73e | [
"Apache-2.0"
] | null | null | null | projects/objects/buildings/protos/textures/colored_textures/textures_generator.py | chinakwy/webots | 7c35a359848bafe81fe0229ac2ed587528f4c73e | [
"Apache-2.0"
] | 1 | 2020-09-25T02:01:45.000Z | 2020-09-25T02:01:45.000Z | #!/usr/bin/env python
# Copyright 1996-2019 Cyberbotics Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.063291 | 110 | 0.605415 |
d4af2a44bf54fabe00a0ec0f2c572fb0bf043633 | 92 | py | Python | tutorial/test_env.py | viz4biz/PyDataNYC2015 | 066154ea9f1837c355e6108a28b85889f3020da3 | [
"Apache-2.0"
] | 11 | 2015-11-11T13:57:21.000Z | 2019-08-14T15:53:43.000Z | tutorial/test_env.py | viz4biz/PyDataNYC2015 | 066154ea9f1837c355e6108a28b85889f3020da3 | [
"Apache-2.0"
] | null | null | null | tutorial/test_env.py | viz4biz/PyDataNYC2015 | 066154ea9f1837c355e6108a28b85889f3020da3 | [
"Apache-2.0"
] | 6 | 2015-11-11T13:57:25.000Z | 2018-09-12T07:53:03.000Z | """
test local env
"""
import os
for k, v in os.environ.iteritems():
print k, '=', v
| 9.2 | 35 | 0.565217 |
d4b0acbd3ae55e6638c516e22ca4f69932aebab2 | 27,844 | py | Python | project2/marriage.py | filipefborba/MarriageNSFG | d550301fbb9d80ddabf391a6168d2c8636113ed9 | [
"MIT"
] | null | null | null | project2/marriage.py | filipefborba/MarriageNSFG | d550301fbb9d80ddabf391a6168d2c8636113ed9 | [
"MIT"
] | null | null | null | project2/marriage.py | filipefborba/MarriageNSFG | d550301fbb9d80ddabf391a6168d2c8636113ed9 | [
"MIT"
] | null | null | null | """This file contains code for use with "Think Stats",
by Allen B. Downey, available from greenteapress.com
Copyright 2014 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
from __future__ import print_function, division
import bisect
import numpy as np
import pandas as pd
import scipy.sta... | 29.064718 | 79 | 0.599196 |
d4b13f250b052bca7bffe7a5880d063d7c169a7e | 3,955 | py | Python | xfel/merging/application/reflection_table_utils.py | ErwinP/cctbx_project | 58f9fb5ed38c7391510e892f0ca9520467b692c1 | [
"BSD-3-Clause-LBNL"
] | null | null | null | xfel/merging/application/reflection_table_utils.py | ErwinP/cctbx_project | 58f9fb5ed38c7391510e892f0ca9520467b692c1 | [
"BSD-3-Clause-LBNL"
] | null | null | null | xfel/merging/application/reflection_table_utils.py | ErwinP/cctbx_project | 58f9fb5ed38c7391510e892f0ca9520467b692c1 | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import absolute_import, division, print_function
from six.moves import range
from dials.array_family import flex
import math
| 40.357143 | 147 | 0.683439 |
d4b1cf0c1cabef461b1902ca1dbcbf5165c73bc9 | 45,496 | py | Python | rpython/memory/test/test_transformed_gc.py | jptomo/pypy-lang-scheme | 55edb2cec69d78f86793282a4566fcbc1ef9fcac | [
"MIT"
] | 1 | 2019-11-25T10:52:01.000Z | 2019-11-25T10:52:01.000Z | rpython/memory/test/test_transformed_gc.py | jptomo/pypy-lang-scheme | 55edb2cec69d78f86793282a4566fcbc1ef9fcac | [
"MIT"
] | null | null | null | rpython/memory/test/test_transformed_gc.py | jptomo/pypy-lang-scheme | 55edb2cec69d78f86793282a4566fcbc1ef9fcac | [
"MIT"
] | null | null | null | import py
import inspect
from rpython.rlib.objectmodel import compute_hash, compute_identity_hash
from rpython.translator.c import gc
from rpython.annotator import model as annmodel
from rpython.rtyper.llannotation import SomePtr
from rpython.rtyper.lltypesystem import lltype, llmemory, rffi, llgroup
from rpython.memo... | 31.904628 | 93 | 0.512638 |
d4b2424c1e77c6c44ed58c02c4ec0dcbec8b6934 | 132 | py | Python | build/lib/rigidregistration/__init__.py | kem-group/rigidRegistration | cd6bef208d4b475954e2b3970d6ec11c15f61d70 | [
"MIT"
] | 3 | 2021-10-07T18:01:32.000Z | 2022-03-10T17:01:32.000Z | build/lib/rigidregistration/__init__.py | kem-group/rigidRegistration | cd6bef208d4b475954e2b3970d6ec11c15f61d70 | [
"MIT"
] | null | null | null | build/lib/rigidregistration/__init__.py | kem-group/rigidRegistration | cd6bef208d4b475954e2b3970d6ec11c15f61d70 | [
"MIT"
] | 1 | 2022-03-10T17:01:36.000Z | 2022-03-10T17:01:36.000Z | from . import utils
from . import display
from . import save
from . import FFTW
from . import stackregistration
__version__="0.2.1" | 18.857143 | 31 | 0.765152 |
d4b2a9a044269ea09a095573c7237e7f034915c1 | 5,359 | py | Python | torchmetrics/retrieval/retrieval_fallout.py | rudaoshi/metrics | c018348619bd7e375cb86abf7dfcaddb7208a36d | [
"Apache-2.0"
] | null | null | null | torchmetrics/retrieval/retrieval_fallout.py | rudaoshi/metrics | c018348619bd7e375cb86abf7dfcaddb7208a36d | [
"Apache-2.0"
] | null | null | null | torchmetrics/retrieval/retrieval_fallout.py | rudaoshi/metrics | c018348619bd7e375cb86abf7dfcaddb7208a36d | [
"Apache-2.0"
] | null | null | null | # 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... | 40.598485 | 120 | 0.630715 |
d4b30ff4f1cdba84270695cf02e3415880246ea6 | 5,458 | py | Python | pydlm/tests/base/testKalmanFilter.py | onnheimm/pydlm | 4693af6e621e3b75feda7ca15327b69a4ca622a7 | [
"BSD-3-Clause"
] | 423 | 2016-09-15T06:45:26.000Z | 2022-03-29T08:41:11.000Z | pydlm/tests/base/testKalmanFilter.py | onnheimm/pydlm | 4693af6e621e3b75feda7ca15327b69a4ca622a7 | [
"BSD-3-Clause"
] | 50 | 2016-09-14T19:45:49.000Z | 2021-07-26T17:04:10.000Z | pydlm/tests/base/testKalmanFilter.py | onnheimm/pydlm | 4693af6e621e3b75feda7ca15327b69a4ca622a7 | [
"BSD-3-Clause"
] | 99 | 2016-09-19T08:08:41.000Z | 2022-03-07T13:47:36.000Z | import numpy as np
import unittest
from pydlm.modeler.trends import trend
from pydlm.modeler.seasonality import seasonality
from pydlm.modeler.builder import builder
from pydlm.base.kalmanFilter import kalmanFilter
if __name__ == '__main__':
unittest.main()
| 35.212903 | 80 | 0.622756 |
d4b39516d2e47e56ba5e7898643ba4593ea3b27e | 349 | py | Python | change_threshold_migration.py | arcapix/gpfsapi-examples | 15bff7fda7b0a576209253dee48eb44e4c0d565f | [
"MIT"
] | 10 | 2016-05-17T12:58:35.000Z | 2022-01-10T05:23:45.000Z | change_threshold_migration.py | arcapix/gpfsapi-examples | 15bff7fda7b0a576209253dee48eb44e4c0d565f | [
"MIT"
] | null | null | null | change_threshold_migration.py | arcapix/gpfsapi-examples | 15bff7fda7b0a576209253dee48eb44e4c0d565f | [
"MIT"
] | 1 | 2016-09-12T09:07:00.000Z | 2016-09-12T09:07:00.000Z | from arcapix.fs.gpfs.policy import PlacementPolicy
from arcapix.fs.gpfs.rule import MigrateRule
# load placement policy for mmfs1
policy = PlacementPolicy('mmfs1')
# create a new migrate rule for 'sata1'
r = MigrateRule(source='sata1', threshold=(90, 50))
# add rule to start of the policy
policy.rules.insert(r, 0)
... | 23.266667 | 51 | 0.759312 |
d4b440c6e516a3bf9860aad41ef519824e8ea929 | 158 | py | Python | 1/puzzle1.py | tjol/advent-of-code-2021 | 16def395df091d5a8ae9ceb66ba3370554bdf40b | [
"0BSD"
] | 1 | 2021-12-20T19:56:56.000Z | 2021-12-20T19:56:56.000Z | 1/puzzle1.py | tjol/advent-of-code-2021 | 16def395df091d5a8ae9ceb66ba3370554bdf40b | [
"0BSD"
] | null | null | null | 1/puzzle1.py | tjol/advent-of-code-2021 | 16def395df091d5a8ae9ceb66ba3370554bdf40b | [
"0BSD"
] | null | null | null | #!/usr/bin/env python3
import sys
depths = list(map(int, sys.stdin))
increased = [a > b for (a, b) in zip(depths[1:], depths[:-1])]
print(sum(increased))
| 15.8 | 62 | 0.639241 |
d4b523573d56f337047743520fa550fd29576318 | 13,961 | py | Python | project/app/paste/controllers.py | An0nYm0u5101/Pastebin | aef35abee69ce7ce240d3a3f64bb19446468d30d | [
"MIT"
] | 1 | 2020-08-08T06:07:47.000Z | 2020-08-08T06:07:47.000Z | project/app/paste/controllers.py | An0nYm0u5101/Pastebin | aef35abee69ce7ce240d3a3f64bb19446468d30d | [
"MIT"
] | null | null | null | project/app/paste/controllers.py | An0nYm0u5101/Pastebin | aef35abee69ce7ce240d3a3f64bb19446468d30d | [
"MIT"
] | 1 | 2020-08-08T06:07:50.000Z | 2020-08-08T06:07:50.000Z | from flask import Blueprint, request, render_template, \
flash, g, session, redirect, url_for, jsonify
from app import db, requires_auth
from flask_cors import CORS
from .models import Paste
import uuid
from datetime import datetime
from app.user.models import User
from pygments import highlight
from pygments.lexers i... | 34.302211 | 197 | 0.698016 |
d4b56ca40567b39870ee94f1ef850a0b0b2f1d60 | 8,333 | py | Python | control_drone/run_model_on_cam.py | Apiquet/DeepLearningFrameworkFromScratch | 798ac42aa1a05286eb148576072e015fd94dbf94 | [
"MIT"
] | 1 | 2020-12-18T14:40:49.000Z | 2020-12-18T14:40:49.000Z | control_drone/run_model_on_cam.py | Apiquet/DeepLearningFrameworkFromScratch | 798ac42aa1a05286eb148576072e015fd94dbf94 | [
"MIT"
] | null | null | null | control_drone/run_model_on_cam.py | Apiquet/DeepLearningFrameworkFromScratch | 798ac42aa1a05286eb148576072e015fd94dbf94 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script run neural network model on a camera live stream
"""
import argparse
import cv2
import numpy as np
import os
import time
import sys
COMMANDS = {0: "move_forward", 1: "go_down", 2: "rot_10_deg",
3: "go_up", 4: "take_off", 5: "land", 6: "idle"}... | 29.867384 | 78 | 0.531621 |
d4b5c94f17a9cee798f64b657926900668bb67f6 | 5,431 | py | Python | classify_images.py | rmsare/cs231a-project | 91776ada3512d3805de0e66940c9f1c5b3c4c641 | [
"MIT"
] | 2 | 2017-11-06T10:23:16.000Z | 2019-11-09T15:11:19.000Z | classify_images.py | rmsare/cs231a-project | 91776ada3512d3805de0e66940c9f1c5b3c4c641 | [
"MIT"
] | null | null | null | classify_images.py | rmsare/cs231a-project | 91776ada3512d3805de0e66940c9f1c5b3c4c641 | [
"MIT"
] | null | null | null | """
Classification of pixels in images using color and other features.
General pipeline usage:
1. Load and segment images (img_utils.py)
2. Prepare training data (label_image.py)
3. Train classifier or cluster data (sklearn KMeans, MeanShift, SVC, etc.)
4. Predict labels on new image or directory (classify_directory(... | 30.857955 | 104 | 0.662861 |
d4b78df5fd076f594376f0529e58415b66407a89 | 579 | py | Python | quick_start/my_text_classifier/predictors/sentence_classifier_predictor.py | ramild/allennlp-guide | 4cff916e7bc4629184bc70594e213ef56e14ec70 | [
"MIT"
] | 71 | 2020-06-06T03:12:44.000Z | 2022-03-12T20:21:48.000Z | quick_start/my_text_classifier/predictors/sentence_classifier_predictor.py | ramild/allennlp-guide | 4cff916e7bc4629184bc70594e213ef56e14ec70 | [
"MIT"
] | 50 | 2020-06-18T14:19:15.000Z | 2022-03-28T07:04:16.000Z | quick_start/my_text_classifier/predictors/sentence_classifier_predictor.py | ramild/allennlp-guide | 4cff916e7bc4629184bc70594e213ef56e14ec70 | [
"MIT"
] | 37 | 2020-06-05T19:08:44.000Z | 2022-03-17T08:23:41.000Z | from allennlp.common import JsonDict
from allennlp.data import DatasetReader, Instance
from allennlp.models import Model
from allennlp.predictors import Predictor
from overrides import overrides
| 34.058824 | 65 | 0.775475 |
d4b832afc1a419832477a3ad699f701ea5d77522 | 3,357 | py | Python | ciphers/SKINNY-TK2/SKINNY-TK2/skinnytk2.py | j-danner/autoguess | 712a8dcfb259a277b2b2a499bd7c5fc4aab97b67 | [
"MIT"
] | 7 | 2021-11-29T07:25:43.000Z | 2022-03-02T10:15:30.000Z | ciphers/SKINNY-TK2/SKINNY-TK2/skinnytk2.py | j-danner/autoguess | 712a8dcfb259a277b2b2a499bd7c5fc4aab97b67 | [
"MIT"
] | 1 | 2022-03-30T16:29:50.000Z | 2022-03-30T16:29:50.000Z | ciphers/SKINNY-TK2/SKINNY-TK2/skinnytk2.py | j-danner/autoguess | 712a8dcfb259a277b2b2a499bd7c5fc4aab97b67 | [
"MIT"
] | 1 | 2022-03-30T13:40:12.000Z | 2022-03-30T13:40:12.000Z | # Created on Sep 7, 2020
# author: Hosein Hadipour
# contact: hsn.hadipour@gmail.com
import os
output_dir = os.path.curdir
def skinnytk2(R=1):
"""
This function generates the relations of Skinny-n-n for R rounds.
tk ================================================> TWEAKEY_P(t... | 33.909091 | 137 | 0.472148 |
d4bad788e453eaffecc4387f4afebe5f25e9867c | 2,447 | py | Python | tests/test_bmipy.py | visr/bmi-python | 0fcca448d097bc001f7492094ce1fd95d041b81d | [
"MIT"
] | 14 | 2015-01-13T16:26:12.000Z | 2021-07-22T04:56:59.000Z | tests/test_bmipy.py | visr/bmi-python | 0fcca448d097bc001f7492094ce1fd95d041b81d | [
"MIT"
] | 11 | 2015-03-17T21:15:57.000Z | 2021-03-24T21:31:00.000Z | tests/test_bmipy.py | visr/bmi-python | 0fcca448d097bc001f7492094ce1fd95d041b81d | [
"MIT"
] | 9 | 2015-03-13T15:59:52.000Z | 2021-06-28T11:40:51.000Z | import pytest
from bmipy import Bmi
| 16.993056 | 60 | 0.608909 |
d4bc5b3a862989ca34a4883d8781d87ac17bd277 | 592 | py | Python | scrapy_compose/fields/parser/string_field.py | Sphynx-HenryAY/scrapy-compose | bac45ee51bf4a49b3d4a9902767a17072137f869 | [
"MIT"
] | null | null | null | scrapy_compose/fields/parser/string_field.py | Sphynx-HenryAY/scrapy-compose | bac45ee51bf4a49b3d4a9902767a17072137f869 | [
"MIT"
] | 18 | 2019-10-17T10:51:30.000Z | 2020-05-12T10:00:49.000Z | scrapy_compose/fields/parser/string_field.py | Sphynx-HenryAY/scrapy-compose | bac45ee51bf4a49b3d4a9902767a17072137f869 | [
"MIT"
] | null | null | null |
from scrapy_compose.utils.context import realize
from .field import FuncField as BaseField
| 34.823529 | 96 | 0.6875 |
d4bc84fe21a49ee4da04551b3e65cc3308167280 | 2,449 | py | Python | app/request.py | vincentmuya/News-highlight | 67f61bb0bea69ec004c11a2148c62cd892a19615 | [
"CNRI-Python"
] | null | null | null | app/request.py | vincentmuya/News-highlight | 67f61bb0bea69ec004c11a2148c62cd892a19615 | [
"CNRI-Python"
] | null | null | null | app/request.py | vincentmuya/News-highlight | 67f61bb0bea69ec004c11a2148c62cd892a19615 | [
"CNRI-Python"
] | null | null | null | import urllib.request
import json
from .models import News
# Getting api key
api_key = None
# Getting the movie base url
base_url = None
def get_news_source(country,category):
'''
Function that gets the json response to our url request
'''
get_news_source_url = base_url.format(country,category,api_key)... | 33.094595 | 91 | 0.703144 |
d4bca411ec322bf0d2f4684e172c03b2076797b4 | 3,590 | py | Python | hypernet/src/thermophysicalModels/reactionThermo/mixture/multiComponent.py | christian-jacobsen/hypernet | 9f62e1531eb152cc08af0b0c6b09d6fde8d42400 | [
"Apache-2.0"
] | null | null | null | hypernet/src/thermophysicalModels/reactionThermo/mixture/multiComponent.py | christian-jacobsen/hypernet | 9f62e1531eb152cc08af0b0c6b09d6fde8d42400 | [
"Apache-2.0"
] | null | null | null | hypernet/src/thermophysicalModels/reactionThermo/mixture/multiComponent.py | christian-jacobsen/hypernet | 9f62e1531eb152cc08af0b0c6b09d6fde8d42400 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from hypernet.src.general import const
from hypernet.src.general import utils
from hypernet.src.thermophysicalModels.reactionThermo.mixture import Basic
| 30.423729 | 79 | 0.479666 |
d4bd39d2862e151f45c3d33b0cd79ef62c908dbf | 1,760 | py | Python | Exercises/W08D04_Exercise_01_Django_Cat_Collector/main_app/models.py | Roger-Takeshita/Software_Engineer | ec647bb969aa02453dae1884b5787d2045f7b4e2 | [
"MIT"
] | 2 | 2019-12-27T06:15:26.000Z | 2020-05-21T17:37:12.000Z | Exercises/W08D04_Exercise_01_Django_Cat_Collector/main_app/models.py | Roger-Takeshita/Bootcamp-Software-Engineer | ec647bb969aa02453dae1884b5787d2045f7b4e2 | [
"MIT"
] | null | null | null | Exercises/W08D04_Exercise_01_Django_Cat_Collector/main_app/models.py | Roger-Takeshita/Bootcamp-Software-Engineer | ec647bb969aa02453dae1884b5787d2045f7b4e2 | [
"MIT"
] | null | null | null | from django.db import models
from django.urls import reverse
from datetime import date
from django.contrib.auth.models import User #! 1 - Import user models
MEALS = (
('B', 'Breakfast'),
('L', 'Lunch'),
('D', 'Dinner')
) | 28.852459 | 160 | 0.691477 |
d4bdefb01d0a762af075c93831d87a0e10dd81de | 79 | py | Python | kedro-airflow/kedro_airflow/__init__.py | kedro-org/kedro-plugins | ad0755f503b275b73aeb8feb592a0ec0ea1bca8e | [
"Apache-2.0"
] | 6 | 2022-01-21T07:37:05.000Z | 2022-03-31T09:41:29.000Z | kedro-airflow/kedro_airflow/__init__.py | kedro-org/kedro-plugins | ad0755f503b275b73aeb8feb592a0ec0ea1bca8e | [
"Apache-2.0"
] | 7 | 2022-01-20T10:59:29.000Z | 2022-03-30T17:59:12.000Z | kedro-airflow/kedro_airflow/__init__.py | kedro-org/kedro-plugins | ad0755f503b275b73aeb8feb592a0ec0ea1bca8e | [
"Apache-2.0"
] | 1 | 2022-03-29T09:12:00.000Z | 2022-03-29T09:12:00.000Z | """ Kedro plugin for running a project with Airflow """
__version__ = "0.5.0"
| 19.75 | 55 | 0.683544 |
d4be731c2fefcf29455273684888ea746824bba4 | 713 | py | Python | soccer/gameplay/plays/testing/debug_window_evaluator.py | AniruddhaG123/robocup-software | 0eb3b3957428894f2f39341594800be803665f44 | [
"Apache-2.0"
] | 1 | 2019-09-24T22:59:25.000Z | 2019-09-24T22:59:25.000Z | soccer/gameplay/plays/testing/debug_window_evaluator.py | ananth-kumar01/robocup-software | 4043a7f9590d02f617d8e9a762697e4aaa27f1a6 | [
"Apache-2.0"
] | null | null | null | soccer/gameplay/plays/testing/debug_window_evaluator.py | ananth-kumar01/robocup-software | 4043a7f9590d02f617d8e9a762697e4aaa27f1a6 | [
"Apache-2.0"
] | null | null | null | import play
import behavior
import main
import robocup
import constants
import time
import math
## This isn't a real play, but it's pretty useful
# Turn it on and we'll draw the window evaluator stuff on-screen from the ball to our goal
| 29.708333 | 90 | 0.678822 |
d4bf375fc83f7c0bd614c1589d9466c6217e84ec | 331 | py | Python | rainbowconnection/sources/phoenix/utils.py | zkbt/rainbow-connection | 53828fd0b63a552a22a6aa38393cefda27c61b9a | [
"MIT"
] | 6 | 2019-09-04T20:22:02.000Z | 2020-12-30T05:00:10.000Z | rainbowconnection/sources/phoenix/utils.py | zkbt/rainbow-connection | 53828fd0b63a552a22a6aa38393cefda27c61b9a | [
"MIT"
] | 8 | 2019-05-23T18:06:51.000Z | 2020-02-13T22:15:07.000Z | rainbowconnection/sources/phoenix/utils.py | zkbt/rainbow-connection | 53828fd0b63a552a22a6aa38393cefda27c61b9a | [
"MIT"
] | null | null | null | from ...imports import *
def stringify_metallicity(Z):
"""
Convert a metallicity into a PHOENIX-style string.
Parameters
----------
Z : float
[Fe/H]-style metallicity (= 0.0 for solar)
"""
if Z <= 0:
return "-{:03.1f}".format(np.abs(Z))
else:
return "+{:03.1f}"... | 19.470588 | 54 | 0.531722 |
d4bffb102dcb1752fbd5cc9d9f62656784042e5e | 1,506 | py | Python | shipane_sdk/transaction.py | awfssv/ShiPanE-Python-SDK | 678790e5eb220cf685e5f8d03ba3310f3fbb8d22 | [
"MIT"
] | 1 | 2016-12-19T16:05:23.000Z | 2016-12-19T16:05:23.000Z | shipane_sdk/transaction.py | awfssv/ShiPanE-Python-SDK | 678790e5eb220cf685e5f8d03ba3310f3fbb8d22 | [
"MIT"
] | null | null | null | shipane_sdk/transaction.py | awfssv/ShiPanE-Python-SDK | 678790e5eb220cf685e5f8d03ba3310f3fbb8d22 | [
"MIT"
] | 1 | 2021-05-21T02:12:04.000Z | 2021-05-21T02:12:04.000Z | # -*- coding: utf-8 -*-
| 22.477612 | 55 | 0.581009 |
d4c06417dd5e89491398d91b568c1842895c3961 | 14,779 | py | Python | tensorflow_probability/python/distributions/laplace_test.py | wataruhashimoto52/probability | 12e3f256544eadea6e863868da825614f4423eb0 | [
"Apache-2.0"
] | 1 | 2020-04-13T12:31:12.000Z | 2020-04-13T12:31:12.000Z | tensorflow_probability/python/distributions/laplace_test.py | wataruhashimoto52/probability | 12e3f256544eadea6e863868da825614f4423eb0 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/distributions/laplace_test.py | wataruhashimoto52/probability | 12e3f256544eadea6e863868da825614f4423eb0 | [
"Apache-2.0"
] | 1 | 2020-12-19T13:05:15.000Z | 2020-12-19T13:05:15.000Z | # Copyright 2018 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 38.790026 | 109 | 0.66175 |
d4c0845bc0b80a14fbe5e783d9ed64b00db19bce | 3,383 | py | Python | app/__init__.py | credwood/bitplayers | 4ca6b6c6a21bb21d7cd963c64028415559c3dcc4 | [
"MIT"
] | 1 | 2020-06-26T21:49:14.000Z | 2020-06-26T21:49:14.000Z | app/__init__.py | credwood/bitplayers | 4ca6b6c6a21bb21d7cd963c64028415559c3dcc4 | [
"MIT"
] | 2 | 2020-03-31T11:11:04.000Z | 2021-12-13T20:38:48.000Z | app/__init__.py | credwood/bitplayers | 4ca6b6c6a21bb21d7cd963c64028415559c3dcc4 | [
"MIT"
] | null | null | null | import dash
from flask import Flask
from flask.helpers import get_root_path
from flask_login import login_required
from flask_wtf.csrf import CSRFProtect
from flask_admin import Admin, BaseView, expose
from flask_admin.contrib.sqla import ModelView
from datetime import datetime
from dateutil import parser
import pytz
f... | 35.610526 | 111 | 0.738693 |
d4c0decddfc9adf11a583ac3c85b167de4ffaed9 | 33,707 | py | Python | selectinf/randomized/approx_reference_grouplasso.py | kevinbfry/selective-inference | 4e846877b5c23969fc420b452f20cc3b16b6cb78 | [
"BSD-3-Clause"
] | 14 | 2015-09-01T19:31:25.000Z | 2021-11-26T08:47:10.000Z | selectinf/randomized/approx_reference_grouplasso.py | kevinbfry/selective-inference | 4e846877b5c23969fc420b452f20cc3b16b6cb78 | [
"BSD-3-Clause"
] | 7 | 2016-09-12T20:41:41.000Z | 2018-06-26T02:10:30.000Z | selectinf/randomized/approx_reference_grouplasso.py | kevinbfry/selective-inference | 4e846877b5c23969fc420b452f20cc3b16b6cb78 | [
"BSD-3-Clause"
] | 10 | 2015-09-01T19:31:28.000Z | 2021-02-23T01:16:20.000Z | from __future__ import print_function
from scipy.linalg import block_diag
from scipy.stats import norm as ndist
from scipy.interpolate import interp1d
import collections
import numpy as np
from numpy import log
from numpy.linalg import norm, qr, inv, eig
import pandas as pd
import regreg.api as rr
from .randomization... | 37.830527 | 116 | 0.556709 |
d4c1d2fbba6d7c550c2607f8f36af9eb36384e04 | 18,606 | py | Python | internals/states.py | mattjj/pyhsmm-collapsedinfinite | 81a60c025beec6fb065bc9f4e23cea43b6f6725c | [
"MIT"
] | null | null | null | internals/states.py | mattjj/pyhsmm-collapsedinfinite | 81a60c025beec6fb065bc9f4e23cea43b6f6725c | [
"MIT"
] | null | null | null | internals/states.py | mattjj/pyhsmm-collapsedinfinite | 81a60c025beec6fb065bc9f4e23cea43b6f6725c | [
"MIT"
] | 1 | 2021-10-06T15:12:44.000Z | 2021-10-06T15:12:44.000Z | from __future__ import division
import numpy as np
na = np.newaxis
import collections, itertools
import abc
from pyhsmm.util.stats import sample_discrete, sample_discrete_from_log, combinedata
from pyhsmm.util.general import rle as rle
# NOTE: assumes censoring. can make no censoring by adding to score of last
# segm... | 35.849711 | 110 | 0.577448 |
d4c20caa8c6caaf656d4639f0a7424aba4ba6e44 | 1,406 | py | Python | exporters/contrib/writers/odo_writer.py | scrapinghub/exporters | b14f70530826bbbd6163d9e56e74345e762a9189 | [
"BSD-3-Clause"
] | 41 | 2016-06-16T15:29:39.000Z | 2021-08-06T03:29:13.000Z | exporters/contrib/writers/odo_writer.py | bbotella/fluxo | c9fb01db1771ada4672bbffd67cb46e1f7802ab9 | [
"BSD-3-Clause"
] | 52 | 2016-06-20T12:46:57.000Z | 2018-02-08T12:22:03.000Z | exporters/contrib/writers/odo_writer.py | bbotella/fluxo | c9fb01db1771ada4672bbffd67cb46e1f7802ab9 | [
"BSD-3-Clause"
] | 10 | 2016-06-23T08:49:36.000Z | 2018-01-13T10:12:10.000Z | import six
import json
import gzip
from exporters.default_retries import retry_long
from exporters.writers.base_writer import BaseWriter
| 31.244444 | 93 | 0.642959 |
d4c271023ce05496e3aeca43f2ffb25c230ab172 | 184 | py | Python | x7/geom/needs_test.py | gribbg/x7-geom | a01ef29dc47f1587e3390b552decf92db0bbaa20 | [
"BSD-2-Clause"
] | null | null | null | x7/geom/needs_test.py | gribbg/x7-geom | a01ef29dc47f1587e3390b552decf92db0bbaa20 | [
"BSD-2-Clause"
] | null | null | null | x7/geom/needs_test.py | gribbg/x7-geom | a01ef29dc47f1587e3390b552decf92db0bbaa20 | [
"BSD-2-Clause"
] | null | null | null | """
Simple file to validate that maketests is working. Call maketests via:
>>> from x7.shell import *; maketests('x7.sample.needs_tests')
"""
| 20.444444 | 71 | 0.695652 |
d4c391278bd0cf509c7b23a6660f7d6beb4dfdb7 | 3,960 | py | Python | python/SHA3_hashlib_based_concept.py | feketebv/SCA_proof_SHA3-512 | 5a7689ea307463d5b797e49142c349b02cdcda03 | [
"MIT"
] | 1 | 2021-05-19T00:08:15.000Z | 2021-05-19T00:08:15.000Z | python/SHA3_hashlib_based_concept.py | feketebv/SCA_proof_SHA3-512 | 5a7689ea307463d5b797e49142c349b02cdcda03 | [
"MIT"
] | null | null | null | python/SHA3_hashlib_based_concept.py | feketebv/SCA_proof_SHA3-512 | 5a7689ea307463d5b797e49142c349b02cdcda03 | [
"MIT"
] | null | null | null | '''
Written by: Balazs Valer Fekete fbv81bp@outlook.hu fbv81bp@gmail.com
Last updated: 29.01.2021
'''
# the concept is to generate a side channel resistant initialisation of the hashing function based on
# one secret key and several openly known initialisation vectors (IV) in a manner that the same input
# is n... | 40 | 105 | 0.65303 |
d4c3adf62c8a44bad01c91e8ccec7e900d2597c3 | 1,573 | py | Python | graphstar/utils.py | pengboomouch/graphstar | f7f3537aa92118765b358dd3a47b4fa5cea8587c | [
"MIT"
] | null | null | null | graphstar/utils.py | pengboomouch/graphstar | f7f3537aa92118765b358dd3a47b4fa5cea8587c | [
"MIT"
] | null | null | null | graphstar/utils.py | pengboomouch/graphstar | f7f3537aa92118765b358dd3a47b4fa5cea8587c | [
"MIT"
] | null | null | null | """
graphstar.utils
~~~~~~~~~~~~~~~
Cristian Cornea
A simple bedirectional graph with A* and breadth-first pathfinding.
Utils are either used by the search algorithm, or when needed :)
Pretty self explainatory (I hope)
For more information see the examples and tests folder
"""
def clean_route_list(route_st... | 24.968254 | 68 | 0.688493 |
d4c411c2e8e16ded3277d3bfc3c35dd1f462b513 | 527 | py | Python | jinchi/demo/foobar.py | jiz148/py-test | d976265d065c760f2e8b55302dedbfebd01bec28 | [
"Apache-2.0"
] | null | null | null | jinchi/demo/foobar.py | jiz148/py-test | d976265d065c760f2e8b55302dedbfebd01bec28 | [
"Apache-2.0"
] | null | null | null | jinchi/demo/foobar.py | jiz148/py-test | d976265d065c760f2e8b55302dedbfebd01bec28 | [
"Apache-2.0"
] | 1 | 2019-01-07T18:42:53.000Z | 2019-01-07T18:42:53.000Z | import os
def check_env(env_var_name):
"""
Check and return the type of an environment variable.
supported types:
None
Integer
String
@param env_var_name: environment variable name
@return: string of the type name.
"""
try:
val = os.getenv(env_var_name)
... | 18.821429 | 57 | 0.578748 |
d4c4c2df87ed6c462e4aab6092109b050d3d20d5 | 759 | py | Python | sound/serializers.py | Anirudhchoudhary/ApnaGanna__backend | 52e6c3100fdb289e8bf64a1a4007eeb2eb66a022 | [
"MIT"
] | null | null | null | sound/serializers.py | Anirudhchoudhary/ApnaGanna__backend | 52e6c3100fdb289e8bf64a1a4007eeb2eb66a022 | [
"MIT"
] | null | null | null | sound/serializers.py | Anirudhchoudhary/ApnaGanna__backend | 52e6c3100fdb289e8bf64a1a4007eeb2eb66a022 | [
"MIT"
] | null | null | null | from .models import Sound , Album
from rest_framework import serializers
| 27.107143 | 102 | 0.637681 |
d4c56f7b05d7fe221ca2f682d2bea0e270121b36 | 2,000 | py | Python | tracking/utils.py | WGBH/django-tracking | 80e8bc44521820eab956d2264d6df0b6987429e0 | [
"MIT"
] | null | null | null | tracking/utils.py | WGBH/django-tracking | 80e8bc44521820eab956d2264d6df0b6987429e0 | [
"MIT"
] | null | null | null | tracking/utils.py | WGBH/django-tracking | 80e8bc44521820eab956d2264d6df0b6987429e0 | [
"MIT"
] | null | null | null | from datetime import datetime
from django.conf import settings
import pytz
DEFAULT_TRACKER_POSITIONS = [
('tracker-head-top', 'Head - near top'),
('tracker-head-bottom', 'Head - near bottom'),
('tracker-body-top', 'Body - near top'),
('tracker-body-bottom', 'Body - near bottom')
]
def get_tracker_po... | 35.087719 | 88 | 0.665 |
d4c5d71a8319e8e4743e5c7446b67b54ee62af61 | 256 | py | Python | devtools/api/health.py | ankeshkhemani/devtools | beb9a46c27b6b4c02a2e8729af0c971cc175f134 | [
"Apache-2.0"
] | null | null | null | devtools/api/health.py | ankeshkhemani/devtools | beb9a46c27b6b4c02a2e8729af0c971cc175f134 | [
"Apache-2.0"
] | null | null | null | devtools/api/health.py | ankeshkhemani/devtools | beb9a46c27b6b4c02a2e8729af0c971cc175f134 | [
"Apache-2.0"
] | null | null | null | import datetime
from fastapi import APIRouter
router = APIRouter()
| 17.066667 | 56 | 0.605469 |