hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b7a3ac719d785e13f7265ad9a05f4b664dd99826 | 3,685 | py | Python | MIssions_to_Mars/scrape_mars_mission.py | pwickliff1/web-scraping-challenge | 56e2b5e6905c17fce762aeb2ae1ad8cb0f48f8d6 | [
"ADSL"
] | null | null | null | MIssions_to_Mars/scrape_mars_mission.py | pwickliff1/web-scraping-challenge | 56e2b5e6905c17fce762aeb2ae1ad8cb0f48f8d6 | [
"ADSL"
] | null | null | null | MIssions_to_Mars/scrape_mars_mission.py | pwickliff1/web-scraping-challenge | 56e2b5e6905c17fce762aeb2ae1ad8cb0f48f8d6 | [
"ADSL"
] | null | null | null | # Dependencies
from bs4 import BeautifulSoup
import requests
import re
import pandas as pd
def scrape():
mars_data = {}
# Url of website to be scraped
url = 'https://mars.nasa.gov/news/'
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html.parser')
# get the lates... | 35.095238 | 172 | 0.686567 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,082 | 0.564993 |
b7a7160ec0048a1f0be91a335c4abd54fb69fa8b | 10,165 | py | Python | guiapp/meditech_nls_parser/old/meditech_nls_to_xml.py | gcampuzano14/PathISTabs | ae29a0b71647ecb32fc40e234b5c7276ab5333d9 | [
"MIT"
] | 1 | 2017-07-28T14:01:32.000Z | 2017-07-28T14:01:32.000Z | guiapp/meditech_nls_parser/old/meditech_nls_to_xml.py | gcampuzano14/PathISTabs | ae29a0b71647ecb32fc40e234b5c7276ab5333d9 | [
"MIT"
] | null | null | null | guiapp/meditech_nls_parser/old/meditech_nls_to_xml.py | gcampuzano14/PathISTabs | ae29a0b71647ecb32fc40e234b5c7276ab5333d9 | [
"MIT"
] | 1 | 2019-02-14T06:07:24.000Z | 2019-02-14T06:07:24.000Z | #!/usr/bin/env python
import os
import re
import csv
def fil():
filetext = os.path.join(os.path.dirname(__file__),'meditech_data','RAW')
#filetext = "C:/Users/gcampuzanozuluaga/Dropbox/Programming/Python/APPS/meditech_data/MT/RAW"
outtext_temp = os.path.join(os.path.dirname(__file__),'meditec... | 50.073892 | 174 | 0.52789 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,240 | 0.417118 |
b7a7213417448a10f646593e2af28f99d94c2f47 | 3,144 | py | Python | paper_plots/small_vs_large_box.py | finn-dodgson/DeepHalos | 86e0ac6c24ac97a0a2a0a60a7ea3721a04bd050c | [
"MIT"
] | null | null | null | paper_plots/small_vs_large_box.py | finn-dodgson/DeepHalos | 86e0ac6c24ac97a0a2a0a60a7ea3721a04bd050c | [
"MIT"
] | null | null | null | paper_plots/small_vs_large_box.py | finn-dodgson/DeepHalos | 86e0ac6c24ac97a0a2a0a60a7ea3721a04bd050c | [
"MIT"
] | null | null | null | import numpy as np
from plots import plots_for_predictions as pp
from utilss import distinct_colours as dc
import matplotlib.pyplot as plt
c = dc.get_distinct(4)
path = '/Users/luisals/Documents/deep_halos_files/mass_range_13.4/random_20sims_200k/lr5e-5/'
p1 = np.load(path + "seed_20/predicted_sim_6_epoch_09.npy")
t1... | 60.461538 | 126 | 0.699746 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,436 | 0.456743 |
b7a964ee74b74803fefa91500045e19a16c2244a | 85,945 | py | Python | regions.py | greggy/python-ipgeobase | 593e4dc7e55e0c90a1979e586f03c013f6ac057a | [
"BSD-3-Clause"
] | 1 | 2017-11-12T11:26:25.000Z | 2017-11-12T11:26:25.000Z | regions.py | greggy/python-ipgeobase | 593e4dc7e55e0c90a1979e586f03c013f6ac057a | [
"BSD-3-Clause"
] | null | null | null | regions.py | greggy/python-ipgeobase | 593e4dc7e55e0c90a1979e586f03c013f6ac057a | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
REGIONS = {'USRI': 'Rhode Island', 'UY02': 'Canelones', 'KR21': 'Ulsan-gwangyoksi', 'KR20': 'Kyongsang-namdo', 'KM02': 'Grande Comore', 'KM03': 'Moheli', 'CO22': 'Putumayo', 'BN18': 'Zou', 'BN17': 'Plateau', 'BN16': 'Oueme', 'BN15': 'Tutong', 'BN14': 'Littoral', 'BN13': 'Donga', 'BN12': 'Kouffo... | 21,486.25 | 85,919 | 0.602339 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 69,704 | 0.81103 |
b7a9d3a60ea32292f1f1a315f0e465e4cf861159 | 236 | py | Python | configs/semantic_guided/CE.py | hukkelas/full_body_anonymization | c61745b137c84ffb742ef6ab2f4721db4acf22b7 | [
"MIT"
] | 27 | 2022-01-06T20:15:24.000Z | 2022-03-29T11:54:49.000Z | configs/semantic_guided/CE.py | hukkelas/full_body_anonymization | c61745b137c84ffb742ef6ab2f4721db4acf22b7 | [
"MIT"
] | 2 | 2022-03-17T06:04:23.000Z | 2022-03-25T08:50:57.000Z | configs/semantic_guided/CE.py | hukkelas/full_body_anonymization | c61745b137c84ffb742ef6ab2f4721db4acf22b7 | [
"MIT"
] | 2 | 2022-01-07T13:16:59.000Z | 2022-01-16T02:10:50.000Z | _base_config_ = ["base.py"]
generator = dict(
input_cse=True,
use_cse=True
)
discriminator=dict(
pred_only_cse=False,
pred_only_semantic=True
)
loss = dict(
gan_criterion=dict(type="segmentation", seg_weight=.1)
)
| 15.733333 | 58 | 0.699153 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.097458 |
b7ac37d5a23a4e9b74f4c14b649516c082ec539d | 676 | py | Python | test/compiler/test-encode.py | xupingmao/minipy | 5bce2f238925eb92fe9ff7d935f59ef68daa257a | [
"MIT"
] | 52 | 2016-07-11T10:14:35.000Z | 2021-12-09T09:10:43.000Z | test/compiler/test-encode.py | xupingmao/snake | c956f151ed1ebd2faeaf1565352b59ca5a8fa0b4 | [
"MIT"
] | 13 | 2016-07-24T13:50:37.000Z | 2019-03-02T06:56:18.000Z | test/compiler/test-encode.py | xupingmao/snake | c956f151ed1ebd2faeaf1565352b59ca5a8fa0b4 | [
"MIT"
] | 9 | 2017-01-27T10:46:04.000Z | 2021-12-09T09:10:46.000Z | # -*- coding:utf-8 -*-
# @author xupingmao <[email protected]>
# @since 2020/10/20 00:19:47
# @modified 2020/10/20 00:42:52
import sys
sys.path.append("src/python")
from mp_encode import *
def test_compile(fname):
input_fname = "test/compiler/case/%s-input.py" % fname
output_fname = "test/compiler/case/%s-o... | 25.037037 | 67 | 0.668639 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 289 | 0.427515 |
b7ad32170df3a150ccda1de3243e006af407c590 | 3,719 | py | Python | paragen/optim/__init__.py | godweiyang/ParaGen | 9665d1244ea38a41fc06b4e0a7f6411985e2221f | [
"Apache-2.0"
] | null | null | null | paragen/optim/__init__.py | godweiyang/ParaGen | 9665d1244ea38a41fc06b4e0a7f6411985e2221f | [
"Apache-2.0"
] | null | null | null | paragen/optim/__init__.py | godweiyang/ParaGen | 9665d1244ea38a41fc06b4e0a7f6411985e2221f | [
"Apache-2.0"
] | null | null | null | from copy import deepcopy
from inspect import getfullargspec
import importlib
import json
import os
import logging
logger = logging.getLogger(__name__)
from torch.optim.optimizer import Optimizer
from paragen.optim.optimizer import Optimizer
from paragen.utils.rate_schedulers import create_rate_scheduler
from paragen... | 35.419048 | 112 | 0.633235 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 313 | 0.084162 |
b7adb4099781c23875a3639ae37c4e4a5bb88239 | 2,860 | py | Python | joyvillage/joy/views.py | IreneMercy/Joy-Village-Backup | f038e33aa5c28337bc20c6fcd3273ef37d283564 | [
"MIT"
] | null | null | null | joyvillage/joy/views.py | IreneMercy/Joy-Village-Backup | f038e33aa5c28337bc20c6fcd3273ef37d283564 | [
"MIT"
] | 9 | 2021-03-19T09:58:55.000Z | 2022-03-12T00:22:50.000Z | joyvillage/joy/views.py | IreneMercy/Joy-Foundation | f038e33aa5c28337bc20c6fcd3273ef37d283564 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.shortcuts import render, redirect
from django.http import HttpResponse, HttpResponseRedirect
from .models import Events, Gallery, News, Careers, Partners
from django.core.mail import send_mail,BadHeaderError
from django.conf import settings
from.forms import ContactFo... | 29.484536 | 103 | 0.640909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 408 | 0.142657 |
b7ae3072a6046637d4bd29d21eabd8d449e98c65 | 274 | py | Python | src/events/admin.py | cbsBiram/xarala__ssr | 863e1362c786daa752b942b796f7a015211d2f1b | [
"FSFAP"
] | null | null | null | src/events/admin.py | cbsBiram/xarala__ssr | 863e1362c786daa752b942b796f7a015211d2f1b | [
"FSFAP"
] | null | null | null | src/events/admin.py | cbsBiram/xarala__ssr | 863e1362c786daa752b942b796f7a015211d2f1b | [
"FSFAP"
] | null | null | null | from django.contrib import admin
from django_summernote.admin import SummernoteModelAdmin
from .models import Event, Speaker
class EventAdmin(SummernoteModelAdmin):
summernote_fields = ("content",)
admin.site.register(Event, EventAdmin)
admin.site.register(Speaker)
| 22.833333 | 56 | 0.813869 | 76 | 0.277372 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.032847 |
b7af3d0ba516d34beefe1df3aa1a2a39558521ee | 318 | py | Python | python/cython_build.py | n1tk/batch_jaro_winkler | 421c7e3a5bedce89e8c00216b90d32d1629073a2 | [
"MIT"
] | 22 | 2020-04-30T17:56:29.000Z | 2022-01-19T21:05:15.000Z | python/cython_build.py | n1tk/batch_jaro_winkler | 421c7e3a5bedce89e8c00216b90d32d1629073a2 | [
"MIT"
] | 2 | 2021-01-19T14:07:22.000Z | 2021-11-24T16:32:46.000Z | python/cython_build.py | n1tk/batch_jaro_winkler | 421c7e3a5bedce89e8c00216b90d32d1629073a2 | [
"MIT"
] | 3 | 2020-10-28T20:56:29.000Z | 2022-02-25T23:29:05.000Z |
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
import sys
python_version = sys.version_info[0]
setup(
name='batch_jaro_winkler',
ext_modules=cythonize([Extension('batch_jaro_winkler', ['cbatch_jaro_winkler.pyx'])], language_level=python_version)
) | 24.461538 | 118 | 0.811321 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 65 | 0.204403 |
b7afa43603c9767401a62b1a4fe6fc631887605a | 6,647 | py | Python | venv/lib/python3.7/site-packages/google/type/postal_address_pb2.py | nicholasadamou/StockBird | 257396479667863d4ee122ea46adb86087c9aa78 | [
"Apache-2.0"
] | 15 | 2020-06-29T08:33:39.000Z | 2022-02-12T00:28:51.000Z | venv/lib/python3.7/site-packages/google/type/postal_address_pb2.py | nicholasadamou/StockBird | 257396479667863d4ee122ea46adb86087c9aa78 | [
"Apache-2.0"
] | 21 | 2020-03-01T18:21:09.000Z | 2020-05-26T14:49:08.000Z | venv/lib/python3.7/site-packages/google/type/postal_address_pb2.py | nicholasadamou/StockBird | 257396479667863d4ee122ea46adb86087c9aa78 | [
"Apache-2.0"
] | 11 | 2020-06-29T08:40:24.000Z | 2022-02-24T17:39:16.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/type/postal_address.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import r... | 47.141844 | 711 | 0.746352 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,902 | 0.286144 |
b7aff83ef7243e9bfde2d005caee3accba55ac07 | 612 | py | Python | dataprep/tests/data_connector/test_integration.py | dylanzxc/dataprep | 21ef62936eeec28495763f35fcb3cb07f71de6f6 | [
"MIT"
] | 1 | 2020-12-18T13:16:38.000Z | 2020-12-18T13:16:38.000Z | dataprep/tests/data_connector/test_integration.py | bexxmodd/dataprep | 3aaa626bfaf9270cf56ffb70280cbcd8031f3ac3 | [
"MIT"
] | null | null | null | dataprep/tests/data_connector/test_integration.py | bexxmodd/dataprep | 3aaa626bfaf9270cf56ffb70280cbcd8031f3ac3 | [
"MIT"
] | null | null | null | from ...data_connector import Connector
from os import environ
def test_data_connector() -> None:
token = environ["DATAPREP_DATA_CONNECTOR_YELP_TOKEN"]
dc = Connector("yelp", _auth={"access_token": token})
df = dc.query("businesses", term="ramen", location="vancouver")
assert len(df) > 0
dc.info... | 24.48 | 81 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 158 | 0.25817 |
b7b0446dcbe64c12f7cc04baa8e64d8c7155c9fb | 6,294 | py | Python | plot_helpers.py | aspuru-guzik-group/QNODE | 1ec3767c7b574eaeb7b0ec05d1be54983f8972bd | [
"MIT"
] | 14 | 2021-11-06T19:32:56.000Z | 2022-02-08T19:53:28.000Z | plot_helpers.py | aspuru-guzik-group/QNODE | 1ec3767c7b574eaeb7b0ec05d1be54983f8972bd | [
"MIT"
] | null | null | null | plot_helpers.py | aspuru-guzik-group/QNODE | 1ec3767c7b574eaeb7b0ec05d1be54983f8972bd | [
"MIT"
] | null | null | null | import os
import torch
import numpy as np
import math
import matplotlib.pyplot as plt
from matplotlib import cm
from qutip import *
import imageio
plt.rcParams['axes.labelsize'] = 16
from matplotlib import rc
rc('font', **{'family': 'serif', 'serif': ['Computer Modern']})
rc('text', usetex=True)
def animate_recon(xt,... | 35.965714 | 167 | 0.58659 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,346 | 0.213854 |
b7b1005f9392e0dbc05eef28e9be52e84c7d4a58 | 17,348 | py | Python | state.py | Lekensteyn/wgll | 11ac7925687bfc1866d3702f821230233fe3a8de | [
"MIT"
] | 1 | 2021-11-27T17:29:43.000Z | 2021-11-27T17:29:43.000Z | state.py | Lekensteyn/wgll | 11ac7925687bfc1866d3702f821230233fe3a8de | [
"MIT"
] | null | null | null | state.py | Lekensteyn/wgll | 11ac7925687bfc1866d3702f821230233fe3a8de | [
"MIT"
] | null | null | null | # State tracking for WireGuard protocol operations.
# Author: Peter Wu <[email protected]>
# Licensed under the MIT license <http://opensource.org/licenses/MIT>.
import base64
import hashlib
import inspect
import socket
import traceback
from noise_wg import NoiseWG, crypto_scalarmult_base, aead_encrypt, aead_decryp... | 34.557769 | 85 | 0.606006 | 16,033 | 0.924199 | 0 | 0 | 1,069 | 0.061621 | 0 | 0 | 2,407 | 0.138748 |
b7b19fe3229937c45439013a0185385ffb6134b0 | 2,007 | py | Python | BAMF_Detect/modules/dendroid.py | bwall/bamfdetect | 3b0b96a8b2285a1a4b3e3cf5ed1b5ad422b91ed1 | [
"MIT"
] | 152 | 2015-02-04T16:34:53.000Z | 2021-07-27T19:00:40.000Z | BAMF_Detect/modules/dendroid.py | bwall/bamfdetect | 3b0b96a8b2285a1a4b3e3cf5ed1b5ad422b91ed1 | [
"MIT"
] | null | null | null | BAMF_Detect/modules/dendroid.py | bwall/bamfdetect | 3b0b96a8b2285a1a4b3e3cf5ed1b5ad422b91ed1 | [
"MIT"
] | 30 | 2015-03-31T10:20:32.000Z | 2022-02-09T16:17:04.000Z | from common import Modules, data_strings, load_yara_rules, AndroidParseModule, ModuleMetadata
from base64 import b64decode
from string import printable
class dendroid(AndroidParseModule):
def __init__(self):
md = ModuleMetadata(
module_name="dendroid",
bot_name="Dendroid",
... | 33.45 | 119 | 0.521176 | 1,819 | 0.906328 | 0 | 0 | 0 | 0 | 0 | 0 | 233 | 0.116094 |
b7b264987ed766841bcdbbf47f7266aa100f16c2 | 8,942 | py | Python | corehq/ex-submodules/couchforms/tests/test_analytics.py | caktus/commcare-hq | fae9c0f792b4889b768252d3895d9d1884ce0d3b | [
"BSD-3-Clause"
] | null | null | null | corehq/ex-submodules/couchforms/tests/test_analytics.py | caktus/commcare-hq | fae9c0f792b4889b768252d3895d9d1884ce0d3b | [
"BSD-3-Clause"
] | 40 | 2021-07-20T15:55:08.000Z | 2022-03-25T17:21:36.000Z | corehq/ex-submodules/couchforms/tests/test_analytics.py | caktus/commcare-hq | fae9c0f792b4889b768252d3895d9d1884ce0d3b | [
"BSD-3-Clause"
] | null | null | null | import datetime
import uuid
from django.test import TestCase
from mock import patch
from requests import ConnectionError
from couchforms.analytics import (
app_has_been_submitted_to_in_last_30_days,
domain_has_submission_in_last_30_days,
get_all_xmlns_app_id_pairs_submitted_to_in_domain,
get_exports_b... | 40.645455 | 113 | 0.674122 | 7,569 | 0.846455 | 0 | 0 | 7,618 | 0.851935 | 0 | 0 | 1,307 | 0.146164 |
b7b2bf3009f886fb399b6a73378d628699d8010a | 462 | py | Python | src/pythae/models/svae/svae_config.py | eknag/benchmark_VAE | 8b727f29a68aff7771c4c97aff15f75f88320e1f | [
"Apache-2.0"
] | 1 | 2022-03-20T20:23:59.000Z | 2022-03-20T20:23:59.000Z | src/pythae/models/svae/svae_config.py | eknag/benchmark_VAE | 8b727f29a68aff7771c4c97aff15f75f88320e1f | [
"Apache-2.0"
] | null | null | null | src/pythae/models/svae/svae_config.py | eknag/benchmark_VAE | 8b727f29a68aff7771c4c97aff15f75f88320e1f | [
"Apache-2.0"
] | null | null | null | from pydantic.dataclasses import dataclass
from ...models import VAEConfig
@dataclass
class SVAEConfig(VAEConfig):
r"""
:math:`\mathcal{S}`-VAE model config config class
Parameters:
input_dim (int): The input_data dimension
latent_dim (int): The latent space dimension in which lives the ... | 27.176471 | 99 | 0.690476 | 372 | 0.805195 | 0 | 0 | 383 | 0.829004 | 0 | 0 | 330 | 0.714286 |
b7b3ac20c4a0978bc24a666dd7cd9ac25c00bc3a | 7,486 | py | Python | amck/imat/download_data.py | aaronmckinstry706/imaterialist | ebed3f3bd9e231f0852aa30c7bbfafe94d5dbce1 | [
"MIT"
] | null | null | null | amck/imat/download_data.py | aaronmckinstry706/imaterialist | ebed3f3bd9e231f0852aa30c7bbfafe94d5dbce1 | [
"MIT"
] | null | null | null | amck/imat/download_data.py | aaronmckinstry706/imaterialist | ebed3f3bd9e231f0852aa30c7bbfafe94d5dbce1 | [
"MIT"
] | null | null | null | # Parts of code taken from https://www.kaggle.com/aloisiodn/python-3-download-multi-proc-prog-bar-resume by Dourado.
# Improvements on the original script:
# * you can choose which dataset to download;
# * uses threads instead of processes;
# * unpacks data into .../label/id.jpg directory structure, which can be ... | 41.821229 | 118 | 0.716137 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,236 | 0.298691 |
b7b473cc7728c8bc405a3042f957fe877f0c27c2 | 790 | py | Python | JTP Recap./2.Program_IO/function.py | SNP0301/Study_Python | bb7ce7a0d915131c281152e7faee5b57c290df6b | [
"MIT"
] | null | null | null | JTP Recap./2.Program_IO/function.py | SNP0301/Study_Python | bb7ce7a0d915131c281152e7faee5b57c290df6b | [
"MIT"
] | null | null | null | JTP Recap./2.Program_IO/function.py | SNP0301/Study_Python | bb7ce7a0d915131c281152e7faee5b57c290df6b | [
"MIT"
] | null | null | null | """
Function
def function_name(arg1, arg2, ...) :
<op 1>
<op 2>
...
Function with undefined amount of input
def fn_name(*args) --> args' elements make tuple.
kwargs = Keyword Parameter
>>> def print_kwargs(**kwargs):
... print(kwargs)
...
>>> print_kwargs(a=1)
{... | 22.571429 | 72 | 0.596203 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 790 | 1 |
b7b56be6d7b0d5e174db26b106b5f7914f624c31 | 2,437 | py | Python | tweet/common.py | skiwheelr/URS | 45746c945af2ea62a5ddb675c6a8e4e2fe4b5a93 | [
"MIT"
] | 4 | 2021-02-15T02:02:38.000Z | 2022-03-04T16:38:44.000Z | tweet/common.py | skiwheelr/URS | 45746c945af2ea62a5ddb675c6a8e4e2fe4b5a93 | [
"MIT"
] | null | null | null | tweet/common.py | skiwheelr/URS | 45746c945af2ea62a5ddb675c6a8e4e2fe4b5a93 | [
"MIT"
] | 2 | 2021-02-11T01:10:27.000Z | 2021-02-25T19:20:04.000Z | all
import tweepy, config, users, re, groupy
from tweepy import OAuthHandler
from tweepy import API
print(tweepy.__version__)
auth = OAuthHandler(config.consumer_key, config.consumer_secret)
auth.set_access_token(config.access_token,config.access_token_secret)
api = tweepy.API(auth)
from groupy.client import Client
cli... | 33.847222 | 120 | 0.636849 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 492 | 0.201888 |
b7b6119291ad7a11b8a2999460f70e3f10db60c8 | 8,486 | py | Python | crystalpy/examples/PlotData1D.py | oasys-kit/crystalpy | 4852851c622ef914844178577dea4075e92cd8dd | [
"MIT"
] | null | null | null | crystalpy/examples/PlotData1D.py | oasys-kit/crystalpy | 4852851c622ef914844178577dea4075e92cd8dd | [
"MIT"
] | null | null | null | crystalpy/examples/PlotData1D.py | oasys-kit/crystalpy | 4852851c622ef914844178577dea4075e92cd8dd | [
"MIT"
] | null | null | null | """
---OK---
"""
from collections import OrderedDict
import copy
import numpy as np
from crystalpy.examples.Values import Interval
class PlotData1D(object):
"""
Represents a 1D plot. The graph data together with related information.
"""
def __init__(self, title, title_x_axis, title_y_axis):
... | 32.389313 | 111 | 0.582371 | 8,350 | 0.983974 | 0 | 0 | 0 | 0 | 0 | 0 | 4,024 | 0.474193 |
b7b6ad2f30eeeef89f8be32e1b423aba5b40b98c | 51 | py | Python | src/deep_dialog/usersims/__init__.py | Yuqing2018/tcbot_python3 | 583ce1b670f7c67669ff437e69eb09832e784da6 | [
"MIT"
] | null | null | null | src/deep_dialog/usersims/__init__.py | Yuqing2018/tcbot_python3 | 583ce1b670f7c67669ff437e69eb09832e784da6 | [
"MIT"
] | null | null | null | src/deep_dialog/usersims/__init__.py | Yuqing2018/tcbot_python3 | 583ce1b670f7c67669ff437e69eb09832e784da6 | [
"MIT"
] | null | null | null | from .usersim_rule import *
from .realUser import * | 25.5 | 27 | 0.784314 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b7b6cb22cdbe422b0a500a1606789a7d83af799b | 38,534 | py | Python | hs_file_types/models/geofeature.py | tommac7/hydroshare | 87c4543a55f98103d2614bf4c47f7904c3f9c029 | [
"BSD-3-Clause"
] | null | null | null | hs_file_types/models/geofeature.py | tommac7/hydroshare | 87c4543a55f98103d2614bf4c47f7904c3f9c029 | [
"BSD-3-Clause"
] | null | null | null | hs_file_types/models/geofeature.py | tommac7/hydroshare | 87c4543a55f98103d2614bf4c47f7904c3f9c029 | [
"BSD-3-Clause"
] | null | null | null | import os
import logging
import shutil
import zipfile
import xmltodict
from lxml import etree
from osgeo import ogr, osr
from django.core.exceptions import ValidationError
from django.db import models, transaction
from django.utils.html import strip_tags
from django.template import Template, Context
from dominate.ta... | 44.547977 | 100 | 0.61338 | 13,291 | 0.344916 | 0 | 0 | 7,921 | 0.205559 | 0 | 0 | 11,815 | 0.306612 |
b7b9397bbe8da7007b207fc6a20f4e6b29704b5a | 1,313 | py | Python | tests/test_node.py | mjholtkamp/py-iptree | 97025f03247dbc91424898fd28f7be1448d5fce5 | [
"Apache-2.0"
] | null | null | null | tests/test_node.py | mjholtkamp/py-iptree | 97025f03247dbc91424898fd28f7be1448d5fce5 | [
"Apache-2.0"
] | null | null | null | tests/test_node.py | mjholtkamp/py-iptree | 97025f03247dbc91424898fd28f7be1448d5fce5 | [
"Apache-2.0"
] | null | null | null | import unittest
from iptree import IPNode
class TestIPNode(unittest.TestCase):
def test_node_ipv4(self):
node = IPNode('0.0.0.0/0')
node.add(IPNode('127.0.0.1/32'))
assert '127.0.0.1/32' in node
assert '192.0.2.1/32' not in node
def test_node_ipv6(self):
node = IPNode... | 28.543478 | 62 | 0.552932 | 1,267 | 0.964966 | 0 | 0 | 0 | 0 | 0 | 0 | 280 | 0.213252 |
b7b981be89ff3733793d9540e9d6338ff12dd2df | 208 | py | Python | Codewars/8kyu/invert-values/Python/test.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | 7 | 2017-09-20T16:40:39.000Z | 2021-08-31T18:15:08.000Z | Codewars/8kyu/invert-values/Python/test.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | null | null | null | Codewars/8kyu/invert-values/Python/test.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | null | null | null | # Python - 3.4.3
Test.it('Basic Tests')
Test.assert_equals(invert([1, 2, 3, 4, 5]), [-1, -2, -3, -4, -5])
Test.assert_equals(invert([1, -2, 3, -4, 5]), [-1, 2, -3, 4, -5])
Test.assert_equals(invert([]), [])
| 29.714286 | 65 | 0.548077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.139423 |
b7ba3cc002a49b7880bf396084b5e2214c7d5cdf | 1,239 | py | Python | locustfile_create_order.py | Ashutosh-Kaushik/ss-load-test-locust | 286e3cecad39f5ce991717e117392332a9810d64 | [
"Apache-2.0"
] | 1 | 2022-03-31T05:34:33.000Z | 2022-03-31T05:34:33.000Z | locustfile_create_order.py | Ashutosh-Kaushik/ss-load-test-locust | 286e3cecad39f5ce991717e117392332a9810d64 | [
"Apache-2.0"
] | null | null | null | locustfile_create_order.py | Ashutosh-Kaushik/ss-load-test-locust | 286e3cecad39f5ce991717e117392332a9810d64 | [
"Apache-2.0"
] | null | null | null | import csv
import random
import warnings
import os
from locust import HttpUser, task, between
body = {
"campaignid":"5kXk20gGDISJdM5el5IT",
"walletamount":"0"
}
header = {
"Host": "fkhapi.sastasundar.com",
"Apptype": "N",
"Appversion": "4.0.4",
"Appversioncode": "109",
"Deviceid": "81653d... | 25.8125 | 88 | 0.637611 | 348 | 0.280872 | 0 | 0 | 135 | 0.108959 | 0 | 0 | 656 | 0.529459 |
b7bae45b9bc9f5897fbcca4960ef6f0a8e4b7699 | 1,358 | py | Python | compy/plot/grid.py | tilleyd/compy | b63188341d0c66c0ecd810e29918e569c519b296 | [
"MIT"
] | null | null | null | compy/plot/grid.py | tilleyd/compy | b63188341d0c66c0ecd810e29918e569c519b296 | [
"MIT"
] | null | null | null | compy/plot/grid.py | tilleyd/compy | b63188341d0c66c0ecd810e29918e569c519b296 | [
"MIT"
] | null | null | null | """Contains the grid class to create multiple figures."""
from typing import Optional, Tuple
from .figure import Figure
import matplotlib.gridspec as gridspec
import matplotlib.pyplot as plt
class Grid:
def __init__(
self, rows: int, cols: int, size: Optional[Tuple[float, float]] = None
):
""... | 29.521739 | 78 | 0.581001 | 1,163 | 0.856406 | 0 | 0 | 0 | 0 | 0 | 0 | 436 | 0.32106 |
b7bb34b596fa5c54c79635a6e0d79f862d482ebf | 30,005 | py | Python | parallel_accel/shared/parallel_accel/shared/schemas/external.py | google/parallel_accel | b58fda1c3a22f2aaa9a97337d602cd72c49ee8be | [
"Apache-2.0"
] | 1 | 2021-12-19T21:17:02.000Z | 2021-12-19T21:17:02.000Z | parallel_accel/shared/parallel_accel/shared/schemas/external.py | google/parallel_accel | b58fda1c3a22f2aaa9a97337d602cd72c49ee8be | [
"Apache-2.0"
] | null | null | null | parallel_accel/shared/parallel_accel/shared/schemas/external.py | google/parallel_accel | b58fda1c3a22f2aaa9a97337d602cd72c49ee8be | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The ParallelAccel 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 28.549001 | 113 | 0.627629 | 21,268 | 0.708815 | 0 | 0 | 18,267 | 0.608799 | 0 | 0 | 14,465 | 0.482086 |
b7bb41a1d668770a899b52a1a2113000001bd07c | 1,040 | py | Python | godot-toolkit/godot_config_file.py | WiggleWizard/godot-toolkit | e17b7666ed80e3ab25ee65c43eb1ba9b13634070 | [
"MIT"
] | null | null | null | godot-toolkit/godot_config_file.py | WiggleWizard/godot-toolkit | e17b7666ed80e3ab25ee65c43eb1ba9b13634070 | [
"MIT"
] | null | null | null | godot-toolkit/godot_config_file.py | WiggleWizard/godot-toolkit | e17b7666ed80e3ab25ee65c43eb1ba9b13634070 | [
"MIT"
] | null | null | null | try:
from configparser import RawConfigParser
except ImportError:
from ConfigParser import RawConfigParser
class GodotConfigFile(RawConfigParser):
def write(self, fp):
"""Write an .ini-format representation of the configuration state."""
if self._defaults:
fp.write("[%s]\n" % D... | 41.6 | 79 | 0.5 | 923 | 0.8875 | 0 | 0 | 0 | 0 | 0 | 0 | 168 | 0.161538 |
b7bd5a3b425952bf3f2c75d16b604d8c223988c4 | 683 | py | Python | DMOJ/CCC/escape room.py | eddiegz/Personal-C | f7869826216e5c665f8f646502141f0dc680e545 | [
"MIT"
] | 3 | 2021-05-15T08:18:09.000Z | 2021-05-17T04:41:57.000Z | DMOJ/CCC/escape room.py | eddiegz/Personal-C | f7869826216e5c665f8f646502141f0dc680e545 | [
"MIT"
] | null | null | null | DMOJ/CCC/escape room.py | eddiegz/Personal-C | f7869826216e5c665f8f646502141f0dc680e545 | [
"MIT"
] | null | null | null | import collections
def cal(num):
i=1
f=factor[num]
while i*i<=num:
if num%i==0 and i<=max(n,m) and num//i<=max(n,m):
f.append(i)
i+=1
return num
def dfs(i,j):
if i==m-1 and j==n-1:
return True
if i>=m and j>=n or grid[i][j] in factor:
... | 22.032258 | 58 | 0.513909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.013177 |
b7bd809bb95458cc851905998de0d036112332ab | 2,556 | py | Python | volume_loader.py | xeTaiz/deep-volumetric-ambient-occlusion | 8492ad957f1440d5bf93139f7cf9ee4c7997b0e2 | [
"MIT"
] | 9 | 2020-08-24T20:03:17.000Z | 2022-02-17T07:38:55.000Z | volume_loader.py | xeTaiz/deep-volumetric-ambient-occlusion | 8492ad957f1440d5bf93139f7cf9ee4c7997b0e2 | [
"MIT"
] | null | null | null | volume_loader.py | xeTaiz/deep-volumetric-ambient-occlusion | 8492ad957f1440d5bf93139f7cf9ee4c7997b0e2 | [
"MIT"
] | 1 | 2021-07-12T01:39:24.000Z | 2021-07-12T01:39:24.000Z | import os
import pydicom
import numpy as np
import dicom_numpy
from utils import hidden_errors
from tf_utils import *
from pathlib import Path
def read_dicom_folder(dicom_folder, rescale=None):
''' Reads all .dcm files in `dicom_folder` and merges them to one volume
Returns:
The volume and the affine... | 44.068966 | 127 | 0.620892 | 0 | 0 | 1,034 | 0.404538 | 0 | 0 | 0 | 0 | 705 | 0.275822 |
b7c03a0cfc79b571a75dfb907cc43fbd5d0b1bf0 | 5,056 | py | Python | sudoku_solver/gui.py | andrewhalle/sudoku_solver | 56b88c49a3637449507a9afa66ec3d617d2118a5 | [
"MIT"
] | null | null | null | sudoku_solver/gui.py | andrewhalle/sudoku_solver | 56b88c49a3637449507a9afa66ec3d617d2118a5 | [
"MIT"
] | null | null | null | sudoku_solver/gui.py | andrewhalle/sudoku_solver | 56b88c49a3637449507a9afa66ec3d617d2118a5 | [
"MIT"
] | null | null | null | import sys
from PyQt5.QtCore import Qt, QSize, QPoint
from PyQt5.QtWidgets import QApplication, QDialog, QWidget, QLabel, QPushButton, QVBoxLayout, QHBoxLayout
from PyQt5.QtGui import QPainter, QColor, QPen, QFont
from .sudoku import Sudoku
class SudokuWidget(QWidget):
def __init__(self, parent=None):
supe... | 36.637681 | 135 | 0.585443 | 4,719 | 0.933347 | 0 | 0 | 0 | 0 | 0 | 0 | 153 | 0.030261 |
b7c06f515d7439b0a77375fbc6fb115fb4977fe1 | 1,042 | py | Python | swarmlib/util/functions.py | nkoutsov/swarmlib | fa70a5d9de50de5dacd5d499eba3b6bb72c39c05 | [
"BSD-3-Clause"
] | null | null | null | swarmlib/util/functions.py | nkoutsov/swarmlib | fa70a5d9de50de5dacd5d499eba3b6bb72c39c05 | [
"BSD-3-Clause"
] | null | null | null | swarmlib/util/functions.py | nkoutsov/swarmlib | fa70a5d9de50de5dacd5d499eba3b6bb72c39c05 | [
"BSD-3-Clause"
] | null | null | null | # ------------------------------------------------------------------------------------------------------
# Copyright (c) Leo Hanisch. All rights reserved.
# Licensed under the BSD 3-Clause License. See LICENSE.txt in the project root for license information.
# ---------------------------------------------------------... | 33.612903 | 104 | 0.600768 | 0 | 0 | 0 | 0 | 117 | 0.112284 | 0 | 0 | 562 | 0.539347 |
b7c327b6206469cd0cf73575f1196729fde0be3b | 1,695 | py | Python | nps/network_entity.py | Dry8r3aD/penta-nps | a4c74a2cd90eb2f95158e2040b7eca7056b062db | [
"MIT"
] | 6 | 2016-09-25T07:26:22.000Z | 2022-03-16T06:30:05.000Z | nps/network_entity.py | Dry8r3aD/penta-nps | a4c74a2cd90eb2f95158e2040b7eca7056b062db | [
"MIT"
] | 14 | 2016-10-04T00:02:20.000Z | 2017-02-22T03:06:21.000Z | nps/network_entity.py | Dry8r3aD/penta-nps | a4c74a2cd90eb2f95158e2040b7eca7056b062db | [
"MIT"
] | 5 | 2016-10-06T04:53:32.000Z | 2019-12-08T13:48:58.000Z | # -*- coding: UTF-8 -*-
from collections import deque
class NetworkEntity(object):
"""Client or Server simulation network entity"""
def __init__(self, name):
# "client" or "server"
self.name = name
# simulatation packet list(queue)
# _packet_list contains send/recv PacketBuff... | 25.298507 | 54 | 0.645428 | 1,263 | 0.745133 | 0 | 0 | 0 | 0 | 0 | 0 | 703 | 0.414749 |
b7c3aa3be6cad1fc615356fe4a0db24f49f796d6 | 898 | py | Python | source/_sample/scipy/interp_spline_interest.py | showa-yojyo/notebook | 82c15074c24d64a1dfcb70a526bc1deb2ecffe68 | [
"MIT"
] | 14 | 2016-04-13T08:10:02.000Z | 2021-04-19T09:42:51.000Z | source/_sample/scipy/interp_spline_interest.py | showa-yojyo/note | 5f262ecda3df132cb66206c465d16e174061d6b9 | [
"MIT"
] | 88 | 2017-09-27T15:07:05.000Z | 2019-10-02T04:05:03.000Z | source/_sample/scipy/interp_spline_interest.py | showa-yojyo/note | 5f262ecda3df132cb66206c465d16e174061d6b9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""interp_spline_interest.py: Demonstrate spline interpolation.
"""
from scipy.interpolate import splrep, splev
import numpy as np
import matplotlib.pyplot as plt
# pylint: disable=invalid-name
# Interest rates of Jan, Feb, Mar, Jun, Dec.
x = np.array([1, 2, 3, 6, 12])
y = np.array([0.080, 0.100... | 24.944444 | 63 | 0.679287 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 412 | 0.458797 |
b7c3bf02cb16b87bf7d4abf283104f4f08eda387 | 1,351 | py | Python | Pytorch/Scratch CNN and Pytorch/part1-convnet/tests/test_sgd.py | Kuga23/Deep-Learning | 86980338208c702b6bfcbcfffdb18498e389a56b | [
"MIT"
] | 3 | 2022-01-16T14:46:57.000Z | 2022-02-20T22:40:16.000Z | Pytorch/Scratch CNN and Pytorch/part1-convnet/tests/test_sgd.py | Kuga23/Deep-Learning | 86980338208c702b6bfcbcfffdb18498e389a56b | [
"MIT"
] | null | null | null | Pytorch/Scratch CNN and Pytorch/part1-convnet/tests/test_sgd.py | Kuga23/Deep-Learning | 86980338208c702b6bfcbcfffdb18498e389a56b | [
"MIT"
] | 6 | 2021-09-29T11:42:37.000Z | 2022-02-02T02:33:51.000Z | import unittest
import numpy as np
from optimizer import SGD
from modules import ConvNet
from .utils import *
class TestSGD(unittest.TestCase):
""" The class containing all test cases for this assignment"""
def setUp(self):
"""Define the functions to be tested here."""
pass
def test_sgd(s... | 28.744681 | 104 | 0.624722 | 1,236 | 0.914878 | 0 | 0 | 0 | 0 | 0 | 0 | 215 | 0.159141 |
b7c3c9491c620a60056834ce6902dd96ab059f3b | 3,373 | py | Python | Scripts/simulation/tunable_utils/create_object.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/simulation/tunable_utils/create_object.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/simulation/tunable_utils/create_object.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | # uncompyle6 version 3.7.4
# Python bytecode 3.7 (3394)
# Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
# Embedded file name: T:\InGame\Gameplay\Scripts\Server\tunable_utils\create_object.py
# Compiled at: 2020-05-07 00:26:47
# Size of source mod 2**32: 4106 b... | 54.403226 | 240 | 0.714794 | 2,321 | 0.688111 | 0 | 0 | 381 | 0.112956 | 0 | 0 | 1,022 | 0.302994 |
b7c4849c094e9c707d5b2331ea5e37f6828cbb6d | 1,583 | py | Python | 题源分类/LeetCode/LeetCode日刷/python/47.全排列-ii.py | ZhengyangXu/Algorithm-Daily-Practice | 3017a3d476fc9a857026190ea4fae2911058df59 | [
"MIT"
] | null | null | null | 题源分类/LeetCode/LeetCode日刷/python/47.全排列-ii.py | ZhengyangXu/Algorithm-Daily-Practice | 3017a3d476fc9a857026190ea4fae2911058df59 | [
"MIT"
] | null | null | null | 题源分类/LeetCode/LeetCode日刷/python/47.全排列-ii.py | ZhengyangXu/Algorithm-Daily-Practice | 3017a3d476fc9a857026190ea4fae2911058df59 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode.cn id=47 lang=python3
#
# [47] 全排列 II
#
# https://leetcode-cn.com/problems/permutations-ii/description/
#
# algorithms
# Medium (59.58%)
# Likes: 371
# Dislikes: 0
# Total Accepted: 78.7K
# Total Submissions: 132.1K
# Testcase Example: '[1,1,2]'
#
# 给定一个可包含重复数字的序列,返回所有不重复的全排列。
#
# 示例:
#
# ... | 21.986111 | 67 | 0.475679 | 784 | 0.472005 | 0 | 0 | 0 | 0 | 0 | 0 | 787 | 0.473811 |
b7c4b41079ffcb026b138a48570833eeaf51d196 | 149 | py | Python | testing/run-tests.py | 8enmann/blobfile | 34bf6fac2a0cd4ff5eb5c3e4964914758f264c0b | [
"Unlicense"
] | 21 | 2020-02-26T08:00:20.000Z | 2022-02-28T00:06:50.000Z | testing/run-tests.py | 8enmann/blobfile | 34bf6fac2a0cd4ff5eb5c3e4964914758f264c0b | [
"Unlicense"
] | 146 | 2020-02-28T18:15:53.000Z | 2022-03-24T06:37:57.000Z | testing/run-tests.py | 8enmann/blobfile | 34bf6fac2a0cd4ff5eb5c3e4964914758f264c0b | [
"Unlicense"
] | 15 | 2020-04-10T08:31:57.000Z | 2022-02-28T03:43:02.000Z | import subprocess as sp
import sys
sp.run(["pip", "install", "-e", "."], check=True)
sp.run(["pytest", "blobfile"] + sys.argv[1:], check=True)
| 24.833333 | 58 | 0.604027 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 0.261745 |
b7c583ce42f7da52ba4b620e07b7b1dce4f64729 | 6,467 | py | Python | examples/Components/collision/PrimitiveCreation.py | sofa-framework/issofa | 94855f488465bc3ed41223cbde987581dfca5389 | [
"OML"
] | null | null | null | examples/Components/collision/PrimitiveCreation.py | sofa-framework/issofa | 94855f488465bc3ed41223cbde987581dfca5389 | [
"OML"
] | null | null | null | examples/Components/collision/PrimitiveCreation.py | sofa-framework/issofa | 94855f488465bc3ed41223cbde987581dfca5389 | [
"OML"
] | null | null | null | import Sofa
import random
from cmath import *
############################################################################################
# this is a PythonScriptController example script
############################################################################################
###################################... | 34.216931 | 256 | 0.66043 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,222 | 0.343591 |
b7c6df93916a72fa3dc3b5903a942a8fbc2d13cd | 350 | py | Python | examples/tensorboard/nested.py | dwolfschlaeger/guildai | f82102ad950d7c89c8f2c2eafe596b2d7109dc57 | [
"Apache-2.0"
] | 694 | 2018-11-30T01:06:30.000Z | 2022-03-31T14:46:26.000Z | examples/tensorboard/nested.py | dwolfschlaeger/guildai | f82102ad950d7c89c8f2c2eafe596b2d7109dc57 | [
"Apache-2.0"
] | 323 | 2018-11-05T17:44:34.000Z | 2022-03-31T16:56:41.000Z | examples/tensorboard/nested.py | dwolfschlaeger/guildai | f82102ad950d7c89c8f2c2eafe596b2d7109dc57 | [
"Apache-2.0"
] | 68 | 2019-04-01T04:24:47.000Z | 2022-02-24T17:22:04.000Z | import tensorboardX
with tensorboardX.SummaryWriter("foo") as w:
w.add_scalar("a", 1.0, 1)
w.add_scalar("a", 2.0, 2)
with tensorboardX.SummaryWriter("foo/bar") as w:
w.add_scalar("a", 3.0, 3)
w.add_scalar("a", 4.0, 4)
with tensorboardX.SummaryWriter("foo/bar/baz") as w:
w.add_scalar("a", 5.0, 5)
... | 25 | 52 | 0.634286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.128571 |
b7c7e5d7b1958fefce1bb2170ee1a05f5b0e1bc0 | 444 | py | Python | cobalt/__init__.py | NicolasDenoyelle/cobalt | 08742676214e728ed83f3a90a118b9c020a347fd | [
"BSD-3-Clause"
] | null | null | null | cobalt/__init__.py | NicolasDenoyelle/cobalt | 08742676214e728ed83f3a90a118b9c020a347fd | [
"BSD-3-Clause"
] | null | null | null | cobalt/__init__.py | NicolasDenoyelle/cobalt | 08742676214e728ed83f3a90a118b9c020a347fd | [
"BSD-3-Clause"
] | null | null | null | ###############################################################################
# Copyright 2020 UChicago Argonne, LLC.
# (c.f. AUTHORS, LICENSE)
# For more info, see https://xgitlab.cels.anl.gov/argo/cobalt-python-wrapper
# SPDX-License-Identifier: BSD-3-Clause
#########################################################... | 37 | 79 | 0.481982 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 356 | 0.801802 |
b7c83d7466393b727423c1185dc55c5006258a81 | 859 | py | Python | anand.py | kyclark/py-grepper | ca7a17b1ffc2d666d62da6c80eb4cbc0bd2e547e | [
"MIT"
] | null | null | null | anand.py | kyclark/py-grepper | ca7a17b1ffc2d666d62da6c80eb4cbc0bd2e547e | [
"MIT"
] | null | null | null | anand.py | kyclark/py-grepper | ca7a17b1ffc2d666d62da6c80eb4cbc0bd2e547e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
orderNumbers = open("orders.txt", "r") #Order numbers to match
#Network path to a directory of files that has full details of the order
directoryEntries = os.scandir("")
outputFile = open("matchedData.dat", "w")
for entry in directoryEntries:
print("Currently parsing file ", en... | 31.814815 | 76 | 0.696158 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 377 | 0.438882 |
b7c97b1397f5b96121b2b0909bc775d38cbcd523 | 2,968 | py | Python | tests/test_manager.py | Vizzuality/cog_worker | ae12d2fc42945fedfea4a22394247db9a73d867e | [
"MIT"
] | 24 | 2021-08-23T14:51:02.000Z | 2021-12-20T09:45:10.000Z | tests/test_manager.py | Vizzuality/cog_worker | ae12d2fc42945fedfea4a22394247db9a73d867e | [
"MIT"
] | null | null | null | tests/test_manager.py | Vizzuality/cog_worker | ae12d2fc42945fedfea4a22394247db9a73d867e | [
"MIT"
] | 1 | 2021-08-24T01:09:36.000Z | 2021-08-24T01:09:36.000Z | import pytest
import rasterio as rio
from rasterio.io import DatasetWriter
from cog_worker import Manager
from rasterio import MemoryFile, crs
TEST_COG = "tests/roads_cog.tif"
@pytest.fixture
def molleweide_manager():
return Manager(
proj="+proj=moll",
scale=50000,
)
@pytest.fixture
def sam... | 31.913978 | 83 | 0.686995 | 0 | 0 | 0 | 0 | 233 | 0.078504 | 0 | 0 | 245 | 0.082547 |
b7c9f4fcfbbd13ff61698bd25e58c747a3f4a5c0 | 1,031 | py | Python | CLIP/experiments/tagger/main_binary.py | ASAPP-H/clip2 | e8ba2a3cf4be01ec26bde5107c5a2813bddf8a3b | [
"MIT"
] | null | null | null | CLIP/experiments/tagger/main_binary.py | ASAPP-H/clip2 | e8ba2a3cf4be01ec26bde5107c5a2813bddf8a3b | [
"MIT"
] | 3 | 2021-09-08T02:07:49.000Z | 2022-03-12T00:33:51.000Z | CLIP/experiments/tagger/main_binary.py | ASAPP-H/clip2 | e8ba2a3cf4be01ec26bde5107c5a2813bddf8a3b | [
"MIT"
] | null | null | null | from train import train_model
from utils import *
import os
import sys
pwd = os.environ.get('CLIP_DIR')
DATA_DIR = "%s/data/processed/" % pwd
exp_name = "non_multilabel"
run_name = "sentence_structurel_with_crf"
train_file_name = "MIMIC_train_binary.csv"
dev_file_name = "MIMIC_val_binary.csv"
test_file_name = "test_b... | 25.775 | 72 | 0.696411 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 231 | 0.224054 |
b7caeb322abf8aa00666ef3387b5272abace4020 | 528 | py | Python | persons/urls.py | nhieckqo/lei | f461d8dcbc8f9e037c661abb18b226aa6fa7acae | [
"MIT"
] | null | null | null | persons/urls.py | nhieckqo/lei | f461d8dcbc8f9e037c661abb18b226aa6fa7acae | [
"MIT"
] | null | null | null | persons/urls.py | nhieckqo/lei | f461d8dcbc8f9e037c661abb18b226aa6fa7acae | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name = 'persons'
urlpatterns = [
path('', views.PersonsTableView.as_view(),name='persons_list'),
path('persons_details/<int:pk>',views.PersonsUpdateView.as_view(),name='persons_details_edit'),
path('persons_details/create',views.PersonsCreateView.as_vie... | 40.615385 | 108 | 0.753788 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 203 | 0.38447 |
b7cb10c335526f698fe7f642c39ab4db21115697 | 246 | py | Python | logxs/__version__.py | minlaxz/logxs | e225e7a3c69b01595e1f2c11552b70e4b1540d47 | [
"MIT"
] | null | null | null | logxs/__version__.py | minlaxz/logxs | e225e7a3c69b01595e1f2c11552b70e4b1540d47 | [
"MIT"
] | null | null | null | logxs/__version__.py | minlaxz/logxs | e225e7a3c69b01595e1f2c11552b70e4b1540d47 | [
"MIT"
] | null | null | null | __title__ = 'logxs'
__description__ = 'Replacing with build-in `print` with nice formatting.'
__url__ = 'https://github.com/minlaxz/logxs'
__version__ = '0.3.2'
__author__ = 'Min Latt'
__author_email__ = '[email protected]'
__license__ = 'MIT' | 35.142857 | 73 | 0.747967 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 140 | 0.569106 |
b7cb5d32a878f3d9855d96b75ff3e715c839115f | 977 | py | Python | src/PyMud/Systems/system.py | NichCritic/pymud | 583ec16f5a75dc7b45146564b39851291dc07b6c | [
"MIT"
] | null | null | null | src/PyMud/Systems/system.py | NichCritic/pymud | 583ec16f5a75dc7b45146564b39851291dc07b6c | [
"MIT"
] | null | null | null | src/PyMud/Systems/system.py | NichCritic/pymud | 583ec16f5a75dc7b45146564b39851291dc07b6c | [
"MIT"
] | null | null | null | import time
class System(object):
manditory = []
optional = []
handles = []
def __init__(self, node_factory):
self.node_factory = node_factory
def process(self):
for node in self.get_nodes():
# print(f"{self.__class__.__name__} system got message from
# {n... | 23.261905 | 71 | 0.551689 | 959 | 0.981576 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 0.073695 |
b7cb98a29e28bbca96a3da9a3ddecb43eea2b232 | 2,918 | py | Python | hytra/plugins/transition_feature_vector_construction/transition_feature_subtraction.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | null | null | null | hytra/plugins/transition_feature_vector_construction/transition_feature_subtraction.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | null | null | null | hytra/plugins/transition_feature_vector_construction/transition_feature_subtraction.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | null | null | null | from hytra.pluginsystem import transition_feature_vector_construction_plugin
import numpy as np
from compiler.ast import flatten
class TransitionFeaturesSubtraction(
transition_feature_vector_construction_plugin.TransitionFeatureVectorConstructionPlugin
):
"""
Computes the subtraction of features in the f... | 35.585366 | 91 | 0.48732 | 2,786 | 0.954764 | 0 | 0 | 0 | 0 | 0 | 0 | 315 | 0.107951 |
b7cbae55dbd90dfb87f2e9c515ec5098f54466ea | 5,438 | py | Python | sprites/player.py | hectorpadin1/FICGames | 6d75c3ef74f0d6d2881021833fe06cd67e207ab1 | [
"MIT"
] | null | null | null | sprites/player.py | hectorpadin1/FICGames | 6d75c3ef74f0d6d2881021833fe06cd67e207ab1 | [
"MIT"
] | null | null | null | sprites/player.py | hectorpadin1/FICGames | 6d75c3ef74f0d6d2881021833fe06cd67e207ab1 | [
"MIT"
] | 1 | 2022-03-29T15:38:18.000Z | 2022-03-29T15:38:18.000Z | from matplotlib.style import available
import pygame as pg
from sprites.character import Character
from pygame.math import Vector2
from settings import *
from math import cos, pi
from control import Controler
from sprites.gun import MachineGun, Pistol, Rifle
from managers.resourcemanager import ResourceManager as GR
fr... | 36.743243 | 142 | 0.590291 | 5,075 | 0.932219 | 0 | 0 | 0 | 0 | 0 | 0 | 594 | 0.109111 |
b7cbe1a4f3d3609804f5ba47a2634ce6c4505d36 | 716 | py | Python | yocto/poky/bitbake/lib/bb/ui/crumbs/__init__.py | jxtxinbing/ops-build | 9008de2d8e100f3f868c66765742bca9fa98f3f9 | [
"Apache-2.0"
] | 16 | 2017-01-17T15:20:43.000Z | 2021-03-19T05:45:14.000Z | yocto/poky/bitbake/lib/bb/ui/crumbs/__init__.py | jxtxinbing/ops-build | 9008de2d8e100f3f868c66765742bca9fa98f3f9 | [
"Apache-2.0"
] | 415 | 2016-12-20T17:20:45.000Z | 2018-09-23T07:59:23.000Z | yocto/poky/bitbake/lib/bb/ui/crumbs/__init__.py | jxtxinbing/ops-build | 9008de2d8e100f3f868c66765742bca9fa98f3f9 | [
"Apache-2.0"
] | 10 | 2016-12-20T13:24:50.000Z | 2021-03-19T05:46:43.000Z | #
# Gtk+ UI pieces for BitBake
#
# Copyright (C) 2006-2007 Richard Purdie
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be ... | 39.777778 | 73 | 0.765363 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 699 | 0.976257 |
b7cc1da3745ec1958d532f60dd1185d8b2057b84 | 10,198 | py | Python | mytardisbf/migrations/0001_initial_data.py | keithschulze/mytardisbf | cc15fc9af89cf96c4d860c41fe5b0f366d4ee0d6 | [
"MIT"
] | 2 | 2020-07-09T01:21:00.000Z | 2022-02-06T17:33:57.000Z | mytardisbf/migrations/0001_initial_data.py | keithschulze/mytardisbf | cc15fc9af89cf96c4d860c41fe5b0f366d4ee0d6 | [
"MIT"
] | 14 | 2015-07-21T05:12:58.000Z | 2017-11-16T10:46:30.000Z | mytardisbf/migrations/0001_initial_data.py | keithschulze/mytardisbf | cc15fc9af89cf96c4d860c41fe5b0f366d4ee0d6 | [
"MIT"
] | 4 | 2015-08-04T10:57:29.000Z | 2017-11-28T10:50:33.000Z | # -*- coding: utf-8 -*-
from django.db import migrations
from tardis.tardis_portal.models import (
Schema,
ParameterName,
DatafileParameter,
DatafileParameterSet
)
from mytardisbf.apps import (
OMESCHEMA,
BFSCHEMA
)
def forward_func(apps, schema_editor):
"""Create mytardisbf schemas and pa... | 24.995098 | 80 | 0.499314 | 247 | 0.02422 | 0 | 0 | 0 | 0 | 0 | 0 | 1,075 | 0.105413 |
b7cc56e3520e5aa20afd04452b3d297df2206e1a | 1,473 | py | Python | ipmanagement/models.py | smilelhong/ip_manage | 7581c596a84e943dc5dea4122eca3de14263992b | [
"Apache-2.0"
] | null | null | null | ipmanagement/models.py | smilelhong/ip_manage | 7581c596a84e943dc5dea4122eca3de14263992b | [
"Apache-2.0"
] | null | null | null | ipmanagement/models.py | smilelhong/ip_manage | 7581c596a84e943dc5dea4122eca3de14263992b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from django.db import models
from datetime import datetime
# Create your models here.
class IP_Address(models.Model):
ip = models.GenericIPAddressField(verbose_name=u"IP地址")
gateway = models.GenericIPAddressField(verbose_name=u"网关")
network = models.GenericIPAddressField(verbose_name... | 64.043478 | 104 | 0.745418 | 1,475 | 0.929427 | 0 | 0 | 0 | 0 | 0 | 0 | 316 | 0.199118 |
b7d02035de2ed671a7db2b55074f9e4dd487d817 | 9,616 | py | Python | tests/scripts/thread-cert/border_router/MATN_05_ReregistrationToSameMulticastGroup.py | kkasperczyk-no/sdk-openthread | 385e19da1ae15f27872c2543b97276a42f102ead | [
"BSD-3-Clause"
] | null | null | null | tests/scripts/thread-cert/border_router/MATN_05_ReregistrationToSameMulticastGroup.py | kkasperczyk-no/sdk-openthread | 385e19da1ae15f27872c2543b97276a42f102ead | [
"BSD-3-Clause"
] | null | null | null | tests/scripts/thread-cert/border_router/MATN_05_ReregistrationToSameMulticastGroup.py | kkasperczyk-no/sdk-openthread | 385e19da1ae15f27872c2543b97276a42f102ead | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (c) 2021, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... | 39.089431 | 119 | 0.629992 | 7,165 | 0.745112 | 0 | 0 | 0 | 0 | 0 | 0 | 4,588 | 0.477121 |
b7d0fb3e2eab434c02f0ab81e51febbe5297c8ae | 3,457 | py | Python | senseye_cameras/input/camera_pylon.py | senseye-inc/senseye-cameras | 9d9cdb95e64aaa8d08aa56bd9a79641263e65940 | [
"BSD-3-Clause"
] | 5 | 2020-03-20T17:07:35.000Z | 2022-01-25T23:48:52.000Z | senseye_cameras/input/camera_pylon.py | senseye-inc/senseye-cameras | 9d9cdb95e64aaa8d08aa56bd9a79641263e65940 | [
"BSD-3-Clause"
] | 5 | 2020-03-05T20:55:06.000Z | 2022-03-24T22:41:56.000Z | senseye_cameras/input/camera_pylon.py | senseye-inc/senseye-cameras | 9d9cdb95e64aaa8d08aa56bd9a79641263e65940 | [
"BSD-3-Clause"
] | null | null | null | import time
import logging
try:
from pypylon import pylon
except:
pylon = None
from . input import Input
log = logging.getLogger(__name__)
# writes the framenumber to the 8-11 bytes of the image as a big-endian set of octets
def encode_framenumber(np_image, n):
for i in range(4):
np_image[0][i+7]... | 33.563107 | 102 | 0.60486 | 2,817 | 0.814868 | 0 | 0 | 0 | 0 | 0 | 0 | 1,007 | 0.291293 |
b7d28e8d5b3bd12fe72a9a971fff5626e0a64791 | 3,100 | py | Python | vise/tests/util/phonopy/test_phonopy_input.py | kumagai-group/vise | 8adfe61ad8f31767ec562f02f271e2495f357cd4 | [
"MIT"
] | 16 | 2020-07-14T13:14:05.000Z | 2022-03-04T13:39:30.000Z | vise/tests/util/phonopy/test_phonopy_input.py | kumagai-group/vise | 8adfe61ad8f31767ec562f02f271e2495f357cd4 | [
"MIT"
] | 10 | 2021-03-15T20:47:45.000Z | 2021-08-19T00:47:12.000Z | vise/tests/util/phonopy/test_phonopy_input.py | kumagai-group/vise | 8adfe61ad8f31767ec562f02f271e2495f357cd4 | [
"MIT"
] | 6 | 2020-03-03T00:42:39.000Z | 2022-02-22T02:34:47.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2021. Distributed under the terms of the MIT License.
from phonopy.interface.calculator import read_crystal_structure
from phonopy.structure.atoms import PhonopyAtoms
from vise.util.phonopy.phonopy_input import structure_to_phonopy_atoms
import numpy as np
def assert_same_phon... | 41.333333 | 73 | 0.59 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,797 | 0.579677 |
b7d2c3d5b85f7571232ad665184ca7a2e111ef5a | 1,419 | py | Python | 2020/day15.py | andypymont/adventofcode | 912aa48fc5b31ec9202fb9654380991fc62afcd1 | [
"MIT"
] | null | null | null | 2020/day15.py | andypymont/adventofcode | 912aa48fc5b31ec9202fb9654380991fc62afcd1 | [
"MIT"
] | null | null | null | 2020/day15.py | andypymont/adventofcode | 912aa48fc5b31ec9202fb9654380991fc62afcd1 | [
"MIT"
] | null | null | null | """
2020 Day 15
https://adventofcode.com/2020/day/15
"""
from collections import deque
from typing import Dict, Iterable, Optional
import aocd # type: ignore
class ElfMemoryGame:
def __init__(self, starting_numbers: Iterable[int]):
self.appearances: Dict[int, deque[int]] = {}
self.length = 0
... | 25.8 | 82 | 0.621564 | 892 | 0.628612 | 0 | 0 | 0 | 0 | 0 | 0 | 211 | 0.148696 |
b7d37af2b6bf8f16d281543414e0b3b8888f7e5c | 1,121 | py | Python | src/spring-cloud/azext_spring_cloud/_validators_enterprise.py | SanyaKochhar/azure-cli-extensions | ff845c73e3110d9f4025c122c1938dd24a43cca0 | [
"MIT"
] | 2 | 2021-03-23T02:34:41.000Z | 2021-06-03T05:53:34.000Z | src/spring-cloud/azext_spring_cloud/_validators_enterprise.py | SanyaKochhar/azure-cli-extensions | ff845c73e3110d9f4025c122c1938dd24a43cca0 | [
"MIT"
] | 21 | 2021-03-16T23:04:40.000Z | 2022-03-24T01:45:54.000Z | src/spring-cloud/azext_spring_cloud/_validators_enterprise.py | SanyaKochhar/azure-cli-extensions | ff845c73e3110d9f4025c122c1938dd24a43cca0 | [
"MIT"
] | 9 | 2021-03-11T02:59:39.000Z | 2022-02-24T21:46:34.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 56.05 | 131 | 0.667261 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 533 | 0.475468 |
b7d4dda1b3752a19244c734487e74c4425e170d8 | 8,796 | py | Python | fluentql/function.py | RaduG/fluentql | 653a77bb95b40724eb58744f5f8dbed9c88eaebd | [
"MIT"
] | 4 | 2020-04-15T10:50:03.000Z | 2021-07-22T12:23:50.000Z | fluentql/function.py | RaduG/fluentql | 653a77bb95b40724eb58744f5f8dbed9c88eaebd | [
"MIT"
] | 2 | 2020-05-24T08:54:56.000Z | 2020-05-24T09:04:31.000Z | fluentql/function.py | RaduG/fluentql | 653a77bb95b40724eb58744f5f8dbed9c88eaebd | [
"MIT"
] | null | null | null | from typing import Any, TypeVar, Union
from types import MethodType, FunctionType
from .base_types import BooleanType, Constant, StringType, Collection, Referenceable
from .type_checking import TypeChecker
AnyArgs = TypeVar("AnyArgs")
NoArgs = TypeVar("NoArgs")
VarArgs = TypeVar("VarArgs")
T = TypeVar("T")
class W... | 23.393617 | 96 | 0.624034 | 8,389 | 0.953729 | 0 | 0 | 2,432 | 0.276489 | 0 | 0 | 1,631 | 0.185425 |
b7d5141df884819f6f2e7164679f65c6fbc05ccf | 5,741 | py | Python | trainer.py | tkuboi/my-Punctuator | 17c2c43f3397387b7c21a8ef25584c4fdab73f1b | [
"MIT"
] | 3 | 2018-11-29T02:12:12.000Z | 2020-01-15T10:52:38.000Z | trainer.py | tkuboi/my-Punctuator | 17c2c43f3397387b7c21a8ef25584c4fdab73f1b | [
"MIT"
] | 3 | 2020-01-15T10:52:25.000Z | 2020-05-03T17:24:56.000Z | trainer.py | tkuboi/my-Punctuator | 17c2c43f3397387b7c21a8ef25584c4fdab73f1b | [
"MIT"
] | 5 | 2018-11-19T13:37:31.000Z | 2021-06-25T07:03:38.000Z | """This script is for training and evaluating a model."""
import sys
import os
import traceback
import numpy as np
from functools import partial
from utils import *
from punctuator import Punctuator
from bidirectional_gru_with_gru import BidirectionalGruWithGru
from keras.callbacks import ModelCheckpoint
from keras.m... | 43.492424 | 1,454 | 0.708413 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,600 | 0.452883 |
b7d54fe8e9a77f05bf236b9a737834d1a8f3821a | 5,719 | py | Python | gqn_v2/gqn_predictor.py | goodmattg/tf-gqn | a2088761f11a9806500dcaf28edc28ecd7fc514e | [
"Apache-2.0"
] | null | null | null | gqn_v2/gqn_predictor.py | goodmattg/tf-gqn | a2088761f11a9806500dcaf28edc28ecd7fc514e | [
"Apache-2.0"
] | null | null | null | gqn_v2/gqn_predictor.py | goodmattg/tf-gqn | a2088761f11a9806500dcaf28edc28ecd7fc514e | [
"Apache-2.0"
] | null | null | null | """
Contains a canned predictor for a GQN.
"""
import os
import json
import numpy as np
import tensorflow as tf
from .gqn_graph import gqn_draw
from .gqn_params import create_gqn_config
def _normalize_pose(pose):
"""
Converts a camera pose into the GQN format.
Args:
pose: [x, y, z, yaw, pitch]; x, y, z i... | 36.660256 | 110 | 0.652736 | 4,957 | 0.86676 | 0 | 0 | 256 | 0.044763 | 0 | 0 | 1,876 | 0.328029 |
b7d6284562e6fc98442dc3568881e4543f4597b6 | 6,054 | py | Python | mamba/post_solve_handling.py | xhochy/mamba | 249546a95abf358f116cc1b546bfb51e427001fd | [
"BSD-3-Clause"
] | null | null | null | mamba/post_solve_handling.py | xhochy/mamba | 249546a95abf358f116cc1b546bfb51e427001fd | [
"BSD-3-Clause"
] | null | null | null | mamba/post_solve_handling.py | xhochy/mamba | 249546a95abf358f116cc1b546bfb51e427001fd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2019, QuantStack
# SPDX-License-Identifier: BSD-3-Clause
from conda.base.constants import DepsModifier, UpdateModifier
from conda._vendor.boltons.setutils import IndexedSet
from conda.core.prefix_data import PrefixData
from conda.models.prefix_graph import PrefixGraph
from conda... | 47.669291 | 96 | 0.652296 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,218 | 0.531549 |
b7d668041de4ae36e76a177a55158ac9e8eab418 | 264 | py | Python | Young Physicist.py | techonair/Codeforces | 1f854424e2de69ea4fdf7c6cde8ab04eddfb4566 | [
"MIT"
] | null | null | null | Young Physicist.py | techonair/Codeforces | 1f854424e2de69ea4fdf7c6cde8ab04eddfb4566 | [
"MIT"
] | null | null | null | Young Physicist.py | techonair/Codeforces | 1f854424e2de69ea4fdf7c6cde8ab04eddfb4566 | [
"MIT"
] | null | null | null | num = input()
lucky = 0
for i in num:
if i == '4' or i == '7':
lucky += 1
counter = 0
for c in str(lucky):
if c == '4' or c == '7':
counter += 1
if counter == len(str(lucky)):
print("YES")
else:
print("NO")
| 11 | 30 | 0.431818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0.079545 |
b7d7bf07253855c146dc1edf490b5b90c54ec05e | 477 | py | Python | snakebids/utils/__init__.py | tkkuehn/snakebids | 641026ea91c84c4403f0a654d2aaf2bfa50eaa19 | [
"MIT"
] | null | null | null | snakebids/utils/__init__.py | tkkuehn/snakebids | 641026ea91c84c4403f0a654d2aaf2bfa50eaa19 | [
"MIT"
] | null | null | null | snakebids/utils/__init__.py | tkkuehn/snakebids | 641026ea91c84c4403f0a654d2aaf2bfa50eaa19 | [
"MIT"
] | null | null | null | from snakebids.utils.output import (
Mode,
get_time_hash,
prepare_output,
retrofit_output,
write_config_file,
write_output_mode,
)
from snakebids.utils.snakemake_io import (
glob_wildcards,
regex,
update_wildcard_constraints,
)
__all__ = [
"Mode",
"get_time_hash",
"glob_... | 18.346154 | 42 | 0.681342 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 144 | 0.301887 |
b7d83061ac773421e6029dc4c038d3f9bc4b0679 | 659 | py | Python | examples/custom_renderer/custom_renderer.py | victorbenichoux/vizno | 87ed98f66914a27e4b71d835734ca2a17a09412f | [
"MIT"
] | 5 | 2020-12-02T08:46:06.000Z | 2022-01-15T12:58:27.000Z | examples/custom_renderer/custom_renderer.py | victorbenichoux/vizno | 87ed98f66914a27e4b71d835734ca2a17a09412f | [
"MIT"
] | null | null | null | examples/custom_renderer/custom_renderer.py | victorbenichoux/vizno | 87ed98f66914a27e4b71d835734ca2a17a09412f | [
"MIT"
] | null | null | null | import pydantic
from vizno.renderers import ContentConfiguration, render
from vizno.report import Report
class CustomObject(pydantic.BaseModel):
parameter: int
class CustomRenderConfiguration(ContentConfiguration):
parameter: int
@render.register
def _(obj: CustomObject):
return CustomRenderConfigura... | 19.969697 | 56 | 0.728376 | 131 | 0.198786 | 0 | 0 | 203 | 0.308042 | 0 | 0 | 98 | 0.14871 |
b7d854946bf40e07210624df5e0576dbd5f15fb1 | 945 | py | Python | coregent/net/core.py | landoffire/coregent | 908aaacbb7b2b9d8ea044d47b9518e8914dad08b | [
"Apache-2.0"
] | 1 | 2021-04-25T07:26:07.000Z | 2021-04-25T07:26:07.000Z | coregent/net/core.py | neurite-interactive/coregent | 908aaacbb7b2b9d8ea044d47b9518e8914dad08b | [
"Apache-2.0"
] | null | null | null | coregent/net/core.py | neurite-interactive/coregent | 908aaacbb7b2b9d8ea044d47b9518e8914dad08b | [
"Apache-2.0"
] | 2 | 2021-06-12T23:00:12.000Z | 2021-06-12T23:01:57.000Z | import abc
import collections.abc
import socket
__all__ = ['get_socket_type', 'get_server_socket', 'get_client_socket',
'SocketReader', 'SocketWriter', 'JSONReader', 'JSONWriter']
def get_socket_type(host=None, ip_type=None):
if ip_type is not None:
return ip_type
if host and ':' in host... | 21 | 71 | 0.671958 | 253 | 0.267725 | 0 | 0 | 164 | 0.173545 | 0 | 0 | 110 | 0.116402 |
b7d90dcc48241b77ca82bd93f406aefe69d173b9 | 360 | py | Python | hackdayproject/urls.py | alstn2468/Naver_Campus_Hackday_Project | e8c3b638638182ccb8b4631c03cf5cb153c7278a | [
"MIT"
] | 1 | 2019-11-15T05:03:54.000Z | 2019-11-15T05:03:54.000Z | hackdayproject/urls.py | alstn2468/Naver_Campus_Hackday_Project | e8c3b638638182ccb8b4631c03cf5cb153c7278a | [
"MIT"
] | null | null | null | hackdayproject/urls.py | alstn2468/Naver_Campus_Hackday_Project | e8c3b638638182ccb8b4631c03cf5cb153c7278a | [
"MIT"
] | null | null | null | from django.urls import path, include
from django.contrib import admin
import hackdayproject.main.urls as main_urls
import hackdayproject.repo.urls as repo_urls
urlpatterns = [
path('admin/', admin.site.urls),
path('oauth/', include('social_django.urls', namespace='social')),
path('', include(main_urls)),
... | 30 | 70 | 0.727778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 53 | 0.147222 |
b7d98d9548c561ff4d20a9c30014735028dc693b | 19,134 | py | Python | tests/test_ciftify_recon_all.py | lgrennan/ciftify | 8488423bd081370614b676a2e1d1a8dbfd9aba1c | [
"MIT"
] | null | null | null | tests/test_ciftify_recon_all.py | lgrennan/ciftify | 8488423bd081370614b676a2e1d1a8dbfd9aba1c | [
"MIT"
] | null | null | null | tests/test_ciftify_recon_all.py | lgrennan/ciftify | 8488423bd081370614b676a2e1d1a8dbfd9aba1c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import unittest
import logging
import importlib
import copy
import os
from mock import patch
from nose.tools import raises
logging.disable(logging.CRITICAL)
ciftify_recon_all = importlib.import_module('ciftify.bin.ciftify_recon_all')
class ConvertFreesurferSurface(unittest.TestCase):
meshe... | 40.710638 | 89 | 0.669907 | 18,865 | 0.985941 | 0 | 0 | 17,592 | 0.91941 | 0 | 0 | 6,570 | 0.343368 |
b7da270be2ee04de235dd0dfc5b966c52ba7cf65 | 35,831 | py | Python | Wrangle OSM Dataset.py | Boykai/Project-3-Wrangle-OpenStreetMap-Dataset | 493a4346ae12fb0fe853d4d07e4e8b03ef6a430f | [
"MIT"
] | 1 | 2017-09-01T11:07:26.000Z | 2017-09-01T11:07:26.000Z | Wrangle OSM Dataset.py | Boykai/Project-3-Wrangle-OpenStreetMap-Dataset | 493a4346ae12fb0fe853d4d07e4e8b03ef6a430f | [
"MIT"
] | null | null | null | Wrangle OSM Dataset.py | Boykai/Project-3-Wrangle-OpenStreetMap-Dataset | 493a4346ae12fb0fe853d4d07e4e8b03ef6a430f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Created on Tue Jan 17 16:19:36 2017
@author: Boykai
'''
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import xml.etree.cElementTree as ET # Use cElementTree or lxml if too slow
from collections import defaultdict
import re
import pprint
import string
import codecs
import json
import os
f... | 40.996568 | 127 | 0.471966 | 26,787 | 0.747593 | 1,345 | 0.037537 | 0 | 0 | 0 | 0 | 16,099 | 0.449304 |
b7da43e450c1cde9be925061435a5d471ad6ae05 | 640 | py | Python | Wrapping/Python/vtkmodules/__init__.py | cads-build/VTK | ee0c9688a082c88bfe070afc08f4eb0f0a546487 | [
"BSD-3-Clause"
] | 1 | 2019-09-11T12:30:57.000Z | 2019-09-11T12:30:57.000Z | Wrapping/Python/vtkmodules/__init__.py | AndyJMR/VTK | 3cc9e5f7539107e5dbaeadc2d28f7a8db6de8571 | [
"BSD-3-Clause"
] | null | null | null | Wrapping/Python/vtkmodules/__init__.py | AndyJMR/VTK | 3cc9e5f7539107e5dbaeadc2d28f7a8db6de8571 | [
"BSD-3-Clause"
] | null | null | null | r"""
Currently, this package is experimental and may change in the future.
"""
from __future__ import absolute_import
#------------------------------------------------------------------------------
# this little trick is for static builds of VTK. In such builds, if
# the user imports this Python package in a non-stat... | 37.647059 | 79 | 0.582813 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 490 | 0.765625 |
b7daad942b4ee13674b01a3bc7990323f036b3a5 | 1,176 | py | Python | Financely/basic_app/models.py | Frostday/Financely | 23226aca0ad21971cb61d13509e16651b304d207 | [
"MIT"
] | 8 | 2021-05-28T16:09:36.000Z | 2022-02-27T23:12:48.000Z | Financely/basic_app/models.py | Frostday/Financely | 23226aca0ad21971cb61d13509e16651b304d207 | [
"MIT"
] | null | null | null | Financely/basic_app/models.py | Frostday/Financely | 23226aca0ad21971cb61d13509e16651b304d207 | [
"MIT"
] | 8 | 2021-05-28T16:01:48.000Z | 2022-02-27T23:12:50.000Z | from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Client(models.Model):
user = models.OneToOneField(User,null=True,blank= True,on_delete=models.CASCADE)
name = models.CharField(max_length=100, null=True)
# def __str__(self):
# return self.name... | 40.551724 | 119 | 0.747449 | 1,070 | 0.909864 | 0 | 0 | 0 | 0 | 0 | 0 | 190 | 0.161565 |
b7dd25cebefde2e55f7311a4ace4a861586de3c9 | 1,299 | py | Python | lims/models/shipping.py | razorlabs/BRIMS-backend | 2c5b7bd126debec459b775e9d11e96fc09975059 | [
"MIT"
] | 1 | 2020-03-20T23:00:24.000Z | 2020-03-20T23:00:24.000Z | lims/models/shipping.py | razorlabs/BRIMS-backend | 2c5b7bd126debec459b775e9d11e96fc09975059 | [
"MIT"
] | null | null | null | lims/models/shipping.py | razorlabs/BRIMS-backend | 2c5b7bd126debec459b775e9d11e96fc09975059 | [
"MIT"
] | 1 | 2020-03-09T09:57:25.000Z | 2020-03-09T09:57:25.000Z | from django.db import models
"""
ShipmentModels have a one to many relationship with boxes and aliquot
Aliquot and Box foreign keys to a ShipmentModel determine manifest contents
for shipping purposes (resolved in schema return for manifest view)
"""
class ShipmentModel(models.Model):
carrier = model... | 34.184211 | 79 | 0.628176 | 1,026 | 0.789838 | 0 | 0 | 0 | 0 | 0 | 0 | 319 | 0.245574 |
b7defbba24700ce1dff5cfd0c991ccf13a0c39e0 | 1,857 | py | Python | part-2/2-iterators/Example-consuming_iterators_manually.py | boconlonton/python-deep-dive | c01591a4943c7b77d4d2cd90a8b23423280367a3 | [
"MIT"
] | null | null | null | part-2/2-iterators/Example-consuming_iterators_manually.py | boconlonton/python-deep-dive | c01591a4943c7b77d4d2cd90a8b23423280367a3 | [
"MIT"
] | null | null | null | part-2/2-iterators/Example-consuming_iterators_manually.py | boconlonton/python-deep-dive | c01591a4943c7b77d4d2cd90a8b23423280367a3 | [
"MIT"
] | null | null | null | """
Consuming Iterator manually
"""
from collections import namedtuple
def cast(data_type, value):
"""Cast the value into a correct data type"""
if data_type == 'DOUBLE':
return float(value)
elif data_type == 'STRING':
return str(value)
elif data_type == 'INT':
return int(value... | 27.308824 | 58 | 0.525579 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,120 | 0.603123 |
b7dfa49c85bfb3c402f6a966ce46d040dfc275f6 | 1,675 | py | Python | instance_server/services/startpage.py | Geierhaas/developer-observatory | f2e840ab9a283ea82353a8c5bbb6b1905567fbe4 | [
"MIT"
] | 4 | 2017-08-26T04:51:52.000Z | 2022-01-02T23:07:48.000Z | instance_server/services/startpage.py | Geierhaas/developer-observatory | f2e840ab9a283ea82353a8c5bbb6b1905567fbe4 | [
"MIT"
] | 3 | 2020-11-04T11:13:55.000Z | 2021-03-08T19:47:52.000Z | instance_server/services/startpage.py | Geierhaas/developer-observatory | f2e840ab9a283ea82353a8c5bbb6b1905567fbe4 | [
"MIT"
] | 6 | 2017-10-24T14:44:05.000Z | 2022-01-13T14:26:05.000Z | #! Copyright (C) 2017 Christian Stransky
#!
#! This software may be modified and distributed under the terms
#! of the MIT license. See the LICENSE file for details.
from flask import Flask, redirect, request, make_response
from shutil import copyfile
import json
import requests
import os.path
import uuid
... | 34.183673 | 110 | 0.677612 | 0 | 0 | 0 | 0 | 1,076 | 0.642388 | 0 | 0 | 720 | 0.429851 |
b7e02aed4c2632acfe7ae12115128aac02a396d3 | 672 | py | Python | utils/linalg.py | cimat-ris/TrajectoryInference | 27d1d2d692df52b403cf6557ecba628f818cd380 | [
"Apache-2.0"
] | 6 | 2019-11-05T00:56:06.000Z | 2021-12-05T21:11:14.000Z | utils/linalg.py | cimat-ris/TrajectoryInference | 27d1d2d692df52b403cf6557ecba628f818cd380 | [
"Apache-2.0"
] | 2 | 2021-05-22T11:16:45.000Z | 2021-05-31T00:42:07.000Z | utils/linalg.py | cimat-ris/TrajectoryInference | 27d1d2d692df52b403cf6557ecba628f818cd380 | [
"Apache-2.0"
] | 1 | 2021-05-22T10:35:18.000Z | 2021-05-22T10:35:18.000Z | import numpy as np
import math
import logging
from termcolor import colored
# Check a matrix for: negative eigenvalues, asymmetry and negative diagonal values
def positive_definite(M,epsilon = 0.000001,verbose=False):
# Symmetrization
Mt = np.transpose(M)
M = (M + Mt)/2
eigenvalues = np.linalg.eigvals(... | 29.217391 | 82 | 0.616071 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 148 | 0.220238 |
b7e0fbad2360576b896a69e1a30c6d6156b68c38 | 282 | py | Python | problemsets/Codeforces/Python/A1020.py | juarezpaulino/coderemite | a4649d3f3a89d234457032d14a6646b3af339ac1 | [
"Apache-2.0"
] | null | null | null | problemsets/Codeforces/Python/A1020.py | juarezpaulino/coderemite | a4649d3f3a89d234457032d14a6646b3af339ac1 | [
"Apache-2.0"
] | null | null | null | problemsets/Codeforces/Python/A1020.py | juarezpaulino/coderemite | a4649d3f3a89d234457032d14a6646b3af339ac1 | [
"Apache-2.0"
] | null | null | null | """
*
* Author: Juarez Paulino(coderemite)
* Email: [email protected]
*
"""
I=lambda:map(int,input().split())
f=abs
n,_,a,b,k=I()
while k:
p,q,u,v=I()
P=[a,b]
if a<=q<=b:P+=[q]
if a<=v<=b:P+=[v]
print([min(f(q-x)+f(v-x)for x in P)+f(p-u),f(q-v)][p==u])
k-=1 | 17.625 | 59 | 0.521277 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 0.312057 |
b7e289ea7bf92691efc481deeec6261bf7909c3b | 850 | py | Python | get_tweet.py | Na27i/tweet_generator | 92a5156e041982dd12d9850445f15a599fb6ec5e | [
"MIT"
] | null | null | null | get_tweet.py | Na27i/tweet_generator | 92a5156e041982dd12d9850445f15a599fb6ec5e | [
"MIT"
] | null | null | null | get_tweet.py | Na27i/tweet_generator | 92a5156e041982dd12d9850445f15a599fb6ec5e | [
"MIT"
] | null | null | null | import json
import sys
import pandas
args = sys.argv
if len(args) == 1 :
import main as settings
else :
import sub as settings
from requests_oauthlib import OAuth1Session
CK = settings.CONSUMER_KEY
CS = settings.CONSUMER_SECRET
AT = settings.ACCESS_TOKEN
ATS = settings.ACCESS_TOKEN_SECRET
t... | 22.972973 | 64 | 0.661176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 114 | 0.132867 |
b7e377e1a140ad61d79142b999a2e7a703c9e2ef | 1,284 | py | Python | idact/detail/config/validation/validate_scratch.py | intdata-bsc/idact | 54cb65a711c145351e205970c27c83e6393cccf5 | [
"MIT"
] | 5 | 2018-12-06T15:40:34.000Z | 2019-06-19T11:22:58.000Z | idact/detail/config/validation/validate_scratch.py | garstka/idact | b9c8405c94db362c4a51d6bfdf418b14f06f0da1 | [
"MIT"
] | 9 | 2018-12-06T16:35:26.000Z | 2019-04-28T19:01:40.000Z | idact/detail/config/validation/validate_scratch.py | intdata-bsc/idact | 54cb65a711c145351e205970c27c83e6393cccf5 | [
"MIT"
] | 2 | 2019-04-28T19:18:58.000Z | 2019-06-17T06:56:28.000Z | """This module contains a function for validating a scratch config entry."""
import re
from idact.detail.config.validation.validation_error_message import \
validation_error_message
VALID_SCRATCH_DESCRIPTION = 'Non-empty absolute path, or environment' \
' variable name.'
VALID_SCRATC... | 29.181818 | 96 | 0.660436 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 519 | 0.404206 |
b7e39de3f444fe8cb279979f19de1ae9ea72a25e | 10,135 | py | Python | paramak/parametric_components/blanket_fp.py | zmarkan/paramak | ecf9a46394adb4d6bb5744000ec6e2f74c30f2ba | [
"MIT"
] | null | null | null | paramak/parametric_components/blanket_fp.py | zmarkan/paramak | ecf9a46394adb4d6bb5744000ec6e2f74c30f2ba | [
"MIT"
] | null | null | null | paramak/parametric_components/blanket_fp.py | zmarkan/paramak | ecf9a46394adb4d6bb5744000ec6e2f74c30f2ba | [
"MIT"
] | null | null | null |
import warnings
from typing import Callable, List, Optional, Union
import mpmath
import numpy as np
import paramak
import sympy as sp
from paramak import RotateMixedShape, diff_between_angles
from paramak.parametric_components.tokamak_plasma_plasmaboundaries import \
PlasmaBoundaries
from scipy.interpolate import... | 36.456835 | 79 | 0.597139 | 9,802 | 0.967144 | 0 | 0 | 1,012 | 0.099852 | 0 | 0 | 3,413 | 0.336754 |
b7e4658365995b8bd790113c73797283daaf0910 | 907 | py | Python | 3.7.1/solution.py | luxnlex/stepic-python | 92a4b25391f76935c3c2a70fb8552e7f93928d9b | [
"MIT"
] | 1 | 2021-05-07T18:20:51.000Z | 2021-05-07T18:20:51.000Z | 3.7.1/solution.py | luxnlex/stepic-python | 92a4b25391f76935c3c2a70fb8552e7f93928d9b | [
"MIT"
] | null | null | null | 3.7.1/solution.py | luxnlex/stepic-python | 92a4b25391f76935c3c2a70fb8552e7f93928d9b | [
"MIT"
] | 2 | 2017-12-27T07:51:57.000Z | 2020-08-03T22:10:55.000Z | s=str(input())
a=[]
for i in range(len(s)):
si=s[i]
a.append(si)
b=[]
n=str(input())
for j in range(len(n)):
sj=n[j]
b.append(sj)
p={}
for pi in range(len(s)):
key=s[pi]
p[key]=0
j1=0
for i in range(0,len(a)):
key=a[i]
while j1<len(b):
bj=b[0]
if key in p:
p[k... | 14.868852 | 31 | 0.485116 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0.00441 |
b7e4fae61f0aabd32e88f180183fcddc115ab0ca | 4,352 | py | Python | airbyte-integrations/connectors/source-plaid/source_plaid/source.py | OTRI-Unipd/OTRI-airbyte | 50eeeb773f75246e86c6e167b0cd7d2dda6efe0d | [
"MIT"
] | 2 | 2022-03-02T13:46:05.000Z | 2022-03-05T12:31:28.000Z | airbyte-integrations/connectors/source-plaid/source_plaid/source.py | OTRI-Unipd/OTRI-airbyte | 50eeeb773f75246e86c6e167b0cd7d2dda6efe0d | [
"MIT"
] | 29 | 2021-10-07T17:20:29.000Z | 2021-12-27T13:07:09.000Z | airbyte-integrations/connectors/source-plaid/source_plaid/source.py | OTRI-Unipd/OTRI-airbyte | 50eeeb773f75246e86c6e167b0cd7d2dda6efe0d | [
"MIT"
] | 1 | 2021-07-30T07:24:51.000Z | 2021-07-30T07:24:51.000Z | #
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#
import datetime
import json
from typing import Any, Iterable, List, Mapping, MutableMapping, Optional, Tuple, Union
import plaid
from airbyte_cdk.logger import AirbyteLogger
from airbyte_cdk.models import SyncMode
from airbyte_cdk.sources import AbstractSou... | 35.966942 | 135 | 0.667509 | 3,617 | 0.831112 | 1,402 | 0.322151 | 506 | 0.116268 | 0 | 0 | 356 | 0.081801 |
b7e5547eb715244c2608406503ff045d83d45b75 | 17,939 | py | Python | demo/demo.py | taewhankim/DeepHRnet | c316b4a9f5f3002f6fcc0398c12d80de82195ef0 | [
"MIT"
] | null | null | null | demo/demo.py | taewhankim/DeepHRnet | c316b4a9f5f3002f6fcc0398c12d80de82195ef0 | [
"MIT"
] | null | null | null | demo/demo.py | taewhankim/DeepHRnet | c316b4a9f5f3002f6fcc0398c12d80de82195ef0 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import csv
import os
import shutil
from PIL import Image
import torch
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.optim
import torch.utils.data
import torch.utils... | 36.911523 | 118 | 0.572997 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,891 | 0.216708 |
b7e6129db622711592b894cfa7f14f8bbe198a09 | 2,749 | py | Python | feemodeldata/plotting/plotwaits.py | bitcoinfees/bitcoin-feemodel-data | 3eb09cf2a64b1aa23d328484bbcd7e4d55291898 | [
"MIT"
] | 2 | 2015-07-10T20:14:54.000Z | 2017-06-08T11:01:03.000Z | feemodeldata/plotting/plotwaits.py | bitcoinfees/bitcoin-feemodel-data | 3eb09cf2a64b1aa23d328484bbcd7e4d55291898 | [
"MIT"
] | null | null | null | feemodeldata/plotting/plotwaits.py | bitcoinfees/bitcoin-feemodel-data | 3eb09cf2a64b1aa23d328484bbcd7e4d55291898 | [
"MIT"
] | null | null | null | from __future__ import division
import sqlite3
from bisect import bisect_left
import plotly.plotly as py
from plotly.graph_objs import Scatter, Figure, Layout, Data, YAxis, XAxis
from feemodel.util import DataSample
from feemodel.app.predict import PVALS_DBFILE
from feemodeldata.plotting.plotrrd import BASEDIR
de... | 28.936842 | 75 | 0.628592 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 285 | 0.103674 |
b7e7c6200dfbf2600bb1a1bc581331cb427697e7 | 5,181 | py | Python | utils/pytorch_utils.py | shoegazerstella/BTC-ISMIR19 | fc4c8ef792711460d98b502ddc2e5befc800d2e5 | [
"MIT"
] | 1 | 2020-07-23T23:46:24.000Z | 2020-07-23T23:46:24.000Z | utils/pytorch_utils.py | shoegazerstella/BTC-ISMIR19 | fc4c8ef792711460d98b502ddc2e5befc800d2e5 | [
"MIT"
] | null | null | null | utils/pytorch_utils.py | shoegazerstella/BTC-ISMIR19 | fc4c8ef792711460d98b502ddc2e5befc800d2e5 | [
"MIT"
] | null | null | null |
import torch
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
import os
import math
from utils import logger
use_cuda = torch.cuda.is_available()
# utility
def to_var(x, dtype=None):
if type(x) is np.ndarray:
x = torch.from_numpy(x)
elif type(x) is list:
... | 35.244898 | 107 | 0.640803 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,599 | 0.308628 |
b7e805c3fdc6130f33ad7d70c4f57afa4833b9f9 | 3,630 | py | Python | ecosante/users/schemas/__init__.py | betagouv/recosante-api | 4560b2cf2ff4dc19597792fe15a3805f6259201d | [
"MIT"
] | 3 | 2021-09-24T14:07:51.000Z | 2021-12-14T13:48:34.000Z | ecosante/users/schemas/__init__.py | betagouv/recosante-api | 4560b2cf2ff4dc19597792fe15a3805f6259201d | [
"MIT"
] | 187 | 2021-03-25T16:43:49.000Z | 2022-03-23T14:40:31.000Z | ecosante/users/schemas/__init__.py | betagouv/recosante-api | 4560b2cf2ff4dc19597792fe15a3805f6259201d | [
"MIT"
] | null | null | null | from dataclasses import field
from marshmallow import Schema, ValidationError, post_load, schema
from marshmallow.validate import OneOf, Length
from marshmallow.fields import Bool, Str, List, Nested, Email
from flask_rebar import ResponseSchema, RequestSchema, errors
from ecosante.inscription.models import Inscription
... | 43.214286 | 115 | 0.689532 | 2,754 | 0.758678 | 0 | 0 | 1,051 | 0.289532 | 0 | 0 | 607 | 0.167218 |
b7ea33cae6c817255b7381a86f5b2cf3631857b7 | 933 | py | Python | Course 01 - Getting Started with Python/Extra Studies/Basics/ex022.py | marcoshsq/python_practical_exercises | 77136cd4bc0f34acde3380ffdc5af74f7a960670 | [
"MIT"
] | 9 | 2022-03-22T16:45:17.000Z | 2022-03-25T20:22:35.000Z | Course 01 - Getting Started with Python/Extra Studies/Basics/ex022.py | marcoshsq/python_practical_exercises | 77136cd4bc0f34acde3380ffdc5af74f7a960670 | [
"MIT"
] | null | null | null | Course 01 - Getting Started with Python/Extra Studies/Basics/ex022.py | marcoshsq/python_practical_exercises | 77136cd4bc0f34acde3380ffdc5af74f7a960670 | [
"MIT"
] | 3 | 2022-03-22T17:03:38.000Z | 2022-03-29T17:20:55.000Z | import math
# Exercise 017: Right Triangle
"""Write a program that reads the length of the opposite side and the adjacent side of a right triangle.
Calculate and display the length of the hypotenuse."""
# To do this we will use the Pythagorean theorem: a^2 = b^2 + c^2
# Method 01, without the module Math:
# First we... | 38.875 | 104 | 0.710611 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 708 | 0.758842 |
b7ebf597cf4af041d284ceb92dfc3840fcf8cea7 | 146 | py | Python | annuaire/commands/__init__.py | djacomy/layer-annuaire | b0312534e31dd98d98568a83918cf7dd583aa4c7 | [
"MIT"
] | null | null | null | annuaire/commands/__init__.py | djacomy/layer-annuaire | b0312534e31dd98d98568a83918cf7dd583aa4c7 | [
"MIT"
] | null | null | null | annuaire/commands/__init__.py | djacomy/layer-annuaire | b0312534e31dd98d98568a83918cf7dd583aa4c7 | [
"MIT"
] | null | null | null | """Package groups the different commands modules."""
from annuaire.commands import download, import_lawyers
__all__ = [download, import_lawyers]
| 29.2 | 54 | 0.80137 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 52 | 0.356164 |
b7eda2093d6d54b12bba13592c13c99ac642ca74 | 15,883 | py | Python | eventsourcing/application/actors.py | vladimirnani/eventsourcing | f49d2b9aaa585073aca4dc20c59d46db5a14eb57 | [
"BSD-3-Clause"
] | 1 | 2020-02-10T08:12:31.000Z | 2020-02-10T08:12:31.000Z | eventsourcing/application/actors.py | vladimirnani/eventsourcing | f49d2b9aaa585073aca4dc20c59d46db5a14eb57 | [
"BSD-3-Clause"
] | null | null | null | eventsourcing/application/actors.py | vladimirnani/eventsourcing | f49d2b9aaa585073aca4dc20c59d46db5a14eb57 | [
"BSD-3-Clause"
] | null | null | null | import logging
from thespian.actors import *
from eventsourcing.application.process import ProcessApplication, Prompt
from eventsourcing.application.system import System, SystemRunner
from eventsourcing.domain.model.events import subscribe, unsubscribe
from eventsourcing.interface.notificationlog import RecordManager... | 37.637441 | 116 | 0.661336 | 14,440 | 0.909148 | 0 | 0 | 146 | 0.009192 | 0 | 0 | 3,092 | 0.194674 |
b7edb2af66a1ef0492b215ff19713cb25d91778e | 4,517 | py | Python | sudoku/board.py | DariaMinieieva/sudoku_project | acfe6b6ff4e0343ad0dae597e783f9da40a7faee | [
"MIT"
] | 5 | 2021-05-27T09:26:30.000Z | 2021-05-28T10:33:46.000Z | sudoku/board.py | DariaMinieieva/sudoku_project | acfe6b6ff4e0343ad0dae597e783f9da40a7faee | [
"MIT"
] | null | null | null | sudoku/board.py | DariaMinieieva/sudoku_project | acfe6b6ff4e0343ad0dae597e783f9da40a7faee | [
"MIT"
] | 1 | 2021-05-28T08:43:05.000Z | 2021-05-28T08:43:05.000Z | """This module implements backtracking algorithm to solve sudoku."""
class Board:
"""
Class for sudoku board representation.
"""
NUMBERS = [1, 2, 3, 4, 5, 6, 7, 8, 9]
def __init__(self, board):
"""
Create a new board.
"""
self.board = board
def __str__(self) ... | 30.938356 | 92 | 0.556121 | 4,446 | 0.984282 | 0 | 0 | 618 | 0.136816 | 0 | 0 | 1,320 | 0.292229 |
b7f128c1c030f4883afe9da12b85ac98f1c9b3dd | 9,603 | py | Python | openfl/component/ca/ca.py | saransh09/openfl-1 | beba571929a56771f2fc1671154a3dbe60b38785 | [
"Apache-2.0"
] | null | null | null | openfl/component/ca/ca.py | saransh09/openfl-1 | beba571929a56771f2fc1671154a3dbe60b38785 | [
"Apache-2.0"
] | 1 | 2022-03-02T18:07:11.000Z | 2022-03-10T02:43:12.000Z | openfl/component/ca/ca.py | saransh09/openfl-1 | beba571929a56771f2fc1671154a3dbe60b38785 | [
"Apache-2.0"
] | 1 | 2022-03-03T00:50:15.000Z | 2022-03-03T00:50:15.000Z | # Copyright (C) 2020-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
"""Aggregator module."""
import base64
import json
import os
import platform
import shutil
import signal
import subprocess
import time
import urllib.request
from logging import getLogger
from pathlib import Path
from subprocess import c... | 34.793478 | 97 | 0.656357 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,372 | 0.35114 |
b7f17afa5fddb406481a5085256bccee3d1bcc8c | 574 | py | Python | bin/optimization/cosmo_optimizer_hod_only.py | mclaughlin6464/pearce | 746f2bf4bf45e904d66996e003043661a01423ba | [
"MIT"
] | null | null | null | bin/optimization/cosmo_optimizer_hod_only.py | mclaughlin6464/pearce | 746f2bf4bf45e904d66996e003043661a01423ba | [
"MIT"
] | 16 | 2016-11-04T22:24:32.000Z | 2018-05-01T22:53:39.000Z | bin/optimization/cosmo_optimizer_hod_only.py | mclaughlin6464/pearce | 746f2bf4bf45e904d66996e003043661a01423ba | [
"MIT"
] | 3 | 2016-10-04T08:07:52.000Z | 2019-05-03T23:50:01.000Z | from pearce.emulator import OriginalRecipe, ExtraCrispy
import numpy as np
training_file = '/home/users/swmclau2/scratch/PearceRedMagicWpCosmo.hdf5'
em_method = 'gp'
split_method = 'random'
a = 1.0
z = 1.0/a - 1.0
fixed_params = {'z':z, 'cosmo': 1}#, 'r':0.18477483}
n_leaves, n_overlap = 5, 2
emu = ExtraCrispy(tra... | 23.916667 | 115 | 0.721254 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 97 | 0.16899 |
b7f255f31605c7a9c29e736bc41dc0df25f503be | 294 | py | Python | tests/test_xmllint_map_html.py | sthagen/python-xmllint_map_html | 23363cfe1c126bc72efddf8fea084283375e2204 | [
"MIT"
] | null | null | null | tests/test_xmllint_map_html.py | sthagen/python-xmllint_map_html | 23363cfe1c126bc72efddf8fea084283375e2204 | [
"MIT"
] | 16 | 2020-09-11T11:07:09.000Z | 2020-12-06T16:42:18.000Z | tests/test_xmllint_map_html.py | sthagen/python-xmllint_map_html | 23363cfe1c126bc72efddf8fea084283375e2204 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# pylint: disable=missing-docstring,unused-import,reimported
import json
import pytest # type: ignore
import xmllint_map_html.xmllint_map_html as xmh
def test_parse_ok_minimal():
job = ['[]']
parser = xmh.parse(job)
assert next(parser) == NotImplemented
| 22.615385 | 60 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 101 | 0.343537 |
b7f62fa1d5695f548ee6f73816a2ab82ef2fbcfd | 1,318 | py | Python | apps/transmissions/views/transmissions.py | felipebarraza6/amamaule | 1da7cd542a7e610bc8fa230684770732a41520c9 | [
"MIT"
] | null | null | null | apps/transmissions/views/transmissions.py | felipebarraza6/amamaule | 1da7cd542a7e610bc8fa230684770732a41520c9 | [
"MIT"
] | null | null | null | apps/transmissions/views/transmissions.py | felipebarraza6/amamaule | 1da7cd542a7e610bc8fa230684770732a41520c9 | [
"MIT"
] | null | null | null | from rest_framework import mixins, viewsets, status
from rest_framework.permissions import (
AllowAny,
IsAuthenticated
)
from apps.transmissions.models import Transmission
from apps.transmissions.serializers import TransmissionModelSerializer, CommentModelserializer
from django_filters import rest_framework a... | 30.651163 | 94 | 0.636571 | 985 | 0.747344 | 0 | 0 | 0 | 0 | 0 | 0 | 124 | 0.094082 |
b7f67bcee29d8224470eff2f3efe74022a5ab08f | 4,751 | py | Python | amstramdam/events/game.py | felix-martel/multigeo | 2a1af9abae1fcef399744f6d88c4b1c25e8a25ab | [
"CC-BY-4.0",
"CC0-1.0"
] | 3 | 2020-11-28T15:00:56.000Z | 2021-04-06T14:10:47.000Z | amstramdam/events/game.py | felix-martel/amstramdam | 7142c34bda5aecfb5f7059a576a0ea7015a1edbc | [
"CC0-1.0",
"CC-BY-4.0"
] | 9 | 2021-04-11T17:28:57.000Z | 2022-02-19T13:53:35.000Z | amstramdam/events/game.py | felix-martel/multigeo | 2a1af9abae1fcef399744f6d88c4b1c25e8a25ab | [
"CC-BY-4.0",
"CC0-1.0"
] | 2 | 2020-11-17T09:34:50.000Z | 2020-11-28T14:57:58.000Z | from amstramdam import app, socketio, timers, manager
from flask import session
from flask_socketio import emit
from .types import GameEndNotification, GameEndPayload
from .utils import safe_cancel, wait_and_run
from ..game.types import GameName, Coordinates
def terminate_game(game_name: GameName) -> None:
game ... | 30.261146 | 88 | 0.603662 | 0 | 0 | 0 | 0 | 1,776 | 0.373816 | 0 | 0 | 790 | 0.166281 |
b7f6d5055a8a870cf0186a412e583a2dc0833fd5 | 1,515 | py | Python | src/glod/unittests/in_out/test_statement_csv.py | gordon-elliott/glod | a381e21455d05d9c005942a3dee4ac67e10f366a | [
"MIT"
] | null | null | null | src/glod/unittests/in_out/test_statement_csv.py | gordon-elliott/glod | a381e21455d05d9c005942a3dee4ac67e10f366a | [
"MIT"
] | 1 | 2021-03-10T16:48:34.000Z | 2021-03-10T16:48:34.000Z | src/glod/unittests/in_out/test_statement_csv.py | gordon-elliott/glod | a381e21455d05d9c005942a3dee4ac67e10f366a | [
"MIT"
] | null | null | null |
__copyright__ = 'Copyright(c) Gordon Elliott 2017'
"""
"""
from datetime import date
from decimal import Decimal
from io import StringIO
from unittest import TestCase
from glod.model.statement_item import StatementItem
from glod.model.account import Account
from glod.in_out.statement_item import statement_item_csv... | 25.677966 | 75 | 0.570957 | 1,191 | 0.786139 | 0 | 0 | 0 | 0 | 0 | 0 | 334 | 0.220462 |
b7f7145927c059a2c43b18ff8ea2eb1911103a21 | 1,072 | py | Python | ExifExtractor.py | MalwareJunkie/PythonScripts | ad827a8aafaae4a50970c9df11b674f4472eb371 | [
"MIT"
] | null | null | null | ExifExtractor.py | MalwareJunkie/PythonScripts | ad827a8aafaae4a50970c9df11b674f4472eb371 | [
"MIT"
] | null | null | null | ExifExtractor.py | MalwareJunkie/PythonScripts | ad827a8aafaae4a50970c9df11b674f4472eb371 | [
"MIT"
] | null | null | null | # Tested with Python 3.6
# Install Pillow: pip install pillow
""" This script extracts exif data from JPEG images """
from PIL import Image
from PIL.ExifTags import TAGS
import sys
def getExif(img):
res = {}
exif = img._getexif()
if exif == None:
print("No exif data found!!")
... | 23.304348 | 62 | 0.527052 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 307 | 0.286381 |
b7f7a2d524260e395bf0b274a89d51e8f9652827 | 240 | py | Python | nbgrader/nbgraderformat/__init__.py | FrattisUC/nbgrader | f6402dcbb875e41ee3317be9e7af518afda9f72c | [
"BSD-3-Clause-Clear"
] | 2 | 2021-09-11T20:32:18.000Z | 2021-09-11T20:32:37.000Z | nbgrader/nbgraderformat/__init__.py | FrattisUC/nbgrader | f6402dcbb875e41ee3317be9e7af518afda9f72c | [
"BSD-3-Clause-Clear"
] | null | null | null | nbgrader/nbgraderformat/__init__.py | FrattisUC/nbgrader | f6402dcbb875e41ee3317be9e7af518afda9f72c | [
"BSD-3-Clause-Clear"
] | 1 | 2019-09-13T07:46:09.000Z | 2019-09-13T07:46:09.000Z | SCHEMA_VERSION = 2
from .common import ValidationError, SchemaMismatchError
from .v2 import MetadataValidatorV2 as MetadataValidator
from .v2 import read_v2 as read, write_v2 as write
from .v2 import reads_v2 as reads, writes_v2 as writes
| 34.285714 | 56 | 0.829167 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b7f7e17dac70dc7137a4fbc2c1596760a4b65113 | 9,537 | py | Python | testFiles/test_script.py | Janga-Lab/Penguin-1 | f6162be3549c470416da0fab590ae7d04c74bfa5 | [
"MIT"
] | null | null | null | testFiles/test_script.py | Janga-Lab/Penguin-1 | f6162be3549c470416da0fab590ae7d04c74bfa5 | [
"MIT"
] | null | null | null | testFiles/test_script.py | Janga-Lab/Penguin-1 | f6162be3549c470416da0fab590ae7d04c74bfa5 | [
"MIT"
] | null | null | null | import h5py
from ont_fast5_api.conversion_tools import multi_to_single_fast5
from ont_fast5_api import fast5_interface
import SequenceGenerator.align as align
import SignalExtractor.Nanopolish as events
from testFiles.test_commands import *
import os, sys
import subprocess
#todo get basecall data
def bas... | 37.695652 | 165 | 0.567998 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,224 | 0.442907 |
b7f84a7d5201859ed1a739cf1602952494964553 | 7,702 | py | Python | channels/italiaserie.py | sodicarus/channels | d77402f4f460ea6daa66959aa5384aaffbff70b5 | [
"MIT"
] | null | null | null | channels/italiaserie.py | sodicarus/channels | d77402f4f460ea6daa66959aa5384aaffbff70b5 | [
"MIT"
] | null | null | null | channels/italiaserie.py | sodicarus/channels | d77402f4f460ea6daa66959aa5384aaffbff70b5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------
# streamondemand-pureita.- XBMC Plugin
# Canale italiaserie
# http://www.mimediacenter.info/foro/viewtopic.php?f=36&t=7808
# ------------------------------------------------------------
import re
from core import httptools
from cor... | 43.514124 | 149 | 0.531291 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,271 | 0.42464 |
b7f8e6d0c8a700576343e9ec9966950fe6696251 | 629 | py | Python | setup.py | jeffleary00/greenery | cb5b5d037b6fd297463633d2d3315c722851161f | [
"MIT"
] | null | null | null | setup.py | jeffleary00/greenery | cb5b5d037b6fd297463633d2d3315c722851161f | [
"MIT"
] | null | null | null | setup.py | jeffleary00/greenery | cb5b5d037b6fd297463633d2d3315c722851161f | [
"MIT"
] | 1 | 2018-02-25T17:29:37.000Z | 2018-02-25T17:29:37.000Z | from setuptools import setup
setup(
name='potnanny-api',
version='0.2.6',
packages=['potnanny_api'],
include_package_data=True,
description='Part of the Potnanny greenhouse controller application. Contains Flask REST API and basic web interface.',
author='Jeff Leary',
author_email='potnanny... | 26.208333 | 123 | 0.616852 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 337 | 0.535771 |