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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cd037892f04f2a0ec86c850579b001591ee90f88 | 1,381 | py | Python | libkol/request/clan_rumpus.py | danheath/pykol-lib | bdc9aa8dbae64ead07e7dbc36f9d6ba802f65ddc | [
"BSD-3-Clause"
] | 6 | 2019-06-11T19:25:32.000Z | 2022-01-21T17:05:01.000Z | libkol/request/clan_rumpus.py | danheath/pykol-lib | bdc9aa8dbae64ead07e7dbc36f9d6ba802f65ddc | [
"BSD-3-Clause"
] | 8 | 2019-06-17T11:41:14.000Z | 2019-08-07T17:28:50.000Z | libkol/request/clan_rumpus.py | python-kol/pykollib | bdc9aa8dbae64ead07e7dbc36f9d6ba802f65ddc | [
"BSD-3-Clause"
] | 9 | 2019-06-09T22:23:06.000Z | 2021-07-10T00:49:00.000Z | import re
from enum import Enum
from typing import List
import libkol
from .request import Request
furniture_pattern = re.compile(r"rump([0-9])_([0-9])\.gif")
| 23.40678 | 85 | 0.569153 |
cd03952161db20fd79bc08d5412273256911f00a | 2,155 | py | Python | utils/utils.py | ZhenqiSong/OCR_Pytorch | df4e8c53353b6c515509241d4c9af3b153224a10 | [
"MIT"
] | null | null | null | utils/utils.py | ZhenqiSong/OCR_Pytorch | df4e8c53353b6c515509241d4c9af3b153224a10 | [
"MIT"
] | null | null | null | utils/utils.py | ZhenqiSong/OCR_Pytorch | df4e8c53353b6c515509241d4c9af3b153224a10 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# __author__:Song Zhenqi
# 2021-01-20
import os
import sys
import yaml
import logging
import functools
logger_initialized = set()
def get_config(file):
"""
yaml
:param file: yaml/yml
:return: dict
"""
_, ext = os.path.splitext(file)
assert ext in ['.yaml', '.yml... | 27.278481 | 91 | 0.645476 |
cd0601891b2dad5746ac7c08ac9655b6e8d13ab9 | 2,130 | py | Python | monitoring/uss_qualifier/webapp/tasks.py | interuss/InterUSS-Platform | 099abaa1159c4c143f8f1fde6b88956c86608281 | [
"Apache-2.0"
] | null | null | null | monitoring/uss_qualifier/webapp/tasks.py | interuss/InterUSS-Platform | 099abaa1159c4c143f8f1fde6b88956c86608281 | [
"Apache-2.0"
] | 1 | 2021-11-29T21:53:39.000Z | 2021-11-29T21:53:39.000Z | monitoring/uss_qualifier/webapp/tasks.py | interuss/InterUSS-Platform | 099abaa1159c4c143f8f1fde6b88956c86608281 | [
"Apache-2.0"
] | null | null | null | from monitoring.uss_qualifier.test_data import test_report
from monitoring.uss_qualifier.utils import USSQualifierTestConfiguration
from monitoring.uss_qualifier.main import uss_test_executor
from monitoring.uss_qualifier.rid.simulator import flight_state_from_kml
from monitoring.uss_qualifier.rid.utils import FullFlig... | 30.869565 | 88 | 0.746948 |
cd06e20fb3a5b8f7301bbddc6604a232ac3d8294 | 11,853 | py | Python | grenades_services/modules/basket.py | Parveen3300/Reans | 6dfce046b01099284a8c945a04600ed83e5099a4 | [
"Apache-2.0"
] | null | null | null | grenades_services/modules/basket.py | Parveen3300/Reans | 6dfce046b01099284a8c945a04600ed83e5099a4 | [
"Apache-2.0"
] | null | null | null | grenades_services/modules/basket.py | Parveen3300/Reans | 6dfce046b01099284a8c945a04600ed83e5099a4 | [
"Apache-2.0"
] | null | null | null | """
BasketManagementRelated modules
"""
# import basket models
from basket.models import Basket
from basket.models import BasketProductLine
# import configuration models
from grenades_services.all_configuration_data import get_currency_instance
from grenades_services.all_configuration_data import get_customer_instance... | 40.731959 | 114 | 0.651312 |
cd08e29c15d2756e6bc4a870585c434ad2c07d7a | 2,935 | py | Python | plots.py | klowrey/speed_arch | edb002b6d57915fa5e2024b36eb66acf30a7130a | [
"MIT"
] | null | null | null | plots.py | klowrey/speed_arch | edb002b6d57915fa5e2024b36eb66acf30a7130a | [
"MIT"
] | null | null | null | plots.py | klowrey/speed_arch | edb002b6d57915fa5e2024b36eb66acf30a7130a | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
acc = np.array([7.95549917, 7.46641684, 8.16141701, 8.80025005, 7.29208231,
7.73391724, 8.16333294, 9.02033329, 7.60566664, 7.88175011,
7.77574968, 8.79116631, 8.24524975, 8.98549938, 7.3717494 ,
7.32324982, 8.14583302, 8.53608322, 9.301250... | 56.442308 | 79 | 0.65247 |
cd08e9d07146abb0712c59ab83d9a3d247ba38c2 | 27 | py | Python | tool/klint/bpf/__init__.py | kylerky/klint | 77be216ec3f4315a835b7bcdaef1b66ed3144603 | [
"MIT"
] | 2 | 2022-03-08T16:10:27.000Z | 2022-03-11T14:14:04.000Z | tool/klint/bpf/__init__.py | kylerky/klint | 77be216ec3f4315a835b7bcdaef1b66ed3144603 | [
"MIT"
] | null | null | null | tool/klint/bpf/__init__.py | kylerky/klint | 77be216ec3f4315a835b7bcdaef1b66ed3144603 | [
"MIT"
] | 1 | 2022-03-24T09:27:41.000Z | 2022-03-24T09:27:41.000Z | """
BPF-related stuff.
"""
| 6.75 | 18 | 0.555556 |
cd094ee5dcfd76a9bf766f06eb8cdcb0b8027094 | 4,485 | py | Python | tests/test_geojson.py | geographika/mappyfile-geojson | 9525bb840ae243a0f5072730f6432bf98dcacbe9 | [
"MIT"
] | 8 | 2018-08-08T06:47:38.000Z | 2022-01-30T13:25:35.000Z | tests/test_geojson.py | geographika/mappyfile-geojson | 9525bb840ae243a0f5072730f6432bf98dcacbe9 | [
"MIT"
] | 4 | 2020-09-24T05:28:19.000Z | 2022-03-29T22:18:13.000Z | tests/test_geojson.py | geographika/mappyfile-geojson | 9525bb840ae243a0f5072730f6432bf98dcacbe9 | [
"MIT"
] | 1 | 2018-08-08T06:47:42.000Z | 2018-08-08T06:47:42.000Z | import os
import json
import geojson
import mappyfile_geojson
import mappyfile
import pytest
def test_pointZ():
"""
Z-values are simply removed as they are not supported by inline
MapServer Features
"""
gj = get_geojson("PointZ.json")
layer = mappyfile_geojson.convert(gj)
... | 19.933333 | 68 | 0.515942 |
cd0b619e6db23ae007998ba9f088e9c319778c9d | 517 | py | Python | 230.py | BYOUINZAKA/LeetCodeNotes | 48e1b4522c1f769eeec4944cfbd57abf1281d09a | [
"MIT"
] | null | null | null | 230.py | BYOUINZAKA/LeetCodeNotes | 48e1b4522c1f769eeec4944cfbd57abf1281d09a | [
"MIT"
] | null | null | null | 230.py | BYOUINZAKA/LeetCodeNotes | 48e1b4522c1f769eeec4944cfbd57abf1281d09a | [
"MIT"
] | null | null | null | '''
@Author: Hata
@Date: 2020-05-24 15:30:19
@LastEditors: Hata
@LastEditTime: 2020-05-24 15:32:04
@FilePath: \LeetCode\230.py
@Description: https://leetcode-cn.com/problems/kth-smallest-element-in-a-bst/
'''
| 22.478261 | 77 | 0.558994 |
cd0c0c186a507173da38fb9c91812fd94be9043a | 3,430 | py | Python | Scripts/TestParsers/PyUnittestTestParser.py | davidbrownell/v3-Common_Environment | 8f42f256e573cbd83cbf9813db9958025ddf12f2 | [
"BSL-1.0"
] | null | null | null | Scripts/TestParsers/PyUnittestTestParser.py | davidbrownell/v3-Common_Environment | 8f42f256e573cbd83cbf9813db9958025ddf12f2 | [
"BSL-1.0"
] | 1 | 2018-06-08T06:45:16.000Z | 2018-06-08T06:45:16.000Z | Scripts/TestParsers/PyUnittestTestParser.py | davidbrownell/v3-Common_Environment | 8f42f256e573cbd83cbf9813db9958025ddf12f2 | [
"BSL-1.0"
] | 1 | 2018-06-08T04:15:17.000Z | 2018-06-08T04:15:17.000Z | # ----------------------------------------------------------------------
# |
# | PythonUnittestTestParser.py
# |
# | David Brownell <db@DavidBrownell.com>
# | 2018-05-22 07:59:46
# |
# ----------------------------------------------------------------------
# |
# | Copyright David Brownell 2018-22.
# | ... | 38.539326 | 159 | 0.473178 |
cd0c8d9af792a61f23cb21cb4b226023ec5c2f1f | 7,116 | py | Python | fairseq/models/transformer_xlm_iwslt_decoder.py | jm-glowienke/fairseq | ca45353322f92776e34a7308bf3fab75af9c1d50 | [
"MIT"
] | null | null | null | fairseq/models/transformer_xlm_iwslt_decoder.py | jm-glowienke/fairseq | ca45353322f92776e34a7308bf3fab75af9c1d50 | [
"MIT"
] | null | null | null | fairseq/models/transformer_xlm_iwslt_decoder.py | jm-glowienke/fairseq | ca45353322f92776e34a7308bf3fab75af9c1d50 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
from typing import Any, Dict
from fairseq import checkpoint_utils
from fairseq.data.legacy.masked_lm_dictionary import MaskedLMDict... | 40.662857 | 82 | 0.647274 |
cd0d1977c612b5942005c2d4eceddb8039516a10 | 7,249 | py | Python | test/unit/mysql_db_admin/process_request.py | mjpernot/mysql-mysql-db-admin | 4821d6923155a48362869a6f2bf8c69fe3e533d4 | [
"MIT"
] | null | null | null | test/unit/mysql_db_admin/process_request.py | mjpernot/mysql-mysql-db-admin | 4821d6923155a48362869a6f2bf8c69fe3e533d4 | [
"MIT"
] | null | null | null | test/unit/mysql_db_admin/process_request.py | mjpernot/mysql-mysql-db-admin | 4821d6923155a48362869a6f2bf8c69fe3e533d4 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Classification (U)
"""Program: process_request.py
Description: Unit testing of process_request in mysql_db_admin.py.
Usage:
test/unit/mysql_db_admin/process_request.py
Arguments:
"""
# Libraries and Global Variables
# Standard
import sys
import os
if sys.version_info < ... | 26.36 | 76 | 0.646986 |
cd0e89b4b693cd65319eaacf6298dcfed09dbd78 | 594 | py | Python | fsttest/__init__.py | eddieantonio/fsttest | 8ff71a9aa41a70a30832fa219b72e7478872c16f | [
"MIT"
] | null | null | null | fsttest/__init__.py | eddieantonio/fsttest | 8ff71a9aa41a70a30832fa219b72e7478872c16f | [
"MIT"
] | 1 | 2020-01-27T21:43:04.000Z | 2020-01-28T15:57:05.000Z | fsttest/__init__.py | eddieantonio/fsttest | 8ff71a9aa41a70a30832fa219b72e7478872c16f | [
"MIT"
] | 1 | 2021-04-26T17:46:19.000Z | 2021-04-26T17:46:19.000Z | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
FST test -- test your Foma finite-state transducers!
"""
from .__version__ import VERSION as __version__
from ._fst import FST
from ._results import FailedTestResult, PassedTestResult, TestResults
from ._run import execute_test_case, run_tests
from ._test_case import... | 22.846154 | 69 | 0.725589 |
cd0ff0154f3a2ed2059c34dae1964cf271d9a2e1 | 3,674 | py | Python | analysis/sharpness.py | sanketvmehta/lifelong-learning-pretraining-and-sam | 2fee18a4b13c918f6005f88c19089b86f4a8aae2 | [
"Apache-2.0"
] | null | null | null | analysis/sharpness.py | sanketvmehta/lifelong-learning-pretraining-and-sam | 2fee18a4b13c918f6005f88c19089b86f4a8aae2 | [
"Apache-2.0"
] | null | null | null | analysis/sharpness.py | sanketvmehta/lifelong-learning-pretraining-and-sam | 2fee18a4b13c918f6005f88c19089b86f4a8aae2 | [
"Apache-2.0"
] | null | null | null | import copy
import numpy as np
import torch
from scipy import optimize
import logging
def sharpness(model, criterion_fn, A, epsilon=1e-3, p=0, bounds=None):
"""Computes sharpness metric according to https://arxiv.org/abs/1609.04836.
Args:
model: Model on which to compute sharpness
criterion_... | 32.803571 | 80 | 0.631464 |
cd10ef939588bc49c75df0d3a2c4ba2f987aa04b | 1,164 | py | Python | benchmark_runner.py | mamrehn/simplification | cb43ccadcbe011b89845142910d844b0bf7ca510 | [
"MIT"
] | null | null | null | benchmark_runner.py | mamrehn/simplification | cb43ccadcbe011b89845142910d844b0bf7ca510 | [
"MIT"
] | null | null | null | benchmark_runner.py | mamrehn/simplification | cb43ccadcbe011b89845142910d844b0bf7ca510 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Standalone benchmark runner
"""
import cProfile
import pstats
import profile
import numpy as np
print("Running Rust + Cython benchmarks")
# calibrate
pr = profile.Profile()
calibration = np.mean([pr.calibrate(100000) for x in xrange(5)])
# add the bias
profile.Profil... | 35.272727 | 135 | 0.803265 |
cd13a01142ccf63d717a89caf8e588ed9c337f8d | 850 | py | Python | D_QuickS.py | rut999/Algo | 9180f66452597a758a31073cb2b8fa4a3e6a93fe | [
"MIT"
] | null | null | null | D_QuickS.py | rut999/Algo | 9180f66452597a758a31073cb2b8fa4a3e6a93fe | [
"MIT"
] | null | null | null | D_QuickS.py | rut999/Algo | 9180f66452597a758a31073cb2b8fa4a3e6a93fe | [
"MIT"
] | null | null | null | import time
from random import randint
random_list = random_int(100000)
#list2 = [0,0,99,34,56,54,-1,-1,32,2.5,-1.1,1000,1000,-2,30,21,24,15,10,6]
t1 = time.time()
Quick_sort(random_list)
t2 = time.time()
print(t2-t1)
# def Quick_Sort(list1):
# if (list1[0]<list1[-1]):
# partition_index =partition(list1... | 22.368421 | 74 | 0.583529 |
cd18f52d3cd9d807fe305ade001766cc89245405 | 1,929 | py | Python | cride/circles/views/circles.py | LhernerRemon/Rider | 30783cf58513698d23730f5fa477dfeddda8ee6b | [
"MIT"
] | null | null | null | cride/circles/views/circles.py | LhernerRemon/Rider | 30783cf58513698d23730f5fa477dfeddda8ee6b | [
"MIT"
] | null | null | null | cride/circles/views/circles.py | LhernerRemon/Rider | 30783cf58513698d23730f5fa477dfeddda8ee6b | [
"MIT"
] | null | null | null | #REST
from rest_framework import viewsets,mixins
from rest_framework.permissions import IsAuthenticated
#Filters
from rest_framework.filters import SearchFilter,OrderingFilter
from django_filters.rest_framework import DjangoFilterBackend
#Models, serializers
from cride.circles.models import Circle,Membership
from cri... | 32.694915 | 83 | 0.690513 |
cd18f82e759c1f805c2c156a96b2d6d4fe352c3d | 780 | py | Python | api/service/cidades_atendimento_service.py | FinotelliCarlos/ewipesimple-adminweb-python | 3bf779250efeb9f85b4283ffbf210bf227aa8e8c | [
"MIT"
] | 1 | 2021-06-17T06:13:33.000Z | 2021-06-17T06:13:33.000Z | api/service/cidades_atendimento_service.py | FinotelliCarlos/ewipesimple-adminweb-python | 3bf779250efeb9f85b4283ffbf210bf227aa8e8c | [
"MIT"
] | null | null | null | api/service/cidades_atendimento_service.py | FinotelliCarlos/ewipesimple-adminweb-python | 3bf779250efeb9f85b4283ffbf210bf227aa8e8c | [
"MIT"
] | null | null | null | from adminweb.services import cep_service
from adminweb.models import Profissional
from rest_framework import serializers
import json
| 32.5 | 91 | 0.75 |
cd190e09b3c36d0f4700cf8693b8dfde027f164e | 6,680 | py | Python | 초보를 위한 셀레니움/#1 Google Screenshots Scrapping/main.py | donddog/Nomad_Academy_Online_Course_Codes | 391fde26052a67f7b533219ab0de6096830697b6 | [
"MIT"
] | 1 | 2021-02-11T16:45:22.000Z | 2021-02-11T16:45:22.000Z | 초보를 위한 셀레니움/#1 Google Screenshots Scrapping/main.py | donddog/Nomad_Academy_Online_Course_Codes | 391fde26052a67f7b533219ab0de6096830697b6 | [
"MIT"
] | null | null | null | 초보를 위한 셀레니움/#1 Google Screenshots Scrapping/main.py | donddog/Nomad_Academy_Online_Course_Codes | 391fde26052a67f7b533219ab0de6096830697b6 | [
"MIT"
] | null | null | null | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
import shutil
import os
domain_competitors = GoogleKeywordScreenshooter("bu... | 38.171429 | 107 | 0.572156 |
cd1a66acf2cfd6c3c481c4c94e53d436215cbbe7 | 9,414 | py | Python | omicron/core/numpy_extensions.py | evimacs/omicron | abe77fd25a93cf3d0d17661ae957373474724535 | [
"MIT"
] | 4 | 2020-11-09T02:23:51.000Z | 2021-01-24T00:45:21.000Z | omicron/core/numpy_extensions.py | evimacs/omicron | abe77fd25a93cf3d0d17661ae957373474724535 | [
"MIT"
] | 14 | 2020-11-09T02:31:34.000Z | 2021-12-22T10:15:47.000Z | omicron/core/numpy_extensions.py | evimacs/omicron | abe77fd25a93cf3d0d17661ae957373474724535 | [
"MIT"
] | 2 | 2021-01-24T00:45:25.000Z | 2021-12-24T06:18:37.000Z | """Extension function related to numpy
"""
from __future__ import annotations
from typing import List, Tuple
import numpy as np
import pandas
from numpy.typing import ArrayLike
def dict_to_numpy_array(d: dict, dtype: List[Tuple]) -> np.array:
"""convert dictionary to numpy array
Examples:
>>> d = {"aa... | 26.222841 | 161 | 0.546633 |
cd1bfaec0e66cc493fec447100454ceabadeff14 | 838 | py | Python | pepy/domain/read_model.py | daghan/pepy | 11e15e0a7af922cf72647dde95b6cc26760ee8ab | [
"MIT"
] | null | null | null | pepy/domain/read_model.py | daghan/pepy | 11e15e0a7af922cf72647dde95b6cc26760ee8ab | [
"MIT"
] | null | null | null | pepy/domain/read_model.py | daghan/pepy | 11e15e0a7af922cf72647dde95b6cc26760ee8ab | [
"MIT"
] | null | null | null | from datetime import date
from typing import List
from attr import attrs, attrib
| 22.052632 | 85 | 0.657518 |
cd1c390db89d68211aa13e58ba3a2a89676c5247 | 3,039 | py | Python | finetuning/pretrain_scripts/create_sentiment_mask.py | tatsu-lab/mlm_inductive_bias | 2d99e2477293036949ba356c88513729244dc1f9 | [
"MIT"
] | 10 | 2021-04-14T22:06:19.000Z | 2022-01-12T19:41:12.000Z | finetuning/pretrain_scripts/create_sentiment_mask.py | tatsu-lab/mlm_inductive_bias | 2d99e2477293036949ba356c88513729244dc1f9 | [
"MIT"
] | null | null | null | finetuning/pretrain_scripts/create_sentiment_mask.py | tatsu-lab/mlm_inductive_bias | 2d99e2477293036949ba356c88513729244dc1f9 | [
"MIT"
] | 3 | 2021-06-06T09:43:14.000Z | 2022-02-20T00:40:42.000Z | """
This script computes word masks based on sentiment lexicons
"""
import os
import torch
import argparse
from tqdm import tqdm
from transformers import AutoTokenizer
from transformers import GlueDataTrainingArguments as DataTrainingArguments
from transformers import GlueDataset as Dataset
parser = argparse.Argumen... | 37.518519 | 136 | 0.66535 |
cd26104c6eb130ab45214eda4f1934869ef8a4f2 | 3,524 | py | Python | src/data_reader.py | jazzsewera/mops-projekt | 75924546eb73c266ba81e8e22c68ad939dea19d6 | [
"MIT"
] | null | null | null | src/data_reader.py | jazzsewera/mops-projekt | 75924546eb73c266ba81e8e22c68ad939dea19d6 | [
"MIT"
] | null | null | null | src/data_reader.py | jazzsewera/mops-projekt | 75924546eb73c266ba81e8e22c68ad939dea19d6 | [
"MIT"
] | null | null | null | from logger import Logger
from numpy import average
log = Logger(None)
| 24.136986 | 86 | 0.638763 |
cd2798a9ad4d90fcc9bb40c5df39c9d1117edd80 | 5,946 | py | Python | fetch.py | kirillvarn/grocerycomparator-stat | 861f90a2d5b4c2b52d89b6cdb574b722eae2327d | [
"MIT"
] | null | null | null | fetch.py | kirillvarn/grocerycomparator-stat | 861f90a2d5b4c2b52d89b6cdb574b722eae2327d | [
"MIT"
] | null | null | null | fetch.py | kirillvarn/grocerycomparator-stat | 861f90a2d5b4c2b52d89b6cdb574b722eae2327d | [
"MIT"
] | null | null | null | import repo
import export.csv as csv
# CONSTANTS
milk_q = "SELECT * FROM \"%s\" WHERE price != 0 AND discount = false AND (name ILIKE '%%1l%%' OR name ILIKE '%%1 l%%') AND (name ILIKE '%%piim %%' OR name ILIKE '%%piim,%%') AND name NOT ILIKE '%%juust%%' AND name NOT ILIKE '%%kohupiim%%' AND name NOT ILIKE '%%laktoos%%... | 58.871287 | 365 | 0.601245 |
cd27a3a7d166518d8d7678101792de0e23b578ef | 1,755 | py | Python | code1.py | roshangol/executed-path-visualize | 1759c12b0048fe117205990b151d2f5f57ad9616 | [
"MIT"
] | null | null | null | code1.py | roshangol/executed-path-visualize | 1759c12b0048fe117205990b151d2f5f57ad9616 | [
"MIT"
] | null | null | null | code1.py | roshangol/executed-path-visualize | 1759c12b0048fe117205990b151d2f5f57ad9616 | [
"MIT"
] | null | null | null | # EX1
# if x < y:
# y = 0
# x = x + 1
# else:
# x = y
max(30, 28, 18)
# def triangleType(a, b, c):
# isATriangle = False
# if (a < b + c) and\
# (b < a + c) and\
# (c < a + b):
# isATriangle = True
# if isATriangle:
# if (a == b) and (b == c):
# ... | 16.25 | 66 | 0.4 |
cd28f531641b97aa10ded06e3c6b7fdb2de0d2e7 | 1,193 | py | Python | GameProject/dice.py | CreativeUsernameThatWontInsultAnyone/GameProject | 998274e4587d93ff0564af174f4fc1e3a3e60174 | [
"CC0-1.0"
] | 1 | 2021-11-13T17:14:03.000Z | 2021-11-13T17:14:03.000Z | GameProject/dice.py | CreativeUsernameThatWontInsultAnyone/GameProject | 998274e4587d93ff0564af174f4fc1e3a3e60174 | [
"CC0-1.0"
] | null | null | null | GameProject/dice.py | CreativeUsernameThatWontInsultAnyone/GameProject | 998274e4587d93ff0564af174f4fc1e3a3e60174 | [
"CC0-1.0"
] | null | null | null | import random
import time
while (1):
wmsg = "Good morning!"
events = {
1 : "calm",
2 : "calm",
3 : "rainy",
4 : "rainy",
5 : "rainy",
6 : "thunder",
}
array = [1,2,3,4,5,6] ## Array used to get events or smth
output = random.... | 28.404762 | 105 | 0.506287 |
cd2c1598eaae27b2b8504f6e96bc81711b260dde | 774 | py | Python | multivision/oa_image_io.py | olaals/tpktools | 50416ca554809e3d2f364b25531c78cf4751311c | [
"MIT"
] | null | null | null | multivision/oa_image_io.py | olaals/tpktools | 50416ca554809e3d2f364b25531c78cf4751311c | [
"MIT"
] | null | null | null | multivision/oa_image_io.py | olaals/tpktools | 50416ca554809e3d2f364b25531c78cf4751311c | [
"MIT"
] | null | null | null | import numpy as np
import OpenEXR as exr
import cv2
import Imath
import matplotlib.pyplot as plt
| 29.769231 | 90 | 0.630491 |
cd314573d937025d1a50953b27cb47b89f485e85 | 2,972 | py | Python | yggdrasil/serialize/FunctionalSerialize.py | astro-friedel/yggdrasil | 5ecbfd083240965c20c502b4795b6dc93d94b020 | [
"BSD-3-Clause"
] | 22 | 2019-02-05T15:20:07.000Z | 2022-02-25T09:00:40.000Z | yggdrasil/serialize/FunctionalSerialize.py | astro-friedel/yggdrasil | 5ecbfd083240965c20c502b4795b6dc93d94b020 | [
"BSD-3-Clause"
] | 48 | 2019-02-15T20:41:24.000Z | 2022-03-16T20:52:02.000Z | yggdrasil/serialize/FunctionalSerialize.py | astro-friedel/yggdrasil | 5ecbfd083240965c20c502b4795b6dc93d94b020 | [
"BSD-3-Clause"
] | 16 | 2019-04-27T03:36:40.000Z | 2021-12-02T09:47:06.000Z | from yggdrasil.serialize.SerializeBase import SerializeBase
| 43.072464 | 84 | 0.654778 |
cd3156dd0e4a0a15e50945d8d1d506c7eefae69c | 2,046 | py | Python | wordy_chat.py | thecodingchannel/wordy-discord-bot-tutorial | be70d237abcb302b6516f985ae900c61b598296a | [
"Apache-2.0"
] | null | null | null | wordy_chat.py | thecodingchannel/wordy-discord-bot-tutorial | be70d237abcb302b6516f985ae900c61b598296a | [
"Apache-2.0"
] | null | null | null | wordy_chat.py | thecodingchannel/wordy-discord-bot-tutorial | be70d237abcb302b6516f985ae900c61b598296a | [
"Apache-2.0"
] | 1 | 2022-03-09T04:55:56.000Z | 2022-03-09T04:55:56.000Z | '''
This file is the glue between the Discord bot and the game logic.
'''
from wordle_logic import evaluate_guess, generate_new_word
from wordy_types import ActiveGame, EndResult, LetterState
def begin_game() -> ActiveGame:
"""
Begin a game for a user.
"""
# Select a word
answer = ge... | 26.230769 | 86 | 0.608504 |
cd318b68f4231a08be74b1a2c64d0b4969b29c51 | 2,422 | py | Python | NNet/utils/readNNet.py | noyahoch/Marabou | 03eb551498287e5372d462e3c2ad4fcc3210a5fa | [
"BSD-3-Clause"
] | 7 | 2020-01-27T21:25:49.000Z | 2022-01-07T04:37:37.000Z | NNet/utils/readNNet.py | noyahoch/Marabou | 03eb551498287e5372d462e3c2ad4fcc3210a5fa | [
"BSD-3-Clause"
] | 1 | 2022-01-25T17:41:54.000Z | 2022-01-26T02:27:51.000Z | NNet/utils/readNNet.py | noyahoch/Marabou | 03eb551498287e5372d462e3c2ad4fcc3210a5fa | [
"BSD-3-Clause"
] | 3 | 2020-03-14T17:12:17.000Z | 2022-03-16T09:50:46.000Z | import numpy as np
def readNNet(nnetFile, withNorm=False):
'''
Read a .nnet file and return list of weight matrices and bias vectors
Inputs:
nnetFile: (string) .nnet file to read
withNorm: (bool) If true, return normalization parameters
Returns:
weights: List of ... | 27.83908 | 103 | 0.562758 |
cd336f08882633e139c7b8cf8e6bbf9503123d24 | 13,668 | py | Python | models/model.py | hearai/hearai | 2f2bc2923fa2bb170d9ed895c3f638e99811442f | [
"MIT"
] | 16 | 2021-12-16T20:19:31.000Z | 2022-03-19T15:59:23.000Z | models/model.py | hearai/hearai | 2f2bc2923fa2bb170d9ed895c3f638e99811442f | [
"MIT"
] | 34 | 2021-12-21T19:33:31.000Z | 2022-03-31T19:04:39.000Z | models/model.py | hearai/hearai | 2f2bc2923fa2bb170d9ed895c3f638e99811442f | [
"MIT"
] | 5 | 2021-12-18T22:35:20.000Z | 2022-02-20T12:26:39.000Z | from typing import Dict
import neptune.new as neptune
import numpy as np
import pytorch_lightning as pl
import torch
import torch.nn as nn
from config import NEPTUNE_API_TOKEN, NEPTUNE_PROJECT_NAME
from sklearn.metrics import classification_report, f1_score
from utils.summary_loss import SummaryLoss
from math import c... | 41.92638 | 136 | 0.592479 |
cd33abe036b992ac7ac194a0541c5439617437c4 | 2,305 | py | Python | solutions/day09/solution.py | dbjohnson/advent-of-code-2021 | 2ed1d30362afa0a73c890730cea46de3291be21f | [
"MIT"
] | null | null | null | solutions/day09/solution.py | dbjohnson/advent-of-code-2021 | 2ed1d30362afa0a73c890730cea46de3291be21f | [
"MIT"
] | null | null | null | solutions/day09/solution.py | dbjohnson/advent-of-code-2021 | 2ed1d30362afa0a73c890730cea46de3291be21f | [
"MIT"
] | null | null | null | from functools import lru_cache
from collections import defaultdict
import pandas as pd
import numpy as np
with open('input.txt') as fh:
depthmap = pd.DataFrame([{
'row': row,
'col': col,
'height': int(d)
}
for row, line in enumerate(fh)
for col, d in enumerate(line.str... | 21.342593 | 67 | 0.516269 |
cd3470135bfe7a2b8866c6a268c9e629dad7a8b7 | 3,467 | py | Python | docs/conf.py | ocefpaf/pystac-client | ddf0e0566b2b1783a4d32d3d77f9f51b80270df3 | [
"Apache-2.0"
] | 52 | 2021-04-15T23:24:12.000Z | 2022-03-09T23:02:27.000Z | docs/conf.py | ocefpaf/pystac-client | ddf0e0566b2b1783a4d32d3d77f9f51b80270df3 | [
"Apache-2.0"
] | 119 | 2021-04-13T11:42:01.000Z | 2022-02-24T10:02:35.000Z | docs/conf.py | ocefpaf/pystac-client | ddf0e0566b2b1783a4d32d3d77f9f51b80270df3 | [
"Apache-2.0"
] | 14 | 2021-04-13T19:00:19.000Z | 2022-02-23T09:17:30.000Z | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
import re
import subprocess
import sys
from pathlib import Path
# -- Path setup ------... | 33.660194 | 97 | 0.654168 |
cd358b914861d3a881968cfd805aae9c0f7bed42 | 1,345 | py | Python | modules/lexer/token.py | DavidMacDonald11/sea-to-c-transpiler-python-based | 20c41931346b13d4bf2a12e96037f44b1add8145 | [
"MIT"
] | null | null | null | modules/lexer/token.py | DavidMacDonald11/sea-to-c-transpiler-python-based | 20c41931346b13d4bf2a12e96037f44b1add8145 | [
"MIT"
] | 11 | 2021-04-22T13:09:34.000Z | 2022-01-29T22:53:58.000Z | modules/lexer/token.py | DavidMacDonald11/sea-to-c-transpiler-python-based | 20c41931346b13d4bf2a12e96037f44b1add8145 | [
"MIT"
] | null | null | null | from .token_types import TT
from .token_types import BadTT
from .position import Position
from .keywords import is_keyword
from .keywords import keyword_declared_type
from ..lexer import errors
| 33.625 | 80 | 0.665428 |
cd36eb6513428b0c0f981f91eaea0aa21154992a | 689 | py | Python | cb_scripts/nums_square_cube.py | christopher-burke/python-scripts | bdbea2456130e0958b6a6ab8d138f4f19b39b934 | [
"MIT"
] | 1 | 2022-02-05T06:39:05.000Z | 2022-02-05T06:39:05.000Z | cb_scripts/nums_square_cube.py | christopher-burke/python-scripts | bdbea2456130e0958b6a6ab8d138f4f19b39b934 | [
"MIT"
] | null | null | null | cb_scripts/nums_square_cube.py | christopher-burke/python-scripts | bdbea2456130e0958b6a6ab8d138f4f19b39b934 | [
"MIT"
] | 1 | 2021-06-10T22:04:35.000Z | 2021-06-10T22:04:35.000Z | #!/usr/bin/env python3
"""Squares and Cubes for a range of numbers.
Given a start and end, calucate the Square x**2 and
the Cube x**3 for all numbers.
Example of generator and functools.partial.
"""
from functools import partial
def power(base, exponent):
"""Raise a base to the exponent."""
return base *... | 20.264706 | 63 | 0.651669 |
cd36ecd76329e8d74ce6fdd1bc24ac05a02cc921 | 101 | py | Python | Darlington/phase2/LIST/day 41 solution/qtn2.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 6 | 2020-05-23T19:53:25.000Z | 2021-05-08T20:21:30.000Z | Darlington/phase2/LIST/day 41 solution/qtn2.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 8 | 2020-05-14T18:53:12.000Z | 2020-07-03T00:06:20.000Z | Darlington/phase2/LIST/day 41 solution/qtn2.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 39 | 2020-05-10T20:55:02.000Z | 2020-09-12T17:40:59.000Z | #program to find the index of an item in a specified list.
num =[10, 30, 4, -6]
print(num.index(30))
| 25.25 | 58 | 0.683168 |
cd36fd075f7cd95707b64e346e7a7db96e365eac | 1,748 | py | Python | mozdns/txt/tests.py | jlin/inventory | c098c98e570c3bf9fadfd811eb75e1213f6ea428 | [
"BSD-3-Clause"
] | 22 | 2015-01-16T01:36:32.000Z | 2020-06-08T00:46:18.000Z | mozdns/txt/tests.py | jlin/inventory | c098c98e570c3bf9fadfd811eb75e1213f6ea428 | [
"BSD-3-Clause"
] | 8 | 2015-12-28T18:56:19.000Z | 2019-04-01T17:33:48.000Z | mozdns/txt/tests.py | jlin/inventory | c098c98e570c3bf9fadfd811eb75e1213f6ea428 | [
"BSD-3-Clause"
] | 13 | 2015-01-13T20:56:22.000Z | 2022-02-23T06:01:17.000Z | from django.test import TestCase
from django.core.exceptions import ValidationError
from mozdns.txt.models import TXT
from mozdns.domain.models import Domain
| 29.627119 | 69 | 0.587529 |
cd39f1397ad328542fed8bb62d6c47dc4c191597 | 6,698 | py | Python | xtesting/tests/unit/core/test_behaveframework.py | collivier/functest-xtesting | 17739d718901a10f7ec0aaf9a6d53141294a347d | [
"Apache-2.0"
] | 1 | 2020-05-15T12:58:58.000Z | 2020-05-15T12:58:58.000Z | xtesting/tests/unit/core/test_behaveframework.py | collivier/functest-xtesting | 17739d718901a10f7ec0aaf9a6d53141294a347d | [
"Apache-2.0"
] | null | null | null | xtesting/tests/unit/core/test_behaveframework.py | collivier/functest-xtesting | 17739d718901a10f7ec0aaf9a6d53141294a347d | [
"Apache-2.0"
] | 3 | 2018-02-28T15:55:14.000Z | 2022-02-24T15:46:12.000Z | #!/usr/bin/env python
# Copyright (c) 2019 Orange and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
"""Define t... | 37.418994 | 77 | 0.640042 |
cd3a28ba018f4c08dd5b0ec2fb2ba69c859e803c | 963 | py | Python | data/test/python/cd3a28ba018f4c08dd5b0ec2fb2ba69c859e803cdjango.py | harshp8l/deep-learning-lang-detection | 2a54293181c1c2b1a2b840ddee4d4d80177efb33 | [
"MIT"
] | 84 | 2017-10-25T15:49:21.000Z | 2021-11-28T21:25:54.000Z | data/test/python/cd3a28ba018f4c08dd5b0ec2fb2ba69c859e803cdjango.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 5 | 2018-03-29T11:50:46.000Z | 2021-04-26T13:33:18.000Z | data/test/python/cd3a28ba018f4c08dd5b0ec2fb2ba69c859e803cdjango.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 24 | 2017-11-22T08:31:00.000Z | 2022-03-27T01:22:31.000Z | # coding=utf-8
from fabric.api import env, run
COMMAND_COLLECTSTATIC = 'collectstatic'
COMMAND_SYNCDB = 'syncdb'
COMMAND_MIGRATE = 'migrate'
_default_command = '{python} {manage} {command}'
_commands_list = {
COMMAND_COLLECTSTATIC: 'yes yes | {python} {manage} {command}',
COMMAND_MIGRATE: '{python} {manage} ... | 24.075 | 67 | 0.677051 |
cd3da08c421072d75aa5562437930fcd09889489 | 8,820 | py | Python | commercialoperator/components/bookings/utils.py | wilsonc86/ledger | a60a681e547f37e4ac81cb93dffaf90aea8c8151 | [
"Apache-2.0"
] | null | null | null | commercialoperator/components/bookings/utils.py | wilsonc86/ledger | a60a681e547f37e4ac81cb93dffaf90aea8c8151 | [
"Apache-2.0"
] | null | null | null | commercialoperator/components/bookings/utils.py | wilsonc86/ledger | a60a681e547f37e4ac81cb93dffaf90aea8c8151 | [
"Apache-2.0"
] | null | null | null | from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.conf import settings
from django.core.exceptions import ValidationError
from datetime import datetime, timedelta
from commercialoperator.components.main.models import Park
from commercialoperator.components.proposals.... | 40.090909 | 175 | 0.675057 |
cd3eb5a68afae376fb0cdba9c6455dc19c74e74f | 3,552 | py | Python | src/application/models.py | Chitrank-Dixit/WikiG | 74d99a16afc635a991c17de8d237eb4f6eccbe86 | [
"CNRI-Python"
] | 1 | 2015-11-05T03:51:44.000Z | 2015-11-05T03:51:44.000Z | src/application/models.py | Chitrank-Dixit/WikiG | 74d99a16afc635a991c17de8d237eb4f6eccbe86 | [
"CNRI-Python"
] | null | null | null | src/application/models.py | Chitrank-Dixit/WikiG | 74d99a16afc635a991c17de8d237eb4f6eccbe86 | [
"CNRI-Python"
] | null | null | null | """
models.py
App Engine datastore models
Documentation: https://developers.google.com/appengine/docs/python/ndb/entities
"""
from google.appengine.ext import ndb
from google.appengine.ext import blobstore
from google.appengine.api import users
import functools
import flask
from flaskext import login
from flaskex... | 23.368421 | 155 | 0.677928 |
cd3ebb35376a9ad6bb35907b043a70f74ff3d06d | 2,488 | py | Python | driver.py | Nobregaigor/Robot-path-tracking-and-obstacle-avoidance-simulation | 23ab060316c5978724b3f109d851ea33206d0e10 | [
"MIT"
] | 6 | 2020-05-01T23:33:13.000Z | 2021-12-18T08:13:50.000Z | driver.py | Nobregaigor/Robot-path-tracking-and-obstacle-avoidance-simulation--Python | 23ab060316c5978724b3f109d851ea33206d0e10 | [
"MIT"
] | null | null | null | driver.py | Nobregaigor/Robot-path-tracking-and-obstacle-avoidance-simulation--Python | 23ab060316c5978724b3f109d851ea33206d0e10 | [
"MIT"
] | 2 | 2020-05-06T11:54:10.000Z | 2020-07-30T01:58:06.000Z | import pygame
import math
import path_planning as pp
| 35.542857 | 123 | 0.63545 |
cd423af6c5271daa0eac7f6a8ca5e2cf87ffc2fe | 2,752 | py | Python | test/test_api_v1_module.py | feizhihui/deepnlp | cc6647d65ec39aadd35e4a4748da92df5b79bd48 | [
"MIT"
] | null | null | null | test/test_api_v1_module.py | feizhihui/deepnlp | cc6647d65ec39aadd35e4a4748da92df5b79bd48 | [
"MIT"
] | null | null | null | test/test_api_v1_module.py | feizhihui/deepnlp | cc6647d65ec39aadd35e4a4748da92df5b79bd48 | [
"MIT"
] | 1 | 2019-05-13T14:24:15.000Z | 2019-05-13T14:24:15.000Z | #coding:utf-8
'''
Demo for calling API of deepnlp.org web service
Anonymous user of this package have limited access on the number of API calling 100/day
Please Register and Login Your Account to deepnlp.org to get unlimited access to fully support
api_service API module, now supports both windows and linux platforms.
... | 38.222222 | 133 | 0.682776 |
cd448e3854b74fee56a6672cdae1ce1e148e593d | 1,195 | py | Python | spring_cloud/commons/client/loadbalancer/round_robin.py | haribo0915/Spring-Cloud-in-Python | 0bcd7093869c797df14428bf2d1b0a779f96e573 | [
"Apache-2.0"
] | 5 | 2020-10-06T09:48:23.000Z | 2020-10-07T13:19:46.000Z | spring_cloud/commons/client/loadbalancer/round_robin.py | haribo0915/Spring-Cloud-in-Python | 0bcd7093869c797df14428bf2d1b0a779f96e573 | [
"Apache-2.0"
] | 5 | 2020-10-05T09:57:01.000Z | 2020-10-12T19:52:48.000Z | spring_cloud/commons/client/loadbalancer/round_robin.py | haribo0915/Spring-Cloud-in-Python | 0bcd7093869c797df14428bf2d1b0a779f96e573 | [
"Apache-2.0"
] | 8 | 2020-10-05T06:34:49.000Z | 2020-10-07T13:19:46.000Z | # -*- coding: utf-8 -*-
"""
The built-in Round-Robin algorithm.
"""
# standard library
from typing import Union
# scip plugin
from spring_cloud.commons.client.service_instance import ServiceInstance
from spring_cloud.utils.atomic import AtomicInteger
from .loadbalancer import LoadBalancer
from .supplier import Servi... | 30.641026 | 88 | 0.738075 |
cd46541bba89d45678808a7b911ed3c9f61dd510 | 4,245 | py | Python | utils/dataset_utils.py | dpaiton/DeepSparseCoding | 5ea01fa8770794df5e13743aa3f2d85297c27eb1 | [
"MIT"
] | 12 | 2017-04-27T17:19:31.000Z | 2021-11-07T03:37:59.000Z | utils/dataset_utils.py | dpaiton/DeepSparseCoding | 5ea01fa8770794df5e13743aa3f2d85297c27eb1 | [
"MIT"
] | 12 | 2018-03-21T01:16:25.000Z | 2022-02-10T00:21:58.000Z | utils/dataset_utils.py | dpaiton/DeepSparseCoding | 5ea01fa8770794df5e13743aa3f2d85297c27eb1 | [
"MIT"
] | 12 | 2017-02-01T19:49:57.000Z | 2021-12-08T03:16:58.000Z | import os
import sys
import numpy as np
import torch
from torchvision import datasets, transforms
ROOT_DIR = os.path.dirname(os.getcwd())
if ROOT_DIR not in sys.path: sys.path.append(ROOT_DIR)
import DeepSparseCoding.utils.data_processing as dp
import DeepSparseCoding.datasets.synthetic as synthetic
| 42.878788 | 107 | 0.660306 |
cd4856841cf209c6c31d8cf4b1d4a02e1669fe87 | 1,051 | py | Python | adi_study_watch/nrf5_sdk_15.2.0/adi_study_watch/cli/m2m2/inc/master_definitions/led_interface.py | ArrowElectronics/Vital-Signs-Monitoring | ba43fe9a116d94170561433910fd7bffba5726e7 | [
"Unlicense"
] | 5 | 2021-06-13T17:11:19.000Z | 2021-12-01T18:20:38.000Z | adi_study_watch/nrf5_sdk_15.2.0/adi_study_watch/cli/m2m2/inc/master_definitions/led_interface.py | ArrowElectronics/Vital-Signs-Monitoring | ba43fe9a116d94170561433910fd7bffba5726e7 | [
"Unlicense"
] | null | null | null | adi_study_watch/nrf5_sdk_15.2.0/adi_study_watch/cli/m2m2/inc/master_definitions/led_interface.py | ArrowElectronics/Vital-Signs-Monitoring | ba43fe9a116d94170561433910fd7bffba5726e7 | [
"Unlicense"
] | 1 | 2022-01-08T15:01:44.000Z | 2022-01-08T15:01:44.000Z | #!/usr/bin/env python3
from ctypes import *
import m2m2_core
| 30.028571 | 53 | 0.726927 |
cd485ea8847607e1b8262b17b33a7d95c7b05c48 | 2,327 | py | Python | src/empirical_study.py | arshajithwolverine/Recommentation-System_KGNN-LS | 82ad10633a56794bbc38dc7e6c40a3636c7d570a | [
"MIT"
] | 133 | 2019-06-20T08:38:04.000Z | 2022-03-30T07:57:14.000Z | src/empirical_study.py | piaofu110/KGNN-LS | 3afd76361b623e9e38b822861c79bcd61dae41aa | [
"MIT"
] | 10 | 2019-07-06T12:53:01.000Z | 2021-11-10T12:58:50.000Z | src/empirical_study.py | piaofu110/KGNN-LS | 3afd76361b623e9e38b822861c79bcd61dae41aa | [
"MIT"
] | 40 | 2019-08-07T06:02:31.000Z | 2022-01-05T15:19:29.000Z | import networkx as nx
import numpy as np
import argparse
if __name__ == '__main__':
np.random.seed(555)
NUM = 10000
parser = argparse.ArgumentParser()
parser.add_argument('-d', type=str, default='music')
args = parser.parse_args()
DATASET = args.d
kg_np = np.load('../data/' + DATASET + '... | 36.359375 | 104 | 0.621401 |
cd48bacc37dd1b8304c3c30daa2f346ee7aa4309 | 6,317 | py | Python | Survival_Pygame/data.py | Lily-Li828/effective-octo-fiesta | 4dbfeaec6158141bb03005aa25240dd337694ee3 | [
"Apache-2.0"
] | null | null | null | Survival_Pygame/data.py | Lily-Li828/effective-octo-fiesta | 4dbfeaec6158141bb03005aa25240dd337694ee3 | [
"Apache-2.0"
] | null | null | null | Survival_Pygame/data.py | Lily-Li828/effective-octo-fiesta | 4dbfeaec6158141bb03005aa25240dd337694ee3 | [
"Apache-2.0"
] | null | null | null | import pygame
from pygame.locals import*
from pygame import mixer
pygame.init()
# loading in background image
backgroundClassic_image=pygame.image.load('image/WallPaper.png')
backgroundAncient_image=pygame.image.load('image/WallPaper2.png')
# loading in player image
player_imageClassic=pygame.image.... | 54.930435 | 114 | 0.625139 |
cd4c852bd50c3ecb65653b4479673255f18bc5fa | 8,170 | py | Python | test/filters_iso_test.py | todofixthis/filters-iso | da6052b49a2f71a3b3d6b66e2633debbb64f5b16 | [
"MIT"
] | null | null | null | test/filters_iso_test.py | todofixthis/filters-iso | da6052b49a2f71a3b3d6b66e2633debbb64f5b16 | [
"MIT"
] | null | null | null | test/filters_iso_test.py | todofixthis/filters-iso | da6052b49a2f71a3b3d6b66e2633debbb64f5b16 | [
"MIT"
] | null | null | null | import filters as f
from filters.test import BaseFilterTestCase
# noinspection PyProtectedMember
from iso3166 import Country, countries_by_alpha3
from language_tags import tags
from language_tags.Tag import Tag
from moneyed import Currency, get_currency
| 31.914063 | 75 | 0.623745 |
cd4d5dd7883050a254679a4b1f93de18a8465561 | 1,179 | py | Python | datacamp-master/22-introduction-to-time-series-analysis-in-python/04-moving-average-ma-and-arma-models/08-equivalance-of-ar(1)-and-ma(infinity).py | vitthal10/datacamp | 522d2b192656f7f6563bf6fc33471b048f1cf029 | [
"MIT"
] | 1 | 2020-06-11T01:32:36.000Z | 2020-06-11T01:32:36.000Z | 22-introduction-to-time-series-analysis-in-python/04-moving-average-ma-and-arma-models/08-equivalance-of-ar(1)-and-ma(infinity).py | AndreasFerox/DataCamp | 41525d7252f574111f4929158da1498ee1e73a84 | [
"MIT"
] | null | null | null | 22-introduction-to-time-series-analysis-in-python/04-moving-average-ma-and-arma-models/08-equivalance-of-ar(1)-and-ma(infinity).py | AndreasFerox/DataCamp | 41525d7252f574111f4929158da1498ee1e73a84 | [
"MIT"
] | 1 | 2021-08-08T05:09:52.000Z | 2021-08-08T05:09:52.000Z | '''
Equivalence of AR(1) and MA(infinity)
To better understand the relationship between MA models and AR models, you will demonstrate that an AR(1) model is equivalent to an MA(
) model with the appropriate parameters.
You will simulate an MA model with parameters 0.8,0.82,0.83,
0.8
,
0.8
2
,
0.8
3
,
for a large n... | 19.983051 | 136 | 0.74894 |
cd4e4c3a86cc4a31b024c46ddddde1fa3e66e93b | 3,752 | py | Python | imutils.py | shimoda-uec/ssdd | 564c3e08fae7a158516cdbd9f3599a74dc748aff | [
"MIT"
] | 33 | 2019-11-05T07:15:36.000Z | 2021-04-27T06:33:47.000Z | imutils.py | shimoda-uec/ssdd | 564c3e08fae7a158516cdbd9f3599a74dc748aff | [
"MIT"
] | 1 | 2019-11-18T13:02:40.000Z | 2019-11-18T13:02:54.000Z | imutils.py | shimoda-uec/ssdd | 564c3e08fae7a158516cdbd9f3599a74dc748aff | [
"MIT"
] | 3 | 2019-11-25T11:00:39.000Z | 2021-03-27T06:53:21.000Z | import PIL.Image
import random
import numpy as np
import cv2
def HWC_to_CHW(img):
return np.transpose(img, (2, 0, 1))
| 32.068376 | 91 | 0.567697 |
cd503144da89b34c7f7e0c6f7d30f63249106454 | 398 | py | Python | dfmt/svg/run.py | wangrl2016/coding | fd6cd342cade42379c4a0447d83e17c6596fd3a3 | [
"MIT"
] | 4 | 2021-02-20T03:47:48.000Z | 2021-11-09T17:25:43.000Z | dfmt/svg/run.py | wangrl2016/coding | fd6cd342cade42379c4a0447d83e17c6596fd3a3 | [
"MIT"
] | null | null | null | dfmt/svg/run.py | wangrl2016/coding | fd6cd342cade42379c4a0447d83e17c6596fd3a3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import subprocess
if __name__ == '__main__':
out_dir = 'out'
if not os.path.exists(out_dir):
os.mkdir(out_dir)
subprocess.run(['cargo', 'build', '--release'])
exe = 'target/release/svg'
subprocess.run([exe, '-i', 'test/simple-text.svg', '-o', 'out/simple-t... | 26.533333 | 93 | 0.585427 |
cd517441104b9bb84c95422e46c5a618c55415fc | 79 | py | Python | project/enums/string_types_enum.py | vinibiavatti1/PythonFlaskCms | e43a4db84d1f77a5f66b1f8fcb9dc96e05e6c023 | [
"MIT"
] | null | null | null | project/enums/string_types_enum.py | vinibiavatti1/PythonFlaskCms | e43a4db84d1f77a5f66b1f8fcb9dc96e05e6c023 | [
"MIT"
] | null | null | null | project/enums/string_types_enum.py | vinibiavatti1/PythonFlaskCms | e43a4db84d1f77a5f66b1f8fcb9dc96e05e6c023 | [
"MIT"
] | null | null | null | """
String format type value enumeration.
"""
TRUE = '1'
FALSE = '0'
NONE = ''
| 11.285714 | 37 | 0.594937 |
cd52a473787d5199c37a49a98543ea8b45caa074 | 90 | py | Python | LTA/museums/admin.py | valeriimartsyshyn/lviv_tourist_adviser | e8ce0c7ba97262b2d181e3373eb806f4dcc9bbf1 | [
"MIT"
] | null | null | null | LTA/museums/admin.py | valeriimartsyshyn/lviv_tourist_adviser | e8ce0c7ba97262b2d181e3373eb806f4dcc9bbf1 | [
"MIT"
] | 1 | 2021-09-27T06:33:26.000Z | 2021-09-27T06:33:26.000Z | LTA/museums/admin.py | valeriimartsyshyn/lviv_tourist_adviser | e8ce0c7ba97262b2d181e3373eb806f4dcc9bbf1 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Museums
admin.site.register(Museums) | 22.5 | 32 | 0.833333 |
cd537e30b909d9612963bfa8b8f1c4d920b60f98 | 1,584 | py | Python | grailapp-osc-6a60f9376f69/setup.py | yuan7407/TD_OpenCV_PythonOSC | f4424b1f7155f7942397212b97183cb749612f50 | [
"MIT"
] | 20 | 2018-12-06T21:35:10.000Z | 2022-02-08T23:22:35.000Z | grailapp-osc-6a60f9376f69/setup.py | phoebezhung/TD_OpenCV_PythonOSC | f4424b1f7155f7942397212b97183cb749612f50 | [
"MIT"
] | null | null | null | grailapp-osc-6a60f9376f69/setup.py | phoebezhung/TD_OpenCV_PythonOSC | f4424b1f7155f7942397212b97183cb749612f50 | [
"MIT"
] | 4 | 2019-02-27T08:13:45.000Z | 2021-11-02T15:14:41.000Z | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
setup
~~~~~
Setup Script
Run the build process by running the command 'python setup.py build'
:copyright: (c) 2018 by Oleksii Lytvyn.
:license: MIT, see LICENSE for more details.
"""
import osc.osc as osc
try:
from setuptools import setup... | 31.058824 | 92 | 0.621212 |
cd5534b9b393b4ca6ad72c44a3438fcc6e74b3d0 | 2,501 | py | Python | socketshark/utils.py | Play2Live/socketshark | 9b1e40654bf629c593079fb44c548911d4c864af | [
"MIT"
] | null | null | null | socketshark/utils.py | Play2Live/socketshark | 9b1e40654bf629c593079fb44c548911d4c864af | [
"MIT"
] | null | null | null | socketshark/utils.py | Play2Live/socketshark | 9b1e40654bf629c593079fb44c548911d4c864af | [
"MIT"
] | null | null | null | import asyncio
import ssl
import aiohttp
from . import constants as c
def _get_rate_limit_wait(log, resp, opts):
"""
Returns the number of seconds we should wait given a 429 HTTP response and
HTTP options.
"""
max_wait = 3600
wait = opts['wait']
header_name = opts['rate_limit_reset_he... | 35.225352 | 78 | 0.551779 |
cd592812165ebec71f40378868573e5f9eda72b9 | 252 | py | Python | download_and_create_reference_datasets/v02/create_ht__clinvar.py | NLSVTN/hail-elasticsearch-pipelines | 8b895a2e46a33d347dd2a1024101a6d515027a03 | [
"MIT"
] | 15 | 2017-11-22T14:48:04.000Z | 2020-10-05T18:22:24.000Z | download_and_create_reference_datasets/v02/create_ht__clinvar.py | NLSVTN/hail-elasticsearch-pipelines | 8b895a2e46a33d347dd2a1024101a6d515027a03 | [
"MIT"
] | 94 | 2020-10-21T17:37:57.000Z | 2022-03-29T14:59:46.000Z | download_and_create_reference_datasets/v02/create_ht__clinvar.py | NLSVTN/hail-elasticsearch-pipelines | 8b895a2e46a33d347dd2a1024101a6d515027a03 | [
"MIT"
] | 7 | 2019-01-29T09:08:10.000Z | 2020-02-25T16:22:57.000Z | #!/usr/bin/env python3
from kubernetes.shell_utils import simple_run as run
run((
"python3 gcloud_dataproc/v02/run_script.py "
"--cluster create-ht-clinvar "
"download_and_create_reference_datasets/v02/hail_scripts/write_clinvar_ht.py"))
| 28 | 83 | 0.77381 |
cd597b04327e251c7079f983fdc1e98e38cf4a8a | 4,324 | py | Python | cogs/member_.py | himo1101/NFlegel | 7621f5d71b41b71faaf44d142f3b903b0471873a | [
"MIT"
] | null | null | null | cogs/member_.py | himo1101/NFlegel | 7621f5d71b41b71faaf44d142f3b903b0471873a | [
"MIT"
] | null | null | null | cogs/member_.py | himo1101/NFlegel | 7621f5d71b41b71faaf44d142f3b903b0471873a | [
"MIT"
] | null | null | null | from discord.ext import commands
from flegelapi.pg import default, server
from distutils.util import strtobool
import discord
member_table= """ member_(
id serial PRIMARY KEY,
server_id interger NOT NULL,
role_ld interger,
channel_id interger,
custom_mes character varying DEFAULT ,
on_off boole... | 32.757576 | 102 | 0.56568 |
cd59d9b93bd906d8d50478926274bfcb5696cb98 | 4,388 | py | Python | old/policy_grads2.py | DarkElement75/cartpole-policy-gradients | ca6b7fb826fa023e2d845408d3d16d8032b07508 | [
"MIT"
] | null | null | null | old/policy_grads2.py | DarkElement75/cartpole-policy-gradients | ca6b7fb826fa023e2d845408d3d16d8032b07508 | [
"MIT"
] | null | null | null | old/policy_grads2.py | DarkElement75/cartpole-policy-gradients | ca6b7fb826fa023e2d845408d3d16d8032b07508 | [
"MIT"
] | null | null | null | import gym
import numpy as np
import sys
import theano
import theano.tensor as T
import layers
from layers import FullyConnectedLayer, SoftmaxLayer
env = gym.make('CartPole-v0')
#Number of actions
action_n = env.action_space.n
#Number of features observed
feature_n = env.observation_space.shape[0]
epochs = 100
min... | 26.756098 | 120 | 0.635369 |
cd5a19f0cbafdf639c273ea9eebb620d7cbc509e | 7,720 | py | Python | client.py | andreidorin13/cs544-messaging-protocol | 40d26cb20234a4ad58095150795946aceaf9e4d4 | [
"MIT"
] | null | null | null | client.py | andreidorin13/cs544-messaging-protocol | 40d26cb20234a4ad58095150795946aceaf9e4d4 | [
"MIT"
] | null | null | null | client.py | andreidorin13/cs544-messaging-protocol | 40d26cb20234a4ad58095150795946aceaf9e4d4 | [
"MIT"
] | null | null | null | #!/usr/bin/python
'''
Andrei Dorin
06/10/2018
User interface for WISP chat implementation
'''
import argparse
import logging
import signal
import sys
import time
import queue
import select
import getpass
from wisp_client import WispClient
from wisp_common import State, WispRequest, WispResponse, WispMessage, WISP_DEF... | 32.166667 | 116 | 0.584197 |
cd5a2073c9ceff87b49af728a52895c0f1961f0b | 61 | py | Python | newpy/loggers/__init__.py | janithPet/newpy | feb264f4e3da371c3f2ddc7633f3fdd5a25db661 | [
"MIT"
] | null | null | null | newpy/loggers/__init__.py | janithPet/newpy | feb264f4e3da371c3f2ddc7633f3fdd5a25db661 | [
"MIT"
] | 4 | 2021-09-03T06:18:29.000Z | 2021-09-03T08:36:25.000Z | newpy/loggers/__init__.py | janithPet/newpy | feb264f4e3da371c3f2ddc7633f3fdd5a25db661 | [
"MIT"
] | null | null | null | from newpy.loggers.colored_formatter import ColoredFormatter
| 30.5 | 60 | 0.901639 |
cd5d8710df3d01c40879c8b39d50c6ffb79da254 | 181 | py | Python | putao/source/__init__.py | ongyx/putao | e901402308b9b4c3c9acf8dae15eb4781ddfcede | [
"MIT"
] | 7 | 2021-06-29T00:50:46.000Z | 2021-10-14T23:31:12.000Z | putao/source/__init__.py | ongyx/putao | e901402308b9b4c3c9acf8dae15eb4781ddfcede | [
"MIT"
] | 2 | 2021-08-28T05:34:01.000Z | 2021-08-29T05:03:34.000Z | putao/source/__init__.py | ongyx/putao | e901402308b9b4c3c9acf8dae15eb4781ddfcede | [
"MIT"
] | null | null | null | # coding: utf8
"""Sources provide an abstraction between a source of music notes and putao projects."""
from . import mml # noqa
from .reg import formats, loads, register # noqa
| 30.166667 | 88 | 0.734807 |
cd5dd7dda160122dc7f0149e4f5abf4d8e95ebe4 | 206 | py | Python | parser/src/test/test-data/math_csc.py | luciansmith/sedml-script | d891645d0b3f89ff190fc7e719659c8e229c07da | [
"MIT"
] | null | null | null | parser/src/test/test-data/math_csc.py | luciansmith/sedml-script | d891645d0b3f89ff190fc7e719659c8e229c07da | [
"MIT"
] | null | null | null | parser/src/test/test-data/math_csc.py | luciansmith/sedml-script | d891645d0b3f89ff190fc7e719659c8e229c07da | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created by libsedmlscript v0.0.1
"""
from sed_roadrunner import model, task, plot
from mpmath import csc
#----------------------------------------------
csc(0.5)
| 15.846154 | 48 | 0.475728 |
cd5e1e26e39c56d3ae62b8fd2032ab324293acc8 | 526 | py | Python | lib/redis_set_get.py | InformaticsResearchCenter/ITeung | 2e3f76294c3affca07934293cdeb46d6d618180a | [
"MIT"
] | null | null | null | lib/redis_set_get.py | InformaticsResearchCenter/ITeung | 2e3f76294c3affca07934293cdeb46d6d618180a | [
"MIT"
] | 37 | 2020-03-22T23:21:14.000Z | 2020-09-16T15:07:06.000Z | lib/redis_set_get.py | InformaticsResearchCenter/ITeung | 2e3f76294c3affca07934293cdeb46d6d618180a | [
"MIT"
] | 1 | 2020-09-08T11:31:30.000Z | 2020-09-08T11:31:30.000Z | import redis | 21.04 | 48 | 0.579848 |
cd5e82adedde50cba3e364b3ccb25d0a6e80401a | 18,185 | py | Python | FTDISPI.py | g-i-wilson/spi-tools | 1c961a97572a366235f9f3b0517d8201fa8be371 | [
"MIT"
] | 1 | 2022-03-22T20:44:01.000Z | 2022-03-22T20:44:01.000Z | FTDISPI.py | g-i-wilson/spi-tools | 1c961a97572a366235f9f3b0517d8201fa8be371 | [
"MIT"
] | null | null | null | FTDISPI.py | g-i-wilson/spi-tools | 1c961a97572a366235f9f3b0517d8201fa8be371 | [
"MIT"
] | null | null | null | from pyftdi.spi import SpiController
from pyftdi.gpio import GpioSyncController
import serial
import time
import sys
import JSONFile
dbg = False
def ui_hex(str):
return int(str,16)
def uiLoopHelp():
print()
print("Command set:")
print()
print("write <REG_NAME> XXXX1010 1XXXXXX0 | W... | 36.081349 | 144 | 0.534451 |
cd63c34fbdfbd183f707a4b54997655b51643809 | 3,417 | py | Python | src/onegov/gazette/views/groups.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/gazette/views/groups.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/gazette/views/groups.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from morepath import redirect
from onegov.core.security import Private
from onegov.gazette import _
from onegov.gazette import GazetteApp
from onegov.gazette.forms import EmptyForm
from onegov.gazette.layout import Layout
from onegov.user import UserGroup
from onegov.user import UserGroupCollection
from onegov.user.for... | 23.244898 | 66 | 0.605502 |
cd6412162ab8b14b43aaaa41358897ddfe50fe48 | 136 | py | Python | dlpt/__init__.py | damogranlabs/dlpt | e4cdbaf4b5496ed985eb255b17294aa7cf3d35e4 | [
"MIT"
] | 5 | 2021-08-09T19:39:06.000Z | 2022-03-22T11:21:29.000Z | dlpt/__init__.py | damogranlabs/dlpt | e4cdbaf4b5496ed985eb255b17294aa7cf3d35e4 | [
"MIT"
] | null | null | null | dlpt/__init__.py | damogranlabs/dlpt | e4cdbaf4b5496ed985eb255b17294aa7cf3d35e4 | [
"MIT"
] | null | null | null | from . import utils
from . import pth
from . import proc
from . import log
from . import json
from . import time
from . import importer
| 17 | 22 | 0.742647 |
cd64ffc5e28a3c1d060e7cdf2e73c1f3c1f202dd | 1,466 | py | Python | personal_utilities/fourier_filters.py | dbstein/personal_utilities | 3a4c7d2416b13a87f88fc0e400b299d648e1e541 | [
"Apache-2.0"
] | null | null | null | personal_utilities/fourier_filters.py | dbstein/personal_utilities | 3a4c7d2416b13a87f88fc0e400b299d648e1e541 | [
"Apache-2.0"
] | null | null | null | personal_utilities/fourier_filters.py | dbstein/personal_utilities | 3a4c7d2416b13a87f88fc0e400b299d648e1e541 | [
"Apache-2.0"
] | null | null | null | import numpy as np
| 34.093023 | 78 | 0.563438 |
cd67c54b1e46edcb715070c6ab83abb9ea55fa6d | 1,178 | py | Python | sloth/simple.py | codacy-badger/sloth | a4f2118b2f19e55271613d43c785aaf4ab030b5e | [
"MIT"
] | 1 | 2021-02-11T12:14:23.000Z | 2021-02-11T12:14:23.000Z | src/sloth/simple.py | Legorooj/sloth | 47f6358349f8545fc475efab19edd6efda3ffbcd | [
"MIT"
] | null | null | null | src/sloth/simple.py | Legorooj/sloth | 47f6358349f8545fc475efab19edd6efda3ffbcd | [
"MIT"
] | null | null | null | # ----------------------------------------------------------------------------
# Copyright (c) 2020 Legorooj <legorooj@protonmail.com>
# Copyright (c) 2020 FluffyKoalas <github.com/fluffykoalas>
# This file and all others in this project are licensed under the MIT license.
# Please see the LICENSE file in the root of t... | 32.722222 | 78 | 0.616299 |
cd682359aededb5fca5a5b75e857cce2e964a4f3 | 1,385 | py | Python | Final/P2Pchat.py | cainanBlack/csc321 | 9cebf9c3b61befda932732316b7406f1462c0bee | [
"MIT"
] | null | null | null | Final/P2Pchat.py | cainanBlack/csc321 | 9cebf9c3b61befda932732316b7406f1462c0bee | [
"MIT"
] | null | null | null | Final/P2Pchat.py | cainanBlack/csc321 | 9cebf9c3b61befda932732316b7406f1462c0bee | [
"MIT"
] | null | null | null | import netifaces
import argparse
import os
import zmq
import threading
if __name__ == '__main__':
main()
| 26.634615 | 102 | 0.626715 |
cd68c50658ac006c458874597809bf7939658dff | 83 | py | Python | examples/object/reference/change_list.py | zqmillet/kinopico_python_book | 0db4b0a904a1ba1b7e90cf971871e134941aeb65 | [
"MIT"
] | null | null | null | examples/object/reference/change_list.py | zqmillet/kinopico_python_book | 0db4b0a904a1ba1b7e90cf971871e134941aeb65 | [
"MIT"
] | null | null | null | examples/object/reference/change_list.py | zqmillet/kinopico_python_book | 0db4b0a904a1ba1b7e90cf971871e134941aeb65 | [
"MIT"
] | null | null | null | a = [1, 2, 3]
b = a
a[0] = 'gouliguojiashengsiyi'
print('a =', a)
print('b =', b)
| 11.857143 | 29 | 0.506024 |
cd6940cd949b8d012c79a302492e17dd59770ba1 | 2,267 | py | Python | source/CTRW.py | tangxiangong/ClassTop | fdafdafd165672ae464210fb8c66c70256d50956 | [
"MIT"
] | null | null | null | source/CTRW.py | tangxiangong/ClassTop | fdafdafd165672ae464210fb8c66c70256d50956 | [
"MIT"
] | null | null | null | source/CTRW.py | tangxiangong/ClassTop | fdafdafd165672ae464210fb8c66c70256d50956 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# @Time : 2021/12/1 13:27
import numpy as np
from numpy import random
import matplotlib.pyplot as plt
from trajectory import Trajectory
from rnd import stable_rnd, skewed_stable_rnd
if __name__ == "__main__":
m1 = CTRW(100, 1, 2)
t1, x1 = m1.get()
fig1 = pl... | 27.313253 | 70 | 0.549625 |
cd6b149fb6473adbe7fd7149968a3e8e9f36d8bd | 901 | py | Python | src/conversion_spec_file_reader.py | Eldar1205/exchanger-python-demo-app | 6733ff6044555f8c4639dc6e25baf4ef51401fd9 | [
"MIT"
] | 7 | 2021-08-31T09:03:39.000Z | 2021-09-27T13:45:58.000Z | src/conversion_spec_file_reader.py | Eldar1205/exchanger-python-demo-app | 6733ff6044555f8c4639dc6e25baf4ef51401fd9 | [
"MIT"
] | null | null | null | src/conversion_spec_file_reader.py | Eldar1205/exchanger-python-demo-app | 6733ff6044555f8c4639dc6e25baf4ef51401fd9 | [
"MIT"
] | null | null | null | import aiofiles
import asyncstdlib
from pydantic.types import PositiveFloat
from conversion_parameters import ConversionParameters
from conversion_spec import ConversionSpec, Currency
from conversion_spec_provider import ConversionSpecProvider
| 37.541667 | 109 | 0.783574 |
cd6b1d33d27551aa6e7a920f48a0b7633b6280b3 | 3,931 | py | Python | Paris_G_1-2-3_v2.py | Gaspe-R/Rendez-vous-prefecture-Paris | e24d1bf0ae6ca5860ad858957c5e923c0ac3d85a | [
"MIT"
] | null | null | null | Paris_G_1-2-3_v2.py | Gaspe-R/Rendez-vous-prefecture-Paris | e24d1bf0ae6ca5860ad858957c5e923c0ac3d85a | [
"MIT"
] | null | null | null | Paris_G_1-2-3_v2.py | Gaspe-R/Rendez-vous-prefecture-Paris | e24d1bf0ae6ca5860ad858957c5e923c0ac3d85a | [
"MIT"
] | null | null | null | from sqlite3 import Date
from twilio.rest import Client
from datetime import datetime
from playsound import playsound
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
import csv
import time
################################ "PREFCTURE DE PARIS" ###########################... | 36.738318 | 126 | 0.522768 |
cd6d9b2b982fd93ff60ad7ad2c61547c26a40708 | 3,022 | py | Python | movo_common/si_utils/src/si_utils/my_tf_listener.py | ALAN-NUS/kinova_movo | 05a0451f5c563359ae0ffe3280e1df85caec9e55 | [
"BSD-3-Clause"
] | 1 | 2021-03-26T06:33:28.000Z | 2021-03-26T06:33:28.000Z | movo_common/si_utils/src/si_utils/my_tf_listener.py | ALAN-NUS/kinova_movo | 05a0451f5c563359ae0ffe3280e1df85caec9e55 | [
"BSD-3-Clause"
] | null | null | null | movo_common/si_utils/src/si_utils/my_tf_listener.py | ALAN-NUS/kinova_movo | 05a0451f5c563359ae0ffe3280e1df85caec9e55 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import rospy
import math
import tf
import geometry_msgs.msg
from geometry_msgs.msg import PoseStamped
from si_utils.lx_transformerROS import my_transformer
if __name__ == '__main__':
rospy.init_node('my_tf_listener')
listener = tf.TransformListener()
# my_trans = my_transformer()
... | 35.139535 | 122 | 0.634348 |
cd6e8efff351684ee42b6f8c78aec9644cacd755 | 8,661 | py | Python | acme_tiny.py | dennydai/docker-letsencrypt | 898fa70665d321e527c7fcc463a57a66dbbdab26 | [
"MIT"
] | 22 | 2015-12-06T06:19:43.000Z | 2016-03-10T06:44:34.000Z | acme_tiny.py | dennydai/docker-letsencrypt | 898fa70665d321e527c7fcc463a57a66dbbdab26 | [
"MIT"
] | 1 | 2016-09-11T07:38:45.000Z | 2016-09-11T10:50:26.000Z | acme_tiny.py | dennydai/docker-letsencrypt | 898fa70665d321e527c7fcc463a57a66dbbdab26 | [
"MIT"
] | 4 | 2015-12-22T01:25:16.000Z | 2016-01-14T13:24:27.000Z | #!/usr/bin/env python
import argparse, subprocess, json, os, os.path, urllib2, sys, base64, binascii, time, \
hashlib, re, copy, textwrap
#CA = "https://acme-staging.api.letsencrypt.org"
CA = "https://acme-v01.api.letsencrypt.org"
if __name__ == "__main__":
parser = argparse.ArgumentParser(
formatter_... | 43.522613 | 221 | 0.592772 |
cd6f36cb0dc0dd674280cb84b43ef766b0e9c395 | 14,691 | py | Python | Draft/08_compare_original_GBS_Exome_biallelic_variation_alle_count.py | peipeiwang6/Genomic_prediction_in_Switchgrass | 1fba3508c0d81d16e0629e3cf94ff4d174a85b13 | [
"MIT"
] | null | null | null | Draft/08_compare_original_GBS_Exome_biallelic_variation_alle_count.py | peipeiwang6/Genomic_prediction_in_Switchgrass | 1fba3508c0d81d16e0629e3cf94ff4d174a85b13 | [
"MIT"
] | null | null | null | Draft/08_compare_original_GBS_Exome_biallelic_variation_alle_count.py | peipeiwang6/Genomic_prediction_in_Switchgrass | 1fba3508c0d81d16e0629e3cf94ff4d174a85b13 | [
"MIT"
] | null | null | null | '''
imput1: exome capture, biallelic indel matrix
input2: exome capture, biallelic SNP matrix
input3: GBS, biallelic indel matrix
input4: GBS, biallelic SNP matrix
input5: allele count file for exome homozygous or heterozygous genotype
input6: allele count file for GBS homozygous or heterozygous genotype
input7: tetrap... | 39.176 | 327 | 0.571166 |
cd7225d8ec41e4d30a72fb83efb498273f5b3bbc | 132 | py | Python | platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/viper/calculators/calc_frame.py | PascalGuenther/gecko_sdk | 2e82050dc8823c9fe0e8908c1b2666fb83056230 | [
"Zlib"
] | 82 | 2016-06-29T17:24:43.000Z | 2021-04-16T06:49:17.000Z | platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/viper/calculators/calc_frame.py | PascalGuenther/gecko_sdk | 2e82050dc8823c9fe0e8908c1b2666fb83056230 | [
"Zlib"
] | 6 | 2022-01-12T18:22:08.000Z | 2022-03-25T10:19:27.000Z | platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/viper/calculators/calc_frame.py | PascalGuenther/gecko_sdk | 2e82050dc8823c9fe0e8908c1b2666fb83056230 | [
"Zlib"
] | 56 | 2016-08-02T10:50:50.000Z | 2021-07-19T08:57:34.000Z | from pyradioconfig.parts.bobcat.calculators.calc_frame import Calc_Frame_Bobcat | 33 | 79 | 0.863636 |
cd7529c73cff8550931b72e595537b4c1b291bee | 1,940 | py | Python | scripts/stats_wrapper.py | gpertea/regtools | a59d5dbd3268b0d83412e6fe81cf7e924c7bcb7c | [
"MIT"
] | 70 | 2015-08-05T21:32:51.000Z | 2021-11-26T13:26:33.000Z | scripts/stats_wrapper.py | gpertea/regtools | a59d5dbd3268b0d83412e6fe81cf7e924c7bcb7c | [
"MIT"
] | 145 | 2015-08-05T22:27:58.000Z | 2022-03-14T21:50:17.000Z | scripts/stats_wrapper.py | gpertea/regtools | a59d5dbd3268b0d83412e6fe81cf7e924c7bcb7c | [
"MIT"
] | 29 | 2015-08-01T02:19:40.000Z | 2021-12-16T20:02:40.000Z | import glob
import subprocess
import os
import argparse
import shutil
input_parser = argparse.ArgumentParser(
description="Run RegTools stats script",
)
input_parser.add_argument(
'tag',
help="Variant tag parameter used to run RegTools.",
)
args = input_parser.parse_args()
tag = args.tag
cwd = os.getcwd(... | 33.448276 | 107 | 0.676804 |
cd7892510c7f345ccc184879db2d6bb6e417c44a | 451 | py | Python | lib/model/utils/plt_loss.py | PhoneSix/Domain-Contrast | 5c674b581bce9beacf5bc0dd13113f33c4050495 | [
"MIT"
] | 4 | 2021-07-31T01:04:15.000Z | 2022-03-09T07:23:10.000Z | lib/model/utils/plt_loss.py | PhoneSix/Domain-Contrast | 5c674b581bce9beacf5bc0dd13113f33c4050495 | [
"MIT"
] | null | null | null | lib/model/utils/plt_loss.py | PhoneSix/Domain-Contrast | 5c674b581bce9beacf5bc0dd13113f33c4050495 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import os | 25.055556 | 47 | 0.62306 |
cd78d6e1151155e18754cebc1cc2d5b9e9efa63f | 3,267 | py | Python | ocellaris/utils/alarm.py | TormodLandet/Ocellaris | 6b4b2515fb881b1ed8d8fd8d8c23a8e1990ada58 | [
"Apache-2.0"
] | 1 | 2017-11-07T12:19:44.000Z | 2017-11-07T12:19:44.000Z | ocellaris/utils/alarm.py | TormodLandet/Ocellaris | 6b4b2515fb881b1ed8d8fd8d8c23a8e1990ada58 | [
"Apache-2.0"
] | null | null | null | ocellaris/utils/alarm.py | TormodLandet/Ocellaris | 6b4b2515fb881b1ed8d8fd8d8c23a8e1990ada58 | [
"Apache-2.0"
] | 2 | 2018-05-02T17:17:01.000Z | 2019-03-11T13:09:40.000Z | # Copyright (C) 2018-2019 Tormod Landet
# SPDX-License-Identifier: Apache-2.0
"""
A timeout context manager based on SIGALRM, Permits multiple
SIGALRM events to be queued.
Uses a `heapq` to store the objects to be called when an alarm signal is
raised, so that the next alarm is always at the top of the heap.
Note: SI... | 25.724409 | 94 | 0.653811 |
cd79597c4dc624f2537254fe68c7bb39e5b6003c | 2,549 | py | Python | apps/insar.py | giswqs/streamlit-insar | e2c0897f01aeff96cd119cce8cf6dd3d8fb0e455 | [
"MIT"
] | 5 | 2021-12-14T23:28:36.000Z | 2022-02-27T14:35:29.000Z | apps/insar.py | giswqs/streamlit-insar | e2c0897f01aeff96cd119cce8cf6dd3d8fb0e455 | [
"MIT"
] | null | null | null | apps/insar.py | giswqs/streamlit-insar | e2c0897f01aeff96cd119cce8cf6dd3d8fb0e455 | [
"MIT"
] | null | null | null | import folium
import altair as alt
import leafmap.foliumap as leafmap
import pandas as pd
import streamlit as st
| 25.747475 | 85 | 0.433503 |
cd7a330fb695d24e5d3e2270fbbe2e1e0d11d2dc | 2,105 | py | Python | solve_net.py | a1exwang/theano-cnn-intro | 5f6ecdcb2908afb34a7d94e69b1d1ab13beb3c62 | [
"MIT"
] | null | null | null | solve_net.py | a1exwang/theano-cnn-intro | 5f6ecdcb2908afb34a7d94e69b1d1ab13beb3c62 | [
"MIT"
] | null | null | null | solve_net.py | a1exwang/theano-cnn-intro | 5f6ecdcb2908afb34a7d94e69b1d1ab13beb3c62 | [
"MIT"
] | null | null | null | from utils import LOG_INFO
import numpy as np
| 39.716981 | 116 | 0.443705 |
cd7b0a77a1f93e1e0546019ec5051874f1e448ee | 1,199 | py | Python | playground/test1.py | mathee92/unirentalz | 803c58628ebda002e2c127db11fbaddf181ef394 | [
"MIT"
] | null | null | null | playground/test1.py | mathee92/unirentalz | 803c58628ebda002e2c127db11fbaddf181ef394 | [
"MIT"
] | null | null | null | playground/test1.py | mathee92/unirentalz | 803c58628ebda002e2c127db11fbaddf181ef394 | [
"MIT"
] | null | null | null | # -----------
# User Instructions
#
# Modify the valid_month() function to verify
# whether the data a user enters is a valid
# month. If the passed in parameter 'month'
# is not a valid month, return None.
# If 'month' is a valid month, then return
# the name of the month with the first letter
# capitalized.
#
... | 18.734375 | 46 | 0.539616 |
cd7da929a4d4176f292520c09ac6f877772c0b49 | 2,274 | py | Python | hookio/logs.py | Marak/hook.io-sdk-python | 722b04eb0832ef712d5dcd491899996088e1aa8b | [
"Unlicense"
] | 1 | 2021-06-15T11:52:44.000Z | 2021-06-15T11:52:44.000Z | hookio/logs.py | Marak/hook.io-sdk-python | 722b04eb0832ef712d5dcd491899996088e1aa8b | [
"Unlicense"
] | null | null | null | hookio/logs.py | Marak/hook.io-sdk-python | 722b04eb0832ef712d5dcd491899996088e1aa8b | [
"Unlicense"
] | null | null | null | import sys
import weakref
import json
import logging
from .utils import opt_json, Response2JSONLinesIterator
from six import StringIO
log = logging.getLogger(__name__)
| 35.53125 | 87 | 0.575638 |
cd7e21c2d43aa6b5ca80b05a26cc762c012f19a7 | 228 | py | Python | data/__init__.py | opconty/keras_std | 26cbe25c525128a067a97157bca0b060f40e5ec8 | [
"Apache-2.0"
] | 18 | 2019-07-16T10:54:29.000Z | 2021-03-16T00:34:23.000Z | data/__init__.py | opconty/keras_std | 26cbe25c525128a067a97157bca0b060f40e5ec8 | [
"Apache-2.0"
] | 2 | 2019-08-26T11:40:12.000Z | 2019-12-07T13:18:48.000Z | data/__init__.py | opconty/keras_std | 26cbe25c525128a067a97157bca0b060f40e5ec8 | [
"Apache-2.0"
] | 8 | 2019-07-17T08:26:10.000Z | 2021-03-16T00:34:17.000Z | #-*- coding:utf-8 -*-
#'''
# Created on 19-7-16 2:14
#
# @Author: Greg Gao(laygin)
#'''
from .synth_text import SynthTextConfig, SynthTextDataset
from .icdar13 import IcdarConfig, IcdarDataset
from .img_aug import resize_image | 25.333333 | 57 | 0.736842 |
cd7f21d270d7885499684e88d3eb5ad2fac11de9 | 6,376 | py | Python | alberto/annotation/train.py | lettomobile/DeepPoseKit | a922d2d99cd55d0a3909c1f3f8b2bf8c377ff503 | [
"Apache-2.0"
] | 1 | 2021-11-01T02:08:00.000Z | 2021-11-01T02:08:00.000Z | alberto/annotation/train.py | albertoursino/DeepPoseKit | a922d2d99cd55d0a3909c1f3f8b2bf8c377ff503 | [
"Apache-2.0"
] | null | null | null | alberto/annotation/train.py | albertoursino/DeepPoseKit | a922d2d99cd55d0a3909c1f3f8b2bf8c377ff503 | [
"Apache-2.0"
] | null | null | null | from alberto.annotation import annotation_set
from pandas import np
from deepposekit.io import TrainingGenerator, DataGenerator
from deepposekit.augment import FlipAxis
import imgaug.augmenters as iaa
import imgaug as ia
from deepposekit.models import StackedHourglass
from deepposekit.models import load_model
import ... | 32.697436 | 132 | 0.606336 |
cd8237accaa927ddf6513747162736a47cc442f6 | 763 | py | Python | northpole/settings/local_staging.py | mhotwagner/northpole | 7d904d919aeb6a36549750ee0700578246896691 | [
"MIT"
] | null | null | null | northpole/settings/local_staging.py | mhotwagner/northpole | 7d904d919aeb6a36549750ee0700578246896691 | [
"MIT"
] | null | null | null | northpole/settings/local_staging.py | mhotwagner/northpole | 7d904d919aeb6a36549750ee0700578246896691 | [
"MIT"
] | null | null | null | from .base import *
from dotenv import load_dotenv
load_dotenv(dotenv_path='northpole/.staging.env', verbose=True)
ALLOWED_HOSTS = ['*']
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': os.get... | 25.433333 | 64 | 0.651376 |
cd836f4eaf2d0f0894b304e6d9d109cacae91338 | 12,587 | py | Python | bc4py/bip32/bip32.py | namuyan/bc4py | 6484d356096261d0d57e9e1f5ffeae1f9a9865f3 | [
"MIT"
] | 12 | 2018-09-19T14:02:09.000Z | 2020-01-27T16:20:14.000Z | bc4py/bip32/bip32.py | kumacoinproject/bc4py | 6484d356096261d0d57e9e1f5ffeae1f9a9865f3 | [
"MIT"
] | 1 | 2020-03-19T16:57:30.000Z | 2020-03-19T16:57:30.000Z | bc4py/bip32/bip32.py | namuyan/bc4py | 6484d356096261d0d57e9e1f5ffeae1f9a9865f3 | [
"MIT"
] | 6 | 2018-11-13T17:20:14.000Z | 2020-02-15T11:46:52.000Z | #!/usr/bin/env python
#
# Copyright 2014 Corgan Labs
# See LICENSE.txt for distribution terms
#
from bc4py.bip32.base58 import check_decode, check_encode
from bc4py_extension import PyAddress
from ecdsa.curves import SECP256k1
from ecdsa.keys import SigningKey, VerifyingKey, square_root_mod_prime as mod_sqrt
from ecds... | 37.573134 | 126 | 0.593072 |
cd83dd3751ba2089366bb8592c6a8484b3986736 | 1,167 | py | Python | lib/utils/useragent.py | cckuailong/pocsploit | fe4a3154e59d2bebd55ccfdf62f4f7efb21b5a2a | [
"MIT"
] | 106 | 2022-03-18T06:51:09.000Z | 2022-03-31T19:11:41.000Z | lib/utils/useragent.py | cckuailong/pocsploit | fe4a3154e59d2bebd55ccfdf62f4f7efb21b5a2a | [
"MIT"
] | 5 | 2022-03-27T07:37:32.000Z | 2022-03-31T13:56:11.000Z | lib/utils/useragent.py | cckuailong/pocsploit | fe4a3154e59d2bebd55ccfdf62f4f7efb21b5a2a | [
"MIT"
] | 30 | 2022-03-21T01:27:08.000Z | 2022-03-31T12:28:01.000Z | import random
from loguru import logger
from lib.vars.vars import conf, th, paths
from lib.vars.ua import UA_LIST
| 28.463415 | 184 | 0.685518 |
cd865fa7395cf48130baac47f65fb9a0acdb8fa6 | 1,378 | py | Python | etapa 2/gaussJacobi.py | jlucartc/MetodosNumericos20182 | d5610b95945ed6ec9b9bae6cd96672f4d616c1b9 | [
"MIT"
] | null | null | null | etapa 2/gaussJacobi.py | jlucartc/MetodosNumericos20182 | d5610b95945ed6ec9b9bae6cd96672f4d616c1b9 | [
"MIT"
] | null | null | null | etapa 2/gaussJacobi.py | jlucartc/MetodosNumericos20182 | d5610b95945ed6ec9b9bae6cd96672f4d616c1b9 | [
"MIT"
] | null | null | null | import numpy as np
from sympy import *
from math import *
from timeit import default_timer as timer
start = None
end = None
A = np.matrix(eval(input("Digite uma matriz : ")))
A = A.astype(float)
X = np.matrix(eval(input("Digite X : ")))
e = float(input("Digite a preciso: "))
B = np.copy(A[:,A.shape[1]-1])
A = np.d... | 18.621622 | 78 | 0.523948 |
cd8770a9a9b49ceb88698ef2075f53487bd2aca7 | 8,139 | py | Python | custom_libs/Project2/plotter.py | drkostas/COSC522 | 5731576301daf99ca7c3d382fe3ea8b1398008ff | [
"MIT"
] | 1 | 2021-12-22T14:29:42.000Z | 2021-12-22T14:29:42.000Z | custom_libs/Project2/plotter.py | drkostas/COSC522 | 5731576301daf99ca7c3d382fe3ea8b1398008ff | [
"MIT"
] | 3 | 2021-10-13T02:14:30.000Z | 2021-11-24T05:28:32.000Z | custom_libs/Project2/plotter.py | drkostas/COSC522 | 5731576301daf99ca7c3d382fe3ea8b1398008ff | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
import numpy as np
| 44.966851 | 110 | 0.578327 |
cd887102450875f1d2f5fd98ea87c44fd4dd0888 | 303 | py | Python | Python/8/SquareSum/square_sum.py | hwakabh/codewars | 7afce5a7424d35abc55c350301ac134f2d3edd3d | [
"MIT"
] | null | null | null | Python/8/SquareSum/square_sum.py | hwakabh/codewars | 7afce5a7424d35abc55c350301ac134f2d3edd3d | [
"MIT"
] | 6 | 2020-02-21T17:01:59.000Z | 2021-05-04T07:04:41.000Z | Python/8/SquareSum/square_sum.py | hwakabh/codewars | 7afce5a7424d35abc55c350301ac134f2d3edd3d | [
"MIT"
] | null | null | null | import sys
if __name__ == "__main__":
if len(sys.argv) == 1:
nums = [int(e) for e in input('>>> Enter the numbers with comma-separeted: ').split(',')]
print(square_sum(numbers=nums))
else:
sys.exit(1) | 23.307692 | 97 | 0.590759 |
cd88a71325bc436cee432caaafbbae9750fb46b0 | 5,710 | py | Python | spatial_ops/lazy_loader.py | LucaMarconato/spatial_ops | 86e5b8557db9efa2ca263098ed47c16de05fab00 | [
"MIT"
] | null | null | null | spatial_ops/lazy_loader.py | LucaMarconato/spatial_ops | 86e5b8557db9efa2ca263098ed47c16de05fab00 | [
"MIT"
] | null | null | null | spatial_ops/lazy_loader.py | LucaMarconato/spatial_ops | 86e5b8557db9efa2ca263098ed47c16de05fab00 | [
"MIT"
] | null | null | null | import os
import pickle
from abc import ABC, abstractmethod
import h5py
import numpy as np
from .folders import get_pickle_lazy_loader_data_path, hdf5_lazy_loader_data_path
from .unpickler import CustomUnpickler
def load_data(self, store_precomputation_on_disk=True):
if self.associated_instance is None... | 33.588235 | 117 | 0.680911 |
cd89017afbf663624d11e9b8f48f90440b465747 | 27,270 | py | Python | connector/binance/websockets.py | firebird631/siis | 8d64e8fb67619aaa5c0a62fda9de51dedcd47796 | [
"PostgreSQL"
] | null | null | null | connector/binance/websockets.py | firebird631/siis | 8d64e8fb67619aaa5c0a62fda9de51dedcd47796 | [
"PostgreSQL"
] | null | null | null | connector/binance/websockets.py | firebird631/siis | 8d64e8fb67619aaa5c0a62fda9de51dedcd47796 | [
"PostgreSQL"
] | null | null | null | # @date 2020-01-31
# @author Frederic Scherma, All rights reserved without prejudices.
# @license Copyright (c) 2020 Dream Overflow
# Binance Websocket connector.
import json
import threading
import traceback
from autobahn.twisted.websocket import WebSocketClientFactory, WebSocketClientProtocol, connectWS
from twiste... | 37.510316 | 136 | 0.541584 |
cd8a35bcbfb312cda1686fb97584510659ede9ae | 669 | py | Python | Basic Data Structures/array/ListSlicing.py | rush2catch/algorithms-leetcode | 38a5e6aa33d48fa14fe09c50c28a2eaabd736e55 | [
"MIT"
] | null | null | null | Basic Data Structures/array/ListSlicing.py | rush2catch/algorithms-leetcode | 38a5e6aa33d48fa14fe09c50c28a2eaabd736e55 | [
"MIT"
] | null | null | null | Basic Data Structures/array/ListSlicing.py | rush2catch/algorithms-leetcode | 38a5e6aa33d48fa14fe09c50c28a2eaabd736e55 | [
"MIT"
] | null | null | null |
list_0 = [1, 2, 3, 6]
print(list_slicing(list_0, 1, 4))
print(list_slicing(list_0, 2, 4))
list_1 = [1, 2, 4, 5, 6, 9, 4, 6, 5, 8, 1, 4]
print(list_slicing(list_1, 3, 4))
print(list_slicing(list_1, 4, 3))
print(list_slicing(list_1, 2, 6))
print(list_slicing(list_1, 6, 2))
print(list_slicing(list_1, 5, 3))
print(list_s... | 27.875 | 63 | 0.605381 |
cd8abd04dc151085122e27f4484b76ecb7ff52ac | 225 | py | Python | OnePy/sys_module/base_riskmanager.py | Chandlercjy/OnePyfx | 9bd43b721d3f7352495b6ccab76bd533a3d2e8f2 | [
"MIT"
] | 321 | 2017-07-09T09:25:45.000Z | 2022-03-29T16:51:35.000Z | OnePy/sys_module/base_riskmanager.py | sunzhouhong/OnePy | 4e225945de297ba1211035a7b95b5094cdddc2a7 | [
"MIT"
] | 7 | 2017-08-23T12:10:29.000Z | 2020-03-26T12:56:09.000Z | OnePy/sys_module/base_riskmanager.py | sunzhouhong/OnePy | 4e225945de297ba1211035a7b95b5094cdddc2a7 | [
"MIT"
] | 134 | 2017-07-26T22:29:18.000Z | 2022-03-23T09:22:10.000Z | from OnePy.sys_module.metabase_env import OnePyEnvBase
| 17.307692 | 70 | 0.715556 |
cd8aca443ef9f431942f1f2a5e259a12ad32107f | 3,057 | py | Python | tests/geographic/duplicates/test_find_grid_duplicates.py | PEM-Humboldt/regi0 | 0d64587d5d87f57cddfc7a67bb8baf74cd70adf2 | [
"MIT"
] | null | null | null | tests/geographic/duplicates/test_find_grid_duplicates.py | PEM-Humboldt/regi0 | 0d64587d5d87f57cddfc7a67bb8baf74cd70adf2 | [
"MIT"
] | 15 | 2022-02-03T11:38:37.000Z | 2022-03-09T23:23:04.000Z | tests/geographic/duplicates/test_find_grid_duplicates.py | PEM-Humboldt/regi0 | 0d64587d5d87f57cddfc7a67bb8baf74cd70adf2 | [
"MIT"
] | null | null | null | """
Test cases for the regi0.geographic.duplicates.find_grid_duplicates function.
"""
import numpy as np
import pandas as pd
from regi0.geographic.duplicates import find_grid_duplicates
| 21.082759 | 83 | 0.446189 |
cd8b45d655ef0b191b537030a3d9f0b1784aa23f | 772 | py | Python | kolibri/core/public/utils.py | FollonSaxBass/kolibri | 4cf820b14386aecc228fecff64c847bad407cbb1 | [
"MIT"
] | 2 | 2021-05-13T10:20:46.000Z | 2021-11-15T12:31:03.000Z | kolibri/core/public/utils.py | camellia26/kolibri | 7f1cb794c93f37e039be22f56a5ac1989ed22bde | [
"MIT"
] | 8 | 2021-05-21T15:31:24.000Z | 2022-02-24T15:02:14.000Z | kolibri/core/public/utils.py | camellia26/kolibri | 7f1cb794c93f37e039be22f56a5ac1989ed22bde | [
"MIT"
] | 1 | 2019-10-05T11:14:40.000Z | 2019-10-05T11:14:40.000Z | import platform
from django.core.exceptions import ObjectDoesNotExist
from morango.models import InstanceIDModel
import kolibri
def get_device_info():
"""Returns metadata information about the device"""
instance_model = InstanceIDModel.get_or_create_current_instance()[0]
try:
device_name = koli... | 28.592593 | 82 | 0.715026 |
cd8c005ad2ae492334e75e29d8ea3fae95bca95b | 1,372 | py | Python | mcpipy/cellcraft/config.py | cellcraft/cellcraft | 1cb2b152bb6433250cec43e2586f1b5d093ec6e5 | [
"MIT"
] | 2 | 2016-01-21T12:05:36.000Z | 2016-04-18T09:50:03.000Z | mcpipy/cellcraft/config.py | cellcraft/cellcraft | 1cb2b152bb6433250cec43e2586f1b5d093ec6e5 | [
"MIT"
] | 1 | 2016-05-13T13:08:28.000Z | 2016-05-13T13:08:28.000Z | mcpipy/cellcraft/config.py | cellcraft/cellcraft | 1cb2b152bb6433250cec43e2586f1b5d093ec6e5 | [
"MIT"
] | 3 | 2015-12-14T19:28:42.000Z | 2020-11-29T12:53:12.000Z | import os
import json
import logging
# cellcraft node
CELLCRAFT_NODE_URL="http://192.168.178.29:4534"
# path to cache where pickle files will be stored
PATH_RESOURCES='cellcraft/resources'
PATH_CACHE='cellcraft/resources/cache/'
PATH_TEST_CACHE='test/fixtures/cache/'
# path to fixtures
PATH_TO_FIXTURES="test/fixtu... | 24.070175 | 98 | 0.764577 |
cd8c4a556bdf6a751d59f1d67ef4d0688f0e6844 | 9,123 | py | Python | ftpsync/pyftpsync.py | wengzy/pyftpsync | db6decb02bf3535fe87d90b45a6cc974dd356b04 | [
"MIT"
] | 86 | 2015-03-02T17:40:03.000Z | 2022-03-14T03:41:40.000Z | ftpsync/pyftpsync.py | wengzy/pyftpsync | db6decb02bf3535fe87d90b45a6cc974dd356b04 | [
"MIT"
] | 63 | 2015-04-12T19:01:52.000Z | 2022-01-19T00:57:51.000Z | ftpsync/pyftpsync.py | wengzy/pyftpsync | db6decb02bf3535fe87d90b45a6cc974dd356b04 | [
"MIT"
] | 25 | 2015-04-12T18:07:25.000Z | 2021-04-25T15:20:24.000Z | # -*- coding: utf-8 -*-
"""
Simple folder synchronization using FTP.
(c) 2012-2021 Martin Wendt; see https://github.com/mar10/pyftpsync
Licensed under the MIT license: https://www.opensource.org/licenses/mit-license.php
Usage examples:
> pyftpsync.py --help
> pyftpsync.py upload . ftps://example.com/myfo... | 31.350515 | 90 | 0.574044 |