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
221ee83a279f586d62cd3b5b659bf72ceddc7c10
8,125
py
Python
VQVAE/main.py
bipashasen/How2Sign-Blob
6e2af881d96d477fdb93104b8e53d943765c64ff
[ "MIT" ]
null
null
null
VQVAE/main.py
bipashasen/How2Sign-Blob
6e2af881d96d477fdb93104b8e53d943765c64ff
[ "MIT" ]
null
null
null
VQVAE/main.py
bipashasen/How2Sign-Blob
6e2af881d96d477fdb93104b8e53d943765c64ff
[ "MIT" ]
null
null
null
import os import numpy as np import torch import torch.nn as nn import torch.optim as optim import argparse from tqdm import tqdm import sys import distributed as dist import utils from models.vqvae import VQVAE, VQVAE_Blob2Full from models.discriminator import discriminator visual_folder = '/home2/bipasha31/python_...
30.204461
113
0.606769
0
0
0
0
0
0
0
0
1,329
0.163569
2221af1a0ee8e71a36084e82816e4e484658018d
1,245
py
Python
api/voters/tests/test_models.py
citizenlabsgr/voter-engagement
2d33eac1531471988543c6c3781b95ac73ec6dd9
[ "MIT" ]
6
2017-11-10T00:50:17.000Z
2018-03-25T02:26:19.000Z
api/voters/tests/test_models.py
citizenlabsgr/voter-engagement
2d33eac1531471988543c6c3781b95ac73ec6dd9
[ "MIT" ]
40
2017-10-25T16:16:55.000Z
2018-08-15T05:27:36.000Z
api/voters/tests/test_models.py
citizenlabsgr/voter-engagement
2d33eac1531471988543c6c3781b95ac73ec6dd9
[ "MIT" ]
3
2017-11-22T01:50:41.000Z
2018-04-17T23:33:08.000Z
# pylint: disable=unused-variable,unused-argument,expression-not-assigned from django.forms.models import model_to_dict import arrow import pytest from expecter import expect from api.elections.models import Election from .. import models @pytest.fixture def info(): return models.Identity( first_name=...
18.863636
73
0.658635
0
0
0
0
423
0.339759
0
0
174
0.139759
22231fc92c2080f08011cca9cc3a336ee11e707e
404
py
Python
leetcode/easy/strobogrammatic-number.py
vtemian/interviews-prep
ddef96b5ecc699a590376a892a804c143fe18034
[ "Apache-2.0" ]
8
2019-05-14T12:50:29.000Z
2022-03-01T09:08:27.000Z
leetcode/easy/strobogrammatic-number.py
vtemian/interviews-prep
ddef96b5ecc699a590376a892a804c143fe18034
[ "Apache-2.0" ]
46
2019-03-24T20:59:29.000Z
2019-04-09T16:28:43.000Z
leetcode/easy/strobogrammatic-number.py
vtemian/interviews-prep
ddef96b5ecc699a590376a892a804c143fe18034
[ "Apache-2.0" ]
1
2022-01-28T12:46:29.000Z
2022-01-28T12:46:29.000Z
class Solution: def isStrobogrammatic(self, num: str) -> bool: strobogrammatic = { '1': '1', '0': '0', '6': '9', '9': '6', '8': '8' } for idx, digit in enumerate(num): if digit not in strobogrammatic or strobogrammatic[...
25.25
96
0.445545
403
0.997525
0
0
0
0
0
0
30
0.074257
22259d4822670697f3a83a96fc5c76baa093e86f
992
py
Python
app/main/helpers/direct_award_helpers.py
uk-gov-mirror/alphagov.digitalmarketplace-buyer-frontend
ec3751b6d24842cc53febb20391ae340c0fea756
[ "MIT" ]
4
2017-10-12T16:15:01.000Z
2020-11-28T03:41:15.000Z
app/main/helpers/direct_award_helpers.py
uk-gov-mirror/alphagov.digitalmarketplace-buyer-frontend
ec3751b6d24842cc53febb20391ae340c0fea756
[ "MIT" ]
615
2015-02-27T15:45:43.000Z
2021-07-01T10:09:55.000Z
app/main/helpers/direct_award_helpers.py
uk-gov-mirror/alphagov.digitalmarketplace-buyer-frontend
ec3751b6d24842cc53febb20391ae340c0fea756
[ "MIT" ]
15
2015-06-30T14:35:20.000Z
2021-04-10T18:06:36.000Z
from operator import itemgetter def is_direct_award_project_accessible(project, user_id): return any([user['id'] == user_id for user in project['users']]) def get_direct_award_projects(data_api_client, user_id, return_type="all", sort_by_key=None, latest_first=None): projects = data_api_client.find_direct_a...
31
113
0.658266
0
0
0
0
0
0
0
0
137
0.138105
2225c8037c0f830751bb9a95f4a1c6bd17ba29de
824
py
Python
403-Frog-Jump/solution.py
Tanych/CodeTracking
86f1cb98de801f58c39d9a48ce9de12df7303d20
[ "MIT" ]
null
null
null
403-Frog-Jump/solution.py
Tanych/CodeTracking
86f1cb98de801f58c39d9a48ce9de12df7303d20
[ "MIT" ]
null
null
null
403-Frog-Jump/solution.py
Tanych/CodeTracking
86f1cb98de801f58c39d9a48ce9de12df7303d20
[ "MIT" ]
null
null
null
class Solution(object): def dfs(self,stones,graph,curpos,lastjump): if curpos==stones[-1]: return True # since the jump need based on lastjump # only forward,get rid of the stay at the same pos rstart=max(curpos+lastjump-1,curpos+1) rend=min(curpos+lastjump+1,ston...
32.96
82
0.566748
815
0.989078
0
0
0
0
0
0
157
0.190534
2227aded77b3fc2c225e7b80658dcf4702936914
2,261
py
Python
daemon/api/endpoints/partial/pod.py
vishalbelsare/jina
ae72cc5ce1f7e7f4c662e72e96ea21dddc28bf43
[ "Apache-2.0" ]
2
2021-06-28T16:25:09.000Z
2021-06-28T16:26:41.000Z
daemon/api/endpoints/partial/pod.py
vishalbelsare/jina
ae72cc5ce1f7e7f4c662e72e96ea21dddc28bf43
[ "Apache-2.0" ]
null
null
null
daemon/api/endpoints/partial/pod.py
vishalbelsare/jina
ae72cc5ce1f7e7f4c662e72e96ea21dddc28bf43
[ "Apache-2.0" ]
null
null
null
from typing import Optional, Dict, Any from fastapi import APIRouter from jina.helper import ArgNamespace from jina.parsers import set_pod_parser from ....excepts import PartialDaemon400Exception from ....models import PodModel from ....models.partial import PartialStoreItem from ....stores import partial_store as sto...
21.951456
74
0.657231
0
0
0
0
1,871
0.82751
1,063
0.470146
616
0.272446
2227e03ea94ec70b6e6c0445734948d8034414f4
708
py
Python
runehistory_api/app/config.py
RuneHistory/runehistory-api
4e857c7fdbdf585d57cf4c7fe6214b565ac37a22
[ "MIT" ]
null
null
null
runehistory_api/app/config.py
RuneHistory/runehistory-api
4e857c7fdbdf585d57cf4c7fe6214b565ac37a22
[ "MIT" ]
6
2018-06-14T13:58:43.000Z
2018-07-16T14:02:24.000Z
runehistory_api/app/config.py
RuneHistory/runehistory-api
4e857c7fdbdf585d57cf4c7fe6214b565ac37a22
[ "MIT" ]
null
null
null
import yaml class Config: def __init__(self, path: str): self.path = path self.cfg = {} self.parse() def parse(self): with open(self.path, 'r') as f: self.cfg = yaml.load(f) @property def secret(self) -> str: return self.cfg.get('secret') @pro...
21.454545
53
0.572034
693
0.978814
0
0
449
0.634181
0
0
84
0.118644
222831d9b44232f8e0bea417d43c813b4bde54d1
4,379
py
Python
csv_filter/__init__.py
mooore-digital/csv_filter
80afed0e4b366d195c5a90fb96ab2bf01620e3bf
[ "MIT" ]
1
2018-08-13T05:51:21.000Z
2018-08-13T05:51:21.000Z
csv_filter/__init__.py
mooore-digital/csv_filter
80afed0e4b366d195c5a90fb96ab2bf01620e3bf
[ "MIT" ]
null
null
null
csv_filter/__init__.py
mooore-digital/csv_filter
80afed0e4b366d195c5a90fb96ab2bf01620e3bf
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import argparse import csv import logging import os import re import sys DELIMITER = ',' class CsvFilter: def __init__( self, file=None, deduplicate=False, filter_query=None, filter_inverse=False, ignore_case=False,...
31.731884
120
0.577529
3,265
0.745604
0
0
0
0
0
0
423
0.096597
2228fe251332d78679abc83f54675d08f42975f5
1,435
py
Python
scientist/__init__.py
boxed/scientist
aadaf5713a4092abc51f1978474ce74d94e56799
[ "BSD-3-Clause" ]
null
null
null
scientist/__init__.py
boxed/scientist
aadaf5713a4092abc51f1978474ce74d94e56799
[ "BSD-3-Clause" ]
null
null
null
scientist/__init__.py
boxed/scientist
aadaf5713a4092abc51f1978474ce74d94e56799
[ "BSD-3-Clause" ]
null
null
null
def check_candidate(a, candidate, callback_when_different, *args, **kwargs): control_result = None candidate_result = None control_exception = None candidate_exception = None reason = None try: control_result = a(*args, **kwargs) except BaseException as e: control_exception ...
32.613636
85
0.643206
0
0
0
0
0
0
0
0
195
0.135889
22298775a674168a052235a68913e1eaa95ece94
9,883
py
Python
bluebottle/impact/tests/test_api.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
10
2015-05-28T18:26:40.000Z
2021-09-06T10:07:03.000Z
bluebottle/impact/tests/test_api.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
762
2015-01-15T10:00:59.000Z
2022-03-31T15:35:14.000Z
bluebottle/impact/tests/test_api.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
9
2015-02-20T13:19:30.000Z
2022-03-08T14:09:17.000Z
# coding=utf-8 from builtins import str import json from django.contrib.auth.models import Group, Permission from django.urls import reverse from rest_framework import status from bluebottle.impact.models import ImpactGoal from bluebottle.impact.tests.factories import ( ImpactTypeFactory, ImpactGoalFactory ) from...
33.16443
82
0.610746
9,281
0.939087
0
0
0
0
0
0
868
0.087828
222b145f8daf822353fc31ee9861239abfadffb3
11,613
py
Python
dotmotif/parsers/v2/test_v2_parser.py
aplbrain/dotmotif
db093ddad7308756e9cf7ee01199f0dca1369872
[ "Apache-2.0" ]
28
2020-06-12T20:46:15.000Z
2022-02-05T18:33:46.000Z
dotmotif/parsers/v2/test_v2_parser.py
aplbrain/dotmotif
db093ddad7308756e9cf7ee01199f0dca1369872
[ "Apache-2.0" ]
26
2020-06-09T20:09:32.000Z
2022-02-01T18:22:20.000Z
dotmotif/parsers/v2/test_v2_parser.py
aplbrain/dotmotif
db093ddad7308756e9cf7ee01199f0dca1369872
[ "Apache-2.0" ]
4
2021-03-08T02:47:49.000Z
2021-09-13T19:16:29.000Z
from . import ParserV2 import dotmotif import unittest _THREE_CYCLE = """A -> B\nB -> C\nC -> A\n""" _THREE_CYCLE_NEG = """A !> B\nB !> C\nC !> A\n""" _THREE_CYCLE_INH = """A -| B\nB -| C\nC -| A\n""" _THREE_CYCLE_NEG_INH = """A !| B\nB !| C\nC !| A\n""" _ABC_TO_D = """\nA -> D\nB -> D\nC -> D\n""" _THREE_CYCLE_CSV ...
26.819861
87
0.490313
11,205
0.964867
0
0
0
0
0
0
4,870
0.419358
222b699bb098dde76e50ecba30e5ab86e3537dcc
1,382
py
Python
examples/classification_mnist/main.py
yassersouri/fandak
2bbadb6d78fcf73dc39f5342aa34c53fa3341c5a
[ "MIT" ]
15
2019-07-12T14:04:46.000Z
2020-08-04T12:30:30.000Z
examples/classification_mnist/main.py
yassersouri/fandak
2bbadb6d78fcf73dc39f5342aa34c53fa3341c5a
[ "MIT" ]
2
2019-07-12T17:06:56.000Z
2019-07-17T12:05:32.000Z
examples/classification_mnist/main.py
yassersouri/fandak
2bbadb6d78fcf73dc39f5342aa34c53fa3341c5a
[ "MIT" ]
null
null
null
from typing import List import click import torch from fandak.utils import common_config from fandak.utils import set_seed from fandak.utils.config import update_config from proj.config import get_config_defaults from proj.datasets import MNISTClassification from proj.evaluators import ValidationEvaluator from proj.m...
26.075472
73
0.708394
0
0
0
0
957
0.692475
0
0
83
0.060058
222b80300db760788fdc862f944935f9de93f40f
864
py
Python
tests/test_problem_solving_algorithms_sorting.py
mxdzi/hackerrank
4455f73e4479a4204b2e1167253f6a02351aa5b7
[ "MIT" ]
null
null
null
tests/test_problem_solving_algorithms_sorting.py
mxdzi/hackerrank
4455f73e4479a4204b2e1167253f6a02351aa5b7
[ "MIT" ]
null
null
null
tests/test_problem_solving_algorithms_sorting.py
mxdzi/hackerrank
4455f73e4479a4204b2e1167253f6a02351aa5b7
[ "MIT" ]
null
null
null
from problem_solving.algorithms.sorting import * def test_q1_big_sorting(capsys, monkeypatch): inputs = ["6", "31415926535897932384626433832795", "1", "3", "10", "3", "5"] monkeypatch.setattr('builtins.input', lambda: inputs.p...
25.411765
64
0.545139
0
0
0
0
0
0
0
0
170
0.196759
222dd53901bfb2ab9baf636ea45e6459defef6a1
9,975
py
Python
runOtakuBot.py
Eagleheardt/otakuBot
6f8576423bb1b0701d5a60095bed7552b2711bab
[ "Unlicense" ]
null
null
null
runOtakuBot.py
Eagleheardt/otakuBot
6f8576423bb1b0701d5a60095bed7552b2711bab
[ "Unlicense" ]
null
null
null
runOtakuBot.py
Eagleheardt/otakuBot
6f8576423bb1b0701d5a60095bed7552b2711bab
[ "Unlicense" ]
null
null
null
import sqlite3 from sqlite3 import Error import os import time import datetime import re import random import schedule import cryptography from apscheduler.schedulers.background import BackgroundScheduler from slackclient import SlackClient from cryptography.fernet import Fernet conn = sqlite3.connect('...
27.631579
95
0.665063
0
0
0
0
0
0
0
0
3,305
0.331328
222fcf6d9b65f24912507aa874036c0ee4a1261b
1,555
py
Python
ocr.py
tunc2112/uet-img-processing
6a191fe6927d7d0844742240cf4a39587c965d16
[ "MIT" ]
null
null
null
ocr.py
tunc2112/uet-img-processing
6a191fe6927d7d0844742240cf4a39587c965d16
[ "MIT" ]
null
null
null
ocr.py
tunc2112/uet-img-processing
6a191fe6927d7d0844742240cf4a39587c965d16
[ "MIT" ]
null
null
null
from PIL import Image import cv2 import pytesseract import tesserocr from pyocr import pyocr from pyocr import builders import sys import os def get_image_filename(img_id): filename = "img_src/src{0:0>3}".format(img_id) for ext in [".png", ".jpg", ".jpeg"]: if os.path.exists(os.path.join(os.getcwd(), ...
27.280702
72
0.674598
0
0
0
0
0
0
0
0
108
0.069453
2230323f70e41224c93df8ff861946c38acbb05d
6,718
py
Python
object_detection/det_heads/retinaNet_head/retinanet_head.py
no-name-xiaosheng/PaddleViT
50226a3be5095b3727d3c62d2eab23ef1e9612ec
[ "Apache-2.0" ]
993
2021-08-30T01:58:57.000Z
2022-03-31T14:03:07.000Z
object_detection/det_heads/retinaNet_head/retinanet_head.py
Dongsheng-Bi/PaddleViT
c90a6c8dc3787e69cef3a37b9a260bd59eeff1f7
[ "Apache-2.0" ]
120
2021-09-03T13:05:32.000Z
2022-03-29T02:08:22.000Z
object_detection/det_heads/retinaNet_head/retinanet_head.py
Dongsheng-Bi/PaddleViT
c90a6c8dc3787e69cef3a37b9a260bd59eeff1f7
[ "Apache-2.0" ]
253
2021-08-30T08:50:27.000Z
2022-03-26T09:21:08.000Z
# Copyright (c) 2021 PPViT Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
40.227545
94
0.620125
5,631
0.838196
0
0
0
0
0
0
1,915
0.285055
223135074d80c82a77c3e9b47c439c7c3abe7792
632
py
Python
brp/formutils.py
chop-dbhi/biorepo-portal
7db13c40b2b9d62af43a28e4af08c2472b98fc96
[ "BSD-2-Clause" ]
6
2016-10-26T19:51:11.000Z
2021-03-18T16:05:55.000Z
brp/formutils.py
chop-dbhi/biorepo-portal
7db13c40b2b9d62af43a28e4af08c2472b98fc96
[ "BSD-2-Clause" ]
207
2015-09-24T17:41:37.000Z
2021-05-18T18:14:08.000Z
brp/formutils.py
chop-dbhi/biorepo-portal
7db13c40b2b9d62af43a28e4af08c2472b98fc96
[ "BSD-2-Clause" ]
8
2016-04-27T19:04:50.000Z
2020-08-24T02:33:05.000Z
from django import template from django.forms import widgets register = template.Library() @register.inclusion_tag('formfield.html') def formfield(field): widget = field.field.widget type_ = None if isinstance(widget, widgets.Input): type_ = 'input' elif isinstance(widget, widgets.Textarea): ...
28.727273
62
0.675633
0
0
0
0
538
0.851266
0
0
77
0.121835
2231aae6662593f94c1874f0078bab296c0ac96f
2,104
py
Python
SGE/src/configs/rng_seeds.py
dabingrosewood/MasterThesisProj
7e40fa2395468a1bccef429362a61ed8515ecc11
[ "MIT" ]
null
null
null
SGE/src/configs/rng_seeds.py
dabingrosewood/MasterThesisProj
7e40fa2395468a1bccef429362a61ed8515ecc11
[ "MIT" ]
null
null
null
SGE/src/configs/rng_seeds.py
dabingrosewood/MasterThesisProj
7e40fa2395468a1bccef429362a61ed8515ecc11
[ "MIT" ]
null
null
null
# CONFIG seeds = [6598903756360202179, 2908409715321502665, 6126375328734039552, 1447957147463681860, 8611858271322161001, 1129180857020570158, 6362222119948958210, 7116573423379052515, 6183551438103583226, 4025455056998962241, 3253052445978017587, 8447055112402476503, 5958072666039141800, 704315598608973559, 127314171...
701.333333
2,094
0.901616
0
0
0
0
0
0
0
0
8
0.003802
223331808a66e2aa15f291c872b40388de56a8a3
2,793
py
Python
learning/modules/visitation_softmax.py
esteng/guiding-multi-step
3f0db0ba70b5851cc83878f4ed48cf82342a2ddf
[ "BSD-2-Clause" ]
null
null
null
learning/modules/visitation_softmax.py
esteng/guiding-multi-step
3f0db0ba70b5851cc83878f4ed48cf82342a2ddf
[ "BSD-2-Clause" ]
null
null
null
learning/modules/visitation_softmax.py
esteng/guiding-multi-step
3f0db0ba70b5851cc83878f4ed48cf82342a2ddf
[ "BSD-2-Clause" ]
null
null
null
import torch import torch.nn as nn import numpy as np class VisitationSoftmax(nn.Module): def __init__(self, log=False): super(VisitationSoftmax, self).__init__() self.log = log self.logsoftmax = nn.LogSoftmax() self.softmax = nn.Softmax(dim=1) def forward(self, visitation_di...
52.698113
139
0.713928
2,737
0.97995
0
0
0
0
0
0
871
0.311851
223355bd5379be3ac4c24bf1261412562ebdf029
96
py
Python
baekjoon/easy-math/17362-finger.py
honux77/algorithm
2ed8cef1fbee7ad96d8f2ae583666d52bd8892ee
[ "MIT" ]
2
2019-02-08T01:23:07.000Z
2020-11-19T12:23:52.000Z
baekjoon/easy-math/17362-finger.py
honux77/algorithm
2ed8cef1fbee7ad96d8f2ae583666d52bd8892ee
[ "MIT" ]
null
null
null
baekjoon/easy-math/17362-finger.py
honux77/algorithm
2ed8cef1fbee7ad96d8f2ae583666d52bd8892ee
[ "MIT" ]
null
null
null
n = int(input()) % 8 if n == 0: print(2) elif n <= 5: print(n) else: print(10 - n)
12
20
0.458333
0
0
0
0
0
0
0
0
0
0
22350d67f0af834116a7d33c446043e6c69e8a30
908
py
Python
Module/nikodou_information.py
RyoTozawa/LineBot
14b34094f9a27650d412128334c3f09c7444ffc9
[ "MIT" ]
1
2018-10-16T07:50:59.000Z
2018-10-16T07:50:59.000Z
Module/nikodou_information.py
RyoTozawa/LineBot
14b34094f9a27650d412128334c3f09c7444ffc9
[ "MIT" ]
1
2018-04-09T11:03:25.000Z
2018-04-09T11:03:25.000Z
Module/nikodou_information.py
tozastation/Line-Bot
14b34094f9a27650d412128334c3f09c7444ffc9
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # coding:utf-8 import urllib from xml.etree import ElementTree import xml.dom.minidom as md class Niko(object): def __init__(self): self.url_ranking = 'http://www.nicovideo.jp/ranking/fav/hourly/sing?rss=2.0&lang=ja-jp' self.url_news = 'http://news.nicovideo.jp/categories/10...
29.290323
95
0.643172
787
0.86674
0
0
0
0
0
0
188
0.207048
2235a02d239f6f03f7a8b8fc3826bf3189e27e0c
927
py
Python
climbing/add_new_climbs.py
JiriKalvoda/slama.dev
4856d246858dd98a1852365b028873b61f5a6775
[ "MIT" ]
7
2019-09-15T19:55:11.000Z
2021-12-27T11:40:20.000Z
climbing/add_new_climbs.py
JiriKalvoda/slama.dev
4856d246858dd98a1852365b028873b61f5a6775
[ "MIT" ]
38
2020-05-18T12:49:13.000Z
2022-03-23T12:51:28.000Z
climbing/add_new_climbs.py
JiriKalvoda/slama.dev
4856d246858dd98a1852365b028873b61f5a6775
[ "MIT" ]
17
2020-02-16T19:49:25.000Z
2022-02-06T14:28:35.000Z
#!/usr/bin/env python3 import os import shutil from subprocess import Popen, PIPE from datetime import date import yaml os.chdir(os.path.dirname(os.path.realpath(__file__))) CLIMBING_FOLDER = "." CLIMBING_VIDEOS_FOLDER = os.path.join(CLIMBING_FOLDER, "videos") CLIMBING_INFO = os.path.join(CLIMBING_FOLDER, "videos....
24.394737
64
0.614887
0
0
0
0
0
0
0
0
154
0.166127
22369660633e2973cf659ea963259b0f27b54f98
952
py
Python
posts/models.py
dnetochaves/blog
e04fda385490b671540b671631726584a533369c
[ "MIT" ]
null
null
null
posts/models.py
dnetochaves/blog
e04fda385490b671540b671631726584a533369c
[ "MIT" ]
null
null
null
posts/models.py
dnetochaves/blog
e04fda385490b671540b671631726584a533369c
[ "MIT" ]
null
null
null
from django.db import models from categorias.models import Categoria from django.contrib.auth.models import User from django.utils import timezone # Create your models here. class Post(models.Model): titulo_post = models.CharField(max_length=50, verbose_name='Titulo') autor_post = models.ForeignKey(User, on_...
43.272727
103
0.765756
774
0.813025
0
0
0
0
0
0
105
0.110294
2237660edc2b315c6d1a8e947bbdd55091f794e0
2,765
py
Python
src/ros_vision_interaction/examples/example_interaction.py
HaaaO/vision-project
72256af07834195cfe52ac344aee5effcd0da978
[ "MIT" ]
null
null
null
src/ros_vision_interaction/examples/example_interaction.py
HaaaO/vision-project
72256af07834195cfe52ac344aee5effcd0da978
[ "MIT" ]
21
2020-09-09T18:55:58.000Z
2021-07-26T19:42:46.000Z
src/ros_vision_interaction/examples/example_interaction.py
HaaaO/vision-project
72256af07834195cfe52ac344aee5effcd0da978
[ "MIT" ]
6
2020-12-20T17:19:29.000Z
2021-08-09T22:33:04.000Z
#!/usr/bin/env python import datetime import logging import os import random import rospy import schedule from interaction_engine.cordial_interface import CordialInterface from interaction_engine.database import Database from interaction_engine.int_engine import InteractionEngine from interaction_engine.message impor...
24.469027
71
0.725859
131
0.047378
0
0
0
0
0
0
398
0.143942
2237956981da3e82e0d6350f1b78b20897718d48
2,441
py
Python
explicalib/distribution/multiclass_distribution.py
euranova/estimating_eces
9bfa81dd7a39ebe069c5b11b8e7a9bf9017e9350
[ "MIT" ]
2
2021-11-30T18:44:11.000Z
2021-11-30T18:44:19.000Z
explicalib/distribution/multiclass_distribution.py
euranova/estimating_eces
9bfa81dd7a39ebe069c5b11b8e7a9bf9017e9350
[ "MIT" ]
null
null
null
explicalib/distribution/multiclass_distribution.py
euranova/estimating_eces
9bfa81dd7a39ebe069c5b11b8e7a9bf9017e9350
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ @author: nicolas.posocco """ from abc import ABC import numpy as np class MulticlassDistribution(ABC): def __init__(self): """ Initializes the distribution, allowing later sampling and posterior probabilities calculations. """ pass def sample(sel...
29.059524
116
0.643179
2,339
0.958214
0
0
0
0
0
0
1,029
0.421549
22386109daaa28a3082c4a5bbbaea3c931eb1b4c
3,169
py
Python
test.py
JulioPDX/ci_cd_dev
e9b72c1b16e9f05a5e93e22f045fda605aac509f
[ "MIT" ]
6
2021-10-31T18:36:49.000Z
2022-03-14T02:26:37.000Z
test.py
JulioPDX/ci_cd_dev
e9b72c1b16e9f05a5e93e22f045fda605aac509f
[ "MIT" ]
null
null
null
test.py
JulioPDX/ci_cd_dev
e9b72c1b16e9f05a5e93e22f045fda605aac509f
[ "MIT" ]
2
2022-02-10T16:58:46.000Z
2022-03-07T05:00:57.000Z
#!/usr/bin/env python """Script used to test the network with batfish""" from pybatfish.client.commands import * from pybatfish.question import load_questions from pybatfish.client.asserts import ( assert_no_duplicate_router_ids, assert_no_incompatible_bgp_sessions, assert_no_incompatible_ospf_sessions, ...
30.471154
125
0.716945
0
0
0
0
0
0
0
0
1,394
0.439886
22386711171a0a872717803582d333bc6bde0602
1,176
py
Python
algs15_priority_queue/circular_queue.py
zhubaiyuan/learning-algorithms
ea9ee674878d535a9e9987c0d948c0357e0ed4da
[ "MIT" ]
null
null
null
algs15_priority_queue/circular_queue.py
zhubaiyuan/learning-algorithms
ea9ee674878d535a9e9987c0d948c0357e0ed4da
[ "MIT" ]
null
null
null
algs15_priority_queue/circular_queue.py
zhubaiyuan/learning-algorithms
ea9ee674878d535a9e9987c0d948c0357e0ed4da
[ "MIT" ]
null
null
null
""" A fixed-capacity queue implemented as circular queue. Queue can become full. * enqueue is O(1) * dequeue is O(1) """ class Queue: """ Implementation of a Queue using a circular buffer. """ def __init__(self, size): self.size = size self.storage = [None] * size self.first =...
22.188679
54
0.519558
1,052
0.894558
0
0
0
0
0
0
441
0.375
223a35394d8e357d916a263b18714241694b5330
4,300
py
Python
pos_evaluation/create_train_dev_old.py
ayyoobimani/GNN-POSTAG
47eb4bc6d64de565e87ee7cb8e9c5020d936138c
[ "MIT" ]
null
null
null
pos_evaluation/create_train_dev_old.py
ayyoobimani/GNN-POSTAG
47eb4bc6d64de565e87ee7cb8e9c5020d936138c
[ "MIT" ]
null
null
null
pos_evaluation/create_train_dev_old.py
ayyoobimani/GNN-POSTAG
47eb4bc6d64de565e87ee7cb8e9c5020d936138c
[ "MIT" ]
null
null
null
""" Create train and dev set from bronze data Example call: $ python3 create_train_dev.py --pos /mounts/work/ayyoob/results/gnn_align/yoruba/pos_tags_tam-x-bible-newworld_posfeatFalse_transformerFalse_trainWEFalse_maskLangTrue.pickle --bible tam-x-bible-newworld.txt --bronze 1 --lang tam $ python3 create_train_dev.py ...
38.738739
228
0.621163
0
0
0
0
0
0
0
0
1,803
0.419302
223b3e8319f85381a1c34694d9c35926bb3d9b11
1,076
py
Python
lib/spack/spack/test/permissions.py
SimeonEhrig/spack
7fe0230492ecf0e497a84d578ea163570cf460eb
[ "ECL-2.0", "Apache-2.0", "MIT" ]
2
2016-01-12T20:14:40.000Z
2017-06-16T07:03:46.000Z
lib/spack/spack/test/permissions.py
SimeonEhrig/spack
7fe0230492ecf0e497a84d578ea163570cf460eb
[ "ECL-2.0", "Apache-2.0", "MIT" ]
75
2016-07-27T11:43:00.000Z
2020-12-08T15:56:53.000Z
lib/spack/spack/test/permissions.py
SimeonEhrig/spack
7fe0230492ecf0e497a84d578ea163570cf460eb
[ "ECL-2.0", "Apache-2.0", "MIT" ]
8
2015-10-16T13:51:49.000Z
2021-10-18T13:58:03.000Z
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os import pytest import stat from spack.hooks.permissions_setters import ( chmod_real_entries, InvalidPermissi...
29.888889
76
0.736059
0
0
0
0
0
0
0
0
247
0.229554
223b618424ceff584aa410ff8121dcf69f5567f4
323
py
Python
data_statistics/variable_statistics.py
go-jugo/ml_event_prediction_trainer
0d644b737afdef078ad5b6fc2b7e2549b964b56f
[ "Apache-2.0" ]
null
null
null
data_statistics/variable_statistics.py
go-jugo/ml_event_prediction_trainer
0d644b737afdef078ad5b6fc2b7e2549b964b56f
[ "Apache-2.0" ]
null
null
null
data_statistics/variable_statistics.py
go-jugo/ml_event_prediction_trainer
0d644b737afdef078ad5b6fc2b7e2549b964b56f
[ "Apache-2.0" ]
null
null
null
import dask.dataframe as dd def descibe_dataframe(df): error_cols = [col for col in df.columns if 'errorCode' in col] df = df.categorize(columns=error_cols) statistics = df.describe(include='all').compute() statistics = statistics.T statistics.to_excel('../statistics/variables_statistics.xls...
40.375
67
0.718266
0
0
0
0
0
0
0
0
57
0.176471
223b7dfcfebf8324a056e2a31a6551d0d0397ac2
393
py
Python
code/com/caicongyang/python/study/base/pandas_sql.py
caicongyang/python-study
e5db4d1b033d183da7e9af6a8c930bcaba2962f7
[ "Apache-2.0" ]
null
null
null
code/com/caicongyang/python/study/base/pandas_sql.py
caicongyang/python-study
e5db4d1b033d183da7e9af6a8c930bcaba2962f7
[ "Apache-2.0" ]
null
null
null
code/com/caicongyang/python/study/base/pandas_sql.py
caicongyang/python-study
e5db4d1b033d183da7e9af6a8c930bcaba2962f7
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: UTF-8 -*- import numpy as np import pandas as pd ''' 如何用sql的方式打开pandas ''' from pandas import DataFrame, Series from pandasql import sqldf, load_meat, load_births df1 = DataFrame({'name': ['jack', 'tony', 'pony'], 'data1': range(3)}) print(df1) sql = "select * from df1 where name = ...
19.65
70
0.676845
0
0
0
0
0
0
0
0
151
0.369193
223ccb03fea812be5bc8d09d17bc6aa157ee7449
5,016
py
Python
tests/test_publish_parq.py
jacobtobias/s3parq
0a56fbc7d93168c68e823f05b073b8d03e67a665
[ "MIT" ]
null
null
null
tests/test_publish_parq.py
jacobtobias/s3parq
0a56fbc7d93168c68e823f05b073b8d03e67a665
[ "MIT" ]
null
null
null
tests/test_publish_parq.py
jacobtobias/s3parq
0a56fbc7d93168c68e823f05b073b8d03e67a665
[ "MIT" ]
null
null
null
import pytest from mock import patch import pandas as pd import pyarrow as pa import pyarrow.parquet as pq import boto3 from string import ascii_lowercase import random from dfmock import DFMock import s3parq.publish_parq as parq import s3fs from moto import mock_s3 @mock_s3 class Test: def setup_s3(self): ...
36.347826
105
0.622608
4,737
0.944378
0
0
4,746
0.946172
0
0
1,077
0.214713
223dcc250b1cfb0dc6bb2a2c2757035efcba4a73
2,936
py
Python
docs/examples/examplesCategorization.py
benstear/pyiomica
bc26032b610fc911cc03b54115d6abdf53a56fce
[ "MIT" ]
12
2019-11-22T21:44:13.000Z
2022-03-06T21:46:31.000Z
docs/examples/examplesCategorization.py
benstear/pyiomica
bc26032b610fc911cc03b54115d6abdf53a56fce
[ "MIT" ]
null
null
null
docs/examples/examplesCategorization.py
benstear/pyiomica
bc26032b610fc911cc03b54115d6abdf53a56fce
[ "MIT" ]
5
2019-07-25T21:03:42.000Z
2021-06-09T02:14:30.000Z
#import sys #sys.path.append("../..") import pyiomica as pio from pyiomica import categorizationFunctions as cf if __name__ == '__main__': # Unzip example data with pio.zipfile.ZipFile(pio.os.path.join(pio.ConstantPyIOmicaExamplesDirectory, 'SLV.zip'), "r") as zipFile: zipFile.extractall(...
47.354839
149
0.742166
0
0
0
0
0
0
0
0
947
0.322548
223df95481a53841ba1260a2ab6e7adbdff16f31
2,612
py
Python
tworaven_apps/eventdata_queries/initialization/icews_unique_count.py
TwoRavens/TwoRavens
e5f820557d6646df525ceed15e17d79f4159cf0a
[ "Apache-2.0" ]
20
2017-12-11T07:26:06.000Z
2021-11-22T16:16:20.000Z
tworaven_apps/eventdata_queries/initialization/icews_unique_count.py
TwoRavens/TwoRavens
e5f820557d6646df525ceed15e17d79f4159cf0a
[ "Apache-2.0" ]
849
2017-10-20T18:21:18.000Z
2022-02-18T02:45:44.000Z
tworaven_apps/eventdata_queries/initialization/icews_unique_count.py
TwoRavens/TwoRavens
e5f820557d6646df525ceed15e17d79f4159cf0a
[ "Apache-2.0" ]
1
2020-05-18T06:02:13.000Z
2020-05-18T06:02:13.000Z
# returns number of unique records for icews with different filtering: # -by rounded lat/lon (100,000) # -by country, district, province, city (100,000) # -by lat/lon, filtered by 2 or more matches (70,000) from pymongo import MongoClient import os mongo_client = MongoClient(host='localhost', port=27017) # Default p...
20.092308
72
0.343415
0
0
0
0
0
0
0
0
858
0.328484
223edb2e5970e591f491deb0d0fde065371aadb5
7,576
py
Python
OcCo_Torch/models/pointnet_util.py
sun-pyo/OcCo
e2e12dbaa8f9b98fb8c42fc32682f49e99be302f
[ "MIT" ]
158
2020-08-19T18:13:28.000Z
2022-03-30T13:55:32.000Z
OcCo_Torch/models/pointnet_util.py
sun-pyo/OcCo
e2e12dbaa8f9b98fb8c42fc32682f49e99be302f
[ "MIT" ]
28
2020-05-30T04:02:33.000Z
2022-03-30T15:46:38.000Z
OcCo_Torch/models/pointnet_util.py
sun-pyo/OcCo
e2e12dbaa8f9b98fb8c42fc32682f49e99be302f
[ "MIT" ]
18
2020-08-19T19:52:38.000Z
2022-02-06T11:42:26.000Z
# Copyright (c) 2020. Hanchen Wang, [email protected] # Ref: https://github.com/fxia22/pointnet.pytorch/pointnet/model.py import torch, torch.nn as nn, numpy as np, torch.nn.functional as F from torch.autograd import Variable def feature_transform_regularizer(trans): d = trans.size()[1] I = torch.eye(d)[None...
33.522124
105
0.567318
7,044
0.929778
0
0
0
0
0
0
469
0.061906
2241d0bcc483df8ae598bcac2ffa98c9d73b4660
747
py
Python
Week#3__Assignment#3/join.py
P7h/IntroToDataScience__Coursera_Course
4f3d4073e552c7e6f5d1e31c0391eccec32d3786
[ "Apache-2.0" ]
1
2015-10-26T00:32:09.000Z
2015-10-26T00:32:09.000Z
Week#3__Assignment#3/join.py
P7h/IntroToDataScience__Coursera_Course
4f3d4073e552c7e6f5d1e31c0391eccec32d3786
[ "Apache-2.0" ]
null
null
null
Week#3__Assignment#3/join.py
P7h/IntroToDataScience__Coursera_Course
4f3d4073e552c7e6f5d1e31c0391eccec32d3786
[ "Apache-2.0" ]
null
null
null
import MapReduce import sys """ SQL style Joins in MapReduce """ mr = MapReduce.MapReduce() # ============================= # Do not modify above this line def mapper(record): # key: document identifier # value: document contents value = str(record[0]) num = str(record[1]) mr.emit_intermediate(num, (value...
20.189189
44
0.609103
0
0
0
0
0
0
0
0
278
0.372155
224336ed5538a9d61b10299e07b1b099064fc032
823
py
Python
tests/test_testresources.py
sjoerdk/anonapi
ade94da2b8eb2fb94f831ef77e563f750f88d0ba
[ "MIT" ]
null
null
null
tests/test_testresources.py
sjoerdk/anonapi
ade94da2b8eb2fb94f831ef77e563f750f88d0ba
[ "MIT" ]
408
2018-11-24T19:41:10.000Z
2022-03-31T23:48:54.000Z
tests/test_testresources.py
sjoerdk/anonapi
ade94da2b8eb2fb94f831ef77e563f750f88d0ba
[ "MIT" ]
2
2018-11-11T12:56:03.000Z
2021-08-09T01:53:07.000Z
from anonapi.testresources import ( MockAnonClientTool, JobInfoFactory, RemoteAnonServerFactory, JobStatus, ) def test_mock_anon_client_tool(): some_responses = [ JobInfoFactory(status=JobStatus.DONE), JobInfoFactory(status=JobStatus.ERROR), JobInfoFactory(status=JobStatus....
30.481481
85
0.690158
0
0
0
0
0
0
0
0
58
0.070474
2243b6cc5ce377cffdd91e6609c4b0155421a8c1
13,442
py
Python
homeassistant/components/mikrotik/hub.py
jvitkauskas/home-assistant
3718b25bd9528188530f291f0810a1c7970abcdb
[ "Apache-2.0" ]
null
null
null
homeassistant/components/mikrotik/hub.py
jvitkauskas/home-assistant
3718b25bd9528188530f291f0810a1c7970abcdb
[ "Apache-2.0" ]
7
2016-04-09T20:56:30.000Z
2016-04-19T21:28:46.000Z
homeassistant/components/mikrotik/hub.py
jvitkauskas/home-assistant
3718b25bd9528188530f291f0810a1c7970abcdb
[ "Apache-2.0" ]
null
null
null
"""The Mikrotik router class.""" from datetime import timedelta import logging import socket import ssl import librouteros from librouteros.login import plain as login_plain, token as login_token from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME, CONF_VERIFY_SSL from homeassistant.exceptions imp...
32.468599
88
0.602515
11,467
0.853072
0
0
2,510
0.186728
1,887
0.140381
2,319
0.172519
22441b73e069c3528a08a1ed36f4c0850e6085f0
4,137
py
Python
gemlog_from_rss/spip/page.py
Hookz/Gemlog-from-RSS
b57a311db3008e8b0df2442236c4729a06d9b74d
[ "MIT" ]
1
2021-02-19T16:06:07.000Z
2021-02-19T16:06:07.000Z
gemlog_from_rss/spip/page.py
Hookz/Gemlog-from-RSS
b57a311db3008e8b0df2442236c4729a06d9b74d
[ "MIT" ]
null
null
null
gemlog_from_rss/spip/page.py
Hookz/Gemlog-from-RSS
b57a311db3008e8b0df2442236c4729a06d9b74d
[ "MIT" ]
null
null
null
from bs4 import BeautifulSoup import requests import re from lxml.html import fromstring from lxml.etree import ParserError from gemlog_from_rss.spip import SinglePost def localize(lang): if lang == "pl": return { "our_articles": "Nasze artykuły" } if lang == "fr": return {...
32.069767
109
0.547982
3,677
0.888594
0
0
0
0
0
0
854
0.20638
2245fe03d22e27328780ecdf4fb5f3ecb80912ed
1,421
py
Python
simulation/aivika/modeler/arrival_timer.py
dsorokin/aivika-modeler
5c112015f9af6ba1974a3b208842da01e705f9ac
[ "BSD-3-Clause" ]
null
null
null
simulation/aivika/modeler/arrival_timer.py
dsorokin/aivika-modeler
5c112015f9af6ba1974a3b208842da01e705f9ac
[ "BSD-3-Clause" ]
null
null
null
simulation/aivika/modeler/arrival_timer.py
dsorokin/aivika-modeler
5c112015f9af6ba1974a3b208842da01e705f9ac
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2017 David Sorokin <[email protected]> # # Licensed under BSD3. See the LICENSE.txt file in the root of this distribution. from simulation.aivika.modeler.model import * from simulation.aivika.modeler.port import * def create_arrival_timer(model, name, descr = None): """Return a new timer tha...
36.435897
105
0.712878
0
0
0
0
0
0
0
0
523
0.368051
2246b2f969806313a587b3933434d8a9f94f2b5f
106
py
Python
mundo 1/aula 7/exer8.py
jonatan098/cursopython
6e4cbaef6229e230fdbc66d80ec1b5a089887b0d
[ "MIT" ]
null
null
null
mundo 1/aula 7/exer8.py
jonatan098/cursopython
6e4cbaef6229e230fdbc66d80ec1b5a089887b0d
[ "MIT" ]
null
null
null
mundo 1/aula 7/exer8.py
jonatan098/cursopython
6e4cbaef6229e230fdbc66d80ec1b5a089887b0d
[ "MIT" ]
1
2020-02-22T17:21:05.000Z
2020-02-22T17:21:05.000Z
m = float(input('digite o metro ')) print(f'{m} metros e igual {m*100} centimetros e {m*1000} milimetros')
53
70
0.688679
0
0
0
0
0
0
0
0
80
0.754717
2246b7989fa46d68e0d0a29597a7a6170e8898d9
859
py
Python
ros/src/airsim_ros_pkgs/scripts/readscan.py
juwangvsu/AirSim
fcf8c7d89821a9067d53f0d083c7bc6efac1776c
[ "MIT" ]
null
null
null
ros/src/airsim_ros_pkgs/scripts/readscan.py
juwangvsu/AirSim
fcf8c7d89821a9067d53f0d083c7bc6efac1776c
[ "MIT" ]
null
null
null
ros/src/airsim_ros_pkgs/scripts/readscan.py
juwangvsu/AirSim
fcf8c7d89821a9067d53f0d083c7bc6efac1776c
[ "MIT" ]
1
2021-03-23T23:11:02.000Z
2021-03-23T23:11:02.000Z
#!/usr/bin/env python import rospy import rosbag import os import sys import textwrap import yaml lidarmsg=None ################# read the lidar msg from yaml file and return ############## def readlidardummy(): global lidarmsg if lidarmsg==None: lidarmsg= doreadlidar() return lidarmsg def doreadlidar():...
23.861111
100
0.694994
0
0
0
0
0
0
0
0
441
0.513388
2247d6e5fabfa0bfb68bd37d1e8736537d83e496
4,375
py
Python
flytekit/models/qubole.py
slai/flytekit
9d73d096b748d263a638e6865d15db4880845305
[ "Apache-2.0" ]
null
null
null
flytekit/models/qubole.py
slai/flytekit
9d73d096b748d263a638e6865d15db4880845305
[ "Apache-2.0" ]
2
2021-06-26T04:32:43.000Z
2021-07-14T04:47:52.000Z
flytekit/models/qubole.py
slai/flytekit
9d73d096b748d263a638e6865d15db4880845305
[ "Apache-2.0" ]
null
null
null
from flyteidl.plugins import qubole_pb2 as _qubole from flytekit.models import common as _common class HiveQuery(_common.FlyteIdlEntity): def __init__(self, query, timeout_sec, retry_count): """ Initializes a new HiveQuery. :param Text query: The query string. :param int timeout_...
26.355422
109
0.597257
4,268
0.975543
0
0
2,140
0.489143
0
0
1,580
0.361143
224b518501a4fc21242f8b7e19fdfbb05fcec01d
1,583
py
Python
app/app.py
SogoKato/mecab-parser
402f22b4da283dfc74935fc66f092452158beb56
[ "MIT" ]
null
null
null
app/app.py
SogoKato/mecab-parser
402f22b4da283dfc74935fc66f092452158beb56
[ "MIT" ]
null
null
null
app/app.py
SogoKato/mecab-parser
402f22b4da283dfc74935fc66f092452158beb56
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from dataclasses import asdict from logging import DEBUG import os from flask import Flask, jsonify, request from werkzeug.exceptions import HTTPException from mecab_parser import MecabParserFactory app = Flask(__name__) app.config["JSON_AS_ASCII"] = False @app.route("/parse", methods=["PO...
27.77193
94
0.599495
0
0
0
0
1,156
0.730259
0
0
376
0.237524
224e634019de5a0413838cff34d92fa96b8463fb
1,402
py
Python
src/data_migrator/emitters/__init__.py
schubergphilis/data-migrator
b5ced9abd6bc2c60e9c115951fee38c2fd08923f
[ "MIT" ]
18
2017-04-27T08:57:40.000Z
2021-04-01T22:39:40.000Z
src/data_migrator/emitters/__init__.py
schubergphilis/data-migrator
b5ced9abd6bc2c60e9c115951fee38c2fd08923f
[ "MIT" ]
1,077
2017-04-13T20:56:44.000Z
2022-03-31T01:23:50.000Z
src/data_migrator/emitters/__init__.py
schubergphilis/data-migrator
b5ced9abd6bc2c60e9c115951fee38c2fd08923f
[ "MIT" ]
6
2017-04-17T14:14:45.000Z
2020-05-05T10:05:23.000Z
#!/usr/bin/env python # -*- coding: UTF-8 -*- """Emitters are used to export models to output format. This module contains all classes for emitters: base and actuals. Currently the system has two emitters: :class:`~.CSVEmitter` and :class:`~.MySQLEmitter` implemented, of which the last is the default emitter. An emitt...
32.604651
78
0.738231
0
0
0
0
0
0
0
0
1,229
0.876605
22529ca1da0ceee85ccd01a18946c0340e79ffbb
330
py
Python
cycleshare/migrations/0013_remove_cycle_toprofile.py
vasundhara7/College-EWallet
0a4c32bc08218650635a04fb9a9e28446fd4f3e1
[ "Apache-2.0" ]
2
2019-07-28T00:34:09.000Z
2020-06-18T11:58:03.000Z
cycleshare/migrations/0013_remove_cycle_toprofile.py
vasundhara7/College-EWallet
0a4c32bc08218650635a04fb9a9e28446fd4f3e1
[ "Apache-2.0" ]
null
null
null
cycleshare/migrations/0013_remove_cycle_toprofile.py
vasundhara7/College-EWallet
0a4c32bc08218650635a04fb9a9e28446fd4f3e1
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.0.9 on 2018-12-12 08:18 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('cycleshare', '0012_cycle_toprofile'), ] operations = [ migrations.RemoveField( model_name='cycle', name='toprofile', ...
18.333333
47
0.593939
245
0.742424
0
0
0
0
0
0
99
0.3
2252c6b7f19070373e0889abae519f050d93b6aa
5,495
py
Python
projects/aFPGA/10_python/npu/generate_npu_sram_init_file.py
helloworld1983/NPU_on_FPGA
1d0626dbed463cfacd47805a3214a43662f5b28c
[ "BSD-2-Clause" ]
63
2018-08-05T14:30:47.000Z
2022-03-31T09:41:55.000Z
projects/aFPGA/10_python/npu/generate_npu_sram_init_file.py
cxdzyq1110/NPU_on_FPGA
1d0626dbed463cfacd47805a3214a43662f5b28c
[ "BSD-2-Clause" ]
null
null
null
projects/aFPGA/10_python/npu/generate_npu_sram_init_file.py
cxdzyq1110/NPU_on_FPGA
1d0626dbed463cfacd47805a3214a43662f5b28c
[ "BSD-2-Clause" ]
22
2018-11-06T13:01:28.000Z
2022-03-09T08:52:27.000Z
import math import numpy as np from scipy import signal #%% 全自动的数据生成 M = 16; N = 100; AddImm = 1000; MAT_M = 3; MAT_N = 5; MAT_P = 7; Pm = 5; Pn = 5; Km = 5; Kn = 5; MODE = 1; fpp = open("./npu_verification_para.list", "w") fpp.write("%d\n"%(M)) fpp.write("%d\n"%(N)) fpp.write("%d\n"%(AddImm)) fpp.write("%d\n"%(MAT_M...
25.67757
67
0.601274
0
0
0
0
0
0
0
0
1,106
0.192214
225438e5c2b8551e69ccb321df71b6704ae2b4d5
17
py
Python
2.py
modianor/git_project
21d664bfa31d6f3e584ffc594514ea4342b6bc3f
[ "MIT" ]
null
null
null
2.py
modianor/git_project
21d664bfa31d6f3e584ffc594514ea4342b6bc3f
[ "MIT" ]
null
null
null
2.py
modianor/git_project
21d664bfa31d6f3e584ffc594514ea4342b6bc3f
[ "MIT" ]
null
null
null
A = 1 B = 2 C = 4
5.666667
5
0.352941
0
0
0
0
0
0
0
0
0
0
2255fb2ff207d881f927e1b321a4dc62c8ca610a
17
py
Python
src/ixu/commands/server/__init__.py
luanguimaraesla/ixu
f213bdf27fc7336a76110cf3f89e30ae1d5a64fb
[ "Apache-2.0" ]
2
2021-05-14T17:14:09.000Z
2021-06-13T21:35:04.000Z
src/ixu/commands/server/__init__.py
luanguimaraesla/ixu
f213bdf27fc7336a76110cf3f89e30ae1d5a64fb
[ "Apache-2.0" ]
null
null
null
src/ixu/commands/server/__init__.py
luanguimaraesla/ixu
f213bdf27fc7336a76110cf3f89e30ae1d5a64fb
[ "Apache-2.0" ]
null
null
null
from . import up
8.5
16
0.705882
0
0
0
0
0
0
0
0
0
0
225632b6786bc6319f8c49ffcd364075da52275b
247
py
Python
pythoncev/exercicios/ex096.py
gustavobelloni/Python
156a99d10f460f0fcaea18a87d35d4b0e3dba493
[ "MIT" ]
null
null
null
pythoncev/exercicios/ex096.py
gustavobelloni/Python
156a99d10f460f0fcaea18a87d35d4b0e3dba493
[ "MIT" ]
null
null
null
pythoncev/exercicios/ex096.py
gustavobelloni/Python
156a99d10f460f0fcaea18a87d35d4b0e3dba493
[ "MIT" ]
null
null
null
def área(larg, comp): a = larg * comp print(f'A área de um terreno {larg}x{comp} é de {a}m²') print('Controle de Terrenos') print('--------------------') l = float(input('Largura (m): ')) c = float(input('Comprimento (m): ')) área(l, c)
22.454545
59
0.554656
0
0
0
0
0
0
0
0
129
0.511905
22567858f90706f357ad018d732e41ca1cb74961
2,678
py
Python
readthedocs/proxito/views/decorators.py
tkoyama010/readthedocs.org
aac8fb39586db902d9fbb51b639dd281c819dae2
[ "MIT" ]
2
2021-05-16T06:57:15.000Z
2021-05-16T06:57:18.000Z
readthedocs/proxito/views/decorators.py
tkoyama010/readthedocs.org
aac8fb39586db902d9fbb51b639dd281c819dae2
[ "MIT" ]
12
2021-03-21T13:16:50.000Z
2022-03-12T00:55:05.000Z
readthedocs/proxito/views/decorators.py
mondeja/readthedocs.org
fb01c6d9d78272e3f4fd146697e8760c04e4fbb6
[ "MIT" ]
1
2021-07-09T14:02:39.000Z
2021-07-09T14:02:39.000Z
import logging from functools import wraps from django.http import Http404 from readthedocs.projects.models import Project, ProjectRelationship log = logging.getLogger(__name__) # noqa def map_subproject_slug(view_func): """ A decorator that maps a ``subproject_slug`` URL param into a Project. :raise...
33.475
100
0.581404
0
0
0
0
1,929
0.720314
0
0
842
0.314414
2256a0c4684d099dc813eeba74a7fcc9133e772a
4,217
py
Python
tortue_geniale/tg_channel_events.py
vavalm/discord_bot_tortue_geniale
2fa2865166dd109b1138b77ed7f21d8e59efd8ab
[ "MIT" ]
null
null
null
tortue_geniale/tg_channel_events.py
vavalm/discord_bot_tortue_geniale
2fa2865166dd109b1138b77ed7f21d8e59efd8ab
[ "MIT" ]
null
null
null
tortue_geniale/tg_channel_events.py
vavalm/discord_bot_tortue_geniale
2fa2865166dd109b1138b77ed7f21d8e59efd8ab
[ "MIT" ]
null
null
null
import discord import asyncio import re import logging from data.groups_name import free_random_name logging.basicConfig(level=logging.INFO) client = discord.Client() class ClientEvents(discord.Client): ''' Classe initialization ''' def __init__(self, *args, **kwargs): super().__init__(*args...
35.436975
116
0.596396
4,047
0.958778
0
0
338
0.080076
3,393
0.803838
834
0.197584
22574ae53ea97f421f17d51078183bbb695cb068
566
py
Python
middleware/login_required.py
ahmetelgun/flask-boilerplate
56bc0235b5f00a7aaca6a9536a1744442863b8b6
[ "Apache-2.0" ]
2
2021-12-01T20:48:44.000Z
2022-02-04T16:33:33.000Z
middleware/login_required.py
ahmetelgun/flask_authentication_boilerplate
56bc0235b5f00a7aaca6a9536a1744442863b8b6
[ "Apache-2.0" ]
null
null
null
middleware/login_required.py
ahmetelgun/flask_authentication_boilerplate
56bc0235b5f00a7aaca6a9536a1744442863b8b6
[ "Apache-2.0" ]
null
null
null
from flask import request, make_response, jsonify, g from datetime import datetime from functools import wraps import jwt from models import DBContext, User from settings import SECRET_KEY from service import is_token_valid def login_required(func): @wraps(func) def wrapper(*args, **kwargs): not_auth...
22.64
52
0.681979
0
0
0
0
288
0.508834
0
0
25
0.04417
22574e100d92910a2acaa1fb84cd7d78b47e8242
2,189
py
Python
libs/sqlservice/utils.py
smartadvising/smartadvising-api
74cfcc336c87523fcb011a96bc4506ecdef93afe
[ "MIT" ]
null
null
null
libs/sqlservice/utils.py
smartadvising/smartadvising-api
74cfcc336c87523fcb011a96bc4506ecdef93afe
[ "MIT" ]
null
null
null
libs/sqlservice/utils.py
smartadvising/smartadvising-api
74cfcc336c87523fcb011a96bc4506ecdef93afe
[ "MIT" ]
null
null
null
""" Utilities --------- The utilities module. """ from collections.abc import Mapping, Sequence from functools import wraps import types class FrozenDict(Mapping): """A frozen dictionary implementation that prevents the object from being mutated. This is primarily used when defining a dict-like object as a ...
27.708861
79
0.640018
753
0.343993
205
0.09365
280
0.127912
0
0
757
0.34582
2257918164befc9b4532377573ee36b973df3e73
1,817
py
Python
tests/test_normals.py
foobarbecue/trimesh
db2c649ebc577874702644248964b3295bd6ed5b
[ "MIT" ]
null
null
null
tests/test_normals.py
foobarbecue/trimesh
db2c649ebc577874702644248964b3295bd6ed5b
[ "MIT" ]
null
null
null
tests/test_normals.py
foobarbecue/trimesh
db2c649ebc577874702644248964b3295bd6ed5b
[ "MIT" ]
1
2019-05-31T03:37:21.000Z
2019-05-31T03:37:21.000Z
try: from . import generic as g except BaseException: import generic as g class NormalsTest(g.unittest.TestCase): def test_vertex_normal(self): mesh = g.trimesh.creation.icosahedron() # the icosahedron is centered at zero, so the true vertex # normal is just a unit vector of the v...
41.295455
79
0.587782
1,646
0.905889
0
0
0
0
0
0
332
0.182719
2257acdf6a3fd8c165f7da9ebcd60fa9bce30be5
14,692
py
Python
flagmaker/settings.py
google/sa360-bigquery-bootstrapper
ca25e9d9f4d00f392970e5e942942f9acb21952b
[ "Apache-2.0" ]
4
2020-03-14T03:26:46.000Z
2020-12-13T14:43:22.000Z
flagmaker/settings.py
google/sa360-bigquery-bootstrapper
ca25e9d9f4d00f392970e5e942942f9acb21952b
[ "Apache-2.0" ]
1
2020-11-17T16:26:50.000Z
2020-11-17T16:26:50.000Z
flagmaker/settings.py
google/sa360-bigquery-bootstrapper
ca25e9d9f4d00f392970e5e942942f9acb21952b
[ "Apache-2.0" ]
1
2020-10-13T17:02:23.000Z
2020-10-13T17:02:23.000Z
# /*********************************************************************** # Copyright 2019 Google Inc. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICE...
33.239819
80
0.544854
12,799
0.871154
0
0
1,207
0.082154
0
0
2,039
0.138783
225800b91896c420ce99d82a83f56df5a8a804aa
19,390
py
Python
cli/sub.py
mylovage/GolemQT
7560d4e67d564022fbbdc00c069a51c673bfe267
[ "MIT" ]
null
null
null
cli/sub.py
mylovage/GolemQT
7560d4e67d564022fbbdc00c069a51c673bfe267
[ "MIT" ]
null
null
null
cli/sub.py
mylovage/GolemQT
7560d4e67d564022fbbdc00c069a51c673bfe267
[ "MIT" ]
null
null
null
# coding:utf-8 # # The MIT License (MIT) # # Copyright (c) 2018-2020 azai/Rgveda/GolemQuant base on QUANTAXIS/yutiansut # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, ...
37.145594
143
0.545848
667
0.030346
0
0
1,308
0.059509
0
0
8,776
0.399272
225834b3b08a2a19311dda4b3b5c026b4df674f0
3,125
py
Python
setup.py
voxel51/eta
17fb1148e853704872ed50e0e30c7800272b8398
[ "Apache-2.0" ]
25
2018-07-21T02:37:34.000Z
2022-03-30T12:57:54.000Z
setup.py
voxel51/eta
17fb1148e853704872ed50e0e30c7800272b8398
[ "Apache-2.0" ]
183
2018-06-13T18:57:00.000Z
2022-02-24T14:35:49.000Z
setup.py
voxel51/eta
17fb1148e853704872ed50e0e30c7800272b8398
[ "Apache-2.0" ]
13
2018-09-10T18:46:58.000Z
2022-02-07T02:25:31.000Z
#!/usr/bin/env python """ Installs ETA. Copyright 2017-2021, Voxel51, Inc. voxel51.com """ import os from setuptools import setup, find_packages from wheel.bdist_wheel import bdist_wheel VERSION = "0.6.1" class BdistWheelCustom(bdist_wheel): def finalize_options(self): bdist_wheel.finalize_options(self...
28.935185
70
0.58944
204
0.06528
0
0
0
0
0
0
1,630
0.5216
2258db01c670eb29b690517709324afbc74e8b71
8,582
py
Python
Kernel/kernel.py
y11en/BranchMonitoringProject
5d3ca533338da919a1757562f3810d49296ebf48
[ "MIT" ]
122
2017-03-08T00:45:03.000Z
2022-03-01T03:05:21.000Z
Kernel/kernel.py
y11en/BranchMonitoringProject
5d3ca533338da919a1757562f3810d49296ebf48
[ "MIT" ]
3
2017-03-08T01:16:54.000Z
2017-03-22T22:59:26.000Z
Kernel/kernel.py
y11en/BranchMonitoringProject
5d3ca533338da919a1757562f3810d49296ebf48
[ "MIT" ]
42
2017-03-08T21:28:48.000Z
2022-02-20T15:24:46.000Z
# Kernel introspection module to enrich branch collected data # This code is part of BranchMonitoring framework # Written by: Marcus Botacin - 2017 # Federal University of Parana (UFPR) from xml.etree.ElementTree import ElementTree # Parse XML import subprocess # Run dump tools i...
34.465863
105
0.53519
7,599
0.885458
0
0
0
0
0
0
2,988
0.348171
2258e4decef3126cb93f24dd49680df54adc84dc
243
py
Python
config/environments/__init__.py
mihail-ivanov/flask-init
47f634f70bb8bd02db8f0a0a3a1955b08a249254
[ "MIT" ]
null
null
null
config/environments/__init__.py
mihail-ivanov/flask-init
47f634f70bb8bd02db8f0a0a3a1955b08a249254
[ "MIT" ]
null
null
null
config/environments/__init__.py
mihail-ivanov/flask-init
47f634f70bb8bd02db8f0a0a3a1955b08a249254
[ "MIT" ]
null
null
null
from .development import DevelopmentConfig from .testing import TestingConfig from .production import ProductionConfig app_config = { 'development': DevelopmentConfig, 'testing': TestingConfig, 'production': ProductionConfig, }
20.25
42
0.773663
0
0
0
0
0
0
0
0
34
0.139918
225b7caf45db6cf9057062f56f08950fb1b441f2
5,026
py
Python
dialogs.py
rdbende/Sun-Valley-messageboxes
d6f2b0849caf63c609fc22ecd3909491e2f3ffcf
[ "MIT" ]
5
2021-12-29T11:58:37.000Z
2022-03-06T15:13:08.000Z
dialogs.py
rdbende/Sun-Valley-messageboxes
d6f2b0849caf63c609fc22ecd3909491e2f3ffcf
[ "MIT" ]
1
2022-02-05T10:30:08.000Z
2022-02-05T16:04:06.000Z
dialogs.py
rdbende/Sun-Valley-messageboxes
d6f2b0849caf63c609fc22ecd3909491e2f3ffcf
[ "MIT" ]
null
null
null
import tkinter as tk from tkinter import ttk from functools import partial def popup(parent, title, details, icon, *, buttons): dialog = tk.Toplevel() result = None big_frame = ttk.Frame(dialog) big_frame.pack(fill="both", expand=True) big_frame.columnconfigure(0, weight=1) big_frame.rowconf...
27.615385
87
0.591922
0
0
0
0
0
0
0
0
621
0.123558
225c724f4896f9bddbbf401bf1a3929af43df247
94
py
Python
enthought/endo/docerror.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
3
2016-12-09T06:05:18.000Z
2018-03-01T13:00:29.000Z
enthought/endo/docerror.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
1
2020-12-02T00:51:32.000Z
2020-12-02T08:48:55.000Z
enthought/endo/docerror.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
null
null
null
# proxy module from __future__ import absolute_import from etsdevtools.endo.docerror import *
23.5
39
0.840426
0
0
0
0
0
0
0
0
14
0.148936
225d1d06e227d6a8a3242fe225e574042e91441e
12,591
py
Python
troposphere/kendra.py
marinpurgar/troposphere
ec35854000ddfd5e2eecd251d5ecaf31979bd2d1
[ "BSD-2-Clause" ]
null
null
null
troposphere/kendra.py
marinpurgar/troposphere
ec35854000ddfd5e2eecd251d5ecaf31979bd2d1
[ "BSD-2-Clause" ]
null
null
null
troposphere/kendra.py
marinpurgar/troposphere
ec35854000ddfd5e2eecd251d5ecaf31979bd2d1
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2012-2020, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 18.6.0 from . import AWSObject from . import AWSProperty from . import Tags from .validators import boolean from ....
30.194245
76
0.669685
12,113
0.962036
0
0
0
0
0
0
3,144
0.249702
225fee4b672c69f3b564170c5c438a29025400e1
3,046
py
Python
cv2/wxPython-CV-widget/main.py
whitmans-max/python-examples
881a8f23f0eebc76816a0078e19951893f0daaaa
[ "MIT" ]
140
2017-02-21T22:49:04.000Z
2022-03-22T17:51:58.000Z
cv2/wxPython-CV-widget/main.py
whitmans-max/python-examples
881a8f23f0eebc76816a0078e19951893f0daaaa
[ "MIT" ]
5
2017-12-02T19:55:00.000Z
2021-09-22T23:18:39.000Z
cv2/wxPython-CV-widget/main.py
whitmans-max/python-examples
881a8f23f0eebc76816a0078e19951893f0daaaa
[ "MIT" ]
79
2017-01-25T10:53:33.000Z
2022-03-11T16:13:57.000Z
import wx import cv2 #---------------------------------------------------------------------- # Panel to display image from camera #---------------------------------------------------------------------- class WebcamPanel(wx.Window): # wx.Panel, wx.Control def __init__(self, parent, camera, fps=15, flip=Fals...
30.158416
114
0.520026
2,512
0.824688
0
0
0
0
0
0
980
0.321733
2260413d47cac288ecaeb49a5d64f3b2f805bd94
580
py
Python
src/inputbox.py
creikey/nuked-dashboard
250f8af29570bca69394fd1328343917fa067543
[ "MIT" ]
1
2019-01-17T14:20:32.000Z
2019-01-17T14:20:32.000Z
src/inputbox.py
creikey/nuked-dashboard
250f8af29570bca69394fd1328343917fa067543
[ "MIT" ]
3
2019-01-19T01:33:10.000Z
2019-01-19T01:35:35.000Z
src/inputbox.py
creikey/doomsdash
250f8af29570bca69394fd1328343917fa067543
[ "MIT" ]
null
null
null
import pynk from pynk.nkpygame import NkPygame class InputBox: def __init__(self, max_len): # self.max_len = pynk.ffi.new("int *", max_len) self.len = pynk.ffi.new("int *", 0) self.max_len = max_len # self.len = 0 self.cur_text = pynk.ffi.new("char[{}]".format(max_len)) ...
34.117647
90
0.575862
530
0.913793
0
0
0
0
0
0
97
0.167241
226058992d51da3d32320a685665a445a8020b91
1,454
py
Python
01_demo/MLP_test.py
wwww666/Tensorflow2.0
4df3a3784482bb8db7943ffb402b5822d5111ab9
[ "Apache-2.0" ]
2
2020-04-24T10:20:18.000Z
2021-02-25T03:53:07.000Z
01_demo/MLP_test.py
wwww666/Tensorflow2.0
4df3a3784482bb8db7943ffb402b5822d5111ab9
[ "Apache-2.0" ]
null
null
null
01_demo/MLP_test.py
wwww666/Tensorflow2.0
4df3a3784482bb8db7943ffb402b5822d5111ab9
[ "Apache-2.0" ]
null
null
null
''' 自定义实现双层网络,实现Relu激活函数 ''' import tensorflow as tf import numpy as np import sys sys.path.append("..") from softmax_test import train_che3 from tensorflow.keras.datasets.fashion_mnist import load_data # 加载数据集;转换类型并做归一化处理 (x_train,y_train),(x_test,y_test)=load_data() batch_size=256 x_train=tf.cast(x_tra...
29.08
104
0.751719
0
0
0
0
0
0
0
0
373
0.223621
22613f6d8ef797b79ce3c0bf426040fa5c8d5f9b
1,704
py
Python
ticketnum/ticket_numbering.py
phizzl3/PrintShopScripts
26cf12d189836907370fd8671ef0d8eba7cd3411
[ "MIT" ]
1
2021-01-19T20:36:35.000Z
2021-01-19T20:36:35.000Z
ticketnum/ticket_numbering.py
phizzl3/counter-calculator
26cf12d189836907370fd8671ef0d8eba7cd3411
[ "MIT" ]
null
null
null
ticketnum/ticket_numbering.py
phizzl3/counter-calculator
26cf12d189836907370fd8671ef0d8eba7cd3411
[ "MIT" ]
null
null
null
""" A simple script for numbering nUp tickets for the print shop. """ def numbering_main() -> None: """ Gets numbering sequences for nUp ticket numbering. Gets the total number of tickets requested along with now many will fit on a sheet (n_up) as well as the starting ticket number and prints the tic...
33.411765
111
0.662559
0
0
0
0
0
0
0
0
958
0.562207
2261d6d71d2909cadfc80285de61e3b9d29b7970
2,539
py
Python
emergent ferromagnetism near three-quarters filling in twisted bilayer graphene/scripts/myTerrain.py
aaronsharpe/publication_archives
aabf1a7899b81c43fc27bdd05094f5a84e509e90
[ "MIT" ]
null
null
null
emergent ferromagnetism near three-quarters filling in twisted bilayer graphene/scripts/myTerrain.py
aaronsharpe/publication_archives
aabf1a7899b81c43fc27bdd05094f5a84e509e90
[ "MIT" ]
null
null
null
emergent ferromagnetism near three-quarters filling in twisted bilayer graphene/scripts/myTerrain.py
aaronsharpe/publication_archives
aabf1a7899b81c43fc27bdd05094f5a84e509e90
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon May 15 21:32:17 2017 @author: Aaron Sharpe """ import numpy as np import os from matplotlib.colors import LinearSegmentedColormap def igorTerrain(n): n1 = np.around(n*25/256) n2 = np.around(n*37/256) n3 = np.around(n*100/256) n4 = np.around(n*150/256) r...
30.590361
86
0.54549
0
0
0
0
0
0
0
0
182
0.071682
226279b24caaedae28347564e963c2b64e533cf3
217
py
Python
datapackage_pipelines/generators/utilities.py
gperonato/datapackage-pipelines
72b98918db1c19590586a3a85c5b087227cbbc3b
[ "MIT" ]
109
2016-09-01T08:41:55.000Z
2021-11-10T10:08:35.000Z
datapackage_pipelines/generators/utilities.py
gperonato/datapackage-pipelines
72b98918db1c19590586a3a85c5b087227cbbc3b
[ "MIT" ]
144
2016-08-30T16:26:50.000Z
2021-04-18T09:06:12.000Z
datapackage_pipelines/generators/utilities.py
gperonato/datapackage-pipelines
72b98918db1c19590586a3a85c5b087227cbbc3b
[ "MIT" ]
34
2016-09-05T12:46:53.000Z
2022-03-05T01:53:49.000Z
def arg_to_step(arg): if isinstance(arg, str): return {'run': arg} else: return dict(zip(['run', 'parameters', 'cache'], arg)) def steps(*args): return [arg_to_step(arg) for arg in args]
21.7
61
0.59447
0
0
0
0
0
0
0
0
29
0.133641
2262f6ba6d8c2278a63ea0e571aa7725d2647bf8
11,843
py
Python
plugin/taskmage2/project/projects.py
willjp/vim-taskmage
adcf809ccf1768753eca4dadaf6279b34e8d5699
[ "BSD-2-Clause" ]
1
2017-11-28T14:12:03.000Z
2017-11-28T14:12:03.000Z
plugin/taskmage2/project/projects.py
willjp/vim-taskmage
adcf809ccf1768753eca4dadaf6279b34e8d5699
[ "BSD-2-Clause" ]
16
2017-08-13T18:01:26.000Z
2020-11-17T04:55:43.000Z
plugin/taskmage2/project/projects.py
willjp/vim-taskmage
adcf809ccf1768753eca4dadaf6279b34e8d5699
[ "BSD-2-Clause" ]
null
null
null
import os import shutil import tempfile from taskmage2.utils import filesystem, functional from taskmage2.asttree import asttree, renderers from taskmage2.parser import iostream, parsers from taskmage2.project import taskfiles class Project(object): def __init__(self, root='.'): """ Constructor. ...
31.248021
125
0.548679
11,094
0.936756
816
0.068901
2,283
0.192772
0
0
5,769
0.487123
2263a0daf4d65f69a2ef1044b98efa275d27150f
1,611
py
Python
discord/ext/vbu/cogs/utils/converters/filtered_user.py
6days9weeks/Novus
a21157f15d7a07669cb75b3f023bd9eedf40e40e
[ "MIT" ]
2
2022-01-22T16:05:42.000Z
2022-01-22T16:06:07.000Z
discord/ext/vbu/cogs/utils/converters/filtered_user.py
6days9weeks/Novus
a21157f15d7a07669cb75b3f023bd9eedf40e40e
[ "MIT" ]
null
null
null
discord/ext/vbu/cogs/utils/converters/filtered_user.py
6days9weeks/Novus
a21157f15d7a07669cb75b3f023bd9eedf40e40e
[ "MIT" ]
null
null
null
from discord.ext import commands class FilteredUser(commands.UserConverter): """ A simple :class:`discord.ext.commands.UserConverter` that doesn't allow bots or the author to be passed into the function. """ def __init__(self, *, allow_author: bool = False, allow_bots: bool = False): supe...
38.357143
82
0.664184
1,572
0.975791
0
0
0
0
800
0.496586
442
0.274364
226437962414de4509b79b7a803dd031ebb02932
361
py
Python
py/2017/3B.py
pedrotari7/advent_of_code
98d5bc8d903435624a019a5702f5421d7b4ef8c8
[ "MIT" ]
null
null
null
py/2017/3B.py
pedrotari7/advent_of_code
98d5bc8d903435624a019a5702f5421d7b4ef8c8
[ "MIT" ]
null
null
null
py/2017/3B.py
pedrotari7/advent_of_code
98d5bc8d903435624a019a5702f5421d7b4ef8c8
[ "MIT" ]
null
null
null
a = 289326 coords = [(1, 0), (1, -1), (0, -1), (-1, -1), (-1, 0), (-1, 1), (0, 1), (1, 1)] x,y = (0,0) dx,dy = (1,0) M = {(x,y):1} while M[(x, y)] < a: x, y = x+dx, y+dy M[(x, y)] = sum([M[(x+ox, y+oy)] for ox,oy in coords if (x+ox,y+oy) in M]) if (x == y) or (x > 0 and x == 1-y) or (x < 0 and x == -y): ...
24.066667
79
0.382271
0
0
0
0
0
0
0
0
0
0
226749a06c765ec39cc633d7c553b9c567992420
811
py
Python
q.py
Akatsuki1910/tokuron
2f5b05dc1c1395f30e738a0d5749ac32d46e5379
[ "MIT" ]
null
null
null
q.py
Akatsuki1910/tokuron
2f5b05dc1c1395f30e738a0d5749ac32d46e5379
[ "MIT" ]
null
null
null
q.py
Akatsuki1910/tokuron
2f5b05dc1c1395f30e738a0d5749ac32d46e5379
[ "MIT" ]
null
null
null
""" Q learning """ import numpy as np import plot Q = np.array(np.zeros([11, 3])) GAMMA = 0.9 ALPHA = 0.1 def action_select(s_s): """ action select """ return np.random.choice([i for i in range(1, 4) if i + s_s < 11]) for i in range(10000): S_STATE = 0 while S_STATE != 10: a_state = acti...
21.918919
69
0.557337
0
0
0
0
0
0
0
0
39
0.048089
226990cee4efe4dbfe653dc0472db81ab56d2396
390
py
Python
videogame_project/videogame_app/models.py
cs-fullstack-fall-2018/django-form-post1-R3coTh3Cod3r
3e44b737425fe347757a50f30aa5df021057bfde
[ "Apache-2.0" ]
null
null
null
videogame_project/videogame_app/models.py
cs-fullstack-fall-2018/django-form-post1-R3coTh3Cod3r
3e44b737425fe347757a50f30aa5df021057bfde
[ "Apache-2.0" ]
null
null
null
videogame_project/videogame_app/models.py
cs-fullstack-fall-2018/django-form-post1-R3coTh3Cod3r
3e44b737425fe347757a50f30aa5df021057bfde
[ "Apache-2.0" ]
null
null
null
from django.db import models from django.utils import timezone class GameIdea(models.Model): name=models.CharField(max_length=100) genre= models.CharField(max_length=100) currentdate= models.DateTimeField(blank=True, null=True) def __str__(self): return self.name, self.genre def displaye...
26
60
0.707692
326
0.835897
0
0
0
0
0
0
0
0
226a5ca3cf4445179f1951c272dd77866530bcb2
4,296
py
Python
tests/test_estimate_r.py
lo-hfk/epyestim
ca2ca928b744f324dade248c24a40872b69a5222
[ "MIT" ]
11
2021-01-10T22:37:26.000Z
2022-03-14T10:46:21.000Z
tests/test_estimate_r.py
lo-hfk/epyestim
ca2ca928b744f324dade248c24a40872b69a5222
[ "MIT" ]
null
null
null
tests/test_estimate_r.py
lo-hfk/epyestim
ca2ca928b744f324dade248c24a40872b69a5222
[ "MIT" ]
4
2021-03-26T23:43:03.000Z
2021-11-21T15:16:05.000Z
import unittest from datetime import date import numpy as np import pandas as pd from numpy.testing import assert_array_almost_equal from scipy.stats import gamma from epyestim.estimate_r import overall_infectivity, sum_by_split_dates, estimate_r, gamma_quantiles class EstimateRTest(unittest.TestCase): def test...
34.926829
106
0.571927
3,978
0.925978
0
0
0
0
0
0
514
0.119646
226bbbb2f75ccc059e2118af7b3e40bfe68eb6e9
3,355
py
Python
tests/imagenet_classification_test.py
SanggunLee/edgetpu
d3cf166783265f475c1ddba5883e150ee84f7bfe
[ "Apache-2.0" ]
2
2020-05-07T22:34:16.000Z
2020-09-03T20:30:37.000Z
tests/imagenet_classification_test.py
SanggunLee/edgetpu
d3cf166783265f475c1ddba5883e150ee84f7bfe
[ "Apache-2.0" ]
null
null
null
tests/imagenet_classification_test.py
SanggunLee/edgetpu
d3cf166783265f475c1ddba5883e150ee84f7bfe
[ "Apache-2.0" ]
1
2020-01-08T05:55:58.000Z
2020-01-08T05:55:58.000Z
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
37.696629
80
0.701937
2,443
0.728167
0
0
0
0
0
0
1,147
0.341878
226d9e6adcc58d1700424bf4cff15de32eb71005
1,781
py
Python
11_testing_best_practices/generate_maze_faster.py
krother/maze_run
2860198a2af7d05609d043de1b582cc0070aac09
[ "MIT" ]
7
2017-05-02T12:23:03.000Z
2020-04-07T07:01:52.000Z
11_testing_best_practices/generate_maze_faster.py
fengshao007P/maze_run
2860198a2af7d05609d043de1b582cc0070aac09
[ "MIT" ]
null
null
null
11_testing_best_practices/generate_maze_faster.py
fengshao007P/maze_run
2860198a2af7d05609d043de1b582cc0070aac09
[ "MIT" ]
21
2016-02-26T10:26:16.000Z
2021-12-04T23:38:00.000Z
# Improved version of the code from chapter 03 # created in chapter 11 to accelerate execution import random XMAX, YMAX = 19, 16 def create_grid_string(dots, xsize, ysize): """ Creates a grid of size (xx, yy) with the given positions of dots. """ grid = "" for y in range(ysize): f...
25.811594
74
0.601909
0
0
0
0
0
0
0
0
424
0.238069
226ee0a94d2c674c5419d2b1671a6c420a52ce80
98
py
Python
flask-backend/create_database.py
amlannandy/OpenMF
da5f474bb3002084f3e5bc9ceb18b32efdf34107
[ "Apache-2.0" ]
null
null
null
flask-backend/create_database.py
amlannandy/OpenMF
da5f474bb3002084f3e5bc9ceb18b32efdf34107
[ "Apache-2.0" ]
null
null
null
flask-backend/create_database.py
amlannandy/OpenMF
da5f474bb3002084f3e5bc9ceb18b32efdf34107
[ "Apache-2.0" ]
null
null
null
from api.models.models import User from api import db, create_app db.create_all(app=create_app())
24.5
34
0.806122
0
0
0
0
0
0
0
0
0
0
226f3f6717063fd8afff828ee410784d07c44bf7
1,820
py
Python
src/UQpy/Distributions/baseclass/DistributionContinuous1D.py
marrov/UQpy
b04a267b3080e3d4d38e876547ba0d3b979734f3
[ "MIT" ]
132
2018-03-13T13:56:33.000Z
2022-03-21T13:59:17.000Z
src/UQpy/Distributions/baseclass/DistributionContinuous1D.py
marrov/UQpy
b04a267b3080e3d4d38e876547ba0d3b979734f3
[ "MIT" ]
140
2018-05-21T13:40:01.000Z
2022-03-29T14:18:01.000Z
src/UQpy/Distributions/baseclass/DistributionContinuous1D.py
marrov/UQpy
b04a267b3080e3d4d38e876547ba0d3b979734f3
[ "MIT" ]
61
2018-05-02T13:40:05.000Z
2022-03-06T11:31:21.000Z
import numpy as np import scipy.stats as stats from UQpy.Distributions.baseclass.Distribution import Distribution class DistributionContinuous1D(Distribution): """ Parent class for univariate continuous probability distributions. """ def __init__(self, **kwargs): super().__init__(**kwargs) ...
45.5
108
0.647253
1,704
0.936264
0
0
351
0.192857
0
0
224
0.123077
226fb3b836b4a323bba46bf26d01dbf892dfb882
1,666
py
Python
bridge/models/basic/layers.py
JTT94/schrodinger_bridge
71841f2789c180a23d4b4641f160da5c0288a337
[ "MIT" ]
null
null
null
bridge/models/basic/layers.py
JTT94/schrodinger_bridge
71841f2789c180a23d4b4641f160da5c0288a337
[ "MIT" ]
null
null
null
bridge/models/basic/layers.py
JTT94/schrodinger_bridge
71841f2789c180a23d4b4641f160da5c0288a337
[ "MIT" ]
null
null
null
import torch from torch import nn import torch.nn.functional as F import math from functools import partial class MLP(torch.nn.Module): def __init__(self, input_dim, layer_widths, activate_final = False, activation_fn=F.relu): super(MLP, self).__init__() layers = [] prev_width = input_dim ...
34.708333
121
0.630852
1,552
0.931573
0
0
0
0
0
0
73
0.043818
2270789e36e09bf77f3225fa068413436f325de3
10,920
py
Python
chessbot.py
UbiLabsChessbot/tensorflow_chessbot
5112d9213d0224dc7acc373a7048167b7e6da6ce
[ "MIT" ]
null
null
null
chessbot.py
UbiLabsChessbot/tensorflow_chessbot
5112d9213d0224dc7acc373a7048167b7e6da6ce
[ "MIT" ]
null
null
null
chessbot.py
UbiLabsChessbot/tensorflow_chessbot
5112d9213d0224dc7acc373a7048167b7e6da6ce
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Finds submissions with chessboard images in them, # use a tensorflow convolutional neural network to predict pieces and return # a lichess analysis link and FEN diagram of chessboard import praw import collections import os import time from datetime import datetime from praw....
36.891892
154
0.677747
0
0
0
0
0
0
0
0
4,995
0.456999
2271553668c1d9c135110d311fde305c56e23bd6
1,557
py
Python
Tools/english_word/src/spider.py
pynickle/awesome-python-tools
e405fb8d9a1127ae7cd5bcbd6481da78f6f1fb07
[ "BSD-2-Clause" ]
21
2019-06-02T01:55:14.000Z
2022-01-08T22:35:31.000Z
Tools/english_word/src/spider.py
code-nick-python/awesome-daily-tools
e405fb8d9a1127ae7cd5bcbd6481da78f6f1fb07
[ "BSD-2-Clause" ]
3
2019-06-02T01:55:17.000Z
2019-06-14T12:32:06.000Z
Tools/english_word/src/spider.py
code-nick-python/awesome-daily-tools
e405fb8d9a1127ae7cd5bcbd6481da78f6f1fb07
[ "BSD-2-Clause" ]
16
2019-06-23T13:00:04.000Z
2021-09-18T06:09:58.000Z
import requests import re import time import random import pprint import os headers = {"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3858.0 Safari/537.36"} def youdict(threadName, q): res = [] index = 0 url = q.get(timeout = 2) ...
32.4375
173
0.552987
0
0
0
0
0
0
0
0
529
0.334598
22727c318ff129b6243d715f6523dbfa7a528208
769
py
Python
NFCow/malls/migrations/0001_initial.py
jojoriveraa/titulacion-NFCOW
643f7f2cbe9c68d9343f38d12629720b12e9ce1e
[ "Apache-2.0" ]
null
null
null
NFCow/malls/migrations/0001_initial.py
jojoriveraa/titulacion-NFCOW
643f7f2cbe9c68d9343f38d12629720b12e9ce1e
[ "Apache-2.0" ]
11
2016-01-09T06:27:02.000Z
2016-01-10T05:21:05.000Z
NFCow/malls/migrations/0001_initial.py
jojoriveraa/titulacion-NFCOW
643f7f2cbe9c68d9343f38d12629720b12e9ce1e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2015-12-23 08:44 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Mall', ...
27.464286
87
0.572172
614
0.79844
0
0
0
0
0
0
124
0.161248
22749bf06e02c8354fb9677be5d2215d3d9afe0c
16,406
py
Python
mmdnn/conversion/examples/tensorflow/extractor.py
ferriswym/MMdnn
dc204cdba58a6cba079816715ac766d94bd87732
[ "MIT" ]
null
null
null
mmdnn/conversion/examples/tensorflow/extractor.py
ferriswym/MMdnn
dc204cdba58a6cba079816715ac766d94bd87732
[ "MIT" ]
null
null
null
mmdnn/conversion/examples/tensorflow/extractor.py
ferriswym/MMdnn
dc204cdba58a6cba079816715ac766d94bd87732
[ "MIT" ]
null
null
null
#---------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. #------------------------------------------------------------------...
50.018293
146
0.581007
15,028
0.916006
0
0
5,199
0.316896
0
0
5,022
0.306108
22752bc484df5df4799f2011d63b6f5871537908
2,546
py
Python
nostrint/command_line.py
zevtyardt/no-strint
47583d55e3c4cd12f00f46902d2fd7d5138c3275
[ "MIT" ]
13
2019-03-13T04:14:45.000Z
2020-04-05T09:13:21.000Z
nostrint/command_line.py
zevtyardt/no-strint
47583d55e3c4cd12f00f46902d2fd7d5138c3275
[ "MIT" ]
null
null
null
nostrint/command_line.py
zevtyardt/no-strint
47583d55e3c4cd12f00f46902d2fd7d5138c3275
[ "MIT" ]
6
2019-03-22T04:48:59.000Z
2020-08-07T17:09:20.000Z
from redat import __version__ import argparse as _argparse import sys as _sys def CLI(): _parser = _argparse.ArgumentParser( description='simple str & int obfuscator (c) zvtyrdt.id', formatter_class=_argparse.RawTextHelpFormatter, version=__version__) _parser.add_argument('txt', metava...
72.742857
193
0.710919
0
0
0
0
0
0
0
0
1,328
0.521603
22754cccad56e7c435e32fdb50e3fc9c09afbc92
15,435
py
Python
simple_lib.py
rcmorehead/simplanets
3d9b3d1273a4f1a32ce656bdf5e9d6c6c38e3f7b
[ "MIT" ]
null
null
null
simple_lib.py
rcmorehead/simplanets
3d9b3d1273a4f1a32ce656bdf5e9d6c6c38e3f7b
[ "MIT" ]
null
null
null
simple_lib.py
rcmorehead/simplanets
3d9b3d1273a4f1a32ce656bdf5e9d6c6c38e3f7b
[ "MIT" ]
null
null
null
""" Useful classes and functions for SIMPLE. """ import numpy as np import warnings import math from scipy import integrate r_sun_au = 0.004649 r_earth_r_sun = 0.009155 day_hrs = 24.0 #@profile def impact_parameter(a, e, i, w, r_star): """ Compute the impact parameter at for a transiting planet. Paramet...
27.464413
94
0.579981
0
0
0
0
0
0
0
0
9,866
0.639197
2275883293755489ec49ada67afba2a65cceb970
179
py
Python
y10m/join.lines.py
goodagood/story
99dd959f4be44070144fe87313cf51595d928a11
[ "Apache-2.0" ]
3
2019-12-03T02:08:55.000Z
2021-05-30T14:02:21.000Z
y10m/join.lines.py
goodagood/story
99dd959f4be44070144fe87313cf51595d928a11
[ "Apache-2.0" ]
null
null
null
y10m/join.lines.py
goodagood/story
99dd959f4be44070144fe87313cf51595d928a11
[ "Apache-2.0" ]
1
2020-08-07T23:09:45.000Z
2020-08-07T23:09:45.000Z
#inputFile = 'sand.407' inputFile = 'sand.407' outputFile= 'sand.out' def joinLine(): pass with open(inputFile) as OF: lines = OF.readlines() print(lines[0:3])
11.1875
27
0.631285
0
0
0
0
0
0
0
0
43
0.240223
227598bb20ab74c029eb76f22348999ce40f32c0
718
py
Python
web_programming/fetch_github_info.py
JB1959/Python
b6ca263983933c3ecc06ed0083dd11b6faf870c8
[ "MIT" ]
14
2020-10-03T05:43:48.000Z
2021-11-01T21:02:26.000Z
web_programming/fetch_github_info.py
JB1959/Python
b6ca263983933c3ecc06ed0083dd11b6faf870c8
[ "MIT" ]
3
2020-06-08T07:03:15.000Z
2020-06-08T08:41:22.000Z
web_programming/fetch_github_info.py
JB1959/Python
b6ca263983933c3ecc06ed0083dd11b6faf870c8
[ "MIT" ]
12
2020-10-03T05:44:19.000Z
2022-01-16T05:37:54.000Z
#!/usr/bin/env python3 """ Created by sarathkaul on 14/11/19 Basic authentication using an API password is deprecated and will soon no longer work. Visit https://developer.github.com/changes/2020-02-14-deprecating-password-auth for more information around suggested workarounds and removal dates. """ import requests...
26.592593
86
0.71727
0
0
0
0
0
0
0
0
450
0.626741
2275d1ae20d552ba2f46265e141e463daa5307b3
1,362
py
Python
ACM ICPC/Sorting/Merge Sort/Python/Merge_Sort.py
shreejitverma/GeeksforGeeks
d7bcb166369fffa9a031a258e925b6aff8d44e6c
[ "MIT" ]
2
2022-02-18T05:14:28.000Z
2022-03-08T07:00:08.000Z
ACM ICPC/Sorting/Merge Sort/Python/Merge_Sort.py
shivaniverma1/Competitive-Programming-1
d7bcb166369fffa9a031a258e925b6aff8d44e6c
[ "MIT" ]
6
2022-01-13T04:31:04.000Z
2022-03-12T01:06:16.000Z
ACM ICPC/Sorting/Merge Sort/Python/Merge_Sort.py
shivaniverma1/Competitive-Programming-1
d7bcb166369fffa9a031a258e925b6aff8d44e6c
[ "MIT" ]
2
2022-02-14T19:53:53.000Z
2022-02-18T05:14:30.000Z
class MergeSort: def __init__(self, lst): self.lst = lst def mergeSort(self, a): midPoint = len(a) // 2 if a[len(a) - 1] < a[0]: left = self.mergeSort(a[:midPoint]) right = self.mergeSort(a[midPoint:]) return self.merge(left, right) else: ...
30.266667
68
0.509545
1,264
0.928047
0
0
0
0
0
0
10
0.007342
2277a209f052632755ba80cff0004cf66a4c0551
3,952
py
Python
nightly.py
insolar/insolar-jepsen
f95e05fdf0b3d28756f60de9aef1b8c44ef0d030
[ "Apache-2.0" ]
6
2019-03-26T10:02:54.000Z
2019-09-13T15:31:39.000Z
nightly.py
insolar/insolar-jepsen
f95e05fdf0b3d28756f60de9aef1b8c44ef0d030
[ "Apache-2.0" ]
17
2019-06-04T10:55:42.000Z
2020-03-10T09:22:52.000Z
nightly.py
insolar/insolar-jepsen
f95e05fdf0b3d28756f60de9aef1b8c44ef0d030
[ "Apache-2.0" ]
3
2019-11-22T10:41:00.000Z
2021-02-18T12:03:38.000Z
#!/usr/bin/env python3 # vim: set ai et ts=4 sw=4: import os import subprocess import argparse import time import calendar import re def run(cmd): code = subprocess.call(['/bin/bash', '-o', 'pipefail', '-c', cmd]) if code != 0: raise RuntimeError("Command `%s` returned non-zero status: %d" % ...
34.365217
83
0.605263
0
0
0
0
0
0
0
0
1,499
0.379302
2277e005db07cac1472613b25b5759c8831551c6
7,195
py
Python
ecart/ecart.py
micael-grilo/E-Cart
76e86b4c7ea5bd2becda23ef8c69470c86630c5e
[ "MIT" ]
null
null
null
ecart/ecart.py
micael-grilo/E-Cart
76e86b4c7ea5bd2becda23ef8c69470c86630c5e
[ "MIT" ]
null
null
null
ecart/ecart.py
micael-grilo/E-Cart
76e86b4c7ea5bd2becda23ef8c69470c86630c5e
[ "MIT" ]
null
null
null
import redis import copy from functools import wraps from .exception import ErrorMessage from .decorators import raise_exception from .serializer import Serializer TTL = 604800 class Cart(object): """ Main Class for Cart, contains all functionality """ @raise_exception("E-Cart can't be initiali...
34.927184
120
0.624739
7,014
0.974844
0
0
5,184
0.7205
0
0
2,660
0.369701
2278e9e4e492d486947a4dea8110d0c980581f65
1,172
py
Python
app/tests/test_transaction.py
geometry-labs/icon-filter-registration
5ac93268465a529be453a51447805a65f2e23415
[ "Apache-2.0" ]
null
null
null
app/tests/test_transaction.py
geometry-labs/icon-filter-registration
5ac93268465a529be453a51447805a65f2e23415
[ "Apache-2.0" ]
1
2021-03-02T22:41:58.000Z
2021-03-11T16:44:26.000Z
app/tests/test_transaction.py
geometry-labs/icon-filter-registration
5ac93268465a529be453a51447805a65f2e23415
[ "Apache-2.0" ]
null
null
null
import pytest from app.main import app from app.models import TransactionRegistration from app.settings import settings from httpx import AsyncClient from tests.conftest import RequestCache registration = TransactionRegistration( to_address="cx0000000000000000000000000000000000000001", from_address="cx00000000...
28.585366
69
0.729522
0
0
0
0
809
0.690273
767
0.654437
170
0.145051
22793242be75fa797dece7e56ce733139032b7be
33,565
py
Python
oslo_messaging/tests/rpc/test_server.py
ox12345/oslo.messaging
bdb21c0bcddfb2dac1e0f4d926e7df53d975bf0c
[ "Apache-1.1" ]
null
null
null
oslo_messaging/tests/rpc/test_server.py
ox12345/oslo.messaging
bdb21c0bcddfb2dac1e0f4d926e7df53d975bf0c
[ "Apache-1.1" ]
null
null
null
oslo_messaging/tests/rpc/test_server.py
ox12345/oslo.messaging
bdb21c0bcddfb2dac1e0f4d926e7df53d975bf0c
[ "Apache-1.1" ]
null
null
null
# Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
36.404555
79
0.601847
32,444
0.966602
0
0
7,710
0.229704
0
0
5,870
0.174885
227a7fa4744296865be9c842b020f4d289542d47
3,683
py
Python
3.03-pdDataOps.py
pgiardiniere/notes-PythonDataScienceHandbook
ddb6662d2fbeedd5b6b09ce4d8ddee55813ec589
[ "MIT" ]
2
2019-05-01T02:23:02.000Z
2019-05-04T03:26:39.000Z
3.03-pdDataOps.py
pgiardiniere/notes-PythonDataScienceHandbook
ddb6662d2fbeedd5b6b09ce4d8ddee55813ec589
[ "MIT" ]
null
null
null
3.03-pdDataOps.py
pgiardiniere/notes-PythonDataScienceHandbook
ddb6662d2fbeedd5b6b09ce4d8ddee55813ec589
[ "MIT" ]
null
null
null
# Recall material on NP Universal Functions from Ch2 # PD builds on ufuncs functionality a few ways: # first, for unary operations (negation / trig funcs), ufuncs preserve # index and column labels in the output # second, for binary operations (addition / multiplication) PD aligns # indices when passing objects to th...
32.59292
77
0.688298
0
0
0
0
0
0
0
0
2,705
0.734456
227b1e1bc0c209d9e1b5a1176eb8edcc2f765f16
1,286
py
Python
cogs/feelings.py
Surice/dc_sophie
fa42f457b7b9d68a156a4b6db41e3d849238384c
[ "MIT" ]
null
null
null
cogs/feelings.py
Surice/dc_sophie
fa42f457b7b9d68a156a4b6db41e3d849238384c
[ "MIT" ]
null
null
null
cogs/feelings.py
Surice/dc_sophie
fa42f457b7b9d68a156a4b6db41e3d849238384c
[ "MIT" ]
null
null
null
from itertools import chain from components.config import getConfig from components.convert import fetchUser, pretRes import discord from discord import channel from discord.ext import commands class Feelings(commands.Cog): def __init__(self, client) -> None: self.client = client self.config = get...
33.842105
105
0.681182
1,014
0.786047
0
0
863
0.668992
791
0.613178
235
0.182171
227bae7ab6f777a68303a1c49a615d5f64a02cfd
2,400
py
Python
Solutions/arrays/Median_of_Two_Sorted_Arrays.py
HuitingZhengAvery/Leetcode-solutions
ac21cef395717abab188e76895ad83cf212fd60f
[ "MIT" ]
1
2019-06-21T16:28:59.000Z
2019-06-21T16:28:59.000Z
Solutions/arrays/Median_of_Two_Sorted_Arrays.py
HuitingZhengAvery/Leetcode-solutions
ac21cef395717abab188e76895ad83cf212fd60f
[ "MIT" ]
null
null
null
Solutions/arrays/Median_of_Two_Sorted_Arrays.py
HuitingZhengAvery/Leetcode-solutions
ac21cef395717abab188e76895ad83cf212fd60f
[ "MIT" ]
null
null
null
''' There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). You may assume nums1 and nums2 cannot be both empty. ''' ### Nature: the meaning of MEDIAN, is that, the number of elements less than it, ##...
36.923077
97
0.542083
0
0
0
0
0
0
0
0
1,295
0.539583
227c213f9c9f02d257d21830222edf425fe68721
781
py
Python
carl/envs/mario/mario_game.py
automl/genRL
b7382fec9006d7da768ad7252194c6c5f1b2bbd7
[ "Apache-2.0" ]
27
2021-09-13T21:50:10.000Z
2022-03-30T15:35:38.000Z
carl/envs/mario/mario_game.py
automl/genRL
b7382fec9006d7da768ad7252194c6c5f1b2bbd7
[ "Apache-2.0" ]
35
2021-09-15T07:20:29.000Z
2022-03-02T15:14:31.000Z
carl/envs/mario/mario_game.py
automl/genRL
b7382fec9006d7da768ad7252194c6c5f1b2bbd7
[ "Apache-2.0" ]
2
2022-01-13T11:13:12.000Z
2022-03-14T06:11:13.000Z
from abc import ABC, abstractmethod class MarioGame(ABC): @abstractmethod def getPort(self) -> int: pass @abstractmethod def initGame(self): pass @abstractmethod def stepGame(self, left: bool, right: bool, down: bool, speed: bool, jump: bool): pass @abstractmetho...
19.525
85
0.62484
742
0.950064
0
0
668
0.855314
0
0
0
0
227c29400ceb467de41b94027e6c73ad4c909b28
16,832
py
Python
sec5.2/train.py
Z-T-WANG/ConvergentDQN
1b7f1857e33bc0a41b16ed6fe3251cb78220c691
[ "MIT" ]
1
2021-08-20T11:38:58.000Z
2021-08-20T11:38:58.000Z
sec5.2/train.py
Z-T-WANG/ConvergentDQN
1b7f1857e33bc0a41b16ed6fe3251cb78220c691
[ "MIT" ]
null
null
null
sec5.2/train.py
Z-T-WANG/ConvergentDQN
1b7f1857e33bc0a41b16ed6fe3251cb78220c691
[ "MIT" ]
null
null
null
import torch import torch.optim as optim import torch.nn.functional as F import optimizers import time, os, random import numpy as np import math, copy from collections import deque from common.utils import epsilon_scheduler, beta_scheduler, update_target, print_log, load_model, print_args from model import DQN fro...
49.798817
172
0.649774
0
0
0
0
0
0
0
0
2,208
0.131179
227d0c74c72ef68b3f928e3787684e5cdd3c8d18
6,290
py
Python
tests/broker/test_update_chassis.py
ned21/aquilon
6562ea0f224cda33b72a6f7664f48d65f96bd41a
[ "Apache-2.0" ]
7
2015-07-31T05:57:30.000Z
2021-09-07T15:18:56.000Z
tests/broker/test_update_chassis.py
ned21/aquilon
6562ea0f224cda33b72a6f7664f48d65f96bd41a
[ "Apache-2.0" ]
115
2015-03-03T13:11:46.000Z
2021-09-20T12:42:24.000Z
tests/broker/test_update_chassis.py
ned21/aquilon
6562ea0f224cda33b72a6f7664f48d65f96bd41a
[ "Apache-2.0" ]
13
2015-03-03T11:17:59.000Z
2021-09-09T09:16:41.000Z
#!/usr/bin/env python # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2012,2013,2015,2016,2017,2018 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. #...
43.082192
109
0.592687
5,173
0.822417
0
0
0
0
0
0
2,784
0.442607
97d3b4402a419951038455ac0b5764d606d2b2b1
11,289
py
Python
label_propagation/label_propagation.py
lujiaxuan0520/NAIC-ReID-2020-contest
51953a6927afb71733e39845fec9723210d37a1b
[ "MIT" ]
1
2020-12-13T12:39:30.000Z
2020-12-13T12:39:30.000Z
label_propagation/label_propagation.py
lujiaxuan0520/NAIC-ReID-2020-contest
51953a6927afb71733e39845fec9723210d37a1b
[ "MIT" ]
null
null
null
label_propagation/label_propagation.py
lujiaxuan0520/NAIC-ReID-2020-contest
51953a6927afb71733e39845fec9723210d37a1b
[ "MIT" ]
null
null
null
######################################################################################### # semi-supervised learning: use label propagation to make pseudo labels for no label data # This is not the parallel implement of label propagation, may requires a lot of time # Author: Jiaxuan Lu #################################...
37.257426
129
0.652582
0
0
0
0
0
0
0
0
3,071
0.272035