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 stringdate 2015-01-01 00:00:47 2022-03-31 23:42:18 ⌀ | max_issues_repo_issues_event_max_datetime stringdate 2015-01-01 17:43:30 2022-03-31 23:59:58 ⌀ | 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9d19f0ff06adc850dcf2436e1f6a4aeadf9e7144 | 1,130 | py | Python | example/undistort_ir_images.py | greeknerd1/stereo-rectify | 98a23c3ff96dd4344ecad13d4ff145060c8fb992 | [
"MIT"
] | null | null | null | example/undistort_ir_images.py | greeknerd1/stereo-rectify | 98a23c3ff96dd4344ecad13d4ff145060c8fb992 | [
"MIT"
] | null | null | null | example/undistort_ir_images.py | greeknerd1/stereo-rectify | 98a23c3ff96dd4344ecad13d4ff145060c8fb992 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import cv2
import numpy as np
import os
import glob
import itertools
import json
from numpy.core.fromnumeric import argmax
#SECTION 1: UNDISTORT FISHEYE
#Read in OpenCV compatible instrinsics & distortion coeffs
COLOR_INTRINSIC = np.load('./savedCoeff/colorIntr.npy')
COLOR_DIST = np.load('./sav... | 36.451613 | 115 | 0.752212 |
9d1ab6609be43e89cc309b21cfc303cd71c0ffae | 5,617 | py | Python | tests/tensor/test_tensor_data.py | aspfohl/tinytorch | 99ac1847b798f755d12876667ec7c3a6c7149857 | [
"MIT"
] | null | null | null | tests/tensor/test_tensor_data.py | aspfohl/tinytorch | 99ac1847b798f755d12876667ec7c3a6c7149857 | [
"MIT"
] | null | null | null | tests/tensor/test_tensor_data.py | aspfohl/tinytorch | 99ac1847b798f755d12876667ec7c3a6c7149857 | [
"MIT"
] | null | null | null | import pytest
from hypothesis import given
from hypothesis.strategies import data
from numpy import array, array_equal
from tests.strategies import indices, tensor_data
from tinytorch.tensor.data import (
IndexingError,
TensorData,
broadcast_index,
shape_broadcast,
)
# Check basic properties of layout... | 27.534314 | 88 | 0.574862 |
9d1aff1bfb4da29713d9d7f9b89454bc608165f8 | 359 | py | Python | terra_layer/apps.py | Terralego/terra-layer | 6564a63d389503d3ae1f63ce46e674b228d6764b | [
"MIT"
] | 1 | 2019-08-08T15:17:32.000Z | 2019-08-08T15:17:32.000Z | terra_layer/apps.py | Terralego/terra-layer | 6564a63d389503d3ae1f63ce46e674b228d6764b | [
"MIT"
] | 65 | 2019-10-21T10:05:00.000Z | 2022-03-08T14:08:27.000Z | terra_layer/apps.py | Terralego/terra-layer | 6564a63d389503d3ae1f63ce46e674b228d6764b | [
"MIT"
] | null | null | null | from django.apps import AppConfig
from terra_accounts.permissions_mixins import PermissionRegistrationMixin
class TerraLayerConfig(PermissionRegistrationMixin, AppConfig):
name = "terra_layer"
permissions = (
("DataLayer", "can_manage_layers", "Can manage layers"),
("DataSource", "can_manage_... | 29.916667 | 73 | 0.740947 |
9d1d92e0aac0102261fb87134d9195f41601abbb | 2,813 | py | Python | aps/tokenizer/word.py | ishine/aps | c814dc5a8b0bff5efa7e1ecc23c6180e76b8e26c | [
"Apache-2.0"
] | 117 | 2021-02-02T13:38:16.000Z | 2022-03-16T05:40:25.000Z | aps/tokenizer/word.py | ishine/aps | c814dc5a8b0bff5efa7e1ecc23c6180e76b8e26c | [
"Apache-2.0"
] | 3 | 2021-11-11T07:07:31.000Z | 2021-11-20T15:25:42.000Z | aps/tokenizer/word.py | ishine/aps | c814dc5a8b0bff5efa7e1ecc23c6180e76b8e26c | [
"Apache-2.0"
] | 19 | 2021-02-04T10:04:25.000Z | 2022-02-16T05:24:44.000Z | #!/usr/bin/env python
# Copyright 2021 Jian Wu
# License: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
from typing import List, Union
from aps.tokenizer.base import TokenizerAbc, ApsTokenizer
class WordBasedTokenizer(TokenizerAbc):
"""
Word based (word, character) tokenizer
Args:
filt... | 30.247312 | 77 | 0.539637 |
9d1d953211acad0e8c4ba6634015c410a59e3522 | 1,736 | py | Python | tests/test_session.py | StenSipma/astrometry-client | 11d5b0cd0ae41a18b5bbd7f5570af60dbfbd9cc6 | [
"MIT"
] | 1 | 2020-08-06T17:55:52.000Z | 2020-08-06T17:55:52.000Z | tests/test_session.py | StenSipma/astrometry-client | 11d5b0cd0ae41a18b5bbd7f5570af60dbfbd9cc6 | [
"MIT"
] | 1 | 2021-12-18T17:03:21.000Z | 2021-12-19T12:33:16.000Z | tests/test_session.py | StenSipma/astrometry-client | 11d5b0cd0ae41a18b5bbd7f5570af60dbfbd9cc6 | [
"MIT"
] | null | null | null | import os
from unittest import mock
import pytest
import requests
from constants import VALID_KEY
from utils import FunctionCalledException, function_called_raiser
from astrometry_net_client import Session
from astrometry_net_client.exceptions import APIKeyError, LoginFailedException
some_key = "somekey"
# Start o... | 27.555556 | 78 | 0.75 |
9d1e173ec4f6da5495185d4e64e6ce6be159c672 | 2,184 | py | Python | all_repos_depends/lang/python.py | mxr/all-repos-depends | dcf715dbfb7182899e2412dbfaaf1ef4cc50865c | [
"MIT"
] | 11 | 2018-04-23T06:41:55.000Z | 2022-01-27T13:37:59.000Z | all_repos_depends/lang/python.py | mxr/all-repos-depends | dcf715dbfb7182899e2412dbfaaf1ef4cc50865c | [
"MIT"
] | 2 | 2018-04-23T06:03:18.000Z | 2018-04-23T06:03:51.000Z | all_repos_depends/lang/python.py | mxr/all-repos-depends | dcf715dbfb7182899e2412dbfaaf1ef4cc50865c | [
"MIT"
] | 2 | 2021-02-01T15:02:14.000Z | 2021-09-25T15:49:44.000Z | import ast
import os.path
from typing import Iterable
from packaging.requirements import InvalidRequirement
from packaging.requirements import Requirement
from packaging.utils import canonicalize_name
from all_repos_depends.errors import DependsError
from all_repos_depends.types import Depends
NAME = 'python'
def ... | 29.513514 | 79 | 0.617674 |
9d1fd039657947bcd1efbe3cb094639c4aa0c630 | 2,829 | py | Python | mac/macos_app_audit.py | airdata/scripts | b24d62d70bbc70f02b3758ea14e47cc2b34646a9 | [
"Apache-2.0"
] | null | null | null | mac/macos_app_audit.py | airdata/scripts | b24d62d70bbc70f02b3758ea14e47cc2b34646a9 | [
"Apache-2.0"
] | null | null | null | mac/macos_app_audit.py | airdata/scripts | b24d62d70bbc70f02b3758ea14e47cc2b34646a9 | [
"Apache-2.0"
] | null | null | null | from os import listdir
from os.path import isfile, join
class Command(object):
"""
Run a command and capture it's output string, error string and exit status
Source: http://stackoverflow.com/a/13848259/354247
"""
def __init__(self, command):
self.command = command
def run(self, shell=Tr... | 41.602941 | 551 | 0.70555 |
9d208e0e14d75f5e83f5d7ca01135d1ab258d6e8 | 317 | py | Python | src/hark_lang/machine/stdout_item.py | krrome/teal-lang | 594ac0f0baae047fdb19ac9126d174408d487905 | [
"Apache-2.0"
] | 85 | 2020-04-29T13:51:33.000Z | 2020-08-28T04:40:11.000Z | src/hark_lang/machine/stdout_item.py | krrome/teal-lang | 594ac0f0baae047fdb19ac9126d174408d487905 | [
"Apache-2.0"
] | 15 | 2020-05-06T07:58:18.000Z | 2020-08-28T10:29:28.000Z | src/hark_lang/machine/stdout_item.py | krrome/teal-lang | 594ac0f0baae047fdb19ac9126d174408d487905 | [
"Apache-2.0"
] | 4 | 2020-05-31T09:42:08.000Z | 2020-08-27T17:04:26.000Z | """StdoutItem class"""
from dataclasses import asdict, dataclass
from .hark_serialisable import HarkSerialisable, now_str
@dataclass
class StdoutItem(HarkSerialisable):
thread: int
text: str
time: str = None
def __post_init__(self):
if self.time is None:
self.time = now_str()
| 19.8125 | 56 | 0.690852 |
9d20e8c21375abfa3aefb4fb09790b9ecbec1d58 | 6,911 | py | Python | compress/algorithms/lzw.py | ShellCode33/CompressionAlgorithms | 3b2e7b497ef0af4ba7ac8bc6f4d6e77ea4c4aedc | [
"MIT"
] | null | null | null | compress/algorithms/lzw.py | ShellCode33/CompressionAlgorithms | 3b2e7b497ef0af4ba7ac8bc6f4d6e77ea4c4aedc | [
"MIT"
] | null | null | null | compress/algorithms/lzw.py | ShellCode33/CompressionAlgorithms | 3b2e7b497ef0af4ba7ac8bc6f4d6e77ea4c4aedc | [
"MIT"
] | null | null | null | # coding: utf-8
class LZW(object):
""" Implementation of the LZW algorithm.
Attributes
----------
translation_dict : dict
Association between repeated bytes sequences and integers.
Examples
--------
An array of bytes like ['\x41', '\x42', '\x43', '\x0A', '\x00'] can be represente... | 38.825843 | 120 | 0.64911 |
9d20f94306c2d2e2215af2edce02e11edf2054d9 | 1,322 | py | Python | app/models.py | ariqfadlan/donorojo-db-api | dd1a3241ead5738c94eb77ed0bbb23b26582618f | [
"MIT"
] | null | null | null | app/models.py | ariqfadlan/donorojo-db-api | dd1a3241ead5738c94eb77ed0bbb23b26582618f | [
"MIT"
] | null | null | null | app/models.py | ariqfadlan/donorojo-db-api | dd1a3241ead5738c94eb77ed0bbb23b26582618f | [
"MIT"
] | null | null | null | """
Contains database models
"""
from sqlalchemy import Column, ForeignKey, Integer, String, Float
from sqlalchemy.orm import relationship
from .database import Base
class TouristAttraction(Base):
__tablename__ = "tourist_attraction"
id = Column(Integer, primary_key=True, index=True)
name = Column(String... | 33.05 | 98 | 0.746596 |
9d2612bdf9b9d5fe13c734ed2826b9452f048d19 | 1,096 | py | Python | hackerrank_contests/101Hack44/prime.py | rishabhiitbhu/hackerrank | acc300851c81a29472177f15fd8b56ebebe853ea | [
"MIT"
] | null | null | null | hackerrank_contests/101Hack44/prime.py | rishabhiitbhu/hackerrank | acc300851c81a29472177f15fd8b56ebebe853ea | [
"MIT"
] | null | null | null | hackerrank_contests/101Hack44/prime.py | rishabhiitbhu/hackerrank | acc300851c81a29472177f15fd8b56ebebe853ea | [
"MIT"
] | 1 | 2020-01-30T06:47:09.000Z | 2020-01-30T06:47:09.000Z | def rwh_primes2(n):
correction = (n%6>1)
n = {0:n,1:n-1,2:n+4,3:n+3,4:n+2,5:n+1}[n%6]
sieve = [True] * (n//3)
sieve[0] = False
for i in range(int(n**0.5)//3+1):
if sieve[i]:
k=3*i+1|1
sieve[ ((k*k)//3) ::2*k]=[False]*((n//6-(k*k)//6-1)//k+1)
sieve[(... | 33.212121 | 110 | 0.519161 |
9d26ca6234d4434fd99a9aa1e9b161d86a72613c | 2,649 | py | Python | competitive_k_means.py | QLightman/competitive_k_means | 264a3da409177e40f150da1107d00e149ff1e125 | [
"MIT"
] | 1 | 2019-09-03T09:56:43.000Z | 2019-09-03T09:56:43.000Z | competitive_k_means.py | QLightman/competitive_k_means | 264a3da409177e40f150da1107d00e149ff1e125 | [
"MIT"
] | null | null | null | competitive_k_means.py | QLightman/competitive_k_means | 264a3da409177e40f150da1107d00e149ff1e125 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import copy
k = 4
ratio=0.95
def competitive_k_means(save_plot=False):
plt.figure(figsize=(12, 12))
X, y =generate_dataset()
plt.scatter(X[:,0],X[:,1],c=y,marker='+')
plt.title("results from the data")
if save_plot:
plt.savefig("data.png")
... | 33.1125 | 104 | 0.609287 |
9d280cecbd0d584acd8037cf6b0f18c473484417 | 3,031 | py | Python | shiftmanager/redshift.py | whitmo/shiftmanager | 49cd461854a9e8bc270b5cc6f9a2303cf87c2fb3 | [
"BSD-2-Clause"
] | null | null | null | shiftmanager/redshift.py | whitmo/shiftmanager | 49cd461854a9e8bc270b5cc6f9a2303cf87c2fb3 | [
"BSD-2-Clause"
] | null | null | null | shiftmanager/redshift.py | whitmo/shiftmanager | 49cd461854a9e8bc270b5cc6f9a2303cf87c2fb3 | [
"BSD-2-Clause"
] | 1 | 2020-09-02T04:37:37.000Z | 2020-09-02T04:37:37.000Z | """
Defines a Redshift class which encapsulates a database connection
and utility functions for managing that database.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import os
import psycopg2
from shiftmanager.mixins import AdminMixin, ReflectionMix... | 32.244681 | 75 | 0.629165 |
9d2bc7d987bd63f2af30edb8519069c52527c5c7 | 387 | py | Python | General Data Preprocessing/copyFile.py | yuxiawang1992/Python-Code | d457a1fd61742dfac08a82a26b66703e5ff6f780 | [
"Apache-2.0"
] | null | null | null | General Data Preprocessing/copyFile.py | yuxiawang1992/Python-Code | d457a1fd61742dfac08a82a26b66703e5ff6f780 | [
"Apache-2.0"
] | null | null | null | General Data Preprocessing/copyFile.py | yuxiawang1992/Python-Code | d457a1fd61742dfac08a82a26b66703e5ff6f780 | [
"Apache-2.0"
] | null | null | null | #Python 3.4.3
#coding=gbk
# copy file wangyuxia 20160920
import sys, shutil, os, string
path = "E:\\test for qgis\\"
target_path = "E:\\test for qgis\\HourScale\\"
for i in range(2,31):
for j in range(0,24):
filename = 'N'+str(i).zfill(2)+str(j).zfill(2)
shutil.copyfile(path+'d_02.hdr',target_pat... | 25.8 | 68 | 0.596899 |
9d2c26cb802d2c6da46e391e982eacb22cc6b08d | 3,581 | py | Python | convert_to_onnx.py | bhahn2004/FaceBoxes.PyTorch | be01c2449c6efa2a976a701dd8a052aa903a32b4 | [
"MIT"
] | null | null | null | convert_to_onnx.py | bhahn2004/FaceBoxes.PyTorch | be01c2449c6efa2a976a701dd8a052aa903a32b4 | [
"MIT"
] | null | null | null | convert_to_onnx.py | bhahn2004/FaceBoxes.PyTorch | be01c2449c6efa2a976a701dd8a052aa903a32b4 | [
"MIT"
] | null | null | null | import sys
from scipy.special import softmax
import torch.onnx
import onnxruntime as ort
import numpy as np
import tensorflow as tf
from tensorflow.keras import backend as K
from pytorch2keras.converter import pytorch_to_keras
from models.faceboxes import FaceBoxes
input_dim = 1024
num_classes = 2
model_path = "weig... | 33.46729 | 115 | 0.729405 |
9d2c9923a0dda16187c578d67868231654968587 | 358 | py | Python | setup.py | kckaiwei/pysteamcmd | 273f114352975268b01cb8007cc2336115aea4fc | [
"MIT"
] | null | null | null | setup.py | kckaiwei/pysteamcmd | 273f114352975268b01cb8007cc2336115aea4fc | [
"MIT"
] | null | null | null | setup.py | kckaiwei/pysteamcmd | 273f114352975268b01cb8007cc2336115aea4fc | [
"MIT"
] | null | null | null | from setuptools import setup
setup(name='pysteamcmd',
version='0.1.2',
description='Python package to install and utilize steamcmd',
url='http://github.com/f0rkz/pysteamcmd',
author='f0rkz',
author_email='f0rkz@f0rkznet.net',
license='MIT',
packages=['pysteamcmd'],
insta... | 27.538462 | 67 | 0.648045 |
9d2f4723ec751e23b2b4a9d81dfaceee08d127d9 | 3,292 | py | Python | x2py/links/strategies/buffer_transform_strategy.py | jaykang920/x2py | b8bd473f94ff4b9576e984cc384f4159ab71278d | [
"MIT"
] | null | null | null | x2py/links/strategies/buffer_transform_strategy.py | jaykang920/x2py | b8bd473f94ff4b9576e984cc384f4159ab71278d | [
"MIT"
] | 1 | 2019-06-05T09:35:09.000Z | 2020-07-02T09:46:46.000Z | x2py/links/strategies/buffer_transform_strategy.py | jaykang920/x2py | b8bd473f94ff4b9576e984cc384f4159ab71278d | [
"MIT"
] | null | null | null | # Copyright (c) 2017, 2018 Jae-jun Kang
# See the file LICENSE for details.
from x2py.event_factory import EventFactory
from x2py.links.link_events import *
from x2py.links.strategy import ChannelStrategy
from x2py.util.trace import Trace
class BufferTransformStrategy(ChannelStrategy):
EventFactory.register_type(... | 33.591837 | 82 | 0.637303 |
9d2ffa602fd2739373ede0b55f827179feb8572a | 5,632 | py | Python | ignite_trainer/_visdom.py | jinczing/AudioCLIP | b080fc946599290c91f9d3b203295e5968af1bf6 | [
"MIT"
] | 304 | 2021-06-28T09:59:13.000Z | 2022-03-30T17:33:52.000Z | ignite_trainer/_visdom.py | AK391/AudioCLIP | 45327aa203839bfeb58681dd36c04fd493ee72f4 | [
"MIT"
] | 176 | 2021-07-23T08:30:21.000Z | 2022-03-14T12:29:06.000Z | ignite_trainer/_visdom.py | AK391/AudioCLIP | 45327aa203839bfeb58681dd36c04fd493ee72f4 | [
"MIT"
] | 34 | 2021-06-29T11:50:19.000Z | 2022-03-02T12:01:36.000Z | import os
import sys
import json
import time
import tqdm
import socket
import subprocess
import numpy as np
import visdom
from typing import Tuple
from typing import Optional
def calc_ytick_range(vis: visdom.Visdom, window_name: str, env: Optional[str] = None) -> Tuple[float, float]:
lower_bound, upper_bound = ... | 29.333333 | 109 | 0.552734 |
9d3007ae1a0b21a2c5b82a4a63774e81f6aa5a00 | 4,960 | py | Python | anonybot.py | sp0oks/anonybot | 864688f04231e3088737b12caed76f61a5128993 | [
"MIT"
] | 5 | 2019-12-17T17:53:51.000Z | 2020-09-06T07:51:23.000Z | anonybot.py | CptSpookz/anonybot | 864688f04231e3088737b12caed76f61a5128993 | [
"MIT"
] | null | null | null | anonybot.py | CptSpookz/anonybot | 864688f04231e3088737b12caed76f61a5128993 | [
"MIT"
] | 2 | 2020-01-20T01:01:20.000Z | 2020-09-06T07:51:25.000Z | import os
import time
from sqlalchemy import create_engine, BigInteger, UnicodeText, Column, Integer
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy.exc import SQLAlchemyError
from aiogram import Bot, Dispatcher, executor, types
from aiogr... | 36.20438 | 121 | 0.626008 |
9d303166d818d8f8f693a98022e31dfc5961d444 | 2,912 | py | Python | tests/test_doc_cvnn_example.py | saugatkandel/cvnn | f6d7b5c17fd064a7eaa60e7af922914a974eb69a | [
"MIT"
] | 38 | 2020-09-16T14:47:36.000Z | 2022-03-30T13:35:05.000Z | tests/test_doc_cvnn_example.py | saugatkandel/cvnn | f6d7b5c17fd064a7eaa60e7af922914a974eb69a | [
"MIT"
] | 25 | 2020-10-03T19:30:16.000Z | 2022-03-29T15:24:44.000Z | tests/test_doc_cvnn_example.py | saugatkandel/cvnn | f6d7b5c17fd064a7eaa60e7af922914a974eb69a | [
"MIT"
] | 9 | 2021-01-18T10:48:57.000Z | 2022-02-11T10:34:52.000Z | import numpy as np
import cvnn.layers as complex_layers
import tensorflow as tf
from pdb import set_trace
def get_dataset():
(train_images, train_labels), (test_images, test_labels) = tf.keras.datasets.cifar10.load_data()
train_images = train_images.astype(dtype=np.complex64) / 255.0
test_images = test_im... | 45.5 | 109 | 0.730426 |
9d31c3b53c5a416e56a025e297cf9e335432c27b | 2,580 | py | Python | gkutils/commonutils/getCSVColumnSubset.py | genghisken/gkutils | 0c8aa06d813de72b1cd9cba11219a78952799420 | [
"MIT"
] | null | null | null | gkutils/commonutils/getCSVColumnSubset.py | genghisken/gkutils | 0c8aa06d813de72b1cd9cba11219a78952799420 | [
"MIT"
] | 1 | 2021-11-19T19:28:52.000Z | 2021-11-19T19:29:57.000Z | gkutils/commonutils/getCSVColumnSubset.py | genghisken/gkutils | 0c8aa06d813de72b1cd9cba11219a78952799420 | [
"MIT"
] | null | null | null | """Write a subset of keys from one CSV to another. Don't use lots of memory.
Usage:
%s <filename> <outputfile> [--columns=<columns>] [--htm] [--racol=<racol>] [--deccol=<deccol>] [--filtercol=<filtercol>]
%s (-h | --help)
%s --version
Options:
-h --help Show this screen.
--version ... | 35.342466 | 122 | 0.605039 |
9d3448187e277186c37746a8eee21eed655db199 | 1,030 | py | Python | questions/univalued-binary-tree/Solution.py | marcus-aurelianus/leetcode-solutions | 8b43e72fe1f51c84abc3e89b181ca51f09dc7ca6 | [
"MIT"
] | 141 | 2017-12-12T21:45:53.000Z | 2022-03-25T07:03:39.000Z | questions/univalued-binary-tree/Solution.py | marcus-aurelianus/leetcode-solutions | 8b43e72fe1f51c84abc3e89b181ca51f09dc7ca6 | [
"MIT"
] | 32 | 2015-10-05T14:09:52.000Z | 2021-05-30T10:28:41.000Z | questions/univalued-binary-tree/Solution.py | marcus-aurelianus/leetcode-solutions | 8b43e72fe1f51c84abc3e89b181ca51f09dc7ca6 | [
"MIT"
] | 56 | 2015-09-30T05:23:28.000Z | 2022-03-08T07:57:11.000Z | """
A binary tree is univalued if every node in the tree has the same value.
Return true if and only if the given tree is univalued.
Example 1:
Input: [1,1,1,1,1,null,1]
Output: true
Example 2:
Input: [2,2,2,5,2]
Output: false
Note:
The number of nodes in the given tree will be in the range [1, 100]... | 20.196078 | 77 | 0.586408 |
9d35413c71268ad28c881bbed6ac0a459290c12c | 495 | py | Python | chargingMethod.py | IllllIIlI/TeamProjPrac | da0a3e5ea9f6204c35c4a969eb522da05f5fc05c | [
"MIT"
] | null | null | null | chargingMethod.py | IllllIIlI/TeamProjPrac | da0a3e5ea9f6204c35c4a969eb522da05f5fc05c | [
"MIT"
] | null | null | null | chargingMethod.py | IllllIIlI/TeamProjPrac | da0a3e5ea9f6204c35c4a969eb522da05f5fc05c | [
"MIT"
] | null | null | null | def guide():
print("If you want to be informed about how to charge the electric vehicle, please enter Y.")
answer = input()
if answer == "Y":
print("1.Stop in front of the charger\n" "2.Check the charging connector for my car\n"
"3.Connect to the vehicle\n" "4.Set charge amount\n"
... | 61.875 | 97 | 0.656566 |
9d35852cc4326c58c6eb53f1d5a84c6b35a5e6fb | 1,006 | py | Python | src/python/WMComponent/DBS3Buffer/MySQL/DBSBufferFiles/GetParentStatus.py | khurtado/WMCore | f74e252412e49189a92962945a94f93bec81cd1e | [
"Apache-2.0"
] | 21 | 2015-11-19T16:18:45.000Z | 2021-12-02T18:20:39.000Z | src/python/WMComponent/DBS3Buffer/MySQL/DBSBufferFiles/GetParentStatus.py | khurtado/WMCore | f74e252412e49189a92962945a94f93bec81cd1e | [
"Apache-2.0"
] | 5,671 | 2015-01-06T14:38:52.000Z | 2022-03-31T22:11:14.000Z | src/python/WMComponent/DBS3Buffer/MySQL/DBSBufferFiles/GetParentStatus.py | khurtado/WMCore | f74e252412e49189a92962945a94f93bec81cd1e | [
"Apache-2.0"
] | 67 | 2015-01-21T15:55:38.000Z | 2022-02-03T19:53:13.000Z | #!/usr/bin/env python
"""
_GetParentStatus_
MySQL implementation of DBSBufferFile.GetParentStatus
"""
from WMCore.Database.DBFormatter import DBFormatter
class GetParentStatus(DBFormatter):
sql = """SELECT status FROM dbsbuffer_file
INNER JOIN dbsbuffer_file_parent ON
dbsbuffer... | 27.189189 | 74 | 0.614314 |
9d364f1bcfe20f4a4dd1ba1db0e841b93b086bab | 1,672 | py | Python | yagoMoviesDown.py | afshinsadeghi/DBPediaDownloder | f9c98cab6fc7ce1d4f1c707ce1491c5dacbaf2cc | [
"Apache-2.0"
] | 1 | 2019-04-02T11:12:52.000Z | 2019-04-02T11:12:52.000Z | yagoMoviesDown.py | afshinsadeghi/DBPediaDownloder | f9c98cab6fc7ce1d4f1c707ce1491c5dacbaf2cc | [
"Apache-2.0"
] | null | null | null | yagoMoviesDown.py | afshinsadeghi/DBPediaDownloder | f9c98cab6fc7ce1d4f1c707ce1491c5dacbaf2cc | [
"Apache-2.0"
] | null | null | null | import os
from time import sleep
import requests
querysub0 = 'https://linkeddata1.calcul.u-psud.fr/sparql?default-graph-uri=&query=construct%7B+%3Fs+%3Fp+%3Fo%7D+where+%7B+%0D%0Aselect+distinct+%3Fs+%3Fp+%3Fo+where+%7B%0D%0A%7B%0D%0A%3Fs1+++%3Chttp%3A%2F%2Fyago-knowledge.org%2Fresource%2FactedIn%3E+++%3Fs+.%0D%0A%3Fs2... | 59.714286 | 819 | 0.692584 |
9d3825f401efd886ac45bc856e7732ecfff783b3 | 1,418 | py | Python | src/TestValues/TestProtractor3D.py | SvenKratz/Protractor3D | 39b6c877cc88cae028ca938e994034b83fcccb68 | [
"MIT"
] | 4 | 2018-02-06T14:41:26.000Z | 2020-03-19T14:16:05.000Z | src/TestValues/TestProtractor3D.py | SvenKratz/Protractor3D | 39b6c877cc88cae028ca938e994034b83fcccb68 | [
"MIT"
] | null | null | null | src/TestValues/TestProtractor3D.py | SvenKratz/Protractor3D | 39b6c877cc88cae028ca938e994034b83fcccb68 | [
"MIT"
] | null | null | null | '''
Created on Apr 12, 2011
@author: svenkratz
'''
import TestGestures
import Protractor3D.Protractor3D
from Protractor3D.Protractor3D import *
def triplify(g):
out = []
if len(g) % 3 != 0:
print "Warning: Data not divisible by 3"
for k in xrange(len(g)/3):
out = out + [[g[3*k], g[3*k+1], g[3*k+2]]]
return... | 22.507937 | 121 | 0.693935 |
9d3874299d6c36b60cba6fdb324222e4353364ea | 481 | py | Python | tests/test_actor.py | sdss/HAL | c7a2111f8737a498a124f5571d6f0e6b46e5c371 | [
"BSD-3-Clause"
] | null | null | null | tests/test_actor.py | sdss/HAL | c7a2111f8737a498a124f5571d6f0e6b46e5c371 | [
"BSD-3-Clause"
] | 2 | 2022-01-14T04:50:58.000Z | 2022-02-28T22:31:06.000Z | tests/test_actor.py | sdss/HAL | c7a2111f8737a498a124f5571d6f0e6b46e5c371 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# @Author: José Sánchez-Gallego (gallegoj@uw.edu)
# @Date: 2021-03-24
# @Filename: test_hal.py
# @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause)
import pytest
from hal import __version__
pytestmark = [pytest.mark.asyncio]
async def test_vers... | 20.913043 | 74 | 0.706861 |
9d3a4036188d6088bc1ce4cfe8dfff01c0a9fdb1 | 490 | py | Python | day_07/puzzles.py | electronsandstuff/Advent-of-Code-2021 | 9c23872640e8d092088dcb6d5cb845cd11d98994 | [
"BSD-3-Clause"
] | null | null | null | day_07/puzzles.py | electronsandstuff/Advent-of-Code-2021 | 9c23872640e8d092088dcb6d5cb845cd11d98994 | [
"BSD-3-Clause"
] | null | null | null | day_07/puzzles.py | electronsandstuff/Advent-of-Code-2021 | 9c23872640e8d092088dcb6d5cb845cd11d98994 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
def crab_fuel(n):
return (n**2 + n) // 2
if __name__ == '__main__':
with open('input.txt') as f:
pin = np.array([int(x) for x in f.read().split(',')])
distances = np.abs(pin[None, :] - np.arange(pin.max() + 1)[:, None])
total_fuel = np.sum(distances, axis=1)
print(f'S... | 25.789474 | 72 | 0.608163 |
9d3ac14e7019eef027448de09382a14cd8c888c7 | 352 | py | Python | radical_translations/core/migrations/0033_delete_work.py | kingsdigitallab/radical_translations | c18ca1ccc0ab2d88ae472dc2eda58e2ff9dcc76a | [
"MIT"
] | 3 | 2022-02-08T18:03:44.000Z | 2022-03-18T18:10:43.000Z | radical_translations/core/migrations/0033_delete_work.py | kingsdigitallab/radical_translations | c18ca1ccc0ab2d88ae472dc2eda58e2ff9dcc76a | [
"MIT"
] | 19 | 2020-05-11T15:36:35.000Z | 2022-02-08T11:26:40.000Z | radical_translations/core/migrations/0033_delete_work.py | kingsdigitallab/radical_translations | c18ca1ccc0ab2d88ae472dc2eda58e2ff9dcc76a | [
"MIT"
] | null | null | null | # Generated by Django 2.2.10 on 2020-05-18 10:49
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('events', '0008_alter_field_classification_on_event'),
('core', '0032_delete_instance'),
]
operations = [
migrations.DeleteModel(
... | 19.555556 | 63 | 0.616477 |
9d3b2ee3ee8d1f5868d497f89b1766382405982d | 16,114 | py | Python | sampling.py | bigdata-inha/FedDC | c90c48fc7e35b6cb80890194c8cdfb0d412a0819 | [
"MIT"
] | null | null | null | sampling.py | bigdata-inha/FedDC | c90c48fc7e35b6cb80890194c8cdfb0d412a0819 | [
"MIT"
] | null | null | null | sampling.py | bigdata-inha/FedDC | c90c48fc7e35b6cb80890194c8cdfb0d412a0819 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Python version: 3.6
import numpy as np
from torchvision import datasets, transforms
import logging
import random
import torch
# Settings for a multiplicative linear congruential generator (aka Lehmer
# generator) suggested in 'Random Number Generators: Good
# Ones ... | 37.561772 | 151 | 0.608353 |
9d3ca477c6b29581c9b909f6a0a67fb1fa79ccca | 2,502 | py | Python | codeforcesRating/codeforcesRating.py | gaurav512/Python-Scripts | 46483ab09cccef380c8425d6924507e029745479 | [
"MIT"
] | 3 | 2020-05-23T14:31:35.000Z | 2020-11-12T12:56:08.000Z | codeforcesRating/codeforcesRating.py | gaurav512/Python-Scripts | 46483ab09cccef380c8425d6924507e029745479 | [
"MIT"
] | null | null | null | codeforcesRating/codeforcesRating.py | gaurav512/Python-Scripts | 46483ab09cccef380c8425d6924507e029745479 | [
"MIT"
] | null | null | null | #! /usr/bin/python3
# Author: gaurav512
''' Script written to scrape basic information about a
Codeforces profile given the user id
Usage: Enter the userid as command line argument OR as the input
after running the following in terminal- python3 codeforces.py [userid]
'''
import requests, bs4, sys
def getDetails(u... | 30.144578 | 136 | 0.691847 |
9d3e62b9c9792273ad0f8b50076e62ff7aa9fb5b | 566 | py | Python | tests/test_combinator.py | BrunoSanchez/capsule_N1 | a5ee3b74afc27de1a954ae2f9f96c278a4723226 | [
"BSD-3-Clause"
] | 12 | 2017-04-13T06:49:42.000Z | 2019-11-19T09:27:43.000Z | tests/test_combinator.py | BrunoSanchez/capsule_N1 | a5ee3b74afc27de1a954ae2f9f96c278a4723226 | [
"BSD-3-Clause"
] | 56 | 2017-09-05T16:00:57.000Z | 2020-11-20T18:02:58.000Z | tests/test_combinator.py | BrunoSanchez/capsule_N1 | a5ee3b74afc27de1a954ae2f9f96c278a4723226 | [
"BSD-3-Clause"
] | 5 | 2017-10-08T16:55:40.000Z | 2020-09-22T14:04:53.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# test_combinator.py
#
# Copyright 2020 QuatroPe
#
# This file is part of ProperImage (https://github.com/quatrope/ProperImage)
# License: BSD-3-Clause
# Full Text: https://github.com/quatrope/ProperImage/blob/master/LICENSE.txt
#
"""
test_combinator module from Proper... | 17.151515 | 76 | 0.740283 |
9d3f7a7d27e1b7136efc12dc236457c627b3164e | 1,025 | py | Python | ch09-linear_model/src/score_card.py | ahitboyZBW/book-ml-sem | 73208e7e492c9cbe82c4aaa6459a41e3ac1317be | [
"MIT"
] | 137 | 2020-10-26T11:11:46.000Z | 2022-03-29T01:21:22.000Z | ch09-linear_model/src/score_card.py | zengzhongjie/book-ml-sem | 5d452a427db5ee65538d968ba5b938af013bb87c | [
"MIT"
] | 4 | 2021-01-18T08:57:04.000Z | 2021-07-29T02:39:00.000Z | ch09-linear_model/src/score_card.py | zengzhongjie/book-ml-sem | 5d452a427db5ee65538d968ba5b938af013bb87c | [
"MIT"
] | 46 | 2020-10-26T11:11:57.000Z | 2022-03-08T00:15:32.000Z |
def cal_A_B(pdo=20, base_score=500, odds=1 / 50):
B = pdo / np.log(2)
A = base_score + B * np.log(odds)
return A, B
'''
parameter
---------
df:变量的woe,要求与模型训练logit时的列顺序一样
logit:sklearn中的逻辑回归模型,带截距
return
------
新增每行数据的评分列:Score
example:
df= cal_score(df,logit)
'''
def cal_score_byadd(df, log... | 21.808511 | 77 | 0.559024 |
9d41431a104dca3b80f9642ad172c2f1314cf033 | 3,790 | py | Python | Tools/ecl_ekf/batch_process_logdata_ekf.py | lgarciaos/Firmware | 26dba1407bd1fbc65c23870a22fed904afba6347 | [
"BSD-3-Clause"
] | 4,224 | 2015-01-02T11:51:02.000Z | 2020-10-27T23:42:28.000Z | Tools/ecl_ekf/batch_process_logdata_ekf.py | choudhary0parivesh/Firmware | 02f4ad61ec8eb4f7906dd06b4eb1fd6abb994244 | [
"BSD-3-Clause"
] | 11,736 | 2015-01-01T11:59:16.000Z | 2020-10-28T17:13:38.000Z | Tools/ecl_ekf/batch_process_logdata_ekf.py | choudhary0parivesh/Firmware | 02f4ad61ec8eb4f7906dd06b4eb1fd6abb994244 | [
"BSD-3-Clause"
] | 11,850 | 2015-01-02T14:54:47.000Z | 2020-10-28T16:42:47.000Z | #! /usr/bin/env python3
"""
Runs process_logdata_ekf.py on the .ulg files in the supplied directory. ulog files are skipped from the analysis, if a
corresponding .pdf file already exists (unless the overwrite flag was set).
"""
# -*- coding: utf-8 -*-
import argparse
import os, glob
from process_logdata_ekf import p... | 43.563218 | 125 | 0.656201 |
9d429d9ff49854612f73350299d50ebaeb16c00a | 1,468 | py | Python | goodok_mlu/trackers/neptune.py | roma-goodok/ml_utils | c1d6630021a519102b5c4e029cecccdd8a0da946 | [
"MIT"
] | null | null | null | goodok_mlu/trackers/neptune.py | roma-goodok/ml_utils | c1d6630021a519102b5c4e029cecccdd8a0da946 | [
"MIT"
] | null | null | null | goodok_mlu/trackers/neptune.py | roma-goodok/ml_utils | c1d6630021a519102b5c4e029cecccdd8a0da946 | [
"MIT"
] | 1 | 2021-03-29T13:15:02.000Z | 2021-03-29T13:15:02.000Z | import inspect
import warnings
from pathlib import Path
def send_model_code(model, model_config, logdir, NEPTUNE_ON=False, exp=None):
model_init = None
model_forward = None
model_config_s = None
try:
model_init = inspect.getsource(model.__init__)
except Exception as e:
warnings.war... | 30.583333 | 92 | 0.632834 |
9d433078a8277e748b8b40142b8dbbea8d970588 | 63 | py | Python | python/testData/intentions/returnTypeInPy3AnnotationNoColon_after.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/intentions/returnTypeInPy3AnnotationNoColon_after.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/intentions/returnTypeInPy3AnnotationNoColon_after.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | def foo() -> object:
@decorator
def bar():
pass | 15.75 | 20 | 0.492063 |
9d438aadf58244488ff98e5078d8104573590578 | 3,099 | py | Python | pkgs/sdk-pkg/src/genie/libs/sdk/libs/abstracted_libs/iosxr/subsection.py | jbronikowski/genielibs | 200a34e5fe4838a27b5a80d5973651b2e34ccafb | [
"Apache-2.0"
] | 94 | 2018-04-30T20:29:15.000Z | 2022-03-29T13:40:31.000Z | pkgs/sdk-pkg/src/genie/libs/sdk/libs/abstracted_libs/iosxr/subsection.py | jbronikowski/genielibs | 200a34e5fe4838a27b5a80d5973651b2e34ccafb | [
"Apache-2.0"
] | 67 | 2018-12-06T21:08:09.000Z | 2022-03-29T18:00:46.000Z | pkgs/sdk-pkg/src/genie/libs/sdk/libs/abstracted_libs/iosxr/subsection.py | jbronikowski/genielibs | 200a34e5fe4838a27b5a80d5973651b2e34ccafb | [
"Apache-2.0"
] | 49 | 2018-06-29T18:59:03.000Z | 2022-03-10T02:07:59.000Z | # Python
import logging
from os import path
# Abstract
from genie.abstract import Lookup
# Parser
from genie.libs import parser
from genie.metaparser.util.exceptions import SchemaEmptyParserError
# unicon
from unicon.eal.dialogs import Statement, Dialog
log = logging.getLogger(__name__)
def save_device_informatio... | 26.042017 | 77 | 0.601162 |
9d4487b1ae1496a3f2089388dee11fd461798de0 | 2,933 | py | Python | whisper_scalability/plot.py | Evalir/research | 0128cdc7c3cecaad4cc057886fd84e79b78f6b9c | [
"MIT"
] | 42 | 2019-08-03T18:04:47.000Z | 2022-02-28T14:24:56.000Z | whisper_scalability/plot.py | Evalir/research | 0128cdc7c3cecaad4cc057886fd84e79b78f6b9c | [
"MIT"
] | 88 | 2019-10-03T23:11:12.000Z | 2022-03-30T05:28:44.000Z | whisper_scalability/plot.py | Evalir/research | 0128cdc7c3cecaad4cc057886fd84e79b78f6b9c | [
"MIT"
] | 3 | 2019-09-03T17:19:39.000Z | 2021-12-27T16:53:44.000Z | import matplotlib.pyplot as plt
import numpy as np
from labellines import labelLines
# # Trying to get interpolation to work but getting error:
# # ValueError: The number of derivatives at boundaries does not match: expected 1, got 0+0
# from scipy.interpolate import make_interp_spline, BSpline
# n_users = np.array([1... | 41.309859 | 103 | 0.703034 |
9d44910e8c82debe9ba07f0a00ed736a65d972a9 | 2,000 | py | Python | polydomino/search.py | PsiACE/polydomino | ade7cdb303cb4073d8c075659a5494392d31f8b4 | [
"MIT"
] | null | null | null | polydomino/search.py | PsiACE/polydomino | ade7cdb303cb4073d8c075659a5494392d31f8b4 | [
"MIT"
] | null | null | null | polydomino/search.py | PsiACE/polydomino | ade7cdb303cb4073d8c075659a5494392d31f8b4 | [
"MIT"
] | null | null | null | # import the necessary packages
import argparse
import cv2
import numpy as np
from polydomino.colordescriptor import ColorDescriptor
from polydomino.searcher import Searcher
# construct the argument parser and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument(
"-i",
"--index",
required=T... | 30.30303 | 87 | 0.6935 |
9d44ee135064ae4d96e5b84d0ccf61816f50cfb1 | 1,253 | py | Python | irekua_dev_tools/cli.py | CONABIO-audio/irekua-dev-tools | 87485592b7d4793c5e1f6eda2e00247810bfc99c | [
"BSD-4-Clause"
] | null | null | null | irekua_dev_tools/cli.py | CONABIO-audio/irekua-dev-tools | 87485592b7d4793c5e1f6eda2e00247810bfc99c | [
"BSD-4-Clause"
] | null | null | null | irekua_dev_tools/cli.py | CONABIO-audio/irekua-dev-tools | 87485592b7d4793c5e1f6eda2e00247810bfc99c | [
"BSD-4-Clause"
] | null | null | null | import click
from irekua_dev_tools.utils import load_config
from irekua_dev_tools.utils import get_working_directory
from irekua_dev_tools.utils import load_environment_variables
from irekua_dev_tools.utils import load_repository_info
from . import git
from . import dev
from . import config
from . import db
from .ex... | 29.833333 | 73 | 0.751796 |
9d451d7664d2140e40043248faa30a6b327e59ee | 2,880 | py | Python | optimism/test/testMinimizeScalar.py | btalamini/optimism | 023e1b2a0b137900a7517e4c7ac5056255cf7bbe | [
"MIT"
] | null | null | null | optimism/test/testMinimizeScalar.py | btalamini/optimism | 023e1b2a0b137900a7517e4c7ac5056255cf7bbe | [
"MIT"
] | 1 | 2022-03-12T00:01:12.000Z | 2022-03-12T00:01:12.000Z | optimism/test/testMinimizeScalar.py | btalamini/optimism | 023e1b2a0b137900a7517e4c7ac5056255cf7bbe | [
"MIT"
] | 3 | 2021-12-23T19:53:31.000Z | 2022-03-27T23:12:03.000Z | from optimism.JaxConfig import *
from optimism import MinimizeScalar
from optimism.test import TestFixture
from optimism.material import J2Plastic
def f(x): return 0.25*x**4 - 50.0*x**2 + 2.0
df = jacfwd(f)
class TestMinimizeScalarFixture(TestFixture.TestFixture):
def setUp(self):
self.minimize_scalar_j... | 34.698795 | 95 | 0.515278 |
9d46c2badf319d174f35513f77f2237bac4308e9 | 2,709 | py | Python | anima/ui/review_dialog.py | MehmetErer/anima | f92ae599b5a4c181fc8e131a9ccdde537e635303 | [
"MIT"
] | 101 | 2015-02-08T22:20:11.000Z | 2022-03-21T18:56:42.000Z | anima/ui/review_dialog.py | MehmetErer/anima | f92ae599b5a4c181fc8e131a9ccdde537e635303 | [
"MIT"
] | 23 | 2016-11-30T08:33:21.000Z | 2021-01-26T12:11:12.000Z | anima/ui/review_dialog.py | MehmetErer/anima | f92ae599b5a4c181fc8e131a9ccdde537e635303 | [
"MIT"
] | 27 | 2015-01-03T06:49:45.000Z | 2021-12-28T03:30:54.000Z | # -*- coding: utf-8 -*-
"""
import datetime
from anima import defaults
defaults.timing_resolution = datetime.timedelta(minutes=10)
from anima.ui import SET_PYSIDE2
SET_PYSIDE2()
from anima.ui.widgets.review import APPROVE, REQUEST_REVISION
from anima.ui import review_dialog
review_dialog.UI(review_type=REQUEST_REVIS... | 29.769231 | 80 | 0.655592 |
9d47cbe33f2156eddf7fcd553e506425ed8d1607 | 12,737 | py | Python | squares/dsl/interpreter.py | Vivokas20/SKEL | d8766ceaa8aa766ea3580bbb61b747572ebfe77c | [
"Apache-2.0"
] | 1 | 2022-01-20T14:57:30.000Z | 2022-01-20T14:57:30.000Z | squares/dsl/interpreter.py | Vivokas20/SKEL | d8766ceaa8aa766ea3580bbb61b747572ebfe77c | [
"Apache-2.0"
] | null | null | null | squares/dsl/interpreter.py | Vivokas20/SKEL | d8766ceaa8aa766ea3580bbb61b747572ebfe77c | [
"Apache-2.0"
] | null | null | null | import math
import re
from itertools import permutations
from logging import getLogger
from typing import Tuple, Union
from rpy2 import robjects
from rpy2.rinterface_lib.embedded import RRuntimeError
from z3 import BitVecVal
from .. import util, results
from ..decider import RowNumberInfo
from ..program import LineIn... | 42.885522 | 176 | 0.544241 |
9d4857e094a5401228d6f2b6484e13982abb69b9 | 7,869 | py | Python | src/data_preparation/process_airbnb_data.py | ejgenc/Data-Analysis_Istanbul-Health-Tourism | 34b9838690ca640c6a7a60f63eb2f51983ec46ef | [
"MIT"
] | 1 | 2020-11-18T15:27:53.000Z | 2020-11-18T15:27:53.000Z | src/data_preparation/process_airbnb_data.py | ejgenc/Data-Analysis_Istanbul-Health-Tourism | 34b9838690ca640c6a7a60f63eb2f51983ec46ef | [
"MIT"
] | null | null | null | src/data_preparation/process_airbnb_data.py | ejgenc/Data-Analysis_Istanbul-Health-Tourism | 34b9838690ca640c6a7a60f63eb2f51983ec46ef | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
------ What is this file? ------
This script targets the istanbul_airbnb_raw.csv file. It cleans the .csv
file in order to prepare it for further analysis
"""
#%% --- Import Required Packages ---
import os
import pathlib
from pathlib import Path # To wrap around filepaths
impor... | 38.199029 | 106 | 0.641632 |
9d4ac45e3a86ef95dc9b84f578aa4f83f679c9b6 | 3,695 | py | Python | py/shure.py | dman776/micboard | 166987dfad529dc35654f402fdbbde7f16b60f77 | [
"MIT"
] | 44 | 2019-08-30T02:51:59.000Z | 2022-03-15T13:47:18.000Z | py/shure.py | dman776/micboard | 166987dfad529dc35654f402fdbbde7f16b60f77 | [
"MIT"
] | 21 | 2019-09-01T16:17:22.000Z | 2022-02-01T15:47:55.000Z | py/shure.py | dman776/micboard | 166987dfad529dc35654f402fdbbde7f16b60f77 | [
"MIT"
] | 16 | 2019-09-01T01:40:09.000Z | 2022-03-15T17:12:28.000Z | import time
import select
import queue
import atexit
import sys
import logging
from networkdevice import ShureNetworkDevice
from channel import chart_update_list, data_update_list
# from mic import WirelessMic
# from iem import IEM
NetworkDevices = []
DeviceMessageQueue = queue.Queue()
def get_network_device_by_ip(... | 29.56 | 97 | 0.603518 |
9d4cf41e0ad2b23397f4ee9bbfa792895ce345d0 | 277 | py | Python | alviscorpus/status.py | Bibliome/alviscorpus | ec7bf45efbc6a3cd864fda48e0066090cfb93313 | [
"MIT"
] | null | null | null | alviscorpus/status.py | Bibliome/alviscorpus | ec7bf45efbc6a3cd864fda48e0066090cfb93313 | [
"MIT"
] | null | null | null | alviscorpus/status.py | Bibliome/alviscorpus | ec7bf45efbc6a3cd864fda48e0066090cfb93313 | [
"MIT"
] | null | null | null | import enum
class Status(enum.Enum):
QUEUED = 'queued'
STARTED = 'started'
FINISHED = 'finished'
ERROR = 'error'
def __str__(self):
return self.value
QUEUED = Status.QUEUED
STARTED = Status.STARTED
FINISHED = Status.FINISHED
ERROR = Status.ERROR
| 17.3125 | 26 | 0.67148 |
9d4d51c8583e8a9e583bab2100d07d40d0fad696 | 977 | py | Python | 01_simulate_competition_experiment.py | stevenshave/competition-label-affinity | 2383309e852954a1bd88c6364087c3d57e7acec0 | [
"MIT"
] | null | null | null | 01_simulate_competition_experiment.py | stevenshave/competition-label-affinity | 2383309e852954a1bd88c6364087c3d57e7acec0 | [
"MIT"
] | null | null | null | 01_simulate_competition_experiment.py | stevenshave/competition-label-affinity | 2383309e852954a1bd88c6364087c3d57e7acec0 | [
"MIT"
] | null | null | null | """Simulation 1:1:1 comptition binding"""
import numpy as np
from high_accuracy_binding_equations import *
# We can choose to work in a common unit, typically nM, or uM, as long as all
# numbers are in the same unit, the result is valid. We assume uM for all
# concentrations bellow.
# First, lets simulate a few sin... | 36.185185 | 95 | 0.745138 |
9d50b18aa63e6f3b4b6406ced31f91d878b8ae26 | 773 | py | Python | e_vae_proj/qualitative/mnist/btcvae/gen_train.py | kuangdai/disentangling-vae | 9a5f9da44a82a2c643b7289c4945320621b86247 | [
"MIT"
] | 1 | 2021-06-30T08:58:49.000Z | 2021-06-30T08:58:49.000Z | e_vae_proj/qualitative/mnist/btcvae/gen_train.py | kuangdai/disentangling-vae | 9a5f9da44a82a2c643b7289c4945320621b86247 | [
"MIT"
] | null | null | null | e_vae_proj/qualitative/mnist/btcvae/gen_train.py | kuangdai/disentangling-vae | 9a5f9da44a82a2c643b7289c4945320621b86247 | [
"MIT"
] | null | null | null | import numpy as np
from pathlib import Path
import sys
if __name__ == '__main__':
# absolute path
my_path = Path(__file__).parent.resolve().expanduser()
main_path = my_path.parent.parent
seed = 0
nlat = 10
alpha = 1.0
beta = 6.0
gamma = 1.0
epochs = 100
# cmd... | 28.62963 | 107 | 0.564036 |
9d5197f8d1796538860fe2f3fb98a1af46c8ef38 | 3,331 | py | Python | tests/test_load.py | tom3131/simfin | 8ef5a2b0dd67ddcd3f8b92b5cd45c1a483eeada1 | [
"MIT"
] | 231 | 2019-09-25T13:30:00.000Z | 2022-03-26T08:00:47.000Z | tests/test_load.py | tom3131/simfin | 8ef5a2b0dd67ddcd3f8b92b5cd45c1a483eeada1 | [
"MIT"
] | 11 | 2019-10-01T14:50:15.000Z | 2022-02-23T10:35:47.000Z | tests/test_load.py | tom3131/simfin | 8ef5a2b0dd67ddcd3f8b92b5cd45c1a483eeada1 | [
"MIT"
] | 36 | 2019-09-30T16:14:48.000Z | 2022-03-19T19:59:30.000Z | ##########################################################################
#
# Unit tests (pytest) for load.py
#
##########################################################################
# SimFin - Simple financial data for Python.
# www.simfin.com - www.github.com/simfin/simfin
# See README.md for instructions and LI... | 31.424528 | 78 | 0.576403 |
9d5477ef2956d3615e64662b0ab23440b2cbff69 | 447 | py | Python | lab/__init__.py | patel-zeel/lab | cc0df2c03196863041e78fa4179445341e86958c | [
"MIT"
] | 36 | 2018-05-08T20:54:21.000Z | 2022-02-24T09:15:58.000Z | lab/__init__.py | patel-zeel/lab | cc0df2c03196863041e78fa4179445341e86958c | [
"MIT"
] | 4 | 2021-06-24T11:59:29.000Z | 2022-02-01T15:51:30.000Z | lab/__init__.py | patel-zeel/lab | cc0df2c03196863041e78fa4179445341e86958c | [
"MIT"
] | 3 | 2021-02-14T13:00:26.000Z | 2021-12-10T08:55:17.000Z | import sys
from plum import Dispatcher
B = sys.modules[__name__] # Allow both import styles.
dispatch = Dispatcher() # This dispatch namespace will be used everywhere.
from .generic import *
from .shaping import *
from .linear_algebra import *
from .random import *
from .numpy import *
from .types import *
from ... | 22.35 | 75 | 0.756152 |
9d556827bb836c6e6f6530ec156f0777935a5dea | 1,514 | py | Python | async_nbgrader/apps/exportapp.py | IllumiDesk/async_nbgrader | 427e1b634277c043a1ed9f00bf7e417e0f611aca | [
"Apache-2.0"
] | 2 | 2021-06-23T17:58:22.000Z | 2021-09-27T10:00:01.000Z | async_nbgrader/apps/exportapp.py | IllumiDesk/async-nbgrader | 427e1b634277c043a1ed9f00bf7e417e0f611aca | [
"Apache-2.0"
] | 6 | 2021-06-17T21:40:24.000Z | 2021-11-11T17:48:15.000Z | async_nbgrader/apps/exportapp.py | IllumiDesk/async-nbgrader | 427e1b634277c043a1ed9f00bf7e417e0f611aca | [
"Apache-2.0"
] | 2 | 2021-06-10T18:16:22.000Z | 2021-06-17T02:52:45.000Z | # coding: utf-8
from nbgrader.api import Gradebook
from nbgrader.apps import ExportApp as BaseExportApp
from traitlets import Instance
from traitlets import Type
from traitlets import default
from ..plugins import CanvasCsvExportPlugin
from ..plugins import CustomExportPlugin
aliases = {
"log-level": "Applicatio... | 27.527273 | 78 | 0.703435 |
9d55833e8ac84841e916071829ab4546156cae04 | 2,810 | py | Python | django_ocr_server/conf.py | shmakovpn/django_ocr_server | 4d694629c39c18a6c13bcdfafdb8258b78e5a859 | [
"Apache-2.0"
] | 17 | 2019-12-04T03:14:56.000Z | 2022-03-27T07:05:19.000Z | django_ocr_server/conf.py | shmakovpn/django_ocr_server | 4d694629c39c18a6c13bcdfafdb8258b78e5a859 | [
"Apache-2.0"
] | 1 | 2020-04-17T07:32:30.000Z | 2020-04-17T07:32:30.000Z | django_ocr_server/conf.py | shmakovpn/django_ocr_server | 4d694629c39c18a6c13bcdfafdb8258b78e5a859 | [
"Apache-2.0"
] | 5 | 2020-03-16T10:43:03.000Z | 2021-07-14T14:43:49.000Z | """
django_ocr_server/conf.py
+++++++++++++++++++++++++
The settings manager for **django_ocr_server**.
Usage:
.. code-block:: python
from django_ocr_server.conf import ocr_settings
# Next line will print a value of **OCR_TESSERACT_LANG**
# using the variable from the Django's *settings.py* file
# if the variab... | 29.893617 | 79 | 0.687544 |
9d56f0959997626e16345a92ca50c1b01d2ed5e6 | 105 | py | Python | ibms_project/sfm/apps.py | mohdbakhrayba/ibms | 029e1f3bf108586289c65bb1d547f86851f9494f | [
"Apache-2.0"
] | null | null | null | ibms_project/sfm/apps.py | mohdbakhrayba/ibms | 029e1f3bf108586289c65bb1d547f86851f9494f | [
"Apache-2.0"
] | null | null | null | ibms_project/sfm/apps.py | mohdbakhrayba/ibms | 029e1f3bf108586289c65bb1d547f86851f9494f | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class SFMConfig(AppConfig):
name = 'sfm'
verbose_name = 'SFM'
| 17.5 | 33 | 0.704762 |
9d5735cba5c6faf4bc0915b6d346541d85cbb4ac | 15,960 | py | Python | torsion/model/symmetry_function.py | hnlab/TorsionNet | e81ab624f1340765345b34240a049a8cc5f4d581 | [
"MIT"
] | 15 | 2021-01-15T01:54:26.000Z | 2022-03-31T16:00:52.000Z | torsion/model/symmetry_function.py | hnlab/TorsionNet | e81ab624f1340765345b34240a049a8cc5f4d581 | [
"MIT"
] | 2 | 2021-07-21T22:42:09.000Z | 2021-11-22T06:39:20.000Z | torsion/model/symmetry_function.py | hnlab/TorsionNet | e81ab624f1340765345b34240a049a8cc5f4d581 | [
"MIT"
] | 6 | 2021-01-16T04:07:17.000Z | 2022-02-23T02:11:49.000Z | import math
import numpy as np
from openeye import oechem
from torsion.inchi_keys import get_torsion_oeatom_list, get_torsion_oebond
def GetPairwiseDistanceMatrix(icoords, jcoords):
'''
input: two sets of coordinates, icoords, jcoords; each of which are a list
of OEDoubleArray(3) containing x, y, a... | 40.507614 | 111 | 0.553446 |
9d5757c4a8bf60547e9dd883852158e386888c4b | 6,785 | py | Python | recommendation/recommendation.py | Jackson-Y/Machine-Learning | ea0a8c65ce93501d51fad2d73300dc0a37e2c1d8 | [
"MIT"
] | 4 | 2017-08-17T02:11:45.000Z | 2017-09-25T00:46:13.000Z | recommendation/recommendation.py | Jackson-Y/Machine-Learning | ea0a8c65ce93501d51fad2d73300dc0a37e2c1d8 | [
"MIT"
] | null | null | null | recommendation/recommendation.py | Jackson-Y/Machine-Learning | ea0a8c65ce93501d51fad2d73300dc0a37e2c1d8 | [
"MIT"
] | null | null | null | """ 候选生成(Candidate generation) & 排序(LTR, Learning to Ranking)"""
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import sys
import argparse
from operator import itemgetter
from math import sqrt
import pandas as pd
import py... | 36.875 | 115 | 0.592336 |
9d59344dd6f980db538f0cd26f71a979f4b914e4 | 1,592 | py | Python | orchestration/dags/twitter_streaming.py | amommendes/tweetstream | ef09928a4f3344210c597388332d18a53149bb41 | [
"Apache-2.0"
] | null | null | null | orchestration/dags/twitter_streaming.py | amommendes/tweetstream | ef09928a4f3344210c597388332d18a53149bb41 | [
"Apache-2.0"
] | null | null | null | orchestration/dags/twitter_streaming.py | amommendes/tweetstream | ef09928a4f3344210c597388332d18a53149bb41 | [
"Apache-2.0"
] | null | null | null | from datetime import timedelta
from airflow import DAG
from airflow.utils.dates import days_ago
from airflow.operators.python_operator import PythonOperator
from tweetstream.consumers.twitter_streaming import TwitterStreamingConsumer
from tweetstream.clients.spark import SparkClient
default_args = {
"owner": "twee... | 30.615385 | 105 | 0.692839 |
9d59ba6b91ae4d068be41f7bfb3634b177f8ade2 | 217 | py | Python | tests/expr/expr09.py | ktok07b6/polyphony | 657c5c7440520db6b4985970bd50547407693ac4 | [
"MIT"
] | 83 | 2015-11-30T09:59:13.000Z | 2021-08-03T09:12:28.000Z | tests/expr/expr09.py | jesseclin/polyphony | 657c5c7440520db6b4985970bd50547407693ac4 | [
"MIT"
] | 4 | 2017-02-10T01:43:11.000Z | 2020-07-14T03:52:25.000Z | tests/expr/expr09.py | jesseclin/polyphony | 657c5c7440520db6b4985970bd50547407693ac4 | [
"MIT"
] | 11 | 2016-11-18T14:39:15.000Z | 2021-02-23T10:05:20.000Z | from polyphony import testbench
def expr09(a, b):
return a ^ b
@testbench
def test():
assert 1 == expr09(0b1000, 0b1001)
assert 3 == expr09(0b1000, 0b1011)
assert 1 == expr09(0b1010, 0b1011)
test()
| 16.692308 | 38 | 0.654378 |
9d5d5a4039dbeb89722961536cacebbce65b4ec3 | 1,059 | py | Python | setup.py | fg1/ipynb_format | 58dc276fca4f1fbb179d7e84ce41d59663d011c2 | [
"BSD-3-Clause"
] | null | null | null | setup.py | fg1/ipynb_format | 58dc276fca4f1fbb179d7e84ce41d59663d011c2 | [
"BSD-3-Clause"
] | null | null | null | setup.py | fg1/ipynb_format | 58dc276fca4f1fbb179d7e84ce41d59663d011c2 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
from setuptools import setup, find_packages
from codecs import open
with open('README.rst', 'r', 'utf-8') as fd:
long_description = fd.read()
setup(name='ipynb_format',
version='0.1.1',
description='A code formatter for python code in ipython notebooks',
long_description=long_... | 31.147059 | 74 | 0.588291 |
9d5e11c9180f5fb664452c5f269722fdf9e6a4db | 140 | py | Python | Homework/Homework2/2_3.py | 404nofound/CS521-Info-Str-Python | 2ead691c519f29713419e79d600a2d2a1c87d1c1 | [
"Apache-2.0"
] | null | null | null | Homework/Homework2/2_3.py | 404nofound/CS521-Info-Str-Python | 2ead691c519f29713419e79d600a2d2a1c87d1c1 | [
"Apache-2.0"
] | null | null | null | Homework/Homework2/2_3.py | 404nofound/CS521-Info-Str-Python | 2ead691c519f29713419e79d600a2d2a1c87d1c1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
feet = eval(input("Enter a value for feet: "))
meter = feet * 0.305
print (feet, "feet is %.4f meters" %(meter))
| 17.5 | 46 | 0.585714 |
9d5e75f8cb60c04470b0412ae613020592c5aad7 | 16,072 | py | Python | nn/units/ceecnet.py | feevos/ceecnet | 9dc76f8cd16d44b264cae8c5846eefb8fcf6162d | [
"BSD-3-Clause",
"MIT"
] | 45 | 2020-09-07T01:19:44.000Z | 2022-03-15T14:44:20.000Z | nn/units/ceecnet.py | xautdestiny/ceecnet | 897cd5c128ffd85369732d1cac82a6ddc7643afa | [
"MIT",
"BSD-3-Clause"
] | 10 | 2020-10-02T10:14:47.000Z | 2021-10-19T09:34:14.000Z | nn/units/ceecnet.py | xautdestiny/ceecnet | 897cd5c128ffd85369732d1cac82a6ddc7643afa | [
"MIT",
"BSD-3-Clause"
] | 14 | 2020-09-29T02:46:18.000Z | 2021-09-27T07:13:47.000Z | from mxnet import gluon
from mxnet.gluon import HybridBlock
from ceecnet.nn.layers.conv2Dnormed import *
from ceecnet.utils.get_norm import *
from ceecnet.nn.layers.attention import *
class ResizeLayer(HybridBlock):
"""
Applies bilinear up/down sampling in spatial dims and changes number of filters as well
... | 45.659091 | 186 | 0.66059 |
9d6069e2ba0263497aa9f814cd08018989e4473f | 1,928 | py | Python | reviewboard/reviews/search_indexes.py | znick/reviewboard | f32320b267efcdf2feff1661eabe57f99ef490a7 | [
"MIT"
] | 1 | 2018-08-23T09:19:02.000Z | 2018-08-23T09:19:02.000Z | reviewboard/reviews/search_indexes.py | klpyang/reviewboard | d7dabf36e5b492f18048dd7084026bf99d6933c5 | [
"MIT"
] | null | null | null | reviewboard/reviews/search_indexes.py | klpyang/reviewboard | d7dabf36e5b492f18048dd7084026bf99d6933c5 | [
"MIT"
] | 1 | 2021-11-23T15:25:44.000Z | 2021-11-23T15:25:44.000Z | from django.db.models import Q
from haystack import indexes
from reviewboard.reviews.models import ReviewRequest
class ReviewRequestIndex(indexes.SearchIndex, indexes.Indexable):
"""A Haystack search index for Review Requests."""
# By Haystack convention, the full-text template is automatically
# referen... | 39.346939 | 76 | 0.705394 |
19b2caec75b18b0aa3e0597b5caa0b0c55ce8cad | 7,365 | py | Python | gpss/transaction.py | martendo/gpss.py | 52c6781bd8a65b651381ed11da9e31ddfae6e313 | [
"MIT"
] | 2 | 2021-11-28T08:48:02.000Z | 2022-03-09T16:19:06.000Z | gpss/transaction.py | martendo/gpss.py | 52c6781bd8a65b651381ed11da9e31ddfae6e313 | [
"MIT"
] | null | null | null | gpss/transaction.py | martendo/gpss.py | 52c6781bd8a65b651381ed11da9e31ddfae6e313 | [
"MIT"
] | null | null | null | from .statement import Statement, StatementType
from .event import Event
from ._helpers import debugmsg, simulation_error
class TransactionGenerator:
def __init__(self, simulation, block_num, operands):
self.simulation = simulation
self.block = self.simulation.program[block_num]
self.start_... | 41.610169 | 81 | 0.509029 |
19b32c34ea299311dabdf3d678344f668cb1f1a4 | 234 | py | Python | stone/config.py | ichengplus/mpmatrix | 41cf1ac48abe9aef1b92f1174157608a60e30da0 | [
"Apache-2.0"
] | null | null | null | stone/config.py | ichengplus/mpmatrix | 41cf1ac48abe9aef1b92f1174157608a60e30da0 | [
"Apache-2.0"
] | 3 | 2021-03-10T16:23:59.000Z | 2022-02-13T12:02:00.000Z | stone/config.py | ichengplus/mpmatrix | 41cf1ac48abe9aef1b92f1174157608a60e30da0 | [
"Apache-2.0"
] | null | null | null | REDIS_URL = "redis://redis:6379/0"
DEBUG = True
TESTING = False
JOBS = [
{
'id': 'actoken_refresh',
'func': 'actoken:refresh',
'args': None,
'trigger': 'interval',
'seconds': 7000
}
]
| 15.6 | 34 | 0.504274 |
19b3b12f916bfa71763e1f5555965f2dffc3a223 | 727 | py | Python | utils/update.py | adavila0703/warehouse-hub | 29778d605e372d6d6b41d05a3637edefb047f0bc | [
"MIT"
] | null | null | null | utils/update.py | adavila0703/warehouse-hub | 29778d605e372d6d6b41d05a3637edefb047f0bc | [
"MIT"
] | null | null | null | utils/update.py | adavila0703/warehouse-hub | 29778d605e372d6d6b41d05a3637edefb047f0bc | [
"MIT"
] | null | null | null | from shutil import copy, copytree, rmtree
import pathlib
import os
import time
def update():
"""Update is a script to auto update all the files that the user is using"""
print('Warehouse Hub is updating, do not close this window...')
time.sleep(3)
print('Applying patch...')
time.sleep(1)
c... | 25.068966 | 83 | 0.672627 |
19b3f6aeb28dd07d2770e4ea600d2a99c0c06e65 | 3,134 | py | Python | train_video.py | jacke121/MBMD | 2daf5edb4fb40ee652baead4f9332ca00fa111a5 | [
"MIT"
] | 220 | 2018-09-17T15:42:54.000Z | 2021-09-13T13:14:22.000Z | train_video.py | jacke121/MBMD | 2daf5edb4fb40ee652baead4f9332ca00fa111a5 | [
"MIT"
] | 12 | 2018-09-19T09:30:42.000Z | 2019-07-01T04:03:51.000Z | train_video.py | jacke121/MBMD | 2daf5edb4fb40ee652baead4f9332ca00fa111a5 | [
"MIT"
] | 60 | 2018-09-18T00:29:50.000Z | 2021-02-22T03:55:19.000Z | import functools
import tensorflow as tf
from core import trainer_video, input_reader
from core.model_builder import build_man_model
from google.protobuf import text_format
from object_detection.builders import input_reader_builder
from object_detection.protos import input_reader_pb2
from object_detection.protos import... | 35.613636 | 128 | 0.744735 |
19b4fbf622ea3b5c2b94266b63984fdd1ea1e133 | 460 | py | Python | config.py | icewing1996/biaffine-parser | f5a4ece7ba9a087d81b76dd6a8ea6aa7d90c6c82 | [
"MIT"
] | 1 | 2019-04-02T14:42:20.000Z | 2019-04-02T14:42:20.000Z | config.py | icewing1996/biaffine-parser | f5a4ece7ba9a087d81b76dd6a8ea6aa7d90c6c82 | [
"MIT"
] | null | null | null | config.py | icewing1996/biaffine-parser | f5a4ece7ba9a087d81b76dd6a8ea6aa7d90c6c82 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
class Config(object):
# [Network]
n_embed = 100
n_tag_embed = 100
embed_dropout = 0.33
n_lstm_hidden = 400
n_lstm_layers = 3
lstm_dropout = 0.33
n_mlp_arc = 500
n_mlp_rel = 100
mlp_dropout = 0.33
# [Optimizer]
lr = 2e-3
beta_1 = 0.9
bet... | 15.862069 | 24 | 0.558696 |
19b7ef31e8ac32e464e2b7f9641c6ad98cd6de46 | 3,301 | py | Python | conf_dblp.py | AmiraKetfi/ScientificProductScraper | c700fb579ac47266e76ec834ccbd8674abeaff50 | [
"MIT"
] | 4 | 2018-04-04T12:10:59.000Z | 2020-02-22T17:26:14.000Z | conf_dblp.py | AmiraKetfi/ScientificProductScraper | c700fb579ac47266e76ec834ccbd8674abeaff50 | [
"MIT"
] | null | null | null | conf_dblp.py | AmiraKetfi/ScientificProductScraper | c700fb579ac47266e76ec834ccbd8674abeaff50 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Mar 17 23:01:40 2018
@author: pc
"""
import scholarly,re,urllib.request,nltk
import bs4 as bs
# =============================================================================
# #Probléme les derniere conf ne se rajoute pas
# =======================================... | 38.383721 | 124 | 0.499546 |
19b8ce0aa97bf71df30c5a8e086263306534c4c7 | 4,540 | py | Python | src/robot.py | FROG3160/FRC2018-ARWING | 6635274d79839ea92d8591af2c8e51f8e1112ec1 | [
"MIT"
] | 1 | 2019-01-15T00:47:16.000Z | 2019-01-15T00:47:16.000Z | src/robot.py | FROG3160/FRC2018-ARWING | 6635274d79839ea92d8591af2c8e51f8e1112ec1 | [
"MIT"
] | 18 | 2018-02-15T01:07:03.000Z | 2018-04-10T00:25:59.000Z | src/robot.py | FROG3160/FRC2018-ARWING | 6635274d79839ea92d8591af2c8e51f8e1112ec1 | [
"MIT"
] | 4 | 2018-01-31T01:53:44.000Z | 2018-02-16T00:30:14.000Z | #!/usr/bin/env python3
"""
Main code for Robot
"""
import wpilib
import robotmap
from wpilib import Joystick
from subsystems.drivetrain import DriveTrain as Drive
from subsystems.grabber import cubeGrabber
from subsystems.elevator import Elevator
from subsystems.climber import Climber
from subsystems.autonomous import... | 32.661871 | 83 | 0.652643 |
19b94d7c9d394f09ecf7228b67004f998dd55522 | 1,764 | py | Python | api/attomized_avm.py | johncoleman83/attom_python_client | 2fad572162f481a71cccf6003da4cbd8ec4477d4 | [
"MIT"
] | null | null | null | api/attomized_avm.py | johncoleman83/attom_python_client | 2fad572162f481a71cccf6003da4cbd8ec4477d4 | [
"MIT"
] | null | null | null | api/attomized_avm.py | johncoleman83/attom_python_client | 2fad572162f481a71cccf6003da4cbd8ec4477d4 | [
"MIT"
] | 1 | 2020-11-20T19:28:36.000Z | 2020-11-20T19:28:36.000Z | #!/usr/bin/env python3
"""
ATTOM API
https://api.developer.attomdata.com
"""
import requests
from urllib.parse import quote, urlencode
from api import api
PATH = "attomavm/detail"
def get_avm_by_address(number_street, city_state):
"""
API request to get attomavm/detail
"""
params = urlencode(
{
"add... | 27.138462 | 77 | 0.620181 |
19b9c7cf12ec5b8b173b1bc2764d7bfc2577385f | 7,064 | py | Python | idmap/models.py | tkhyn/django-idmap | 383124fc4bd537d053f9d4c0d02a498f66831baa | [
"BSD-2-Clause"
] | 1 | 2021-04-24T16:35:15.000Z | 2021-04-24T16:35:15.000Z | idmap/models.py | tkhyn/django-idmap | 383124fc4bd537d053f9d4c0d02a498f66831baa | [
"BSD-2-Clause"
] | null | null | null | idmap/models.py | tkhyn/django-idmap | 383124fc4bd537d053f9d4c0d02a498f66831baa | [
"BSD-2-Clause"
] | 1 | 2021-02-27T14:45:48.000Z | 2021-02-27T14:45:48.000Z | import django
from django.db import models
from django.db.models.base import ModelBase
from django.utils import six
from .manager import IdMapManager
from . import tls # thread local storage
META_VALUES = {
'use_strong_refs': False,
'multi_db': False
}
class IdMapModelBase(ModelBase):
def __new__(mc... | 33.799043 | 80 | 0.58876 |
19bbd9ee5d1a69e647b6029452a9fd29e645da59 | 1,345 | py | Python | test_search_in_rotated_sorted_array.py | jaebradley/leetcode.py | 64634cc7d0e975ddd163f35acb18cc92960b8eb5 | [
"MIT"
] | null | null | null | test_search_in_rotated_sorted_array.py | jaebradley/leetcode.py | 64634cc7d0e975ddd163f35acb18cc92960b8eb5 | [
"MIT"
] | 2 | 2019-11-13T19:55:49.000Z | 2019-11-13T19:55:57.000Z | test_search_in_rotated_sorted_array.py | jaebradley/leetcode.py | 64634cc7d0e975ddd163f35acb18cc92960b8eb5 | [
"MIT"
] | null | null | null | from unittest import TestCase
from search_in_rotated_sorted_array import Solution
class TestSearchInRotatedSortedArray(TestCase):
def test_0_when_first_element_is_target(self):
self.assertEqual(Solution().search([1, 2, 3, 4, 5, 6, 7], 1), 0)
def test_end_index_last_element_is_target(self):
s... | 37.361111 | 72 | 0.684758 |
19bd0b651a92c3989a6dcd3e14655ea86b1f4a83 | 2,501 | py | Python | pyrfu/pyrf/ts_skymap.py | ablotekar/irfu-python | 740cb51ca9ce2ab0d62cb6fef3a7a722d430d79e | [
"MIT"
] | 2 | 2020-11-27T11:35:42.000Z | 2021-07-17T11:08:10.000Z | pyrfu/pyrf/ts_skymap.py | ablotekar/irfu-python | 740cb51ca9ce2ab0d62cb6fef3a7a722d430d79e | [
"MIT"
] | 1 | 2021-12-04T07:55:48.000Z | 2021-12-10T12:45:27.000Z | pyrfu/pyrf/ts_skymap.py | ablotekar/irfu-python | 740cb51ca9ce2ab0d62cb6fef3a7a722d430d79e | [
"MIT"
] | 2 | 2021-07-17T11:08:12.000Z | 2021-07-18T18:41:42.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 3rd party imports
import numpy as np
import xarray as xr
__author__ = "Louis Richard"
__email__ = "louisr@irfu.se"
__copyright__ = "Copyright 2020-2021"
__license__ = "MIT"
__version__ = "2.3.7"
__status__ = "Prototype"
def ts_skymap(time, data, energy, phi, theta, **... | 26.892473 | 79 | 0.562575 |
19be0f2de874f8b441c89b5d8fd8cac69393789a | 2,037 | py | Python | src/log_utils.py | alexklwong/calibrated-backprojection-network | 57dbec03c6da94ee0cd020b6de5f02e7e8ee726e | [
"Intel"
] | 38 | 2021-08-28T06:01:25.000Z | 2022-03-03T03:23:23.000Z | src/log_utils.py | alexklwong/calibrated-backprojection-network | 57dbec03c6da94ee0cd020b6de5f02e7e8ee726e | [
"Intel"
] | 14 | 2021-11-15T12:30:34.000Z | 2022-03-30T14:03:16.000Z | src/log_utils.py | alexklwong/calibrated-backprojection-network | 57dbec03c6da94ee0cd020b6de5f02e7e8ee726e | [
"Intel"
] | 9 | 2021-10-19T23:45:07.000Z | 2021-12-20T07:45:37.000Z | '''
Author: Alex Wong <alexw@cs.ucla.edu>
If you use this code, please cite the following paper:
A. Wong, and S. Soatto. Unsupervised Depth Completion with Calibrated Backprojection Layers.
https://arxiv.org/pdf/2108.10531.pdf
@inproceedings{wong2021unsupervised,
title={Unsupervised Depth Completion with Calibrate... | 26.802632 | 92 | 0.60972 |
19c214d222aa500c556609e883b1ff02ba286869 | 788 | py | Python | add-two-numbers/add-two-numbers.py | shaurya-src/code-leet | f642b81eb7bead46c66404bd48ca74bdfeb2abbb | [
"MIT"
] | null | null | null | add-two-numbers/add-two-numbers.py | shaurya-src/code-leet | f642b81eb7bead46c66404bd48ca74bdfeb2abbb | [
"MIT"
] | null | null | null | add-two-numbers/add-two-numbers.py | shaurya-src/code-leet | f642b81eb7bead46c66404bd48ca74bdfeb2abbb | [
"MIT"
] | null | null | null | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def addTwoNumbers(self, l1: Optional[ListNode], l2: Optional[ListNode]) -> Optional[ListNode]:
a = self.get_num(l1)
b = self.get_num(... | 28.142857 | 98 | 0.497462 |
19c251bd8c7eb79b25c470c6951dca0f932a8918 | 2,834 | py | Python | likedtweets.py | PoliTwit1984/Politwitverse | 837dd2d05b3977aa24a70f52a3b951ef22c51dc6 | [
"MIT"
] | 3 | 2022-01-05T07:12:14.000Z | 2022-02-19T20:58:25.000Z | likedtweets.py | PoliTwit1984/Politwitverse | 837dd2d05b3977aa24a70f52a3b951ef22c51dc6 | [
"MIT"
] | 25 | 2022-01-05T08:23:59.000Z | 2022-02-07T01:25:39.000Z | likedtweets.py | PoliTwit1984/Politwitverse | 837dd2d05b3977aa24a70f52a3b951ef22c51dc6 | [
"MIT"
] | 1 | 2022-02-01T22:39:57.000Z | 2022-02-01T22:39:57.000Z | import time
import re
import tweepy
import preprocessor as p
import config
import string
consumer_key = config.consumer_key
consumer_secret = config.consumer_secret
access_token = config.access_token
access_token_secret = config.access_token_secret
bearer_token = config.bearer_token
username = config.username
password... | 26.485981 | 97 | 0.677135 |
19c32bbd1169664ffd8d06d663183110a2d5e53c | 391 | py | Python | src/app/migrations/0004_history_missed.py | deadlock-delegate/arkdelegates | 8a5262f51b519ba3bc10094756c8866fc550df65 | [
"MIT"
] | 2 | 2018-05-22T13:47:09.000Z | 2018-05-23T12:45:05.000Z | src/app/migrations/0004_history_missed.py | deadlock-delegate/arkdelegates | 8a5262f51b519ba3bc10094756c8866fc550df65 | [
"MIT"
] | 21 | 2018-05-08T12:56:46.000Z | 2020-06-05T18:59:38.000Z | src/app/migrations/0004_history_missed.py | deadlock-delegate/arkdelegates | 8a5262f51b519ba3bc10094756c8866fc550df65 | [
"MIT"
] | 4 | 2018-05-04T15:00:59.000Z | 2019-02-13T02:39:07.000Z | # Generated by Django 2.0.3 on 2018-03-14 09:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0003_delegate_public_key'),
]
operations = [
migrations.AddField(
model_name='history',
name='missed',
... | 20.578947 | 59 | 0.595908 |
19c43d42b7108f348940b9fd8fc9fb33a8830e2c | 2,112 | py | Python | audclass.py | theunafraid/audiofeedback-prevention | 0dd3e8ab7b5a65aff214e74b7bd7869366b1b7b5 | [
"Apache-2.0"
] | 1 | 2022-01-20T08:30:20.000Z | 2022-01-20T08:30:20.000Z | audclass.py | theunafraid/audiofeedback-prevention | 0dd3e8ab7b5a65aff214e74b7bd7869366b1b7b5 | [
"Apache-2.0"
] | null | null | null | audclass.py | theunafraid/audiofeedback-prevention | 0dd3e8ab7b5a65aff214e74b7bd7869366b1b7b5 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
import numpy as np
from tensorflow.python.ops.gen_batch_ops import batch
from model import AudioClass
from qrnn import QRNN
from numpy.random import seed
from numpy.random import randn
from random import randint
from lstmfcn import LSTM_FCN
import librosa
import os
def getData():
outX = []
... | 26.734177 | 78 | 0.588542 |
19c4cd4bbbc8cea75d64211787db92e8b023d09a | 3,135 | py | Python | pytanga/components/OpenConfig/routing/ospfv2/ospfv2Interface.py | renatoalmeidaoliveira/Pytanga | aa02f1c0f2573da1330d1d246ab780fa3be336a5 | [
"MIT"
] | null | null | null | pytanga/components/OpenConfig/routing/ospfv2/ospfv2Interface.py | renatoalmeidaoliveira/Pytanga | aa02f1c0f2573da1330d1d246ab780fa3be336a5 | [
"MIT"
] | null | null | null | pytanga/components/OpenConfig/routing/ospfv2/ospfv2Interface.py | renatoalmeidaoliveira/Pytanga | aa02f1c0f2573da1330d1d246ab780fa3be336a5 | [
"MIT"
] | null | null | null | from pytanga.components import AbstractComponent
class ospfv2InterfaceComponent(AbstractComponent):
def __init__(
self,
if_id,
network_type=None,
priority=None,
multi_area_adjacency_primary=None,
authentication_type=None,
metric=... | 32.319588 | 94 | 0.500797 |
19c79aebe6cccec71cf534b0497f44d1a8496883 | 4,127 | py | Python | python_implementation/matriz/quadrada.py | SousaPedro11/algoritmos | 86a3601912778d120b9ec8094267c26a7eb6d153 | [
"MIT"
] | null | null | null | python_implementation/matriz/quadrada.py | SousaPedro11/algoritmos | 86a3601912778d120b9ec8094267c26a7eb6d153 | [
"MIT"
] | null | null | null | python_implementation/matriz/quadrada.py | SousaPedro11/algoritmos | 86a3601912778d120b9ec8094267c26a7eb6d153 | [
"MIT"
] | null | null | null | import math
from typing import List, Tuple
def __cria_matriz_quadrada(tamanho: int = 20) -> List[List[str]]:
matriz = []
for _ in range(tamanho):
linha = ['0' for _ in range(tamanho)]
matriz.append(linha)
return matriz
def __diagonais(matriz: List[List[str]]) -> Tuple[list, list]:
t... | 33.282258 | 100 | 0.628544 |
19c7ee6d99159a70af01f16f7e183bb9ec3972a5 | 7,017 | py | Python | app_mongo.py | emmpets/MongoProject | cbef19b590503825158909703125b34c1bf536ec | [
"Apache-2.0"
] | null | null | null | app_mongo.py | emmpets/MongoProject | cbef19b590503825158909703125b34c1bf536ec | [
"Apache-2.0"
] | null | null | null | app_mongo.py | emmpets/MongoProject | cbef19b590503825158909703125b34c1bf536ec | [
"Apache-2.0"
] | null | null | null | from pymongo import MongoClient
import pymongo
from datetime import datetime,time
import time
from bson.code import Code
mongo_client=MongoClient('mongodb://localhost:27017/')
db=mongo_client.mydb
db_col=db.things
dbc = mongo_client.mydb.things
print mongo_client
print(db)
print("connected")
def first_querry():
... | 30.11588 | 110 | 0.584865 |
19c9e0f683fb12bcf45633873b78ecba612bb09f | 7,399 | py | Python | theseus/util/serialize.py | shiplift/theseus | 9324d67e6e0c6b93a7734a5531838c5a909a1424 | [
"0BSD"
] | null | null | null | theseus/util/serialize.py | shiplift/theseus | 9324d67e6e0c6b93a7734a5531838c5a909a1424 | [
"0BSD"
] | null | null | null | theseus/util/serialize.py | shiplift/theseus | 9324d67e6e0c6b93a7734a5531838c5a909a1424 | [
"0BSD"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
serialize
provide means to persist and recreate the currently known
set of W_Tags and all shapes and transformations reachable
from there.
The rmarshal modules is used for serialization; the format is
marshal_proto = (
int, # number of shapes
[ # shape list
... | 27.403704 | 79 | 0.592783 |
19cc7f391c49230cd25af4f7949e261ca27ffe2b | 1,359 | py | Python | external_scripts/run2.py | AAS97/tokenizRE | 0186a2b533edaa0045b16b0b111b9637248e5046 | [
"MIT"
] | null | null | null | external_scripts/run2.py | AAS97/tokenizRE | 0186a2b533edaa0045b16b0b111b9637248e5046 | [
"MIT"
] | null | null | null | external_scripts/run2.py | AAS97/tokenizRE | 0186a2b533edaa0045b16b0b111b9637248e5046 | [
"MIT"
] | null | null | null | from web3 import Web3, HTTPProvider
import json
import os
w3 = Web3(HTTPProvider("http://127.0.0.1:7545",
request_kwargs={'timeout': 60}))
print(f"Web3 is connected : {w3.isConnected()}")
accounts = w3.eth.accounts
# ------------------------------- get contract ------------------------------- ... | 37.75 | 146 | 0.693893 |
19cc949ad53b4cdcbc1b975b94608f7737a43f64 | 825 | py | Python | main.py | cltl-students/hamersma-agression-causes | 11cbfd94031a0a3c84a27afa20d8a539acdab609 | [
"MIT"
] | null | null | null | main.py | cltl-students/hamersma-agression-causes | 11cbfd94031a0a3c84a27afa20d8a539acdab609 | [
"MIT"
] | null | null | null | main.py | cltl-students/hamersma-agression-causes | 11cbfd94031a0a3c84a27afa20d8a539acdab609 | [
"MIT"
] | null | null | null | from preprocessing import preprocess
from approach1_rulebased import get_predictions_rulebased
from approach2_machine_learning import get_predictions_ml
from bertopic_clustering import cluster_precursors
def main():
'''Main function to use from commandline, preprocess input to generate embeddings, detect agr... | 43.421053 | 118 | 0.778182 |
19cd9765a8c1a72e36854304f427fda7349e31d0 | 8,985 | pyw | Python | 12th project cs/Gui pages.pyw | Jatin-Ya/ChatApp-12th-project- | 77ced9b18205728334f4370fbce8d74687bc5373 | [
"Apache-2.0"
] | null | null | null | 12th project cs/Gui pages.pyw | Jatin-Ya/ChatApp-12th-project- | 77ced9b18205728334f4370fbce8d74687bc5373 | [
"Apache-2.0"
] | null | null | null | 12th project cs/Gui pages.pyw | Jatin-Ya/ChatApp-12th-project- | 77ced9b18205728334f4370fbce8d74687bc5373 | [
"Apache-2.0"
] | null | null | null | from tkinter import *
import threading
import sql_manager as ss
def temp(er,s):
er.destroy()
s.sperson()
def temp2(er,s):
er.destroy()
s.w.destroy()
def close_w(self):
self.w.destroy()
class GUI:
def __init__(self):
self.w=Tk()
p1 = PhotoImage(fi... | 35.654762 | 111 | 0.575292 |
19cea24c1060f2d6ff7113c23c57266d177697db | 1,528 | py | Python | 19/19a.py | jamOne-/adventofcode2018 | d51c01578ae7e4f30824c4f6ace66958491c1ed4 | [
"MIT"
] | null | null | null | 19/19a.py | jamOne-/adventofcode2018 | d51c01578ae7e4f30824c4f6ace66958491c1ed4 | [
"MIT"
] | null | null | null | 19/19a.py | jamOne-/adventofcode2018 | d51c01578ae7e4f30824c4f6ace66958491c1ed4 | [
"MIT"
] | null | null | null | import sys
OPERATIONS = {
'addr': lambda a, b, c, registers: registers[a] + registers[b],
'addi': lambda a, b, c, registers: registers[a] + b,
'mulr': lambda a, b, c, registers: registers[a] * registers[b],
'muli': lambda a, b, c, registers: registers[a] * b,
'banr': lambda a, b, c, registers: registers[a] ... | 36.380952 | 77 | 0.633508 |
19d1e57d2a97ef66002ffa2d6966b97f5f533bee | 1,878 | py | Python | examples/websocket_echo_server.py | HMXHIU/VeryPowerfulAgents | 06abd52776aeaf701637533f760176459c9c361c | [
"MIT"
] | 2 | 2021-11-30T16:14:01.000Z | 2022-03-04T09:20:51.000Z | examples/websocket_echo_server.py | HMXHIU/VeryPowerfulAgents | 06abd52776aeaf701637533f760176459c9c361c | [
"MIT"
] | 8 | 2021-02-10T15:43:49.000Z | 2021-02-10T16:00:16.000Z | examples/websocket_echo_server.py | HMXHIU/VeryPowerfulAgents | 06abd52776aeaf701637533f760176459c9c361c | [
"MIT"
] | 1 | 2021-01-01T12:31:48.000Z | 2021-01-01T12:31:48.000Z | from aiohttp import web
from agents import Agent
class WebServer(Agent):
html = """
<!DOCTYPE html>
<html>
<head>
<title>WebSocket Echo</title>
</head>
<body>
<h1>WebSocket Echo</h1>
<form action="" onsubmit="sendMessage(event)">
... | 30.786885 | 86 | 0.510117 |
19d3c2532fdc242dd0fdaf80342fa01cfdf2a61d | 5,401 | py | Python | janaganana/tables.py | deshetti/janaganana | f29ced95fc9f8b98f77560d9afdbd999510dd497 | [
"MIT"
] | 11 | 2017-02-16T20:45:54.000Z | 2021-12-31T01:08:40.000Z | janaganana/tables.py | deshetti/janaganana | f29ced95fc9f8b98f77560d9afdbd999510dd497 | [
"MIT"
] | 18 | 2017-02-15T20:24:29.000Z | 2022-03-29T21:54:36.000Z | janaganana/tables.py | deshetti/janaganana | f29ced95fc9f8b98f77560d9afdbd999510dd497 | [
"MIT"
] | 13 | 2017-02-16T20:45:25.000Z | 2020-09-23T21:40:57.000Z | from wazimap.data.tables import FieldTable
# Define our tables so the data API can discover them.
# Household tables
FieldTable(['rural population'], universe='Population', table_per_level=False)
FieldTable(['area', 'sex'], universe='Population', table_per_level=False)
FieldTable(['census_year', 'measure'], universe... | 66.679012 | 108 | 0.755601 |
19d4df790639614b567c8829dbce219210c26642 | 585 | py | Python | src/weekly-reset.py | SlimeeGameS/VirginityBot | a1745893f21a16112bbf775fb2aff199c14dbbbb | [
"CC0-1.0"
] | null | null | null | src/weekly-reset.py | SlimeeGameS/VirginityBot | a1745893f21a16112bbf775fb2aff199c14dbbbb | [
"CC0-1.0"
] | 14 | 2020-03-26T01:02:31.000Z | 2021-03-24T23:48:44.000Z | src/weekly-reset.py | SlimeeGameS/VirginityBot | a1745893f21a16112bbf775fb2aff199c14dbbbb | [
"CC0-1.0"
] | 2 | 2020-08-09T19:08:41.000Z | 2021-05-12T17:44:28.000Z | import os
import asyncio
import logging
from pony.orm import *
import logger
from database import start_orm, get_biggest_virgin, Guild, Virgin
logger = logging.getLogger('virginity-bot')
async def reset_weekly_virginity():
with db_session:
virgins = Virgin.select()
for virgin in virgins:
virgin.tot... | 18.870968 | 65 | 0.729915 |
19d525875da360fb20fb2929a08fff78176398d0 | 1,165 | py | Python | hardhat/recipes/racket.py | stangelandcl/hardhat | 1ad0c5dec16728c0243023acb9594f435ef18f9c | [
"MIT"
] | null | null | null | hardhat/recipes/racket.py | stangelandcl/hardhat | 1ad0c5dec16728c0243023acb9594f435ef18f9c | [
"MIT"
] | null | null | null | hardhat/recipes/racket.py | stangelandcl/hardhat | 1ad0c5dec16728c0243023acb9594f435ef18f9c | [
"MIT"
] | null | null | null | import os
import shutil
from .base import GnuRecipe
class RacketRecipe(GnuRecipe):
def __init__(self, *args, **kwargs):
super(RacketRecipe, self).__init__(*args, **kwargs)
self.sha256 = 'bf2bce50b02c626666a8d2093638893e' \
'8beb8b2a19cdd43efa151a686c88edcf'
self.depe... | 31.486486 | 73 | 0.572532 |
19d5619a8ce652fe7933c1843f9585227eb325de | 3,257 | py | Python | lichess-gist.py | swimmy4days/lichess-gist | b70e605345f789e032291253df506384ccbaa270 | [
"MIT"
] | null | null | null | lichess-gist.py | swimmy4days/lichess-gist | b70e605345f789e032291253df506384ccbaa270 | [
"MIT"
] | null | null | null | lichess-gist.py | swimmy4days/lichess-gist | b70e605345f789e032291253df506384ccbaa270 | [
"MIT"
] | null | null | null | import os
import sys
import berserk
from github import Github, InputFileContent, Gist
SEPARATOR = "."
PADDING = {"puzzle": 0, "crazyhouse": 0, "chess960": 0,
"kingOfTheHill": 0, "threeCheck": 2, "antichess": 0, "atomic": 0, "horde": 0, "racingKings": 0,
"ultraBullet": 0, "blitz": 1, "classical"... | 31.317308 | 118 | 0.612834 |
19d5e02630a84a1866bbfe9f9deb571cc98a96cc | 951 | py | Python | alembic/versions/60c735df8d2f_.py | brouberol/grand-cedre | 05f18d1f8b7253ffa7fb5b33b30ceadcc93c4e93 | [
"BSD-3-Clause"
] | null | null | null | alembic/versions/60c735df8d2f_.py | brouberol/grand-cedre | 05f18d1f8b7253ffa7fb5b33b30ceadcc93c4e93 | [
"BSD-3-Clause"
] | 22 | 2019-09-03T20:08:42.000Z | 2022-03-11T23:58:02.000Z | alembic/versions/60c735df8d2f_.py | brouberol/grand-cedre | 05f18d1f8b7253ffa7fb5b33b30ceadcc93c4e93 | [
"BSD-3-Clause"
] | null | null | null | """empty message
Revision ID: 60c735df8d2f
Revises: 88bb7e12da60
Create Date: 2019-09-06 08:27:03.082097
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "60c735df8d2f"
down_revision = "88bb7e12da60"
branch_labels = None
depends_on = None
def upgrade():
# ... | 27.171429 | 84 | 0.690852 |
19d5e29e652c7abc55afdd0fed0c5112571018a1 | 3,640 | py | Python | python/genre_classifier.py | nscharrenberg/Aliran | 628de0476b8f8b413a6fdddf5392c590e8b27654 | [
"MIT"
] | null | null | null | python/genre_classifier.py | nscharrenberg/Aliran | 628de0476b8f8b413a6fdddf5392c590e8b27654 | [
"MIT"
] | null | null | null | python/genre_classifier.py | nscharrenberg/Aliran | 628de0476b8f8b413a6fdddf5392c590e8b27654 | [
"MIT"
] | null | null | null | import scipy.io.wavfile as wav
import numpy as np
import os
import pickle
import random
import operator
from python_speech_features import mfcc
dataset = []
training_set = []
test_set = []
# Get the distance between feature vectors
def distance(instance1, instance2, k):
mm1 = instance1[0]
cm1 = instance1[1]
... | 26.376812 | 102 | 0.613462 |
19d94ed3daa7c3c452d53a4b890d6a26c3139991 | 1,653 | py | Python | run.py | dkosilov/reconciler_anchor_salesforce | 5cf6a8ccaedce84e7dab6c32955c644ede0c6e07 | [
"Xnet",
"X11"
] | 1 | 2020-09-22T11:49:07.000Z | 2020-09-22T11:49:07.000Z | run.py | dkosilov/reconciler_anchor_salesforce | 5cf6a8ccaedce84e7dab6c32955c644ede0c6e07 | [
"Xnet",
"X11"
] | null | null | null | run.py | dkosilov/reconciler_anchor_salesforce | 5cf6a8ccaedce84e7dab6c32955c644ede0c6e07 | [
"Xnet",
"X11"
] | null | null | null | import argparse
from libs.data_model import AnchorNorthstarDataframe, SalesForceDataframe, \
AnchorSalesforceAccountsDataframe, AnchorSalesforceContactsDataframe
from libs.utils import save_dataframes_to_excel
parser = argparse.ArgumentParser(description='Reconcile accounts and contacts between Anchor and Salesfo... | 57 | 120 | 0.754991 |
19db3143b0967735343ec7fb40012d028a989ea5 | 1,650 | py | Python | billrelease.py | arby36/BillAi | e5c10c35279a1669d218439671e03bc17acb7fdc | [
"MIT"
] | null | null | null | billrelease.py | arby36/BillAi | e5c10c35279a1669d218439671e03bc17acb7fdc | [
"MIT"
] | null | null | null | billrelease.py | arby36/BillAi | e5c10c35279a1669d218439671e03bc17acb7fdc | [
"MIT"
] | null | null | null |
def bill():
print("I am bill, please input your name")
name = str(raw_input())
print("Hi %s" % name)
print("Now input a command")
a = raw_input("Command line:")
a = a.lower()
if a == "":
print("You inputed nothing")
bill()
if a == "help":
print("The commands in m... | 27.966102 | 139 | 0.527273 |
19ddf831a5a3b46c86717f74ec094bf9d7bcc0cd | 757 | py | Python | homeworks/hw05/tests/q3b1.py | cwakamiya/ieor135 | 084490380f265225927d11b43d948c1206b0aab8 | [
"Apache-2.0"
] | 28 | 2020-06-15T23:53:36.000Z | 2022-03-19T09:27:02.000Z | homeworks/hw05/tests/q3b1.py | cwakamiya/ieor135 | 084490380f265225927d11b43d948c1206b0aab8 | [
"Apache-2.0"
] | 4 | 2020-06-24T22:20:31.000Z | 2022-02-28T01:37:36.000Z | homeworks/hw05/tests/q3b1.py | cwakamiya/ieor135 | 084490380f265225927d11b43d948c1206b0aab8 | [
"Apache-2.0"
] | 78 | 2020-06-19T09:41:01.000Z | 2022-02-05T00:13:29.000Z | test = { 'name': 'q3b1',
'points': 2,
'suites': [ { 'cases': [ { 'code': '>>> 4 <= '
"sum(list(X1.describe().loc['mean'])) "
'<= 9\n'
'True',
... | 47.3125 | 86 | 0.211361 |
19e32a5576ac8d30a109ed4090fee43e0912beb9 | 3,050 | py | Python | scanpy/api/__init__.py | gioelelm/scanpy | 97391a0e7908b9644b2d6640c8e26d37bdc7811e | [
"BSD-3-Clause"
] | null | null | null | scanpy/api/__init__.py | gioelelm/scanpy | 97391a0e7908b9644b2d6640c8e26d37bdc7811e | [
"BSD-3-Clause"
] | null | null | null | scanpy/api/__init__.py | gioelelm/scanpy | 97391a0e7908b9644b2d6640c8e26d37bdc7811e | [
"BSD-3-Clause"
] | 1 | 2019-02-18T07:39:59.000Z | 2019-02-18T07:39:59.000Z | """Scanpy's high-level API provides an overview of all features relevant to pratical use::
import scanpy.api as sc
.. raw:: html
<h3>Preprocessing tools</h3>
Filtering of highly-variable genes, batch-effect correction, per-cell (UMI) normalization, preprocessing recipes.
.. raw:: html
<h4>Basic Preproc... | 14.95098 | 113 | 0.679016 |
19e36b29ee592d089dc07f0b81f9a1312e103cce | 34,894 | py | Python | sw/EdgeBERT/transformers/src/transformers/modeling_highway_albert.py | yihuajack/EdgeBERT | a51ae7557187e3251f4b11bc13ef9cbd336019ff | [
"Apache-2.0"
] | 8 | 2021-11-01T01:38:04.000Z | 2022-03-20T16:03:39.000Z | sw/EdgeBERT/transformers/src/transformers/modeling_highway_albert.py | yihuajack/EdgeBERT | a51ae7557187e3251f4b11bc13ef9cbd336019ff | [
"Apache-2.0"
] | 1 | 2021-11-19T08:04:02.000Z | 2021-12-19T07:21:48.000Z | sw/EdgeBERT/transformers/src/transformers/modeling_highway_albert.py | yihuajack/EdgeBERT | a51ae7557187e3251f4b11bc13ef9cbd336019ff | [
"Apache-2.0"
] | 5 | 2021-11-19T07:52:44.000Z | 2022-02-10T08:23:19.000Z | import torch
from torch import nn
from torch.nn import CrossEntropyLoss, MSELoss
from .modeling_albert import AlbertPreTrainedModel, AlbertLayerNorm, AlbertLayerGroup
from .modeling_bert import BertEmbeddings
from .modeling_highway_bert import BertPooler
import numpy as np
def entropy(x):
# x: torch.Tensor, logi... | 46.963661 | 148 | 0.611366 |
19e3c7e8cb0d8e13048dc4a21c8f8d2b1867724a | 1,809 | py | Python | tests/test_sar.py | chris-angeli-rft/cloud-custodian | 5ff331b114a591dbaf6d672e30ceefb7ae64a5dd | [
"Apache-2.0"
] | 8 | 2021-05-18T02:22:03.000Z | 2021-09-11T02:49:04.000Z | tests/test_sar.py | chris-angeli-rft/cloud-custodian | 5ff331b114a591dbaf6d672e30ceefb7ae64a5dd | [
"Apache-2.0"
] | 1 | 2021-04-26T04:38:35.000Z | 2021-04-26T04:38:35.000Z | tests/test_sar.py | chris-angeli-rft/cloud-custodian | 5ff331b114a591dbaf6d672e30ceefb7ae64a5dd | [
"Apache-2.0"
] | 1 | 2021-11-10T02:28:47.000Z | 2021-11-10T02:28:47.000Z | # Copyright 2020 Kapil Thangavelu
#
# 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,... | 35.470588 | 74 | 0.616363 |
19e3cc99b66e2939b99c81e570efb9afd33fa23d | 5,773 | py | Python | rovina.py | Pandoro/tools | 631c6036cb74dc845668fd912588fd31aae46f8b | [
"MIT"
] | 1 | 2019-04-22T16:38:03.000Z | 2019-04-22T16:38:03.000Z | rovina.py | afcarl/tools-Pandoro | 631c6036cb74dc845668fd912588fd31aae46f8b | [
"MIT"
] | 2 | 2018-03-13T10:49:48.000Z | 2018-03-13T10:54:01.000Z | rovina.py | afcarl/tools-Pandoro | 631c6036cb74dc845668fd912588fd31aae46f8b | [
"MIT"
] | 2 | 2018-03-08T19:40:10.000Z | 2018-06-11T14:43:49.000Z | import json
import os
import sys
sys.path.append('/usr/lib/python2.7/dist-packages')
import cv2
import numpy as np
from tqdm import *
import dataset_utils
class Rovina(object):
def __init__(self, config_filename):
self.config_filename = config_filename
with open(config_filename) as config_fil... | 37.245161 | 161 | 0.625498 |
19e85b96640382129fd31d8131a6692e41afddf9 | 4,952 | py | Python | gpgLabs/GPR/GPRlab1.py | victortocantins/gpgLabs | 310b69c681dd1ebf91ba8be2b5ac27adf5fc0f12 | [
"MIT"
] | null | null | null | gpgLabs/GPR/GPRlab1.py | victortocantins/gpgLabs | 310b69c681dd1ebf91ba8be2b5ac27adf5fc0f12 | [
"MIT"
] | null | null | null | gpgLabs/GPR/GPRlab1.py | victortocantins/gpgLabs | 310b69c681dd1ebf91ba8be2b5ac27adf5fc0f12 | [
"MIT"
] | null | null | null | import numpy as np
from scipy.constants import mu_0, epsilon_0
import matplotlib.pyplot as plt
from PIL import Image
import warnings
warnings.filterwarnings('ignore')
from ipywidgets import interact, interactive, IntSlider, widget, FloatText, FloatSlider, fixed
from .Wiggle import wiggle, PrimaryWave, ReflectedWave
i... | 24.636816 | 94 | 0.544628 |