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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5d33f0625c53288d64064188bcbc357613405301 | 1,448 | py | Python | tests/test_env.py | Majanao/pytorch-blender | eb5effb033094d037e7bdc2238c00806be7012ae | [
"MIT"
] | 381 | 2019-07-03T14:15:16.000Z | 2022-03-30T08:58:26.000Z | tests/test_env.py | ANABUR920/pytorch-blender | eb5effb033094d037e7bdc2238c00806be7012ae | [
"MIT"
] | 18 | 2020-01-15T17:36:08.000Z | 2021-12-31T08:37:54.000Z | tests/test_env.py | ANABUR920/pytorch-blender | eb5effb033094d037e7bdc2238c00806be7012ae | [
"MIT"
] | 34 | 2019-07-09T03:15:02.000Z | 2022-01-13T17:36:20.000Z | import pytest
from pathlib import Path
from blendtorch import btt
BLENDDIR = Path(__file__).parent/'blender'
class MyEnv(btt.env.OpenAIRemoteEnv):
def __init__(self, background=True, **kwargs):
super().__init__(version='1.0.0')
self.launch(scene=BLENDDIR/'env.blend', script=BLENDDIR /
... | 26.814815 | 81 | 0.641575 | 421 | 0.290746 | 0 | 0 | 83 | 0.05732 | 0 | 0 | 229 | 0.158149 |
5d356088cb332b6a1cde85497c82874f1681387b | 20 | py | Python | sitetree/__init__.py | sitkatech/django-sitetree | 5d7e9d503f97ff021c5c04855e04e098b3d2488c | [
"BSD-3-Clause"
] | 3 | 2019-02-12T01:58:42.000Z | 2019-06-08T10:50:33.000Z | sitetree/__init__.py | sitkatech/django-sitetree | 5d7e9d503f97ff021c5c04855e04e098b3d2488c | [
"BSD-3-Clause"
] | null | null | null | sitetree/__init__.py | sitkatech/django-sitetree | 5d7e9d503f97ff021c5c04855e04e098b3d2488c | [
"BSD-3-Clause"
] | null | null | null | VERSION = (0, 9, 5)
| 10 | 19 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5d36081f930dd6c0a745b46f1b5a299e738d247f | 20,670 | py | Python | deepvariant/runtime_by_region_vis.py | tahashmi/deepvariant | 441c1809d3290f4a20b29a0a0bbf8ecfb929a6e3 | [
"BSD-3-Clause"
] | 4 | 2019-03-30T13:25:25.000Z | 2020-10-14T18:47:21.000Z | deepvariant/runtime_by_region_vis.py | FrogEnthusiast7/deepvariant | 84516dfacd1ed856a34507becb21848aa12e77a8 | [
"BSD-3-Clause"
] | 1 | 2021-06-18T15:04:47.000Z | 2021-06-18T15:04:47.000Z | deepvariant/runtime_by_region_vis.py | FrogEnthusiast7/deepvariant | 84516dfacd1ed856a34507becb21848aa12e77a8 | [
"BSD-3-Clause"
] | 1 | 2019-09-04T16:59:18.000Z | 2019-09-04T16:59:18.000Z | # Copyright 2020 Google LLC.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
#... | 34.335548 | 97 | 0.677504 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11,486 | 0.555685 |
5d36d6dbf217342990cb49eda55af38f42824619 | 4,238 | py | Python | pkgs/dynd-python-0.7.2-py27_0/lib/python2.7/site-packages/dynd/tests/test_nd_fields.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | pkgs/dynd-python-0.7.2-py27_0/lib/python2.7/site-packages/dynd/tests/test_nd_fields.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | pkgs/dynd-python-0.7.2-py27_0/lib/python2.7/site-packages/dynd/tests/test_nd_fields.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | import sys
import unittest
from dynd import nd, ndt
"""
class TestFields(unittest.TestCase):
def test_simple(self):
a = nd.array([
(1, 2, 'a', 'b'),
(3, 4, 'ab', 'cd'),
(5, 6, 'def', 'ghi')],
type='3 * {x: int32, y: int32, z: string, w: string... | 42.808081 | 76 | 0.464606 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,146 | 0.978292 |
5d373f0e4790917fc2d0b3ea420a4ad7a8c76024 | 4,096 | py | Python | xeofs/pandas/_transformer.py | nicrie/xeofs | 4c0ed49b45794ce0abb641c98b82638b2faa4828 | [
"MIT"
] | 3 | 2022-02-22T07:56:09.000Z | 2022-03-30T10:47:20.000Z | xeofs/pandas/_transformer.py | nicrie/xeofs | 4c0ed49b45794ce0abb641c98b82638b2faa4828 | [
"MIT"
] | 13 | 2022-02-15T13:44:34.000Z | 2022-03-15T22:51:01.000Z | xeofs/pandas/_transformer.py | nicrie/xeofs | 4c0ed49b45794ce0abb641c98b82638b2faa4828 | [
"MIT"
] | 2 | 2022-02-17T19:02:59.000Z | 2022-02-22T07:56:15.000Z | from typing import Union, Iterable, List
import numpy as np
import pandas as pd
from ..models._transformer import _ArrayTransformer, _MultiArrayTransformer
class _DataFrameTransformer(_ArrayTransformer):
'''`_ArrayTransformer` wrapper for `pandas.DataFrame`.
'''
def __init__(self):
super().__in... | 35.310345 | 101 | 0.616211 | 3,933 | 0.960205 | 0 | 0 | 0 | 0 | 0 | 0 | 369 | 0.090088 |
5d38d81bebcb78fdcd3ec6d9d6e334cd582c79d5 | 1,004 | py | Python | tests/bogus_python_model.py | FossilizedContainers/fossilized-controller | 5aa14112b3728a619a37233906366c1cda2a0a77 | [
"MIT"
] | 1 | 2022-01-24T21:54:46.000Z | 2022-01-24T21:54:46.000Z | tests/bogus_python_model.py | FossilizedContainers/fossilized-controller | 5aa14112b3728a619a37233906366c1cda2a0a77 | [
"MIT"
] | null | null | null | tests/bogus_python_model.py | FossilizedContainers/fossilized-controller | 5aa14112b3728a619a37233906366c1cda2a0a77 | [
"MIT"
] | null | null | null | import os
import sys
import lipd
# import pythonAdapter, assumes in ../python-adapter/
tests_dir = os.path.dirname(os.path.realpath(__file__))
fc_dir = os.path.dirname(tests_dir)
python_adapter_dir = os.path.join(fc_dir, "python-adapter")
sys.path.append(python_adapter_dir)
import adapter
def fake_model(adapter):
... | 26.421053 | 85 | 0.739044 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 453 | 0.451195 |
5d38e4a873930da8bc4504369cb7f1bca6894323 | 13,421 | py | Python | tello_control_ui.py | banne2266/UAV-autopilot-NCTU-2021 | 1a25d4add2de9659516d045054935e3b6e04d06d | [
"MIT"
] | null | null | null | tello_control_ui.py | banne2266/UAV-autopilot-NCTU-2021 | 1a25d4add2de9659516d045054935e3b6e04d06d | [
"MIT"
] | null | null | null | tello_control_ui.py | banne2266/UAV-autopilot-NCTU-2021 | 1a25d4add2de9659516d045054935e3b6e04d06d | [
"MIT"
] | null | null | null | from PIL import Image
from PIL import ImageTk
import tkinter as tki
from tkinter import Toplevel, Scale
import threading
import datetime
import cv2
import os
import time
import platform
class TelloUI:
"""Wrapper class to enable the GUI."""
def __init__(self,tello,outputpath):
"""
Initial all t... | 37.177285 | 113 | 0.580583 | 13,232 | 0.985918 | 0 | 0 | 0 | 0 | 0 | 0 | 3,799 | 0.283064 |
5d3a6779a16e847e6ab8367c806b8cd0393b9b7c | 160 | py | Python | __temp/examples/rhino/mesh-stanford-dragon.py | robin-gdwl/examples_topop-desc | 3a10dfc891c3e6998029c7baf8a5a7a501870fe2 | [
"MIT"
] | null | null | null | __temp/examples/rhino/mesh-stanford-dragon.py | robin-gdwl/examples_topop-desc | 3a10dfc891c3e6998029c7baf8a5a7a501870fe2 | [
"MIT"
] | null | null | null | __temp/examples/rhino/mesh-stanford-dragon.py | robin-gdwl/examples_topop-desc | 3a10dfc891c3e6998029c7baf8a5a7a501870fe2 | [
"MIT"
] | 1 | 2022-01-16T02:32:43.000Z | 2022-01-16T02:32:43.000Z | import compas
import compas_rhino
from compas.datastructures import Mesh
mesh = Mesh.from_ply(compas.get('stanford_dragon.ply'))
compas_rhino.mesh_draw(mesh)
| 20 | 55 | 0.825 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0.13125 |
5d3b019f7105ea70804aca52b749a325dbd4f20c | 416 | py | Python | Python/ML_DL/DL/Neural-Networks-Demystified-master/partOne.py | vbsteja/code | 0c8f4dc579f5de21b6c55fe6e65c3c8eb5473687 | [
"Apache-2.0"
] | 3 | 2018-08-06T15:34:58.000Z | 2022-02-11T14:19:05.000Z | Python/ML_DL/DL/Neural-Networks-Demystified-master/partOne.py | vbsteja/code | 0c8f4dc579f5de21b6c55fe6e65c3c8eb5473687 | [
"Apache-2.0"
] | null | null | null | Python/ML_DL/DL/Neural-Networks-Demystified-master/partOne.py | vbsteja/code | 0c8f4dc579f5de21b6c55fe6e65c3c8eb5473687 | [
"Apache-2.0"
] | 3 | 2018-08-06T15:35:01.000Z | 2020-08-08T07:53:07.000Z | # Neural Networks Demystified
# Part 1: Data + Architecture
#
# Supporting code for short YouTube series on artificial neural networks.
#
# Stephen Welch
# @stephencwelch
import numpy as np
# X = (hours sleeping, hours studying), y = Score on test
X = np.array(([3,5], [5,1], [10,2]), dtype=float)
y = np.array(([75], ... | 24.470588 | 73 | 0.673077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 254 | 0.610577 |
5d3c91e42dac2041a621585dba8f1dfdc1e88107 | 19,048 | py | Python | manubot/process/util.py | benstear/manubot | df184a5c7e5eb98894a3edb43d9772d1ac3e01ab | [
"BSD-3-Clause"
] | null | null | null | manubot/process/util.py | benstear/manubot | df184a5c7e5eb98894a3edb43d9772d1ac3e01ab | [
"BSD-3-Clause"
] | null | null | null | manubot/process/util.py | benstear/manubot | df184a5c7e5eb98894a3edb43d9772d1ac3e01ab | [
"BSD-3-Clause"
] | null | null | null | import json
import logging
import os
import pathlib
import re
import textwrap
import warnings
from typing import List, Optional
import jinja2
import pandas
import requests
import requests_cache
import yaml
from manubot.util import read_serialized_data, read_serialized_dict
from manubot.process.bibliography import loa... | 37.496063 | 118 | 0.679546 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8,414 | 0.441726 |
5d3efa01c738d69c4c33cd7d548df41216a056d7 | 3,738 | py | Python | iba_scrape.py | wmwilcox/mix-mind | 02da016f314bb5f30f267f1f46c67c6d4a4c370c | [
"Apache-2.0"
] | 1 | 2021-05-02T19:50:44.000Z | 2021-05-02T19:50:44.000Z | iba_scrape.py | wmwilcox/mix-mind | 02da016f314bb5f30f267f1f46c67c6d4a4c370c | [
"Apache-2.0"
] | 34 | 2018-08-07T13:09:29.000Z | 2021-05-13T17:25:18.000Z | iba_scrape.py | wmwilcox/mix-mind | 02da016f314bb5f30f267f1f46c67c6d4a4c370c | [
"Apache-2.0"
] | 4 | 2019-02-14T04:17:24.000Z | 2021-05-14T15:33:39.000Z | #! /usr/bin/env python
# scrape the IBA pages for cocktail lists
import sys
import xml.etree.ElementTree as ET
from lxml import html
import requests
from pprint import pprint
from collections import OrderedDict
import json
url = 'http://iba-world.com/new-era-drinks/'
jsonfile = 'IBA_new_era_drinks.json'
url = 'http... | 33.981818 | 132 | 0.584805 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 847 | 0.226592 |
5d3f1eebd4bcf21a7d4d5c5ef291d2d1f120515e | 1,101 | py | Python | Data Structures/Tree.py | Royals-Aeo-Gamer/MyPyMods | be3a521e9f823ce0b704f925b19f6f34dcb5405d | [
"MIT"
] | null | null | null | Data Structures/Tree.py | Royals-Aeo-Gamer/MyPyMods | be3a521e9f823ce0b704f925b19f6f34dcb5405d | [
"MIT"
] | null | null | null | Data Structures/Tree.py | Royals-Aeo-Gamer/MyPyMods | be3a521e9f823ce0b704f925b19f6f34dcb5405d | [
"MIT"
] | null | null | null | class TreeNode:
def __init__(self, name, data, parent=None):
self.name = name
self.parent = parent
self.data = data
self.childs = {}
def add_child(self, name, data):
self.childs.update({name:(type(self))(name, data, self)})
def rm_branch(self, name, ansistors_n: lis... | 31.457143 | 73 | 0.551317 | 1,099 | 0.998183 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.036331 |
5d3f6e4da89be36858bff2a63bb4de2ff240849a | 244 | py | Python | config.py | ggiaquin16/GroupProject19 | f491abc4e8f127552dc7384f3378e14029da8008 | [
"CC-BY-3.0"
] | null | null | null | config.py | ggiaquin16/GroupProject19 | f491abc4e8f127552dc7384f3378e14029da8008 | [
"CC-BY-3.0"
] | null | null | null | config.py | ggiaquin16/GroupProject19 | f491abc4e8f127552dc7384f3378e14029da8008 | [
"CC-BY-3.0"
] | null | null | null | api_key = "9N7hvPP9yFrjBnELpBdthluBjiOWzJZw"
mongo_url = 'mongodb://localhost:27017'
mongo_db = 'CarPopularity'
mongo_collections = ['CarSalesByYear', 'PopularCarsByRegion']
years_data = ['2019', '2018', '2017', '2016', '2015']
test_mode = True | 40.666667 | 61 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 143 | 0.586066 |
5d4008c47be6196efe901a8e83cca011533d0bf1 | 2,648 | py | Python | pytorch_ares/pytorch_ares/attack_torch/mim.py | thu-ml/realsafe | 474d549aa402b4cdd5e3629d23d035c31b60a360 | [
"MIT"
] | 107 | 2020-06-15T09:55:11.000Z | 2020-12-20T11:27:11.000Z | pytorch_ares/pytorch_ares/attack_torch/mim.py | haichen-ber/ares | 474d549aa402b4cdd5e3629d23d035c31b60a360 | [
"MIT"
] | 7 | 2020-06-14T03:00:18.000Z | 2020-12-07T07:10:10.000Z | pytorch_ares/pytorch_ares/attack_torch/mim.py | haichen-ber/ares | 474d549aa402b4cdd5e3629d23d035c31b60a360 | [
"MIT"
] | 19 | 2020-06-14T08:35:33.000Z | 2020-12-19T13:43:41.000Z | import imp
import torch
import torch.nn as nn
import numpy as np
import torch.nn.functional as F
from pytorch_ares.attack_torch.utils import loss_adv
class MIM(object):
'''Projected Gradient Descent'''
def __init__(self, net, epsilon, p, stepsize, steps, decay_factor, data_name,target, loss, device):
... | 39.522388 | 118 | 0.583837 | 2,496 | 0.942598 | 0 | 0 | 0 | 0 | 0 | 0 | 228 | 0.086103 |
5d4029e498cad9d638e5fe5f4c3a65f28490da96 | 303 | py | Python | src/utils/templatetags/menubutton.py | pwelzel/bornhack-website | af794e6a2fba06e09626259c7768feb30ff394be | [
"BSD-3-Clause"
] | null | null | null | src/utils/templatetags/menubutton.py | pwelzel/bornhack-website | af794e6a2fba06e09626259c7768feb30ff394be | [
"BSD-3-Clause"
] | null | null | null | src/utils/templatetags/menubutton.py | pwelzel/bornhack-website | af794e6a2fba06e09626259c7768feb30ff394be | [
"BSD-3-Clause"
] | null | null | null | from django import template
register = template.Library()
@register.simple_tag(takes_context=True)
def menubuttonclass(context, appname):
if appname == context['request'].resolver_match.func.view_class.__module__.split(".")[0]:
return "btn-primary"
else:
return "btn-default"
| 25.25 | 93 | 0.716172 | 0 | 0 | 0 | 0 | 241 | 0.79538 | 0 | 0 | 38 | 0.125413 |
5d41c3b8ea2fc0ea3e45c5b6768c95bfbb166b0c | 1,965 | py | Python | wiki/tests.py | Prones94/Make_Wiki | f8816eb31bb370f48affff8568a6b0d0ffaf7cd4 | [
"MIT"
] | null | null | null | wiki/tests.py | Prones94/Make_Wiki | f8816eb31bb370f48affff8568a6b0d0ffaf7cd4 | [
"MIT"
] | 5 | 2020-06-06T01:41:16.000Z | 2021-06-10T20:09:01.000Z | wiki/tests.py | Prones94/Make_Wiki | f8816eb31bb370f48affff8568a6b0d0ffaf7cd4 | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.contrib.auth.models import User
from wiki.models import Page
from django.utils.text import slugify
# Create your tests here.
class WikiPageTest(TestCase):
def test_edit(self):
user = User.objects.create_user(username='admin', password='djangopony')
self... | 33.87931 | 85 | 0.641221 | 1,601 | 0.814758 | 0 | 0 | 0 | 0 | 0 | 0 | 525 | 0.267176 |
5d42291558faa9e742ab82a57f0f93c0ba5ed168 | 66 | py | Python | birdy/__init__.py | tkiapril/birdy | cf6a8f8d31c9363dbf7398ae3d78fe3069a5a936 | [
"MIT"
] | 1 | 2015-01-07T17:47:54.000Z | 2015-01-07T17:47:54.000Z | birdy/__init__.py | tkiapril/birdy | cf6a8f8d31c9363dbf7398ae3d78fe3069a5a936 | [
"MIT"
] | null | null | null | birdy/__init__.py | tkiapril/birdy | cf6a8f8d31c9363dbf7398ae3d78fe3069a5a936 | [
"MIT"
] | null | null | null | __author__ = 'Mitja Pagon <mitja@inueni.com>'
__version__ = '0.2'
| 22 | 45 | 0.712121 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 37 | 0.560606 |
5d424aaa1fdb6fb518af8c5169d61b82bae9ef0f | 1,928 | py | Python | ares/defense/randomization.py | KuanKuanQAQ/ares | 40dbefc18f6438e1812021fe6d6c3195f22ca295 | [
"MIT"
] | 206 | 2020-12-31T09:43:11.000Z | 2022-03-30T07:02:41.000Z | ares/defense/randomization.py | afoolboy/ares | 89610d41fdde194e4ad916d29961aaed73383692 | [
"MIT"
] | 7 | 2021-01-26T06:45:44.000Z | 2022-02-26T05:25:48.000Z | ares/defense/randomization.py | afoolboy/ares | 89610d41fdde194e4ad916d29961aaed73383692 | [
"MIT"
] | 61 | 2020-12-29T14:02:41.000Z | 2022-03-26T14:21:10.000Z | ''' The randomization defense method, which applies random . '''
import tensorflow as tf
from ares.defense.input_transformation import input_transformation
def randomize(xs, scale_min=0.875, pad_value=0.0):
''' Apply random rescaling and padding to xs.
:param xs: A batch of inputs for some classifier.
... | 43.818182 | 110 | 0.688797 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 672 | 0.348548 |
5d43ba93812ece31b158196b6ad2d32a374bd0f8 | 147 | py | Python | annotate/backend/admin.py | hopeogbons/image-annotation | 2d8b1799bc791428fd3ab29d8052195996923130 | [
"Apache-2.0"
] | null | null | null | annotate/backend/admin.py | hopeogbons/image-annotation | 2d8b1799bc791428fd3ab29d8052195996923130 | [
"Apache-2.0"
] | 11 | 2021-03-09T10:15:39.000Z | 2022-02-26T13:53:51.000Z | annotate/backend/admin.py | hopeogbons/image-annotation | 2d8b1799bc791428fd3ab29d8052195996923130 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from annotate.backend.models import Image, Annotation
admin.site.register(Image)
admin.site.register(Annotation)
| 24.5 | 53 | 0.836735 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5d451217c589da4fbfb78dd271865830d16162d1 | 826 | py | Python | 34. Find First and Last Position of Element in Sorted Array/main.py | Competitive-Programmers-Community/LeetCode | 841fdee805b1a626e9f1cd0e12398d25054638af | [
"MIT"
] | 2 | 2019-10-05T09:48:20.000Z | 2019-10-05T15:40:01.000Z | 34. Find First and Last Position of Element in Sorted Array/main.py | Competitive-Programmers-Community/LeetCode | 841fdee805b1a626e9f1cd0e12398d25054638af | [
"MIT"
] | null | null | null | 34. Find First and Last Position of Element in Sorted Array/main.py | Competitive-Programmers-Community/LeetCode | 841fdee805b1a626e9f1cd0e12398d25054638af | [
"MIT"
] | null | null | null | class Solution:
def searchRange(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
if not nums:
return [-1, -1]
low = 0
high = len(nums) - 1
f = 0
while low<=high:
mid = (low+h... | 24.294118 | 52 | 0.361985 | 825 | 0.998789 | 0 | 0 | 0 | 0 | 0 | 0 | 97 | 0.117433 |
5d4867285dd6af6ea7e2fbae337fc27c75376241 | 1,893 | py | Python | c/create.py | LMS57/domato | 005739f55b49ead0ac47ea14b324decee05a7625 | [
"Apache-2.0"
] | null | null | null | c/create.py | LMS57/domato | 005739f55b49ead0ac47ea14b324decee05a7625 | [
"Apache-2.0"
] | null | null | null | c/create.py | LMS57/domato | 005739f55b49ead0ac47ea14b324decee05a7625 | [
"Apache-2.0"
] | null | null | null | data = open('./original').readlines()
alphabet = {
"<":"lt",
">":"gt",
"=":"=",
"-":'-',
"+":"+",
"-":"-",
"~":"~",
"!":"ex",
"%":"%",
"^":"^",
"&":"&",
"*":"*",
"(":"(",
")":"right_paran",
"[":"[",... | 18.742574 | 71 | 0.320655 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 280 | 0.147913 |
5d48a2b09ec3e91f3ac7c94a610ddffec5774abc | 10,500 | py | Python | AppServer/google/appengine/api/memcache/memcache_distributed.py | isabella232/scale-safe | 8b887726768106b6b67d7be6ea257bee5cd83f9a | [
"Apache-2.0"
] | 3 | 2016-06-12T01:18:49.000Z | 2018-07-16T18:20:23.000Z | AppServer/google/appengine/api/memcache/memcache_distributed.py | davgit/appscale | 17d35a14fa5a56975de1e3517bec9e7f9047d82a | [
"Apache-2.0"
] | 1 | 2021-06-08T10:04:35.000Z | 2021-06-08T10:04:35.000Z | AppServer/google/appengine/api/memcache/memcache_distributed.py | davgit/appscale | 17d35a14fa5a56975de1e3517bec9e7f9047d82a | [
"Apache-2.0"
] | 1 | 2020-05-25T02:59:15.000Z | 2020-05-25T02:59:15.000Z | #!/usr/bin/env python
#
# Copyright 2007 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/LICENSE-2.0
#
# Unless required by applicable law o... | 33.980583 | 77 | 0.701619 | 9,069 | 0.863714 | 0 | 0 | 0 | 0 | 0 | 0 | 3,540 | 0.337143 |
5d493476e5ae3fc5c2137c7a547ce012434fae4f | 4,927 | py | Python | inflateutils/exportmesh.py | arpruss/inflatemesh | ab4abfc7794fd4cf96f41bb797e1b2a61f687a46 | [
"MIT"
] | 8 | 2017-11-30T14:03:25.000Z | 2021-03-02T03:16:01.000Z | inflateutils/exportmesh.py | arpruss/inflatemesh | ab4abfc7794fd4cf96f41bb797e1b2a61f687a46 | [
"MIT"
] | 2 | 2019-03-15T04:10:04.000Z | 2021-01-11T17:44:31.000Z | inflateutils/exportmesh.py | arpruss/inflatemesh | ab4abfc7794fd4cf96f41bb797e1b2a61f687a46 | [
"MIT"
] | 2 | 2018-04-08T10:59:39.000Z | 2021-01-28T03:37:57.000Z | from struct import pack
from .vector import *
from .formatdecimal import decimal
from numbers import Number
import os
import sys
try:
basestring
except:
basestring = str
def isColorTriangleList(polys):
return isinstance(polys[0][1][0][0], Number)
def toPolyhedra(polys):
if isColorTriangleList(po... | 33.517007 | 166 | 0.558149 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,008 | 0.204587 |
5d4b0bc52d1482cd0028c140868e692cfb38b3c0 | 3,982 | py | Python | Assignment1/Identification/match_module.py | arywatt/FDS_2020_2021 | 392f360b219c6ef5e2c685da1f3c8aab7415ce32 | [
"MIT"
] | null | null | null | Assignment1/Identification/match_module.py | arywatt/FDS_2020_2021 | 392f360b219c6ef5e2c685da1f3c8aab7415ce32 | [
"MIT"
] | null | null | null | Assignment1/Identification/match_module.py | arywatt/FDS_2020_2021 | 392f360b219c6ef5e2c685da1f3c8aab7415ce32 | [
"MIT"
] | 1 | 2020-10-29T08:38:42.000Z | 2020-10-29T08:38:42.000Z | import numpy as np
from PIL import Image
import matplotlib.pyplot as plt
import histogram_module
import dist_module
def rgb2gray(rgb):
r, g, b = rgb[:, :, 0], rgb[:, :, 1], rgb[:, :, 2]
gray = 0.2989 * r + 0.5870 * g + 0.1140 * b
return gray
# model_images - list of file names of model images
# query_... | 33.745763 | 101 | 0.633852 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,260 | 0.316424 |
5d4c8cdbc546fb237f365ef954c77cb12a3738d8 | 1,566 | py | Python | dycco/__main__.py | rojalator/dycco | 84ace8727aef84bb3d886cdaa3d3aef1089f1935 | [
"MIT"
] | null | null | null | dycco/__main__.py | rojalator/dycco | 84ace8727aef84bb3d886cdaa3d3aef1089f1935 | [
"MIT"
] | 1 | 2022-03-22T07:35:15.000Z | 2022-03-22T09:15:44.000Z | dycco/__main__.py | rojalator/dycco | 84ace8727aef84bb3d886cdaa3d3aef1089f1935 | [
"MIT"
] | null | null | null | import argparse
import logging
import sys
from .dycco import document
def main(paths, output_dir, use_ascii:bool, escape_html:bool, single_file:bool):
try:
document(paths, output_dir, use_ascii, escape_html, single_file)
except IOError as e:
logging.error('Unable to open file: %s', e)
... | 46.058824 | 121 | 0.707535 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 593 | 0.378672 |
5d4c9607e3defd3816cf4fbd7853e01e09dcb111 | 14,354 | py | Python | jumpy/jumpy/ndarray.py | rghwer/testdocs | 8fafa40407411ed7a3f8216e691e42e0c7d32083 | [
"Apache-2.0"
] | 13,006 | 2015-02-13T18:35:31.000Z | 2022-03-18T12:11:44.000Z | jumpy/jumpy/ndarray.py | pxiuqin/deeplearning4j | e11ddf3c24d355b43d36431687b807c8561aaae4 | [
"Apache-2.0"
] | 5,319 | 2015-02-13T08:21:46.000Z | 2019-06-12T14:56:50.000Z | jumpy/jumpy/ndarray.py | pxiuqin/deeplearning4j | e11ddf3c24d355b43d36431687b807c8561aaae4 | [
"Apache-2.0"
] | 4,719 | 2015-02-13T22:48:55.000Z | 2022-03-22T07:25:36.000Z | ################################################################################
# Copyright (c) 2015-2018 Skymind, Inc.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless... | 27.980507 | 106 | 0.544448 | 6,890 | 0.480006 | 0 | 0 | 367 | 0.025568 | 0 | 0 | 2,006 | 0.139752 |
5d4ce281f4ac42992169e4a43a604e5e249ccc55 | 592 | py | Python | Python/usec_mode.py | hanayik/StimSync | f08ec01a36c47b00bfe4937b5a6eb2a60af0713d | [
"BSD-2-Clause"
] | 6 | 2017-12-04T18:33:45.000Z | 2021-08-04T02:07:21.000Z | source/Python/usec_mode.py | neurolabusc/StimSync | 749908572bda3073b0911566d50fe92d74d3cdb7 | [
"BSD-2-Clause"
] | null | null | null | source/Python/usec_mode.py | neurolabusc/StimSync | 749908572bda3073b0911566d50fe92d74d3cdb7 | [
"BSD-2-Clause"
] | 3 | 2018-01-13T12:17:18.000Z | 2021-08-01T06:43:10.000Z | import serial
ser = serial.Serial('/dev/tty.usbmodem7071', 115200, timeout=10)
ser.write("\xb1\xa3\xb5\xb5") #set usec mode 177,163,181,181
ser.flush()
ser.flushInput()
obs = ser.read(8)
if len(obs) != 8:
print('Error: no buttons presses detected')
print 'Observed data (as hex): '+ obs.encode('hex')
obsBin = [ord(... | 37 | 87 | 0.663851 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 241 | 0.407095 |
5d4e94cca5bcc101399e2e8aec4db86507599854 | 4,839 | py | Python | torchaudio/datasets/libritts.py | hahaxun/audio | 87a1886ecfa83b398a2a9a09d9a94bd9dabc5cf5 | [
"BSD-2-Clause"
] | 1 | 2021-04-20T09:04:24.000Z | 2021-04-20T09:04:24.000Z | torchaudio/datasets/libritts.py | hahaxun/audio | 87a1886ecfa83b398a2a9a09d9a94bd9dabc5cf5 | [
"BSD-2-Clause"
] | null | null | null | torchaudio/datasets/libritts.py | hahaxun/audio | 87a1886ecfa83b398a2a9a09d9a94bd9dabc5cf5 | [
"BSD-2-Clause"
] | null | null | null | import os
from typing import Tuple
import torchaudio
from torch import Tensor
from torch.utils.data import Dataset
from torchaudio.datasets.utils import (
download_url,
extract_archive,
walk_files,
)
URL = "train-clean-100"
FOLDER_IN_ARCHIVE = "LibriTTS"
_CHECKSUMS = {
"http://www.openslr.org/60/dev-c... | 32.046358 | 98 | 0.619963 | 2,796 | 0.577805 | 0 | 0 | 0 | 0 | 0 | 0 | 1,855 | 0.383344 |
5d4ed462393daeadb0c9bc3293879acfa5af3ab3 | 2,164 | py | Python | Others/Source/19/19.2/barh_test.py | silence0201/Learn-Python | 662da7c0e74221cedb445ba17d5cb1cd3af41c86 | [
"MIT"
] | 1 | 2018-05-30T01:38:23.000Z | 2018-05-30T01:38:23.000Z | Others/Source/19/19.2/barh_test.py | silence0201/Learn-Python | 662da7c0e74221cedb445ba17d5cb1cd3af41c86 | [
"MIT"
] | null | null | null | Others/Source/19/19.2/barh_test.py | silence0201/Learn-Python | 662da7c0e74221cedb445ba17d5cb1cd3af41c86 | [
"MIT"
] | null | null | null | # coding: utf-8
#########################################################################
# 网站: <a href="http://www.crazyit.org">疯狂Java联盟</a> #
# author yeeku.H.lee kongyeeku@163.com #
# #
# version... | 46.042553 | 74 | 0.420055 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,643 | 0.688023 |
5d4ed8a99839b3110a2db17a408cf4dde65b3291 | 2,336 | py | Python | 03_docker_compose/03_c_simple_case_with_mongodb_orm/app/app.py | kendny/study_docker | edb376fb69319a78e05f60faa5dcc88d527602c4 | [
"BSD-2-Clause"
] | 2 | 2019-05-09T01:41:16.000Z | 2022-01-06T01:06:07.000Z | 03_docker_compose/03_c_simple_case_with_mongodb_orm/app/app.py | walkacross/docker_in_practice | da24da76b4fa3eabca5004abd59d7eef7a48988b | [
"BSD-2-Clause"
] | null | null | null | 03_docker_compose/03_c_simple_case_with_mongodb_orm/app/app.py | walkacross/docker_in_practice | da24da76b4fa3eabca5004abd59d7eef7a48988b | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Dec 18 20:13:57 2018
@author: allen
"""
import random, os, json, datetime, time
from flask import Flask, Response
from pymongo import MongoClient
from bson import json_util
app = Flask(__name__)
MONGO_URI = "mongodb://mongodb:27017" # "mongodb:<con... | 26.545455 | 110 | 0.630137 | 240 | 0.10274 | 0 | 0 | 1,152 | 0.493151 | 0 | 0 | 774 | 0.331336 |
5d4f428d1c149bf1e2a1658ede1f6e9adcddbdd2 | 1,523 | py | Python | goethe/eval/analogy_space.py | HPI-DeepLearning/wort2vek | bc91c2752a8516665d270c7a7a793ec484c970c4 | [
"MIT"
] | 4 | 2017-05-01T01:02:40.000Z | 2022-02-03T16:14:19.000Z | goethe/eval/analogy_space.py | HPI-DeepLearning/wort2vek | bc91c2752a8516665d270c7a7a793ec484c970c4 | [
"MIT"
] | 6 | 2017-04-06T22:10:09.000Z | 2017-04-06T22:10:57.000Z | goethe/eval/analogy_space.py | HPI-DeepLearning/wort2vek | bc91c2752a8516665d270c7a7a793ec484c970c4 | [
"MIT"
] | null | null | null | #! /usr/bin/Python
from gensim.models.keyedvectors import KeyedVectors
from scipy import spatial
from numpy import linalg
import argparse
import sys
vector_file = sys.argv[1]
if len(sys.argv) != 6:
print('arguments wrong!')
print(len(sys.argv))
exit()
else:
words = [sys.argv[2], sys.argv[3], sys.arg... | 27.690909 | 91 | 0.644123 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 318 | 0.208798 |
5d5195b07f67a7785033de940e7003695bbf2ec4 | 2,497 | py | Python | localgraphclustering/algorithms/eig2_nL.py | vishalbelsare/LocalGraphClustering | a6325350997932d548a876deb259c2387fc2c809 | [
"MIT"
] | 106 | 2017-09-06T04:47:02.000Z | 2022-03-30T07:43:27.000Z | localgraphclustering/algorithms/eig2_nL.py | vishalbelsare/LocalGraphClustering | a6325350997932d548a876deb259c2387fc2c809 | [
"MIT"
] | 51 | 2017-09-06T02:22:09.000Z | 2021-12-15T11:39:28.000Z | localgraphclustering/algorithms/eig2_nL.py | vishalbelsare/LocalGraphClustering | a6325350997932d548a876deb259c2387fc2c809 | [
"MIT"
] | 38 | 2017-09-04T21:45:13.000Z | 2022-01-19T09:48:25.000Z | import numpy as np
import scipy as sp
import scipy.sparse.linalg as splinalg
def eig2_nL(g, tol_eigs = 1.0e-6, normalize:bool = True, dim:int=1):
"""
DESCRIPTION
-----------
Computes the eigenvector that corresponds to the second smallest eigenvalue
of the normalized Laplacian matrix ... | 33.293333 | 87 | 0.621946 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,393 | 0.557869 |
5d527097e73751e96803cabcd187b0fd2d52470c | 1,737 | py | Python | build/common/hex2carray.py | isabella232/nanos-nonsecure-firmware | d1ce2e0e01a8ed6d8840a24308e16f6560a626aa | [
"Apache-2.0"
] | 16 | 2018-03-20T11:52:29.000Z | 2021-02-12T07:39:54.000Z | build/common/hex2carray.py | LedgerHQ/nanos-nonsecure-firmware | d1ce2e0e01a8ed6d8840a24308e16f6560a626aa | [
"Apache-2.0"
] | 1 | 2022-03-06T09:56:16.000Z | 2022-03-06T09:56:16.000Z | build/common/hex2carray.py | isabella232/nanos-nonsecure-firmware | d1ce2e0e01a8ed6d8840a24308e16f6560a626aa | [
"Apache-2.0"
] | 7 | 2017-08-24T00:42:09.000Z | 2022-03-06T09:51:51.000Z | """
*******************************************************************************
* Ledger Blue
* (c) 2016 Ledger
*
* 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.... | 31.581818 | 146 | 0.599885 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 954 | 0.549223 |
5d52775ef423ec088ebd9b5618d6a0b7639f157e | 2,418 | py | Python | setup.py | xames3/vdoxa | 8fa945449bb34447ded0c421214c0252ff523d4a | [
"Apache-2.0"
] | 1 | 2020-02-04T08:18:54.000Z | 2020-02-04T08:18:54.000Z | setup.py | xames3/vdoxa | 8fa945449bb34447ded0c421214c0252ff523d4a | [
"Apache-2.0"
] | null | null | null | setup.py | xames3/vdoxa | 8fa945449bb34447ded0c421214c0252ff523d4a | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 XAMES3. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 31 | 72 | 0.715054 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,519 | 0.628205 |
5d52a5f4ab272695a4c951a2d0a2e0909bf0ed0b | 1,413 | py | Python | application/modules/login.py | BaggerFast/Simple_votings | 843769fa6fd2c04feb542e6b301b7b4810260d4e | [
"MIT"
] | null | null | null | application/modules/login.py | BaggerFast/Simple_votings | 843769fa6fd2c04feb542e6b301b7b4810260d4e | [
"MIT"
] | null | null | null | application/modules/login.py | BaggerFast/Simple_votings | 843769fa6fd2c04feb542e6b301b7b4810260d4e | [
"MIT"
] | null | null | null | from django.contrib import messages
from django.contrib.auth import login, authenticate
from django.shortcuts import render, redirect
from django.urls import reverse
from django.views import View
from application.forms import AuthenticateForm
from application.views import get_navbar, Page
class LoginView(View):
... | 36.230769 | 95 | 0.640481 | 1,119 | 0.791932 | 0 | 0 | 0 | 0 | 0 | 0 | 178 | 0.125973 |
5d52ada1ae418220d17ef038d3cc8e85cc6253d2 | 2,938 | py | Python | little_questions/utils/log.py | HelloChatterbox/little_questions | 04bee86244b42fdaed9f8d010c2f83037ad753f6 | [
"MIT"
] | null | null | null | little_questions/utils/log.py | HelloChatterbox/little_questions | 04bee86244b42fdaed9f8d010c2f83037ad753f6 | [
"MIT"
] | null | null | null | little_questions/utils/log.py | HelloChatterbox/little_questions | 04bee86244b42fdaed9f8d010c2f83037ad753f6 | [
"MIT"
] | null | null | null | # Copyright 2017 Mycroft AI Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 28.803922 | 74 | 0.596664 | 2,314 | 0.787611 | 0 | 0 | 1,604 | 0.54595 | 0 | 0 | 1,249 | 0.425119 |
5d53556c82d1a27255c1497656b5efc347cde76d | 1,035 | py | Python | alipay/aop/api/response/AlipayOpenMiniVersionAuditApplyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayOpenMiniVersionAuditApplyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayOpenMiniVersionAuditApplyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayOpenMiniVersionAuditApplyResponse(AlipayResponse):
def __init__(self):
super(AlipayOpenMiniVersionAuditApplyResponse, self).__init__()
self._speed_up = None
... | 28.75 | 112 | 0.699517 | 907 | 0.876329 | 0 | 0 | 307 | 0.296618 | 0 | 0 | 94 | 0.090821 |
5d53e848dc1be11f4d81bb7ffe655fc1c2f327c3 | 1,923 | py | Python | cvstudio/view/widgets/loading_dialog/loading_dialog.py | haruiz/PytorchCvStudio | ccf79dd0cc0d61f3fd01b1b5d96f7cda7b681eef | [
"MIT"
] | 32 | 2019-10-31T03:10:52.000Z | 2020-12-23T11:50:53.000Z | cvstudio/view/widgets/loading_dialog/loading_dialog.py | haruiz/CvStudio | ccf79dd0cc0d61f3fd01b1b5d96f7cda7b681eef | [
"MIT"
] | 19 | 2019-10-31T15:06:05.000Z | 2020-06-15T02:21:55.000Z | cvstudio/view/widgets/loading_dialog/loading_dialog.py | haruiz/PytorchCvStudio | ccf79dd0cc0d61f3fd01b1b5d96f7cda7b681eef | [
"MIT"
] | 8 | 2019-10-31T03:32:50.000Z | 2020-07-17T20:47:37.000Z | import os
from PyQt5 import QtCore
from PyQt5.QtCore import QRect, QPoint
from PyQt5.QtGui import QMovie, QCloseEvent, QShowEvent
from PyQt5.QtWidgets import QDialog, QLabel, QVBoxLayout, QApplication, QWidget
class QLoadingDialog(QDialog):
def __init__(self, parent=None):
super(QLoadingDialog, self).__i... | 36.283019 | 95 | 0.637546 | 1,709 | 0.888716 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 0.059802 |
5d546fd247cbdfbb018dec6e3f4e3273ffdefdb8 | 3,115 | py | Python | pysnmp-with-texts/MWORKS-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/MWORKS-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/MWORKS-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module MWORKS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/MWORKS-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:16:04 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:... | 97.34375 | 505 | 0.759551 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,182 | 0.379454 |
5d54ea522a32fa91aca889c9606f036f2de763c3 | 3,935 | py | Python | Assets/Editor/PostprocessBuildPlayer_MpireNxusMeasurementPostBuildiOS.py | mpire-nxus/nxus_unity_sdk | 34a1ebfc588c47c1c71fae11f29e82c1172c6dc2 | [
"MIT"
] | 1 | 2018-03-13T02:44:15.000Z | 2018-03-13T02:44:15.000Z | Assets/Editor/PostprocessBuildPlayer_MpireNxusMeasurementPostBuildiOS.py | mpire-nxus/nxus_unity_sdk | 34a1ebfc588c47c1c71fae11f29e82c1172c6dc2 | [
"MIT"
] | null | null | null | Assets/Editor/PostprocessBuildPlayer_MpireNxusMeasurementPostBuildiOS.py | mpire-nxus/nxus_unity_sdk | 34a1ebfc588c47c1c71fae11f29e82c1172c6dc2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
import re
from subprocess import Popen, PIPE
import argparse
from pbxproj import XcodeProject, TreeType
from pbxproj import FileOptions
def main():
parser = argparse.ArgumentParser(description="MpireNxusMeasurement post build iOS script")
parser.add_argument('ios_project_path... | 38.578431 | 164 | 0.706226 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,346 | 0.342058 |
5d553e6733970b4280761ad4ec3ddb284ae1146d | 1,382 | py | Python | vars_in_python.py | klyusba/python-quiz | 9f469417458f8ba6b21f9507cc860ca4547ea67b | [
"MIT"
] | null | null | null | vars_in_python.py | klyusba/python-quiz | 9f469417458f8ba6b21f9507cc860ca4547ea67b | [
"MIT"
] | null | null | null | vars_in_python.py | klyusba/python-quiz | 9f469417458f8ba6b21f9507cc860ca4547ea67b | [
"MIT"
] | null | null | null | # == 1 ==
bar = [1, 2]
def foo(bar):
bar = sum(bar)
return bar
print(foo(bar))
# == 2 ==
bar = [1, 2]
def foo(bar):
bar[0] = 1
return sum(bar)
print(foo(bar))
# == 3 ==
bar = [1, 2]
def foo():
bar = sum(bar)
return bar
print(foo())
# == 4 ==
bar = [1, 2]
def foo(bar):
bar =... | 11.145161 | 32 | 0.469609 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 147 | 0.106368 |
5d55a06354d86f35af5fb38858161328b7581a23 | 10,786 | py | Python | hack/dev/gh-replay-events.py | sm43/pipelines-as-code | bd21e48c96ab128d533701ecd1a2df7a0d136d65 | [
"Apache-2.0"
] | null | null | null | hack/dev/gh-replay-events.py | sm43/pipelines-as-code | bd21e48c96ab128d533701ecd1a2df7a0d136d65 | [
"Apache-2.0"
] | null | null | null | hack/dev/gh-replay-events.py | sm43/pipelines-as-code | bd21e48c96ab128d533701ecd1a2df7a0d136d65 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Author: Chmouel Boudjnah <chmouel@chmouel.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE... | 30.555241 | 113 | 0.623215 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,653 | 0.33868 |
5d579c372853402ecfd7e953a09a9d04c6d7c725 | 114 | py | Python | nintendeals/noa/api/__init__.py | Pooroomoo/nintendeals | 993f4d159ff405ed82cd2bb023c7b75d921d0acb | [
"MIT"
] | 37 | 2020-04-30T13:48:02.000Z | 2022-03-09T04:55:54.000Z | nintendeals/noa/api/__init__.py | Pooroomoo/nintendeals | 993f4d159ff405ed82cd2bb023c7b75d921d0acb | [
"MIT"
] | 4 | 2020-05-09T03:17:44.000Z | 2021-04-28T00:53:55.000Z | nintendeals/noa/api/__init__.py | Pooroomoo/nintendeals | 993f4d159ff405ed82cd2bb023c7b75d921d0acb | [
"MIT"
] | 5 | 2020-07-22T06:42:27.000Z | 2022-02-07T22:35:57.000Z | from .algolia import search_by_nsuid
from .algolia import search_by_platform
from .algolia import search_by_query
| 28.5 | 39 | 0.868421 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5d58e721508a643ec9487a7f661ca1a66cd5a971 | 3,659 | py | Python | 076_Minimum_Window_Substring.py | joshlyman/Josh-LeetCode | cc9e2cc406d2cbd5a90ee579efbcaeffb842c5ed | [
"MIT"
] | null | null | null | 076_Minimum_Window_Substring.py | joshlyman/Josh-LeetCode | cc9e2cc406d2cbd5a90ee579efbcaeffb842c5ed | [
"MIT"
] | null | null | null | 076_Minimum_Window_Substring.py | joshlyman/Josh-LeetCode | cc9e2cc406d2cbd5a90ee579efbcaeffb842c5ed | [
"MIT"
] | null | null | null |
# Other solution
# V2
def minWindow(s, t):
need = collections.Counter(t) #hash table to store char frequency
missing = len(t) #total number of chars we care
start, end = 0, 0
i = 0
for j, char in enumerate(s, 1): #index j from 1
if need[char] > 0... | 36.959596 | 179 | 0.52774 | 1,392 | 0.379188 | 0 | 0 | 0 | 0 | 0 | 0 | 1,972 | 0.537183 |
5d5c6de0926f1a98ed21db39c4944a17b7f61725 | 823 | py | Python | home/migrations/0002_auto_20171017_0412.py | Taywee/amberherbert.com | 6bf384d7cdf18dc613252fe4dde38545150eabbc | [
"MIT"
] | null | null | null | home/migrations/0002_auto_20171017_0412.py | Taywee/amberherbert.com | 6bf384d7cdf18dc613252fe4dde38545150eabbc | [
"MIT"
] | 2 | 2017-10-15T20:36:59.000Z | 2017-10-17T05:27:49.000Z | home/migrations/0002_auto_20171017_0412.py | Taywee/amberherbert.com | 6bf384d7cdf18dc613252fe4dde38545150eabbc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-10-17 04:12
from __future__ import unicode_literals
from django.db import migrations
import wagtail.core.blocks
import wagtail.core.fields
class Migration(migrations.Migration):
dependencies = [
('home', '0001_initial'),
]
operations ... | 35.782609 | 384 | 0.684083 | 619 | 0.752126 | 0 | 0 | 0 | 0 | 0 | 0 | 235 | 0.285541 |
5d5caf5c5d1415de34379e45359c322cac37e6ff | 2,766 | py | Python | lib/adv_model.py | chawins/entangle-rep | 3e9e0d6e7536b0de0e35d7f8717f2ccc8e887759 | [
"MIT"
] | 15 | 2019-06-30T12:30:17.000Z | 2021-12-07T20:20:36.000Z | lib/adv_model.py | chawins/entangle-rep | 3e9e0d6e7536b0de0e35d7f8717f2ccc8e887759 | [
"MIT"
] | 2 | 2020-06-11T10:10:52.000Z | 2021-12-21T08:50:33.000Z | lib/adv_model.py | chawins/entangle-rep | 3e9e0d6e7536b0de0e35d7f8717f2ccc8e887759 | [
"MIT"
] | 9 | 2019-07-09T14:52:30.000Z | 2020-10-27T19:18:34.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
class PGDModel(nn.Module):
"""
code adapted from
https://github.com/karandwivedi42/adversarial/blob/master/main.py
"""
def __init__(self, basic_net, config):
super(PGDModel, self).__init__()
self.basic_net = basic_... | 35.012658 | 78 | 0.578453 | 2,693 | 0.973608 | 0 | 0 | 0 | 0 | 0 | 0 | 400 | 0.144613 |
5d5d633b271390741583d9b310e4391f6dfe899f | 4,673 | py | Python | fs_image/rpm/storage/tests/storage_base_test.py | singhaditya28/fs_image | 3d122da48eab8b26e5add6754cc1f91296139c58 | [
"MIT"
] | null | null | null | fs_image/rpm/storage/tests/storage_base_test.py | singhaditya28/fs_image | 3d122da48eab8b26e5add6754cc1f91296139c58 | [
"MIT"
] | null | null | null | fs_image/rpm/storage/tests/storage_base_test.py | singhaditya28/fs_image | 3d122da48eab8b26e5add6754cc1f91296139c58 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# 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 unittest
from unittest.mock import patch, MagicMock
from typing import List, Tuple
from .. import Storage # M... | 41.723214 | 79 | 0.558742 | 4,312 | 0.922748 | 0 | 0 | 0 | 0 | 0 | 0 | 1,569 | 0.335759 |
5d5d8bde571d6e8d8f2723242cd35348a71ff40f | 8,457 | py | Python | sdk/python/pulumi_gcp/kms/get_kms_crypto_key_version.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_gcp/kms/get_kms_crypto_key_version.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_gcp/kms/get_kms_crypto_key_version.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 41.253659 | 247 | 0.684522 | 4,307 | 0.509282 | 394 | 0.046589 | 5,316 | 0.628592 | 0 | 0 | 4,386 | 0.518624 |
5d5e98fd28e904d5e1f509a5b35e66ec3047cc56 | 353 | py | Python | lecture11/subsets.py | nd-cse-30872-fa20/cse-30872-fa20-examples | 7a991a0499e03bf91ac8ba40c99245d5d926e20c | [
"MIT"
] | null | null | null | lecture11/subsets.py | nd-cse-30872-fa20/cse-30872-fa20-examples | 7a991a0499e03bf91ac8ba40c99245d5d926e20c | [
"MIT"
] | null | null | null | lecture11/subsets.py | nd-cse-30872-fa20/cse-30872-fa20-examples | 7a991a0499e03bf91ac8ba40c99245d5d926e20c | [
"MIT"
] | 2 | 2020-08-10T15:05:39.000Z | 2020-08-12T15:16:01.000Z | #!/usr/bin/env python3
import itertools
# Constants
NUMBERS = range(0, 10)
# Main Execution
def main():
count = 0
for length in range(0, len(NUMBERS) + 1):
for subset in itertools.combinations(NUMBERS, length):
if sum(subset) % 3 == 0:
count += 1
print(count)
if __... | 16.045455 | 62 | 0.580737 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 0.167139 |
5d5ec924b9a968b7509ed5badaef99e8de842bde | 21,520 | py | Python | src/toil/batchSystems/abstractBatchSystem.py | Hexotical/toil | 312b6e1f221ee7f7f187dd6dbfce1aecffd00e09 | [
"Apache-2.0"
] | 348 | 2018-07-08T03:38:28.000Z | 2022-03-11T18:57:44.000Z | src/toil/batchSystems/abstractBatchSystem.py | Hexotical/toil | 312b6e1f221ee7f7f187dd6dbfce1aecffd00e09 | [
"Apache-2.0"
] | 1,700 | 2018-07-05T18:28:49.000Z | 2022-03-31T14:09:04.000Z | src/toil/batchSystems/abstractBatchSystem.py | Hexotical/toil | 312b6e1f221ee7f7f187dd6dbfce1aecffd00e09 | [
"Apache-2.0"
] | 126 | 2018-07-11T18:59:29.000Z | 2022-01-24T03:14:02.000Z | # Copyright (C) 2015-2021 Regents of the University of California
#
# 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 app... | 42.613861 | 188 | 0.660037 | 19,888 | 0.924164 | 0 | 0 | 8,281 | 0.384805 | 0 | 0 | 14,253 | 0.662314 |
5d6066cbcb225097d2a844447d53060bd3350b74 | 1,969 | py | Python | demo/other_demo.py | Heartfilia/lite_tools | b3432ba7cb60502ac64d45e23022e20555fb1588 | [
"MIT"
] | 5 | 2021-05-10T07:35:47.000Z | 2022-03-07T01:31:12.000Z | demo/other_demo.py | Heartfilia/lite_tools | b3432ba7cb60502ac64d45e23022e20555fb1588 | [
"MIT"
] | null | null | null | demo/other_demo.py | Heartfilia/lite_tools | b3432ba7cb60502ac64d45e23022e20555fb1588 | [
"MIT"
] | 1 | 2022-03-03T03:23:26.000Z | 2022-03-03T03:23:26.000Z | # -*- coding: utf-8 -*-
from lite_tools import get_md5, get_sha, get_sha3, get_b64e, get_b64d
# about hashlib ==> get_md5, get_sha, get_sha3 || default mode=256
s = "test_information" # 这里只能丢字符串
print(get_md5(s)) # 5414ffd88fcb58417e64ecec51bb3a6b
print(get_md5(s, upper=True)) # 5414FFD88FCB5841... | 57.911765 | 176 | 0.718639 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,208 | 0.597724 |
5d61828a9a51cb5ce1865c213ffd2c5903a688a4 | 47 | py | Python | prereise/gather/solardata/tests/__init__.py | terrywqf/PreREISE | f8052dd37091eaa15024725d5c92a3ef0ee311ee | [
"MIT"
] | null | null | null | prereise/gather/solardata/tests/__init__.py | terrywqf/PreREISE | f8052dd37091eaa15024725d5c92a3ef0ee311ee | [
"MIT"
] | null | null | null | prereise/gather/solardata/tests/__init__.py | terrywqf/PreREISE | f8052dd37091eaa15024725d5c92a3ef0ee311ee | [
"MIT"
] | null | null | null | __all__ = ["mock_pv_info", "test_pv_tracking"]
| 23.5 | 46 | 0.744681 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 0.680851 |
5d61d078db118ba78d2af9ae995c1fa84aa2f450 | 2,306 | py | Python | arfit/cp_utils.py | farr/arfit | 7ff6def331ef98f43f623da2d9867d1ac967448b | [
"MIT"
] | 5 | 2015-04-29T21:46:52.000Z | 2021-05-13T04:59:23.000Z | arfit/cp_utils.py | afcarl/arfit | 7ff6def331ef98f43f623da2d9867d1ac967448b | [
"MIT"
] | null | null | null | arfit/cp_utils.py | afcarl/arfit | 7ff6def331ef98f43f623da2d9867d1ac967448b | [
"MIT"
] | 2 | 2015-12-03T12:08:32.000Z | 2018-05-26T16:20:31.000Z | import carmcmc as cm
from gatspy.periodic import LombScargleFast
import matplotlib.pyplot as plt
import numpy as np
def csample_from_files(datafile, chainfile, p, q):
data = np.loadtxt(datafile)
times, tind = np.unique(data[:,0], return_index=True)
data = data[tind, :]
chain = np.loadtxt(chainfil... | 37.193548 | 131 | 0.691674 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 98 | 0.042498 |
5d65143322eb65bf3b9638c414999e21eb0323db | 1,319 | py | Python | pdiffcopy/hashing.py | xolox/python-pdiffcopy | ed765af92c0c0823818d545e61384753912a5725 | [
"MIT"
] | 5 | 2020-03-07T00:01:24.000Z | 2020-12-03T03:44:26.000Z | pdiffcopy/hashing.py | xolox/python-pdiffcopy | ed765af92c0c0823818d545e61384753912a5725 | [
"MIT"
] | null | null | null | pdiffcopy/hashing.py | xolox/python-pdiffcopy | ed765af92c0c0823818d545e61384753912a5725 | [
"MIT"
] | null | null | null | # Fast large file synchronization inspired by rsync.
#
# Author: Peter Odding <peter@peterodding.com>
# Last Change: March 6, 2020
# URL: https://pdiffcopy.readthedocs.io
"""Parallel hashing of files using :mod:`multiprocessing` and :mod:`pdiffcopy.mp`."""
# Standard library modules.
import functools
import hashlib
i... | 31.404762 | 106 | 0.720243 | 0 | 0 | 456 | 0.345716 | 0 | 0 | 0 | 0 | 523 | 0.396513 |
5d65c01cd0ad11126b7931d199f6927d742a24e8 | 2,170 | py | Python | pyscf/nao/test/test_0003_na2_nao.py | robert-anderson/pyscf | cdc56e168cb15f47e8cdc791a92d689fa9b655af | [
"Apache-2.0"
] | 3 | 2021-02-28T00:52:53.000Z | 2021-03-01T06:23:33.000Z | pyscf/nao/test/test_0003_na2_nao.py | robert-anderson/pyscf | cdc56e168cb15f47e8cdc791a92d689fa9b655af | [
"Apache-2.0"
] | 36 | 2018-08-22T19:44:03.000Z | 2020-05-09T10:02:36.000Z | pyscf/nao/test/test_0003_na2_nao.py | robert-anderson/pyscf | cdc56e168cb15f47e8cdc791a92d689fa9b655af | [
"Apache-2.0"
] | 4 | 2018-02-14T16:28:28.000Z | 2019-08-12T16:40:30.000Z | # Copyright 2014-2018 The PySCF Developers. 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 appl... | 31.449275 | 87 | 0.657604 | 1,390 | 0.640553 | 0 | 0 | 0 | 0 | 0 | 0 | 1,282 | 0.590783 |
5d65f544314984a2fee60579b78ec312b1835ccc | 491 | py | Python | tests/moz_library/rental_books_test.py | mozkzki/moz-library | fb925414405a9fcba8bb7194cf983ba18c920e2f | [
"MIT"
] | null | null | null | tests/moz_library/rental_books_test.py | mozkzki/moz-library | fb925414405a9fcba8bb7194cf983ba18c920e2f | [
"MIT"
] | 35 | 2021-10-09T13:08:33.000Z | 2022-03-29T14:26:59.000Z | tests/moz_library/rental_books_test.py | mozkzki/moz-library | fb925414405a9fcba8bb7194cf983ba18c920e2f | [
"MIT"
] | null | null | null | import pytest
from moz_library.rental_books import RentalBooks
class TestRentalBooks:
@pytest.fixture()
def books1(self):
return RentalBooks()
def test_can_extend_period_1(self, books1):
assert books1._can_extend_period("延長できません") is False
def test_can_extend_period_2(self, books1):
... | 27.277778 | 64 | 0.737271 | 469 | 0.876636 | 0 | 0 | 68 | 0.127103 | 0 | 0 | 72 | 0.134579 |
5d66ab6b71d371d38fa50d90c8734a50bf50ee30 | 2,625 | py | Python | examples/src/Charts/MultiCategoryChart.py | aspose-slides/Aspose.Slides-for-Python-via-.NET | c55ad5c71f942598f1e67e22a52cbcd1cb286467 | [
"MIT"
] | null | null | null | examples/src/Charts/MultiCategoryChart.py | aspose-slides/Aspose.Slides-for-Python-via-.NET | c55ad5c71f942598f1e67e22a52cbcd1cb286467 | [
"MIT"
] | null | null | null | examples/src/Charts/MultiCategoryChart.py | aspose-slides/Aspose.Slides-for-Python-via-.NET | c55ad5c71f942598f1e67e22a52cbcd1cb286467 | [
"MIT"
] | null | null | null | import aspose.pydrawing as drawing
import aspose.slides as slides
def charts_multi_category_chart():
#ExStart:MultiCategoryChart
# The path to the documents directory.
outDir = "./examples/out/"
with slides.Presentation() as pres:
slide = pres.slides[0]
ch = pres.slides[0].shapes.add... | 51.470588 | 106 | 0.708952 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 335 | 0.127522 |
5d66c8be8ed85e591a27c5733a7d2e134250bc39 | 9,393 | py | Python | netbox/extras/forms/filtersets.py | cybarox/netbox | ea197eff5f4fe925bb354d1375912decd81752bd | [
"Apache-2.0"
] | null | null | null | netbox/extras/forms/filtersets.py | cybarox/netbox | ea197eff5f4fe925bb354d1375912decd81752bd | [
"Apache-2.0"
] | null | null | null | netbox/extras/forms/filtersets.py | cybarox/netbox | ea197eff5f4fe925bb354d1375912decd81752bd | [
"Apache-2.0"
] | null | null | null | from django import forms
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.utils.translation import gettext as _
from dcim.models import DeviceRole, DeviceType, Platform, Region, Site, SiteGroup
from extras.choices import *
from extras.models import *
fr... | 29.261682 | 117 | 0.639519 | 8,285 | 0.88204 | 0 | 0 | 0 | 0 | 0 | 0 | 1,327 | 0.141275 |
5d66ef032fbd2dcf091b5ffde482a5d596613146 | 1,940 | py | Python | bin/write2cly.py | docdiesel/smartmetertools | 3b7449c7a9069696af078631aa5440f53d0f57bc | [
"MIT"
] | 1 | 2019-05-30T08:28:31.000Z | 2019-05-30T08:28:31.000Z | bin/write2cly.py | docdiesel/smartmetertools | 3b7449c7a9069696af078631aa5440f53d0f57bc | [
"MIT"
] | null | null | null | bin/write2cly.py | docdiesel/smartmetertools | 3b7449c7a9069696af078631aa5440f53d0f57bc | [
"MIT"
] | null | null | null | #!/usr/bin/python3
## write2cly.py - reads json (generated by sml_reader.py) from stdin
## - writes values to Corlysis time series InfluxDB
##
## Writes data from smart meter to time series database (InfluxDB)
## at Corlysis.com [1]. You need to configure your database and token
## in the config secti... | 25.526316 | 71 | 0.652062 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,263 | 0.650696 |
5d672137217c3f190c65f38cc034a58e8ab7815b | 1,440 | py | Python | dns/rdtypes/ANY/__init__.py | Ashiq5/dnspython | 5449af5318d88bada34f661247f3bcb16f58f057 | [
"ISC"
] | null | null | null | dns/rdtypes/ANY/__init__.py | Ashiq5/dnspython | 5449af5318d88bada34f661247f3bcb16f58f057 | [
"ISC"
] | null | null | null | dns/rdtypes/ANY/__init__.py | Ashiq5/dnspython | 5449af5318d88bada34f661247f3bcb16f58f057 | [
"ISC"
] | null | null | null | # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and ... | 22.5 | 75 | 0.620833 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,155 | 0.802083 |
5d67812696614c7eac2050cda2d994e16e9201d7 | 10,519 | py | Python | 01_test.py | KhubbatulinMark/DCase2020-Task-2-on-Wigner-Ville-transform | 6653d7abbaafe09fb17768d9902bb77db24945d4 | [
"MIT"
] | 3 | 2020-09-18T10:33:37.000Z | 2020-11-04T12:53:50.000Z | 01_test.py | KhubbatulinMark/DCase2020-Task-2-on-Wigner-Ville-transform | 6653d7abbaafe09fb17768d9902bb77db24945d4 | [
"MIT"
] | 4 | 2020-09-26T01:07:55.000Z | 2022-02-10T01:30:27.000Z | 01_test.py | KhubbatulinMark/DCase2020-Task-2-on-Wigner-Ville-transform | 6653d7abbaafe09fb17768d9902bb77db24945d4 | [
"MIT"
] | null | null | null | """
@file 01_test.py
@brief Script for test
@author Toshiki Nakamura, Yuki Nikaido, and Yohei Kawaguchi (Hitachi Ltd.)
Copyright (C) 2020 Hitachi, Ltd. All right reserved.
"""
########################################################################
# import default python-library
###############################... | 42.587045 | 118 | 0.456412 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,025 | 0.382641 |
5d68067044bd41e0c94f3b4e115e6a6243c834c1 | 1,247 | py | Python | src/text_split/split.py | i1123581321/word_split | 6401cdc37f58aa8718793dd7cb9bf4d3a4b690a4 | [
"MIT"
] | null | null | null | src/text_split/split.py | i1123581321/word_split | 6401cdc37f58aa8718793dd7cb9bf4d3a4b690a4 | [
"MIT"
] | null | null | null | src/text_split/split.py | i1123581321/word_split | 6401cdc37f58aa8718793dd7cb9bf4d3a4b690a4 | [
"MIT"
] | null | null | null | import argparse
import os
parser = argparse.ArgumentParser(description="a simple parser")
parser.add_argument("filename", type=str)
parser.add_argument("lineno", nargs="+", type=int)
parser.add_argument("--same_length", action=argparse.BooleanOptionalAction)
def main():
args = parser.parse_args()
filename =... | 30.414634 | 77 | 0.585405 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 104 | 0.0834 |
5d68e4a866db0948470d395c5ba6d5ad5676d177 | 23,037 | py | Python | src/sentry/models/event.py | Ali-Tahir/sentry | aa7b306c5ea671ac002a3524982563679557cb31 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/models/event.py | Ali-Tahir/sentry | aa7b306c5ea671ac002a3524982563679557cb31 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/models/event.py | Ali-Tahir/sentry | aa7b306c5ea671ac002a3524982563679557cb31 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import six
import string
import warnings
import pytz
from collections import OrderedDict
from dateutil.parser import parse as parse_date
from django.db import models
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from hashlib import md5... | 33.778592 | 99 | 0.623996 | 22,080 | 0.958458 | 0 | 0 | 7,016 | 0.304554 | 0 | 0 | 8,813 | 0.382558 |
5d6b89b1e8e521a2e81232c6e63ef4c5529270e8 | 2,920 | py | Python | Assignment3/src/data/make_nowcast_dataset.py | shikashyam/BigDataSystemsCoursework | d7f9cabbfb18b0e3303292b65af1ffd530e24ccc | [
"MIT"
] | null | null | null | Assignment3/src/data/make_nowcast_dataset.py | shikashyam/BigDataSystemsCoursework | d7f9cabbfb18b0e3303292b65af1ffd530e24ccc | [
"MIT"
] | null | null | null | Assignment3/src/data/make_nowcast_dataset.py | shikashyam/BigDataSystemsCoursework | d7f9cabbfb18b0e3303292b65af1ffd530e24ccc | [
"MIT"
] | 4 | 2022-02-12T23:59:54.000Z | 2022-02-16T22:53:32.000Z | """
Makes training and test dataset for nowcasting model using SEVIR
"""
# -*- coding: utf-8 -*-
import argparse
import logging
import os
import h5py
os.environ["HDF5_USE_FILE_LOCKING"]='FALSE'
import sys
import numpy as np
import tensorflow as tf
from nowcast_generator import get_nowcast_test_generator
# parser = ... | 42.941176 | 117 | 0.7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,361 | 0.466096 |
5d6e1f190b9f10fc581499ca4a914cfa2670ffb2 | 9,576 | py | Python | blender-plugin/import_cast.py | rtasan/ApexCastImporter | 17f833ab8ff9757e295ca8eadb0cb210bfdd6476 | [
"MIT"
] | null | null | null | blender-plugin/import_cast.py | rtasan/ApexCastImporter | 17f833ab8ff9757e295ca8eadb0cb210bfdd6476 | [
"MIT"
] | 3 | 2021-05-24T12:29:43.000Z | 2021-05-28T13:07:39.000Z | blender-plugin/import_cast.py | rtasan/ApexCastImporter | 17f833ab8ff9757e295ca8eadb0cb210bfdd6476 | [
"MIT"
] | null | null | null |
# The Original importer was created by Nick
# Copyright (c) 2020 Nick
import bpy
import bmesh
import os
import array
import math
from mathutils import *
from bpy_extras.image_utils import load_image
from .cast import Cast, Model, Animation, Curve, NotificationTrack, Mesh, Skeleton, Bone, Material, File
def utilityB... | 33.957447 | 130 | 0.631788 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,210 | 0.124923 |
5d6e47beb4576bf2e083ccdcb792c2e2830c83c4 | 50,279 | py | Python | user_program/usb4vc_ui.py | dekuNukem/USB4VC | 66c4f0b4a4acd7cec6654ea0dd4da026edf5d24c | [
"MIT"
] | 78 | 2022-02-07T16:48:11.000Z | 2022-03-31T12:25:35.000Z | user_program/usb4vc_ui.py | dekuNukem/USB4VC | 66c4f0b4a4acd7cec6654ea0dd4da026edf5d24c | [
"MIT"
] | 1 | 2022-02-26T20:16:08.000Z | 2022-02-26T20:24:04.000Z | user_program/usb4vc_ui.py | dekuNukem/USB4VC | 66c4f0b4a4acd7cec6654ea0dd4da026edf5d24c | [
"MIT"
] | 1 | 2022-02-24T03:34:15.000Z | 2022-02-24T03:34:15.000Z | # https://luma-oled.readthedocs.io/en/latest/software.html
import os
import sys
import time
import threading
import usb4vc_oled
from luma.core.render import canvas
import RPi.GPIO as GPIO
import usb4vc_usb_scan
import usb4vc_shared
import usb4vc_show_ev
import usb4vc_check_update
import json
import subprocess
from sub... | 51.462641 | 1,075 | 0.63269 | 25,339 | 0.503968 | 0 | 0 | 0 | 0 | 0 | 0 | 7,369 | 0.146562 |
5d6f6e6ed3bbf01cb5af3d5c038344399c98f74f | 384 | py | Python | study/migrations/0003_auto_20200224_2316.py | hpathipati/Quick-Tutor | 17476d79b87f51b12a6c8fc435d1a6506bff1e04 | [
"PostgreSQL",
"Unlicense",
"MIT"
] | null | null | null | study/migrations/0003_auto_20200224_2316.py | hpathipati/Quick-Tutor | 17476d79b87f51b12a6c8fc435d1a6506bff1e04 | [
"PostgreSQL",
"Unlicense",
"MIT"
] | null | null | null | study/migrations/0003_auto_20200224_2316.py | hpathipati/Quick-Tutor | 17476d79b87f51b12a6c8fc435d1a6506bff1e04 | [
"PostgreSQL",
"Unlicense",
"MIT"
] | null | null | null | # Generated by Django 3.0.2 on 2020-02-24 23:16
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('study', '0002_student'),
]
operations = [
migrations.AlterField(
model_name='student',
name='bio',
field... | 20.210526 | 63 | 0.588542 | 291 | 0.757813 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 0.213542 |
5d6fd80c1e9176894348ae0d83e6981dbb3ecb3a | 103,544 | py | Python | tests/unit/resources/test_resource.py | gzecchi/oneview-python | 949bc67ca3eaed324a6dc058620145d9e067e25b | [
"Apache-2.0"
] | null | null | null | tests/unit/resources/test_resource.py | gzecchi/oneview-python | 949bc67ca3eaed324a6dc058620145d9e067e25b | [
"Apache-2.0"
] | null | null | null | tests/unit/resources/test_resource.py | gzecchi/oneview-python | 949bc67ca3eaed324a6dc058620145d9e067e25b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
###
# (C) Copyright [2019] Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#... | 42.21117 | 127 | 0.665727 | 102,003 | 0.985117 | 0 | 0 | 82,450 | 0.79628 | 0 | 0 | 20,164 | 0.194738 |
5d72ba13d02bd291e6fb1bfd1e3d024e5c0779f3 | 316 | py | Python | workalendar/usa/colorado.py | vanadium23/workalendar | 4c67b5a7900fa56d7a93b767c6cbd8f1cc6b70a7 | [
"MIT"
] | null | null | null | workalendar/usa/colorado.py | vanadium23/workalendar | 4c67b5a7900fa56d7a93b767c6cbd8f1cc6b70a7 | [
"MIT"
] | null | null | null | workalendar/usa/colorado.py | vanadium23/workalendar | 4c67b5a7900fa56d7a93b767c6cbd8f1cc6b70a7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from .core import UnitedStates
class Colorado(UnitedStates):
"""Colorado"""
# Colorado has only federal state holidays.
# NOTE: Cesar Chavez Day is an optional holiday
| 26.333333 | 66 | 0.677215 | 148 | 0.468354 | 0 | 0 | 0 | 0 | 0 | 0 | 127 | 0.401899 |
5d72e502922a05a806cd65843fb08ea2947b5e7b | 3,358 | py | Python | dataloaders/augmentation.py | thierrypin/gei-pool | 0a9e79b01148735f0e975c50d2476e41ba20af4f | [
"MIT"
] | null | null | null | dataloaders/augmentation.py | thierrypin/gei-pool | 0a9e79b01148735f0e975c50d2476e41ba20af4f | [
"MIT"
] | null | null | null | dataloaders/augmentation.py | thierrypin/gei-pool | 0a9e79b01148735f0e975c50d2476e41ba20af4f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import random
import numpy as np
# Generic data augmentation
class Augmenter:
""" Generic data augmentation class with chained operations
"""
def __init__(self, ops=[]):
if not isinstance(ops, list):
print("Error: ops must be a list of fu... | 25.24812 | 158 | 0.549136 | 511 | 0.152174 | 0 | 0 | 0 | 0 | 0 | 0 | 638 | 0.189994 |
5d72ea525d5fca207b00f29574de0ed2864d8b1b | 7,229 | py | Python | cigeo/admin.py | CzechInvest/ciis | c6102598f564a717472e5e31e7eb894bba2c8104 | [
"MIT"
] | 1 | 2019-05-26T22:24:01.000Z | 2019-05-26T22:24:01.000Z | cigeo/admin.py | CzechInvest/ciis | c6102598f564a717472e5e31e7eb894bba2c8104 | [
"MIT"
] | 6 | 2019-01-22T14:53:43.000Z | 2020-09-22T16:20:28.000Z | cigeo/admin.py | CzechInvest/ciis | c6102598f564a717472e5e31e7eb894bba2c8104 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.gis import geos
from leaflet.admin import LeafletGeoAdmin, LeafletGeoAdminMixin
from .models import Lau1
from .models import Nuts3
from .models import Airport
from .models import Road
from .models import PublicTransportStop
from .models import RailwayStation
from dja... | 30.761702 | 80 | 0.580025 | 6,447 | 0.891825 | 0 | 0 | 0 | 0 | 0 | 0 | 887 | 0.1227 |
5d730d1afb5f1402b6e9a016eacea8ab0f918612 | 858 | py | Python | umbra/monitor/main.py | RafaelAPB/umbra | cf075bbe73e46540e9edee25f9ec3d0828620d5f | [
"Apache-2.0"
] | null | null | null | umbra/monitor/main.py | RafaelAPB/umbra | cf075bbe73e46540e9edee25f9ec3d0828620d5f | [
"Apache-2.0"
] | null | null | null | umbra/monitor/main.py | RafaelAPB/umbra | cf075bbe73e46540e9edee25f9ec3d0828620d5f | [
"Apache-2.0"
] | null | null | null | import logging
import json
import asyncio
from google.protobuf import json_format
from umbra.common.protobuf.umbra_grpc import MonitorBase
from umbra.common.protobuf.umbra_pb2 import Instruction, Snapshot
from umbra.monitor.tools import Tools
logger = logging.getLogger(__name__)
logging.getLogger("hpack").setLevel(... | 31.777778 | 99 | 0.757576 | 518 | 0.60373 | 0 | 0 | 0 | 0 | 426 | 0.496503 | 29 | 0.0338 |
5d733960d2eb830da7ca11bb10495536367425c3 | 6,207 | py | Python | pycs/spells/hunters_mark.py | dwagon/pycs | 4d02acbf380526d3bf0380f6bb8b757a827024b8 | [
"MIT"
] | null | null | null | pycs/spells/hunters_mark.py | dwagon/pycs | 4d02acbf380526d3bf0380f6bb8b757a827024b8 | [
"MIT"
] | null | null | null | pycs/spells/hunters_mark.py | dwagon/pycs | 4d02acbf380526d3bf0380f6bb8b757a827024b8 | [
"MIT"
] | null | null | null | """https://www.dndbeyond.com/spells/hunters-mark"""
from unittest.mock import patch
import dice
from pycs.constant import ActionCategory
from pycs.constant import SpellType
from pycs.creature import Creature
from pycs.effect import Effect
from pycs.gear import Shortbow
from pycs.spell import SpellAction
from pycs.spel... | 41.10596 | 85 | 0.475914 | 5,129 | 0.826325 | 0 | 0 | 0 | 0 | 0 | 0 | 2,961 | 0.477042 |
5d7378673807f7e0283f1553a575bc82a4166826 | 390 | py | Python | utilities.py | armandok/pySLAM-D | ef7398806e021885b29702adf55acbedaf544ce6 | [
"MIT"
] | 10 | 2020-12-24T16:40:46.000Z | 2022-02-01T18:09:13.000Z | utilities.py | armandok/pySLAM-D | ef7398806e021885b29702adf55acbedaf544ce6 | [
"MIT"
] | null | null | null | utilities.py | armandok/pySLAM-D | ef7398806e021885b29702adf55acbedaf544ce6 | [
"MIT"
] | null | null | null | import numpy as np
def rot_to_angle(rot):
return np.arccos(0.5*np.trace(rot)-0.5)
def rot_to_heading(rot):
# This function calculates the heading angle of the rot matrix w.r.t. the y-axis
new_rot = rot[0:3:2, 0:3:2] # remove the mid row and column corresponding to the y-axis
new_rot = new_rot/np.li... | 30 | 92 | 0.694872 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 139 | 0.35641 |
5d7393f1d5071cf9d02bab3da993f038421d4d57 | 1,175 | py | Python | robosuite/models/grippers/__init__.py | kyungjaelee/robosuite | 0d73fcca9ed8e638632f4bd7b0f1b8ebf4640fb1 | [
"MIT"
] | 397 | 2020-09-28T02:49:58.000Z | 2022-03-30T18:08:19.000Z | robosuite/models/grippers/__init__.py | kyungjaelee/robosuite | 0d73fcca9ed8e638632f4bd7b0f1b8ebf4640fb1 | [
"MIT"
] | 169 | 2020-09-28T02:17:59.000Z | 2022-03-29T13:32:43.000Z | robosuite/models/grippers/__init__.py | kyungjaelee/robosuite | 0d73fcca9ed8e638632f4bd7b0f1b8ebf4640fb1 | [
"MIT"
] | 131 | 2020-09-28T14:50:35.000Z | 2022-03-31T02:27:33.000Z | from .gripper_model import GripperModel
from .gripper_factory import gripper_factory
from .gripper_tester import GripperTester
from .panda_gripper import PandaGripper
from .rethink_gripper import RethinkGripper
from .robotiq_85_gripper import Robotiq85Gripper
from .robotiq_three_finger_gripper import RobotiqThreeFinge... | 39.166667 | 103 | 0.846809 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 202 | 0.171915 |
5d7596fcdc1125f69dea760f3f07ca8ccf07185d | 7,509 | py | Python | src/pose/visualizations/visualizations.py | Idein/chainer-hand-pose | 45c7b629a74bf13da8cc9b47d0ded7099c139e9b | [
"Apache-2.0"
] | 11 | 2019-12-14T07:55:52.000Z | 2021-06-22T06:38:34.000Z | src/pose/visualizations/visualizations.py | terasakisatoshi/chainer-hand-pose | a47e0c61c4fea3369db566eea3d539d1c9398bf7 | [
"Apache-2.0"
] | 1 | 2020-06-17T21:39:48.000Z | 2020-06-26T13:16:43.000Z | src/pose/visualizations/visualizations.py | terasakisatoshi/chainer-hand-pose | a47e0c61c4fea3369db566eea3d539d1c9398bf7 | [
"Apache-2.0"
] | 3 | 2019-12-11T13:47:54.000Z | 2020-10-23T07:10:15.000Z | import logging
logger = logging.getLogger(__name__)
import random
import chainercv
import numpy as np
from matplotlib import pyplot as plt
from mpl_toolkits.mplot3d import Axes3D # NOQA
from pose.hand_dataset.geometry_utils import normalize_joint_zyx
from pose.hand_dataset.image_utils import normalize_depth
# Dec... | 31.953191 | 96 | 0.632574 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,088 | 0.144893 |
5d75bb550217d28f2cb95a0798b2a193f98c5dc4 | 190 | py | Python | publication-erdf/flask_service.py | ticapix/automated-tasks | a0c73ad2939c6f1a2d91aea6fd309b5005455191 | [
"Unlicense"
] | null | null | null | publication-erdf/flask_service.py | ticapix/automated-tasks | a0c73ad2939c6f1a2d91aea6fd309b5005455191 | [
"Unlicense"
] | null | null | null | publication-erdf/flask_service.py | ticapix/automated-tasks | a0c73ad2939c6f1a2d91aea6fd309b5005455191 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
from flask import Flask
app = Flask(__name__)
@app.route('/process-email')
def process_email():
return "Hello World!"
if __name__ == "__main__":
app.run()
| 14.615385 | 28 | 0.673684 | 0 | 0 | 0 | 0 | 75 | 0.394737 | 0 | 0 | 62 | 0.326316 |
536f43c7085300c239b6e7cb90378b2df33381ad | 1,134 | py | Python | tools/nn/speaker.py | mikiec84/speaking_detection | ed680138627c156e1f7b0af20d6517e2bea754cc | [
"MIT"
] | null | null | null | tools/nn/speaker.py | mikiec84/speaking_detection | ed680138627c156e1f7b0af20d6517e2bea754cc | [
"MIT"
] | null | null | null | tools/nn/speaker.py | mikiec84/speaking_detection | ed680138627c156e1f7b0af20d6517e2bea754cc | [
"MIT"
] | null | null | null | import os
import skimage.io
from torch.nn import Module
import torch.nn
from torchvision.models import resnet18
from nn.speaker_dataset import Dataset # @UnusedImport
os.environ['TORCH_MODEL_ZOO'] = '../data/'
VIDTIMIT_PATH = '../data/vidtimit/'
skimage.io.use_plugin('pil')
class Net(Module):
def __init__(s... | 23.625 | 74 | 0.613757 | 618 | 0.544974 | 0 | 0 | 0 | 0 | 0 | 0 | 194 | 0.171076 |
536ff8da70c0647265f2448d9db35e0d757a366c | 1,551 | py | Python | tensorflow_model_analysis/util_test.py | mdreves/model-analysis | 73760b27b763e322a92ea80ff0a768ad9ef74526 | [
"Apache-2.0"
] | null | null | null | tensorflow_model_analysis/util_test.py | mdreves/model-analysis | 73760b27b763e322a92ea80ff0a768ad9ef74526 | [
"Apache-2.0"
] | null | null | null | tensorflow_model_analysis/util_test.py | mdreves/model-analysis | 73760b27b763e322a92ea80ff0a768ad9ef74526 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 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, ... | 32.3125 | 74 | 0.691812 | 720 | 0.464217 | 0 | 0 | 155 | 0.099936 | 0 | 0 | 746 | 0.48098 |
5370c3d3d7c64120cfceac3826e677a88c4d71af | 3,556 | py | Python | laia/data/transforms/vision/random_beta_morphology.py | eivtho/PyLaia | 2a7a6e2eeb9b5af68c0faed0c564b02063e72be0 | [
"MIT"
] | 89 | 2018-12-12T23:06:26.000Z | 2022-02-03T09:04:21.000Z | laia/data/transforms/vision/random_beta_morphology.py | eivtho/PyLaia | 2a7a6e2eeb9b5af68c0faed0c564b02063e72be0 | [
"MIT"
] | 30 | 2019-03-06T14:29:48.000Z | 2022-03-16T14:53:43.000Z | laia/data/transforms/vision/random_beta_morphology.py | jpuigcerver/PyLaia | 1b2e864247f1bfb8d95ac1910de9c52df71c017a | [
"MIT"
] | 26 | 2018-12-13T17:48:19.000Z | 2022-02-28T12:52:29.000Z | from typing import List, Tuple, Union
import numpy as np
import scipy.special
from PIL import Image, ImageFilter
class RandomBetaMorphology:
def __init__(
self, filter_size_min: int, filter_size_max: int, alpha: float, beta: float
) -> None:
assert filter_size_min % 2 != 0, "Filter size must ... | 32.327273 | 86 | 0.615298 | 2,710 | 0.762092 | 0 | 0 | 783 | 0.220191 | 0 | 0 | 290 | 0.081552 |
537138998ce86bd69153421493a543bbc8be7c36 | 723 | py | Python | hemp/internal/utils.py | Addvilz/hemp | 2cd1d437fc59a8f7b24f5d150c623bf75c3b6747 | [
"Apache-2.0"
] | 1 | 2020-08-13T22:28:28.000Z | 2020-08-13T22:28:28.000Z | hemp/internal/utils.py | Addvilz/hemp | 2cd1d437fc59a8f7b24f5d150c623bf75c3b6747 | [
"Apache-2.0"
] | null | null | null | hemp/internal/utils.py | Addvilz/hemp | 2cd1d437fc59a8f7b24f5d150c623bf75c3b6747 | [
"Apache-2.0"
] | null | null | null | import sys
from fabric.utils import error, puts
from git import RemoteProgress
def print_err(message, func=None, exception=None, stdout=None, stderr=None):
error('[Hemp] ' + message, func, exception, stdout, stderr)
def print_info(text, show_prefix=None, end="\n", flush=True):
puts('[Hemp] ' + text, show_p... | 26.777778 | 76 | 0.637621 | 237 | 0.327801 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 0.094053 |
53713acb71d2f50fa7d7472d8e125a179f1d5d33 | 417 | py | Python | backend/links/sentence.py | dla1635/hyLink | 8f3d1b6b0cad57ce2f6861583eb2b523f9fceee7 | [
"MIT"
] | 1 | 2020-07-17T05:57:47.000Z | 2020-07-17T05:57:47.000Z | backend/links/sentence.py | dla1635/hyLink | 8f3d1b6b0cad57ce2f6861583eb2b523f9fceee7 | [
"MIT"
] | 11 | 2020-06-06T00:30:23.000Z | 2022-02-26T19:59:06.000Z | backend/links/sentence.py | dla1635/hylink | 8f3d1b6b0cad57ce2f6861583eb2b523f9fceee7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from collections import Counter
from konlpy.tag import Okt
class Sentence(object):
okt = Okt()
def __init__(self, text, index=0):
self.index = index
self.text = text.strip()
self.tokens = self.okt.phrases(self.text)
self.bow = Counter(self.tokens)
... | 18.954545 | 49 | 0.611511 | 330 | 0.791367 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.055156 |
53726406b1ce515956afb2308d74b2a4c7e1b255 | 4,227 | py | Python | tests/arch/x86/test_x86parser.py | IMULMUL/barf-project | 9547ef843b8eb021c2c32c140e36173c0b4eafa3 | [
"BSD-2-Clause"
] | 1,395 | 2015-01-02T11:43:30.000Z | 2022-03-30T01:15:26.000Z | tests/arch/x86/test_x86parser.py | IMULMUL/barf-project | 9547ef843b8eb021c2c32c140e36173c0b4eafa3 | [
"BSD-2-Clause"
] | 54 | 2015-02-11T05:18:05.000Z | 2021-12-10T08:45:39.000Z | tests/arch/x86/test_x86parser.py | IMULMUL/barf-project | 9547ef843b8eb021c2c32c140e36173c0b4eafa3 | [
"BSD-2-Clause"
] | 207 | 2015-01-05T09:47:54.000Z | 2022-03-30T01:15:29.000Z | # Copyright (c) 2014, Fundacion Dr. Manuel Sadosky
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this
# list of condit... | 33.283465 | 80 | 0.666903 | 2,623 | 0.620535 | 0 | 0 | 0 | 0 | 0 | 0 | 2,123 | 0.502247 |
5374082003f5a0ab7717d7cbdda9e4ca3ac483ea | 1,236 | py | Python | Concurrency/codeSample/Part4_Thread_Synchronuzation_Primitives/sema_signal.py | Chyi341152/pyConPaper | 851190d59f8dc85b4f2a0b47c6505edd0367a6fe | [
"MIT"
] | 1 | 2018-05-30T02:36:46.000Z | 2018-05-30T02:36:46.000Z | Concurrency/codeSample/Part4_Thread_Synchronuzation_Primitives/sema_signal.py | Chyi341152/pyConPaper | 851190d59f8dc85b4f2a0b47c6505edd0367a6fe | [
"MIT"
] | null | null | null | Concurrency/codeSample/Part4_Thread_Synchronuzation_Primitives/sema_signal.py | Chyi341152/pyConPaper | 851190d59f8dc85b4f2a0b47c6505edd0367a6fe | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
# sema_signal.py
#
# An example of using a semaphore for signaling between threads
import threading
import time
done = threading.Semaphore(0) # Resource control.
item = None
def producer():
global item
print("I'm the producer and I produce data.")
... | 29.428571 | 145 | 0.669903 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 802 | 0.648867 |
5375dec1385aae371f742bbb1feff08c0d14da3b | 3,199 | py | Python | temp_wc_analysis/analysis.py | KarrLab/wc_sim | 5b0ee03c3d19193fa67a3797d4258b753e6bc576 | [
"MIT"
] | 8 | 2018-03-27T21:35:25.000Z | 2022-01-18T08:32:20.000Z | temp_wc_analysis/analysis.py | KarrLab/wc_sim | 5b0ee03c3d19193fa67a3797d4258b753e6bc576 | [
"MIT"
] | 114 | 2018-02-27T14:14:39.000Z | 2020-12-30T15:06:51.000Z | temp_wc_analysis/analysis.py | KarrLab/wc_sim | 5b0ee03c3d19193fa67a3797d4258b753e6bc576 | [
"MIT"
] | 2 | 2019-04-05T16:17:28.000Z | 2020-05-17T12:55:20.000Z | '''Analysis utility functions.
:Author: Jonathan Karr <karr@mssm.edu>
:Date: 2016-03-26
:Copyright: 2016-2018, Karr Lab
:License: MIT
'''
# TODO(Arthur): IMPORTANT: refactor and replace
from matplotlib import pyplot
from matplotlib import ticker
from wc_lang import Model, Submodel
from scipy.constants import Avogadr... | 29.081818 | 96 | 0.56924 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 600 | 0.187559 |
5378047f0579efdd010c7d57b8aefd313753aa1d | 907 | py | Python | setup.py | bstuddard/bonsai | 3610fc50a3b24818288d850048c2a23306215367 | [
"MIT"
] | 26 | 2021-07-18T14:52:47.000Z | 2022-01-27T10:35:44.000Z | setup.py | bstuddard/bonsai | 3610fc50a3b24818288d850048c2a23306215367 | [
"MIT"
] | null | null | null | setup.py | bstuddard/bonsai | 3610fc50a3b24818288d850048c2a23306215367 | [
"MIT"
] | 3 | 2021-07-20T03:25:22.000Z | 2021-08-17T04:06:27.000Z | from setuptools import setup, find_packages
with open("README.md", "r") as readme_file:
readme = readme_file.read()
requirements = [
'xgboost>=0.90',
'catboost>=0.26',
'bayesian-optimization>=1.2.0',
'numpy>=1.19.5',
'pandas>=1.1.5',
'matplotlib>=3.2.2',
'seaborn>=0.11.1',
'plotly>... | 25.914286 | 65 | 0.607497 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 443 | 0.488423 |
537b221bff7d480fcdf886ab83757cc48372b358 | 823 | py | Python | _scripts/increment_version.py | clockhart/pathogen | 1764d4a7d2dd7c1f5dcc08afc016ec4edf809c36 | [
"MIT"
] | null | null | null | _scripts/increment_version.py | clockhart/pathogen | 1764d4a7d2dd7c1f5dcc08afc016ec4edf809c36 | [
"MIT"
] | null | null | null | _scripts/increment_version.py | clockhart/pathogen | 1764d4a7d2dd7c1f5dcc08afc016ec4edf809c36 | [
"MIT"
] | null | null | null | """
increment_version.py
written in Python3
author: C. Lockhart <chris@lockhartlab.org>
"""
import yaml
# Read in version
with open('version.yml', 'r') as f:
version = yaml.safe_load(f.read())
# Strip "dev" out of micro
version['micro'] = int(str(version['micro']).replace('dev', ''))
# Update patch
version['mi... | 22.243243 | 78 | 0.660996 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 433 | 0.526124 |
537c67be5a305675d3c345fd99a5e6be9b4b00c1 | 15,725 | py | Python | holoviews/core/data/ibis.py | TheoMathurin/holoviews | 0defcef994d6dd6d2054f75a0e332d02d121f8b0 | [
"BSD-3-Clause"
] | 1 | 2017-03-01T07:08:23.000Z | 2017-03-01T07:08:23.000Z | holoviews/core/data/ibis.py | chrinide/holoviews | e1234a60ae0809ac561c204b1998dff0452b2bf0 | [
"BSD-3-Clause"
] | null | null | null | holoviews/core/data/ibis.py | chrinide/holoviews | e1234a60ae0809ac561c204b1998dff0452b2bf0 | [
"BSD-3-Clause"
] | null | null | null | import sys
import numpy
try:
from collections.abc import Iterable
except ImportError:
from collections import Iterable
from .. import util
from ..element import Element
from ..ndmapping import NdMapping, item_check, sorted_context
from .interface import Interface
from . import pandas
from .util import cached
... | 35.022272 | 106 | 0.569348 | 15,367 | 0.977234 | 0 | 0 | 14,832 | 0.943211 | 0 | 0 | 1,059 | 0.067345 |
537e41912df4cf73c680542167c1c109a8513d39 | 3,907 | py | Python | chess/models/tournament.py | S0Imyr/Projet-4 | 1d93e125bc6e44bc560f3ffc9b11e14e35291c98 | [
"MIT"
] | null | null | null | chess/models/tournament.py | S0Imyr/Projet-4 | 1d93e125bc6e44bc560f3ffc9b11e14e35291c98 | [
"MIT"
] | null | null | null | chess/models/tournament.py | S0Imyr/Projet-4 | 1d93e125bc6e44bc560f3ffc9b11e14e35291c98 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Handles the tournament logic
"""
import datetime
from chess.utils.utils import get_new_id
from chess.models.actors import Player
from chess.models.round import Round
TOURNAMENT_ID_WIDTH = 8
NB_ROUND = 4
NB_PLAYERS = 8
NB_MATCH = 4
class Tournament:
""" The class Tournament is t... | 33.393162 | 102 | 0.621449 | 3,637 | 0.930893 | 0 | 0 | 0 | 0 | 0 | 0 | 1,029 | 0.263373 |
537ea975bc8b1468e691c88bd35a36f7347e9442 | 1,895 | py | Python | set-config.py | astubenazy/vrops-metric-collection | c4e5b8d7058759aa5eded74cc619d1dedcbc821a | [
"MIT"
] | 2 | 2020-04-08T13:03:00.000Z | 2020-08-25T18:21:27.000Z | set-config.py | astubenazy/vrops-metric-collection | c4e5b8d7058759aa5eded74cc619d1dedcbc821a | [
"MIT"
] | 1 | 2019-08-15T11:19:18.000Z | 2019-08-17T11:38:48.000Z | set-config.py | astubenazy/vrops-metric-collection | c4e5b8d7058759aa5eded74cc619d1dedcbc821a | [
"MIT"
] | 7 | 2018-06-06T13:47:52.000Z | 2021-06-17T18:33:27.000Z | # !/usr/bin python
"""
#
# set-config - a small python program to setup the configuration environment for data-collect.py
# data-collect.py contain the python program to gather Metrics from vROps
# Author Sajal Debnath <sdebnath@vmware.com>
#
"""
# Importing the required modules
import json
import base64
import os,s... | 29.153846 | 107 | 0.701847 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 840 | 0.443272 |
537f1ecf5b58054b91b3f560bcbfa1d5fc3ac88d | 16,328 | py | Python | tests/test_app.py | inmanta/inmanta-core | ae2153d57f124d00ad1b58e6d4bc6818364be4a8 | [
"Apache-2.0"
] | 6 | 2021-03-09T10:24:02.000Z | 2022-01-16T03:52:11.000Z | tests/test_app.py | inmanta/inmanta-core | ae2153d57f124d00ad1b58e6d4bc6818364be4a8 | [
"Apache-2.0"
] | 1,319 | 2020-12-18T08:52:29.000Z | 2022-03-31T18:17:32.000Z | tests/test_app.py | inmanta/inmanta-core | ae2153d57f124d00ad1b58e6d4bc6818364be4a8 | [
"Apache-2.0"
] | 4 | 2021-03-03T15:36:50.000Z | 2022-03-11T11:41:51.000Z | """
Copyright 2018 Inmanta
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... | 33.390593 | 125 | 0.614282 | 0 | 0 | 0 | 0 | 7,759 | 0.475196 | 0 | 0 | 5,108 | 0.312837 |
537fda8bf126c424a17def77a9e57731a1bb799c | 449 | py | Python | AtC_Beg_Con_021-030/ABC027/C.py | yosho-18/AtCoder | 50f6d5c92a01792552c31ac912ce1cd557b06fb0 | [
"MIT"
] | null | null | null | AtC_Beg_Con_021-030/ABC027/C.py | yosho-18/AtCoder | 50f6d5c92a01792552c31ac912ce1cd557b06fb0 | [
"MIT"
] | null | null | null | AtC_Beg_Con_021-030/ABC027/C.py | yosho-18/AtCoder | 50f6d5c92a01792552c31ac912ce1cd557b06fb0 | [
"MIT"
] | null | null | null | n = int(input())
row = 0
for i in range(100):
if 2 ** i <= n <= 2 ** (i + 1) - 1:
row = i
break
def seki(k, n):
for _ in range(n):
k = 4 * k + 2
return k
k = 0
if row % 2 != 0:
k = 2
cri = seki(k, row // 2)
if n < cri:
print("Aoki")
else:
print("Ta... | 14.966667 | 39 | 0.4098 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 0.075724 |
5382d0895ddebaa840fcd4f4a2179b700c0dfe67 | 21,396 | py | Python | extplugins/codvote.py | Desi-Boyz/cod4x-server-B3-configs | 03a323d7ea293efe1831ed315001391b9aaf532a | [
"MIT"
] | 1 | 2017-07-17T22:21:10.000Z | 2017-07-17T22:21:10.000Z | extplugins/codvote.py | Desi-Boyz/cod4x-server-B3-configs | 03a323d7ea293efe1831ed315001391b9aaf532a | [
"MIT"
] | null | null | null | extplugins/codvote.py | Desi-Boyz/cod4x-server-B3-configs | 03a323d7ea293efe1831ed315001391b9aaf532a | [
"MIT"
] | null | null | null | # CoDVote plugin for BigBrotherBot(B3) (www.bigbrotherbot.net)
# Copyright (C) 2015 ph03n1x
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your optio... | 37.081456 | 139 | 0.550804 | 20,227 | 0.945364 | 0 | 0 | 0 | 0 | 0 | 0 | 7,184 | 0.335764 |
538362192f9fc22f5fcaa82bb61990dd548e6c63 | 3,947 | py | Python | utils.py | bianan/cfl | e09043d213c7330d5410e27ba90c943d4323dbe8 | [
"Apache-2.0"
] | 4 | 2020-07-29T10:18:59.000Z | 2021-06-27T22:57:37.000Z | utils.py | bianan/cfl | e09043d213c7330d5410e27ba90c943d4323dbe8 | [
"Apache-2.0"
] | null | null | null | utils.py | bianan/cfl | e09043d213c7330d5410e27ba90c943d4323dbe8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 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/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 28.395683 | 80 | 0.727135 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,629 | 0.412719 |
53840797fa9f83c58be0cb1122c4f31c4c62dc94 | 4,841 | py | Python | unittest/scripts/py_devapi/scripts/mysqlx_collection_remove.py | mueller/mysql-shell | 29bafc5692bd536a12c4e41c54cb587375fe52cf | [
"Apache-2.0"
] | 119 | 2016-04-14T14:16:22.000Z | 2022-03-08T20:24:38.000Z | unittest/scripts/py_devapi/scripts/mysqlx_collection_remove.py | mueller/mysql-shell | 29bafc5692bd536a12c4e41c54cb587375fe52cf | [
"Apache-2.0"
] | 9 | 2017-04-26T20:48:42.000Z | 2021-09-07T01:52:44.000Z | unittest/scripts/py_devapi/scripts/mysqlx_collection_remove.py | mueller/mysql-shell | 29bafc5692bd536a12c4e41c54cb587375fe52cf | [
"Apache-2.0"
] | 51 | 2016-07-20T05:06:48.000Z | 2022-03-09T01:20:53.000Z | # Assumptions: validate_crud_functions available
# Assumes __uripwd is defined as <user>:<pwd>@<host>:<plugin_port>
from __future__ import print_function
from mysqlsh import mysqlx
mySession = mysqlx.get_session(__uripwd)
ensure_schema_does_not_exist(mySession, 'js_shell_test')
schema = mySession.create_schema('js_s... | 41.732759 | 126 | 0.685602 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,456 | 0.507333 |
538622f0e20beb2e31f0c54850a3e278464da569 | 1,323 | py | Python | indian-flag.py | aditya270520/indian-flag | 65851eefdd229cca150d2bbe8fa61c9e06e120e0 | [
"MIT"
] | null | null | null | indian-flag.py | aditya270520/indian-flag | 65851eefdd229cca150d2bbe8fa61c9e06e120e0 | [
"MIT"
] | null | null | null | indian-flag.py | aditya270520/indian-flag | 65851eefdd229cca150d2bbe8fa61c9e06e120e0 | [
"MIT"
] | null | null | null | import turtle
turtle.bgcolor('black')
wn=turtle.Screen()
tr=turtle.Turtle()
move=1
tr.speed("fastest")
for i in range (360):
tr.write("ADITYA",'false','center',font=('Showcard gothic',50))
tr.penup()
tr.goto(-200,100)
tr.pendown()
tr.color("orange")
tr.right(move)
tr.forward(100)
tr... | 17.64 | 67 | 0.543462 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 179 | 0.135299 |
538700fd5d58b1e117fad14517de686aecad4c56 | 171 | py | Python | leaf/rbac/model/__init__.py | guiqiqi/leaf | 79e34f4b8fba8c6fd208b5a3049103dca2064ab5 | [
"Apache-2.0"
] | 119 | 2020-01-30T04:25:03.000Z | 2022-03-27T07:15:45.000Z | leaf/rbac/model/__init__.py | guiqiqi/leaf | 79e34f4b8fba8c6fd208b5a3049103dca2064ab5 | [
"Apache-2.0"
] | 8 | 2020-02-02T05:49:47.000Z | 2021-01-25T03:31:09.000Z | leaf/rbac/model/__init__.py | guiqiqi/leaf | 79e34f4b8fba8c6fd208b5a3049103dca2064ab5 | [
"Apache-2.0"
] | 11 | 2020-01-31T15:07:11.000Z | 2021-03-24T03:47:48.000Z | """用户, 组, 及相关认证数据库模型"""
from .group import Group
from .user import User
from .user import UserIndex
from .auth import Authentication
from .accesspoint import AccessPoint
| 21.375 | 36 | 0.783626 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 0.248731 |
53898a41d0b3979d97ed59d9bf3e85e1664af2da | 103 | py | Python | programacao basica/7.py | m-brito/Neps-Academy | 0d962fb921d74c5f97f10fcdd8a0f464c0ccdb14 | [
"MIT"
] | null | null | null | programacao basica/7.py | m-brito/Neps-Academy | 0d962fb921d74c5f97f10fcdd8a0f464c0ccdb14 | [
"MIT"
] | null | null | null | programacao basica/7.py | m-brito/Neps-Academy | 0d962fb921d74c5f97f10fcdd8a0f464c0ccdb14 | [
"MIT"
] | null | null | null | bino = int(input())
cino = int(input())
if (bino+cino)%2==0:
print("Bino")
else:
print("Cino")
| 14.714286 | 20 | 0.563107 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.116505 |
5389a92b434b224efc0d211777895516ff271648 | 1,023 | py | Python | update_readme.py | CalmScout/LeetCode | 62720934b5906e6b255c7e91d3a6fa1d713e4391 | [
"MIT"
] | null | null | null | update_readme.py | CalmScout/LeetCode | 62720934b5906e6b255c7e91d3a6fa1d713e4391 | [
"MIT"
] | null | null | null | update_readme.py | CalmScout/LeetCode | 62720934b5906e6b255c7e91d3a6fa1d713e4391 | [
"MIT"
] | null | null | null | """
Script updates `README.md` with respect to files at ./easy and ./medium folders.
"""
import os
curr_dir = os.path.dirname(__file__)
with open(os.path.join(curr_dir, "README.md"), 'w') as readme:
readme.write("# LeetCode\nDeliberate practice in coding.\n")
langs = [l for l in os.listdir(curr_dir) if os.path... | 39.346154 | 105 | 0.572825 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 268 | 0.261975 |
538a493d99ff3d905d532327c5a14418aa3d3b7e | 10,614 | py | Python | scripts/biotimesql.py | Jay-Iam/retriever | 26e321cdb86fcb4cb78184c4bf5c0c6902a97d2c | [
"MIT"
] | null | null | null | scripts/biotimesql.py | Jay-Iam/retriever | 26e321cdb86fcb4cb78184c4bf5c0c6902a97d2c | [
"MIT"
] | 1 | 2019-02-23T14:11:34.000Z | 2019-02-28T21:18:51.000Z | scripts/biotimesql.py | harshitbansal05/retriever | a5b849ee5ed3cc8a92f8aff93e5ec2ba54599213 | [
"MIT"
] | 1 | 2020-01-06T11:37:54.000Z | 2020-01-06T11:37:54.000Z | # -*- coding: utf-8 -*-
#retriever
import csv
from pkg_resources import parse_version
from retriever.lib.models import Table
from retriever.lib.templates import Script
try:
from retriever.lib.defaults import VERSION
try:
from retriever.lib.tools import open_fr, open_fw, open_csvw
except ImportEr... | 39.022059 | 216 | 0.531939 | 10,138 | 0.955064 | 0 | 0 | 0 | 0 | 0 | 0 | 2,997 | 0.282336 |