hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
929548cb4fdb28eda560c96f789724f2f74e54ef | 4,090 | py | Python | Smaug/models/users.py | luviiv/Smaug | d26d837bb97ef583e05c43d16aed265356b7cf74 | [
"Apache-2.0"
] | null | null | null | Smaug/models/users.py | luviiv/Smaug | d26d837bb97ef583e05c43d16aed265356b7cf74 | [
"Apache-2.0"
] | null | null | null | Smaug/models/users.py | luviiv/Smaug | d26d837bb97ef583e05c43d16aed265356b7cf74 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
users.py
~~~~~~~~~~~
user manage
:copyright: (c) 2015 by Lu Tianchao.
:license: Apache, see LICENSE for more details.
"""
import hashlib
from datetime import datetime
from werkzeug import generate_password_hash, check_password_hash, \
cached_property
from flask.ex... | 25.72327 | 71 | 0.601467 |
9296c38d6179d914971335cddde811e8c8cfc78b | 347 | py | Python | cfg/launcher/__main__.py | rr-/dotfiles | 4a684c43a5714a3312b42b445e5ba9ae1fab0d1a | [
"MIT"
] | 16 | 2015-06-05T12:57:44.000Z | 2021-08-05T23:49:42.000Z | cfg/launcher/__main__.py | rr-/dotfiles | 4a684c43a5714a3312b42b445e5ba9ae1fab0d1a | [
"MIT"
] | 6 | 2015-11-01T18:18:26.000Z | 2020-10-06T09:17:29.000Z | cfg/launcher/__main__.py | rr-/dotfiles | 4a684c43a5714a3312b42b445e5ba9ae1fab0d1a | [
"MIT"
] | 6 | 2015-10-31T18:53:12.000Z | 2020-11-30T18:03:06.000Z | import os
from libdotfiles.util import (
HOME_DIR,
PKG_DIR,
REPO_ROOT_DIR,
create_symlink,
run,
)
create_symlink(
PKG_DIR / "launcher.json", HOME_DIR / ".config" / "launcher.json"
)
os.chdir(REPO_ROOT_DIR / "opt" / "launcher")
run(
["python3", "-m", "pip", "install", "--user", "--upgrade"... | 17.35 | 69 | 0.605187 |
9296fb6b24dc3eedf52b5f0b91836cb7ef50d404 | 2,456 | py | Python | problems/737.Sentence-Similarity-II/li.py | subramp-prep/leetcode | d125201d9021ab9b1eea5e5393c2db4edd84e740 | [
"Unlicense"
] | null | null | null | problems/737.Sentence-Similarity-II/li.py | subramp-prep/leetcode | d125201d9021ab9b1eea5e5393c2db4edd84e740 | [
"Unlicense"
] | null | null | null | problems/737.Sentence-Similarity-II/li.py | subramp-prep/leetcode | d125201d9021ab9b1eea5e5393c2db4edd84e740 | [
"Unlicense"
] | null | null | null | # coding=utf-8
# Author: Jianghan LI
# Question: 737.Sentence-Similarity-II
# Complexity: O(N)
# Date: 2018-05 14:50 - 14:56, 1 wrong try
############ test case ###########
s = Solution()
words1 = ["great", "acting", "skills"]
words2 = ["fine", "drama", "talent"]
pairs = [["great", "good"], ["fine", "good"], ["acting"... | 38.375 | 368 | 0.482085 |
929989a699a5e40cd08c6754c513c1391f4e851e | 3,371 | py | Python | test/test_datatypes.py | panny2207/OWL-RL | 218c5779290a0fbd653e40ab377e19b4f7c394fb | [
"W3C-20150513"
] | null | null | null | test/test_datatypes.py | panny2207/OWL-RL | 218c5779290a0fbd653e40ab377e19b4f7c394fb | [
"W3C-20150513"
] | null | null | null | test/test_datatypes.py | panny2207/OWL-RL | 218c5779290a0fbd653e40ab377e19b4f7c394fb | [
"W3C-20150513"
] | null | null | null | """
Test for OWL 2 RL/RDF rules from
Table 8. The Semantics of Datatypes
https://www.w3.org/TR/owl2-profiles/#Reasoning_in_OWL_2_RL_and_RDF_Graphs_using_Rules
NOTE: The following axioms are skipped on purpose
- dt-eq
- dt-diff
"""
from rdflib import Graph, Literal, Namespace, RDF, XSD, RDFS
import owlrl
DAML... | 35.861702 | 85 | 0.68407 |
929b14db4cd8be502dda71851249a5f21efe7fb5 | 7,072 | py | Python | pykin/robots/bimanual.py | jdj2261/pykin | da952b8ec023382b8a324d1095b0cfd675c7452b | [
"MIT"
] | 14 | 2021-08-09T06:59:10.000Z | 2022-03-09T13:05:46.000Z | pykin/robots/bimanual.py | jdj2261/pykin | da952b8ec023382b8a324d1095b0cfd675c7452b | [
"MIT"
] | null | null | null | pykin/robots/bimanual.py | jdj2261/pykin | da952b8ec023382b8a324d1095b0cfd675c7452b | [
"MIT"
] | 4 | 2021-12-13T03:23:36.000Z | 2022-03-09T11:34:29.000Z | import numpy as np
from pykin.robots.robot import Robot
from pykin.utils.error_utils import NotFoundError
| 32 | 126 | 0.5806 |
929d5cde02d733a6bdaf5707edb964059b0f2d46 | 717 | py | Python | tests/test_model.py | tteofili/python-trustyai | 407ba3d9e40b42dd97d46d8ae9077d67ffa3a147 | [
"Apache-2.0"
] | null | null | null | tests/test_model.py | tteofili/python-trustyai | 407ba3d9e40b42dd97d46d8ae9077d67ffa3a147 | [
"Apache-2.0"
] | null | null | null | tests/test_model.py | tteofili/python-trustyai | 407ba3d9e40b42dd97d46d8ae9077d67ffa3a147 | [
"Apache-2.0"
] | null | null | null | # pylint: disable=import-error, wrong-import-position, wrong-import-order, invalid-name
"""Test model provider interface"""
from common import *
from trustyai.model import Model, feature
def test_basic_model():
"""Test basic model"""
model = Model(test_model)
features = [
feature(name=f"f-num... | 23.9 | 108 | 0.644351 |
929dfa2e3f9cf68cb55576bcbba4406af6eaa25b | 381 | py | Python | avazu-ctr/rf.py | ldamewood/renormalization | 9dd2293f8e39fd671abae4f4f5914c9ccbcd5519 | [
"MIT"
] | 6 | 2016-11-26T02:39:27.000Z | 2018-05-11T02:02:03.000Z | avazu-ctr/rf.py | chrinide/renormalization | 9dd2293f8e39fd671abae4f4f5914c9ccbcd5519 | [
"MIT"
] | null | null | null | avazu-ctr/rf.py | chrinide/renormalization | 9dd2293f8e39fd671abae4f4f5914c9ccbcd5519 | [
"MIT"
] | 5 | 2015-01-12T20:22:56.000Z | 2018-03-22T03:38:15.000Z | #!/usr/bin/env python
from __future__ import print_function
from sklearn.feature_extraction import FeatureHasher
from sklearn.ensemble import RandomForestClassifier
from sklearn.pipeline import make_pipeline
from sklearn.metrics import log_loss
import ctr
learner = RandomForestClassifier(verbose = False, n_jobs = -1... | 27.214286 | 62 | 0.811024 |
929e35be958ee3633c514ae680ee6e40e159bff6 | 1,611 | py | Python | migrations/versions/f6ee6f9df554_.py | d-demirci/blockpy-server | f596f539d7809054a430a898bee877a0dbcb15b5 | [
"MIT"
] | 18 | 2019-10-14T13:56:15.000Z | 2022-03-12T23:49:14.000Z | migrations/versions/f6ee6f9df554_.py | acbart/blockpy-server | c504be4dffc624b7161c2c976d2d195f5f08cf9a | [
"MIT"
] | 26 | 2019-08-13T18:17:45.000Z | 2021-09-06T12:31:48.000Z | migrations/versions/f6ee6f9df554_.py | DigitalDerrickcs/blockpy-server | 4d3da5830ec802ec9d018e2fde91f33e2be38f10 | [
"MIT"
] | 9 | 2019-08-27T10:52:31.000Z | 2021-07-27T16:10:17.000Z | """Add Review Table
Revision ID: f6ee6f9df554
Revises:
Create Date: 2019-08-07 13:09:49.691184
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'f6ee6f9df554'
down_revision = None
branch_labels = None
depends_on = None
| 34.276596 | 98 | 0.676598 |
929e8a325b9be258a38a47e650d3a9382c02adaa | 15,486 | py | Python | regionsSP/source/summary.py | abdelhadisamir/covid-19-SEIAR | 187afb1ad4dccb1a4544b54eb7cda3d61d2c601f | [
"MIT"
] | 2 | 2020-05-12T07:32:42.000Z | 2021-07-26T09:41:17.000Z | regionsSP/source/summary.py | abdelhadisamir/covid-19-SEIAR | 187afb1ad4dccb1a4544b54eb7cda3d61d2c601f | [
"MIT"
] | null | null | null | regionsSP/source/summary.py | abdelhadisamir/covid-19-SEIAR | 187afb1ad4dccb1a4544b54eb7cda3d61d2c601f | [
"MIT"
] | null | null | null | if districtRegion1=="DRS 05 - Barretos":
date="2020-04-01"
#initial condition for susceptible
s0=10.0e3
#initial condition for exposed
e0=1e-4
#initial condition for infectious
i0=1e-4
#initial condition for recovered
r0=1e-4
#ini... | 32.465409 | 84 | 0.596216 |
929ee11fc6eb6656e8d14a65c71ef4a3ce9f586f | 4,068 | py | Python | claymore_json_api.py | bennettwarner/ClaymoreJSON-API | c171ce844540135ff8f5e85df3093c84d433c66c | [
"MIT"
] | null | null | null | claymore_json_api.py | bennettwarner/ClaymoreJSON-API | c171ce844540135ff8f5e85df3093c84d433c66c | [
"MIT"
] | null | null | null | claymore_json_api.py | bennettwarner/ClaymoreJSON-API | c171ce844540135ff8f5e85df3093c84d433c66c | [
"MIT"
] | null | null | null | # Author: Bennett Warner
# Last update: 4/16/2018
import sys
import socket
import json
import argparse
from http.server import HTTPServer, BaseHTTPRequestHandler
if sys.version_info < (3, 0):
sys.stdout.write("Sorry, Claymore JSON-API requires Python 3.x\n")
sys.exit(1)
remote_host, remote_port = '', ''
... | 32.544 | 171 | 0.596853 |
92a13a7837e033195b0dd69a79961f1b0bff1db1 | 7,196 | py | Python | src/mushr_pf/motion_model.py | rogeriobonatti/mushr_pf | ec02df0504566f48983cfa0421034bdb94e1283b | [
"BSD-3-Clause"
] | 4 | 2019-08-30T08:20:21.000Z | 2021-12-31T01:34:40.000Z | src/mushr_pf/motion_model.py | rogeriobonatti/mushr_pf | ec02df0504566f48983cfa0421034bdb94e1283b | [
"BSD-3-Clause"
] | 2 | 2020-06-28T21:27:29.000Z | 2020-09-10T21:04:43.000Z | src/mushr_pf/motion_model.py | rogeriobonatti/mushr_pf | ec02df0504566f48983cfa0421034bdb94e1283b | [
"BSD-3-Clause"
] | 5 | 2019-09-26T15:17:43.000Z | 2022-01-21T00:11:20.000Z | #!/usr/bin/env python
# Copyright (c) 2019, The Personal Robotics Lab, The MuSHR Team, The Contributors of MuSHR
# License: BSD 3-Clause. See LICENSE.md file in root directory.
from threading import Lock
import numpy as np
import rospy
from std_msgs.msg import Float64
from vesc_msgs.msg import VescStateStamped
# Tu... | 38.481283 | 175 | 0.65189 |
92a236fcf2da463a8a913c08e7962db7d7a482fc | 2,603 | py | Python | 2018/day-22/part2.py | amochtar/adventofcode | 292e7f00a1e19d2149d00246b0a77fedfcd3bd08 | [
"MIT"
] | 1 | 2019-12-27T22:36:30.000Z | 2019-12-27T22:36:30.000Z | 2018/day-22/part2.py | amochtar/adventofcode | 292e7f00a1e19d2149d00246b0a77fedfcd3bd08 | [
"MIT"
] | null | null | null | 2018/day-22/part2.py | amochtar/adventofcode | 292e7f00a1e19d2149d00246b0a77fedfcd3bd08 | [
"MIT"
] | null | null | null | from collections import defaultdict
from heapq import heappop, heappush
tools = {
'.': set(['c', 't']),
'=': set(['c', 'n']),
'|': set(['t', 'n']),
}
moves = {
'n': lambda p: (p[0]-1,p[1]),
's': lambda p: (p[0]+1,p[1]),
'w': lambda p: (p[0],p[1]-1),
'e': lambda p: (p[0],p[1]+1),
}
so... | 26.561224 | 77 | 0.419516 |
92a2ade8e25bb89801f783432bcd0131ea069e28 | 68 | py | Python | atcoder/abc149/b.py | sugitanishi/competitive-programming | 51af65fdce514ece12f8afbf142b809d63eefb5d | [
"MIT"
] | null | null | null | atcoder/abc149/b.py | sugitanishi/competitive-programming | 51af65fdce514ece12f8afbf142b809d63eefb5d | [
"MIT"
] | null | null | null | atcoder/abc149/b.py | sugitanishi/competitive-programming | 51af65fdce514ece12f8afbf142b809d63eefb5d | [
"MIT"
] | null | null | null | a,b,k=map(int,input().split())
print(max(a-k,0),max(b-max(k-a,0),0)) | 34 | 37 | 0.602941 |
92a36b9eb0f433186029fab6359b6a888ab9e2da | 6,660 | py | Python | models/baselines.py | saverymax/qdriven-chiqa-summarization | 257a00133869db47807b9dd10761a6dd3aa15306 | [
"MIT"
] | 10 | 2020-05-25T20:52:45.000Z | 2022-01-26T08:06:51.000Z | models/baselines.py | saverymax/qdriven-chiqa-summarization | 257a00133869db47807b9dd10761a6dd3aa15306 | [
"MIT"
] | null | null | null | models/baselines.py | saverymax/qdriven-chiqa-summarization | 257a00133869db47807b9dd10761a6dd3aa15306 | [
"MIT"
] | 5 | 2020-07-15T12:21:27.000Z | 2022-02-06T08:11:41.000Z | """
Script for baseline approaches:
1. Take 10 random sentences
2. Take the topk 10 sentences with highest rouge score relative to the question
3. Pick the first 10 sentences
To run
python baselines.py --dataset=chiqa
"""
import json
import numpy as np
import random
import requests
import argparse
import rouge
impor... | 33.807107 | 151 | 0.619369 |
92a38133bdfe889e2dab505ef498dfffa770b831 | 4,593 | py | Python | pycsvschema/validators/types.py | crowdskout/PycsvSchema | d5d44ace9bfe84e1001577caf4d933827143d124 | [
"MIT"
] | 11 | 2018-08-29T21:34:06.000Z | 2021-11-08T12:26:59.000Z | pycsvschema/validators/types.py | crowdskout/PycsvSchema | d5d44ace9bfe84e1001577caf4d933827143d124 | [
"MIT"
] | 2 | 2018-08-30T20:57:19.000Z | 2019-10-09T19:25:27.000Z | pycsvschema/validators/types.py | crowdskout/PycsvSchema | d5d44ace9bfe84e1001577caf4d933827143d124 | [
"MIT"
] | 1 | 2020-03-17T15:06:41.000Z | 2020-03-17T15:06:41.000Z | #!/usr/bin/python
# -*-coding: utf-8 -*-
# https://github.com/frictionlessdata/tableschema-py/tree/1d9750248de06a075029c1278404c5db5311fbc5/tableschema/types
# type and format
# Support types and formats:
# string
# email
# uri
# uuid
# ipv4
# ipv6
# hostname
# datetime
# number
# integer
# boolean
#
i... | 30.62 | 116 | 0.63096 |
92a47215c9aaf111948777614daf685c1e4ab775 | 3,454 | py | Python | Identifeye/src/adj_list.py | haasm3/Identifeye | e2fec37c472f2fc9a124741f431f7d38bdb10b43 | [
"MIT"
] | null | null | null | Identifeye/src/adj_list.py | haasm3/Identifeye | e2fec37c472f2fc9a124741f431f7d38bdb10b43 | [
"MIT"
] | null | null | null | Identifeye/src/adj_list.py | haasm3/Identifeye | e2fec37c472f2fc9a124741f431f7d38bdb10b43 | [
"MIT"
] | null | null | null | from difflib import SequenceMatcher
"""
A Python program to demonstrate the adjacency
list representation of the graph
"""
# weights arreay by value
weights = [1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7]
# A class to represent the adjacency list of the node
# A class to represent a graph... | 30.298246 | 126 | 0.532716 |
92a48b86c4e76dd5956f70160e597a930611bbec | 11,633 | py | Python | scripts/flowed_plaquette_plot.py | hmvege/GluonicLQCD | 9bb7466fce408bf51cb98d65f639acd37d034d62 | [
"MIT"
] | 1 | 2019-04-12T08:12:30.000Z | 2019-04-12T08:12:30.000Z | scripts/flowed_plaquette_plot.py | hmvege/GluonicLQCD | 9bb7466fce408bf51cb98d65f639acd37d034d62 | [
"MIT"
] | 2 | 2021-03-14T12:30:39.000Z | 2021-03-14T12:33:17.000Z | scripts/flowed_plaquette_plot.py | hmvege/GluonicLQCD | 9bb7466fce408bf51cb98d65f639acd37d034d62 | [
"MIT"
] | 1 | 2020-05-14T02:12:33.000Z | 2020-05-14T02:12:33.000Z | import matplotlib.pyplot as plt, numpy as np
plaq_morningstar_ubuntu = np.array("""
0 0.61401745
1 0.62927918
2 0.64409064
3 0.65844519
4 0.67233862
5 0.68576903
6 0.69873661
7 0.71124351
8 0.72329362
9 0.73489239
10 0.74604666
11 0.75676448
12 0.76705495
1... | 20.022375 | 81 | 0.63423 |
92a63e6d9950d24608b3bbb002e036b82919a7bf | 2,541 | py | Python | pyalgs/data_structures/commons/queue.py | vertexproject/pyalgs | 11b9ea37afc9e9f9e38ffacc42b53f9cd96f5f83 | [
"BSD-3-Clause"
] | 12 | 2017-05-01T10:31:42.000Z | 2021-06-23T14:03:28.000Z | pyalgs/data_structures/commons/queue.py | vertexproject/pyalgs | 11b9ea37afc9e9f9e38ffacc42b53f9cd96f5f83 | [
"BSD-3-Clause"
] | 2 | 2018-08-01T10:09:09.000Z | 2020-07-16T11:41:46.000Z | pyalgs/data_structures/commons/queue.py | vertexproject/pyalgs | 11b9ea37afc9e9f9e38ffacc42b53f9cd96f5f83 | [
"BSD-3-Clause"
] | 6 | 2017-06-04T01:41:14.000Z | 2021-01-19T05:05:44.000Z | from abc import abstractmethod, ABCMeta
| 19.546154 | 45 | 0.528926 |
92a704fccf87ceb7853e4a72b95d94d37432b6bb | 18 | py | Python | anchore_manager/version.py | Nordix/anchore-engine | f25baa5cbf9aa34d56e56b341a90f577d85e6146 | [
"Apache-2.0"
] | 110 | 2017-09-14T02:15:15.000Z | 2022-03-30T20:14:21.000Z | anchore_manager/version.py | Nordix/anchore-engine | f25baa5cbf9aa34d56e56b341a90f577d85e6146 | [
"Apache-2.0"
] | 115 | 2017-09-22T12:15:30.000Z | 2022-01-17T12:31:21.000Z | anchore_manager/version.py | Nordix/anchore-engine | f25baa5cbf9aa34d56e56b341a90f577d85e6146 | [
"Apache-2.0"
] | 56 | 2017-09-22T11:26:25.000Z | 2022-03-03T14:14:58.000Z | version = "0.9.4"
| 9 | 17 | 0.555556 |
92a76f0c28626e2a60cb856d6d530e23b266317a | 1,488 | py | Python | GaussianTrashSource.py | jkamalu/trashbots-RL | 22983749bc69ef958121101ce59702d3766b9145 | [
"Apache-2.0"
] | 1 | 2021-06-10T11:59:14.000Z | 2021-06-10T11:59:14.000Z | GaussianTrashSource.py | jkamalu/trashbots-RL | 22983749bc69ef958121101ce59702d3766b9145 | [
"Apache-2.0"
] | 1 | 2019-07-16T12:25:21.000Z | 2019-07-16T12:25:21.000Z | GaussianTrashSource.py | jkamalu/trashbots-RL | 22983749bc69ef958121101ce59702d3766b9145 | [
"Apache-2.0"
] | null | null | null | from numpy.random import multivariate_normal
| 29.176471 | 82 | 0.508737 |
92a781db2000e629d38e7865533c3898de0e92c8 | 1,218 | py | Python | twitter_user/__init__.py | hostinfodev/twitter-user | e85f1e884e156076e550b6ad80bfddf504d06e0f | [
"MIT"
] | null | null | null | twitter_user/__init__.py | hostinfodev/twitter-user | e85f1e884e156076e550b6ad80bfddf504d06e0f | [
"MIT"
] | null | null | null | twitter_user/__init__.py | hostinfodev/twitter-user | e85f1e884e156076e550b6ad80bfddf504d06e0f | [
"MIT"
] | null | null | null | from selenium.webdriver.firefox.options import Options
from webdriver_manager.firefox import GeckoDriverManager
from seleniumwire import webdriver
from .fetch import fetchUser as fetchUser_
| 31.230769 | 132 | 0.686371 |
92a9563621c7a5c44424f2a6b1c724f6506e207a | 923 | py | Python | file_operations.py | OrkunAvci/Content-Based-Image-Retrieval | 4a0a9589e9747fb8d6f14238cc2f18f17dbf5a9e | [
"MIT"
] | null | null | null | file_operations.py | OrkunAvci/Content-Based-Image-Retrieval | 4a0a9589e9747fb8d6f14238cc2f18f17dbf5a9e | [
"MIT"
] | null | null | null | file_operations.py | OrkunAvci/Content-Based-Image-Retrieval | 4a0a9589e9747fb8d6f14238cc2f18f17dbf5a9e | [
"MIT"
] | null | null | null | import cv2 as cv
from os import listdir
from os.path import isfile, join
import json
folders = [
# Img sets to use
"octopus",
"elephant",
"flamingo",
"kangaroo",
"leopards",
"sea_horse"
]
files = [f for f in listdir("./data/camera") if isfile(join("./data/camera", f))] # Get all file names
train_file_nam... | 27.147059 | 118 | 0.671723 |
92a9d8e5eb6b7dfd1c874a961a7ca59965c56a76 | 278 | py | Python | inner_rpc/inner_rpc/ir_exceptions.py | chenjiee815/inner_rpc | d6b4945dfb3ea7fda7a64cfe23d19f8539f988cf | [
"Apache-2.0"
] | 1 | 2015-09-17T01:22:28.000Z | 2015-09-17T01:22:28.000Z | inner_rpc/inner_rpc/ir_exceptions.py | chenjiee815/inner_rpc | d6b4945dfb3ea7fda7a64cfe23d19f8539f988cf | [
"Apache-2.0"
] | null | null | null | inner_rpc/inner_rpc/ir_exceptions.py | chenjiee815/inner_rpc | d6b4945dfb3ea7fda7a64cfe23d19f8539f988cf | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# encoding=utf-8
"""
inner_rpc.ir_exceptions
-----------------
"""
| 12.636364 | 33 | 0.643885 |
92abf94301c78871fdaeb06a8f1ddaf5bff99c2c | 268 | py | Python | floodsystem/analysis.py | AndrewKeYanzhe/part-ia-flood-warning-system | eb3a32d3722be7b45acf3924fd4d2431652d3053 | [
"MIT"
] | null | null | null | floodsystem/analysis.py | AndrewKeYanzhe/part-ia-flood-warning-system | eb3a32d3722be7b45acf3924fd4d2431652d3053 | [
"MIT"
] | null | null | null | floodsystem/analysis.py | AndrewKeYanzhe/part-ia-flood-warning-system | eb3a32d3722be7b45acf3924fd4d2431652d3053 | [
"MIT"
] | null | null | null | import matplotlib
import numpy as np | 22.333333 | 51 | 0.682836 |
92ac0dae3334701d84c09b1bf18e3dc09ab5b133 | 2,211 | py | Python | examples/example_backward_elimination.py | patricklai14/gmp_feature_selection | 5bfec610257fe80a5a5081e8aacdccf54119b771 | [
"MIT"
] | null | null | null | examples/example_backward_elimination.py | patricklai14/gmp_feature_selection | 5bfec610257fe80a5a5081e8aacdccf54119b771 | [
"MIT"
] | null | null | null | examples/example_backward_elimination.py | patricklai14/gmp_feature_selection | 5bfec610257fe80a5a5081e8aacdccf54119b771 | [
"MIT"
] | null | null | null | from ase import Atoms
from ase.calculators.emt import EMT
from ase.io.trajectory import Trajectory
from ase.io import read
import numpy as np
import pandas as pd
import argparse
import copy
import os
import pdb
import pickle
from model_eval import model_evaluation
from gmp_feature_selection import backward_eliminati... | 34.546875 | 109 | 0.642243 |
92acb45103ede7c9d91ff61af3f4f34d8a8e49c2 | 4,797 | py | Python | merlin/cfg.py | USGS-EROS/lcmap-merlin | 692568e7e8e0bbb236e6e801b90abde8be8a05ea | [
"Unlicense"
] | null | null | null | merlin/cfg.py | USGS-EROS/lcmap-merlin | 692568e7e8e0bbb236e6e801b90abde8be8a05ea | [
"Unlicense"
] | null | null | null | merlin/cfg.py | USGS-EROS/lcmap-merlin | 692568e7e8e0bbb236e6e801b90abde8be8a05ea | [
"Unlicense"
] | 3 | 2018-05-08T14:51:56.000Z | 2018-07-12T19:07:34.000Z | from cytoolz import assoc
from cytoolz import merge
from functools import partial
from merlin import chipmunk
from merlin import chips
from merlin import dates
from merlin import formats
from merlin import specs
import os
ubids = {'chipmunk-ard': {'reds': ['LC08_SRB4', 'LE07_SRB3', 'LT05_SRB3', 'LT04_SRB... | 47.49505 | 104 | 0.488013 |
92acbaaddd86f818bb28122d75c4dba5ebed8fa5 | 366 | py | Python | tests/test_core.py | blacktanktop/vivid | e85837bcd86575f8a275517250dd026aac3e451f | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | tests/test_core.py | blacktanktop/vivid | e85837bcd86575f8a275517250dd026aac3e451f | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | tests/test_core.py | blacktanktop/vivid | e85837bcd86575f8a275517250dd026aac3e451f | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | from vivid.core import BaseBlock, network_hash
| 24.4 | 46 | 0.642077 |
92adae391b5af1e46c2cbd108fadd2ff78e87772 | 384 | py | Python | app/app/services/forms.py | dtcooper/crazyarms | 71ea0e58958233daaceb8750043f74ef1a141079 | [
"MIT"
] | 15 | 2021-01-18T17:16:51.000Z | 2022-03-28T22:16:19.000Z | app/app/services/forms.py | dtcooper/carb | 71ea0e58958233daaceb8750043f74ef1a141079 | [
"MIT"
] | 4 | 2021-03-14T16:28:40.000Z | 2021-03-31T16:48:49.000Z | app/app/services/forms.py | dtcooper/carb | 71ea0e58958233daaceb8750043f74ef1a141079 | [
"MIT"
] | 3 | 2021-07-15T02:24:19.000Z | 2022-03-18T11:50:05.000Z | from django import forms
from .services import HarborService
| 34.909091 | 108 | 0.726563 |
92adb85a4eb3efaf7dd6076d356a071ec17c7036 | 26,816 | py | Python | deepmars/models/train_model_sys.py | utplanets/deepmars | ba306aa9b25b654636b61cf952af2791b7ed0e56 | [
"MIT"
] | 2 | 2021-08-08T03:06:58.000Z | 2021-11-25T04:06:00.000Z | deepmars/models/train_model_sys.py | utplanets/deepmars | ba306aa9b25b654636b61cf952af2791b7ed0e56 | [
"MIT"
] | null | null | null | deepmars/models/train_model_sys.py | utplanets/deepmars | ba306aa9b25b654636b61cf952af2791b7ed0e56 | [
"MIT"
] | 2 | 2020-11-23T09:38:26.000Z | 2021-02-26T01:14:28.000Z | #!/usr/bin/env python
"""Convolutional Neural Network Training Functions
Functions for building and training a (UNET) Convolutional Neural Network on
images of the Mars and binary ring targets.
"""
from __future__ import absolute_import, division, print_function
import numpy as np
import pandas as pd
import h5py
fro... | 36.237838 | 79 | 0.545085 |
92adf2c4c13c901877b09563e05bc3de942a3158 | 4,608 | py | Python | chainer_bcnn/functions/loss/noised_cross_entropy.py | yuta-hi/bayesian_unet | cce1dbd75fad9cc29b77eb1c76b33c6a3eb0ffa6 | [
"MIT"
] | 36 | 2019-12-04T02:09:25.000Z | 2022-03-31T07:18:40.000Z | chainer_bcnn/functions/loss/noised_cross_entropy.py | keisuke-uemura/bayesian_unet | cce1dbd75fad9cc29b77eb1c76b33c6a3eb0ffa6 | [
"MIT"
] | 2 | 2019-12-03T06:35:07.000Z | 2020-06-14T23:14:13.000Z | chainer_bcnn/functions/loss/noised_cross_entropy.py | keisuke-uemura/bayesian_unet | cce1dbd75fad9cc29b77eb1c76b33c6a3eb0ffa6 | [
"MIT"
] | 8 | 2020-12-07T03:43:22.000Z | 2022-02-02T03:39:40.000Z | from __future__ import absolute_import
from chainer import backend
from chainer import functions as F
from chainer.functions import sigmoid_cross_entropy
from chainer.functions import softmax_cross_entropy
from .sigmoid_soft_cross_entropy import sigmoid_soft_cross_entropy
def noised_softmax_cross_entropy(y, t, mc_it... | 30.516556 | 95 | 0.591146 |
92ae5b5d2fee593a7d7b0979f8e6f0afa7ccd217 | 160 | py | Python | malib/value_functions/__init__.py | wwxFromTju/malib | 7cd2a4af55cf1f56da8854e26ea7a4f3782ceea2 | [
"MIT"
] | 6 | 2021-05-19T10:25:36.000Z | 2021-12-27T03:30:33.000Z | malib/value_functions/__init__.py | wwxFromTju/malib | 7cd2a4af55cf1f56da8854e26ea7a4f3782ceea2 | [
"MIT"
] | 1 | 2021-05-29T04:51:37.000Z | 2021-05-30T06:18:10.000Z | malib/value_functions/__init__.py | ying-wen/malib_deprecated | 875338b81c4d87064ad31201f461ef742db05f25 | [
"MIT"
] | 1 | 2021-05-31T16:16:12.000Z | 2021-05-31T16:16:12.000Z | from malib.value_functions.value_function import (
MLPValueFunction,
CommNetValueFunction,
BiCNetValueFunction,
)
# __all__ = ["MLPValueFunction"]
| 20 | 50 | 0.7625 |
92af515669514482415e4aa95b757d705f7e871b | 3,010 | py | Python | save_scummer/utils.py | JWCook/save-scummer | 5822e84fa1d87d2d3db95d69a013234d213b4322 | [
"MIT"
] | 2 | 2021-02-19T18:50:14.000Z | 2021-08-30T20:42:46.000Z | save_scummer/utils.py | JWCook/save-scummer | 5822e84fa1d87d2d3db95d69a013234d213b4322 | [
"MIT"
] | null | null | null | save_scummer/utils.py | JWCook/save-scummer | 5822e84fa1d87d2d3db95d69a013234d213b4322 | [
"MIT"
] | null | null | null | """Generic utility functions that don't depend on other modules"""
from datetime import datetime, timedelta
from dateutil.parser import parse as parse_date
from os.path import getmtime
from pathlib import Path
from typing import Dict, Iterable, Union
from pytimeparse import parse as parse_time
StrOrPath = Union[Path,... | 33.820225 | 96 | 0.662791 |
92afbe514a83c1f439be100159e8dac9eed5d374 | 752 | py | Python | bip_utils/bip/__init__.py | djmuratb/bip_utils | 18de9a7067ca2cc3bc4727dc9e39e75db0456e1b | [
"MIT"
] | 1 | 2021-06-13T11:45:23.000Z | 2021-06-13T11:45:23.000Z | bip_utils/bip/__init__.py | djmuratb/bip_utils | 18de9a7067ca2cc3bc4727dc9e39e75db0456e1b | [
"MIT"
] | null | null | null | bip_utils/bip/__init__.py | djmuratb/bip_utils | 18de9a7067ca2cc3bc4727dc9e39e75db0456e1b | [
"MIT"
] | null | null | null | # BIP39
from bip_utils.bip.bip39_ex import Bip39InvalidFileError, Bip39ChecksumError
from bip_utils.bip.bip39 import (
Bip39WordsNum, Bip39EntropyBitLen,
Bip39EntropyGenerator, Bip39MnemonicGenerator, Bip39MnemonicValidator, Bip39SeedGenerator
)
# BIP32
from bip_utils.bip.bip32_ex import Bip32KeyError, Bip32Pat... | 41.777778 | 93 | 0.855053 |
92b79331943ca8f2fc79c0b6c0f927016d96552f | 34,251 | py | Python | simulation_supervised/python/run_script.py | kkelchte/simulation_supervised | 8b55e2984cb4911b3b840090eb8b9d296252c4bd | [
"Apache-2.0"
] | 2 | 2019-02-20T14:25:23.000Z | 2021-06-14T21:58:59.000Z | simulation_supervised/python/run_script.py | kkelchte/simulation_supervised | 8b55e2984cb4911b3b840090eb8b9d296252c4bd | [
"Apache-2.0"
] | null | null | null | simulation_supervised/python/run_script.py | kkelchte/simulation_supervised | 8b55e2984cb4911b3b840090eb8b9d296252c4bd | [
"Apache-2.0"
] | 1 | 2019-02-20T14:25:27.000Z | 2019-02-20T14:25:27.000Z | #!/usr/bin/python
"""
Run_long_script governs the running of long gazebo_ros_tensorflow simulations.
The core functionality lies in:
1. parsing the correct arguments at different levels (tensorflow dnn, gazebo environment, ros supervision)
2. different crash handling when for instance starting gazebo / tensorfl... | 49.63913 | 230 | 0.686754 |
92b84f5fd97fe6052eddaf4fb13a8cbc0248d07a | 270 | py | Python | sample/rubrik_polaris/get_storage_object_ids_ebs.py | talmo77/rubrik-polaris-sdk-for-python | 505ce03b7995e7b86206c728be594d56d4431050 | [
"MIT"
] | 2 | 2021-07-14T12:54:53.000Z | 2022-03-03T21:55:28.000Z | sample/rubrik_polaris/get_storage_object_ids_ebs.py | talmo77/rubrik-polaris-sdk-for-python | 505ce03b7995e7b86206c728be594d56d4431050 | [
"MIT"
] | 8 | 2021-03-09T13:02:15.000Z | 2022-02-24T08:46:50.000Z | sample/rubrik_polaris/get_storage_object_ids_ebs.py | talmo77/rubrik-polaris-sdk-for-python | 505ce03b7995e7b86206c728be594d56d4431050 | [
"MIT"
] | 4 | 2021-04-16T15:49:36.000Z | 2021-11-09T17:58:21.000Z | from rubrik_polaris import PolarisClient
domain = 'my-company'
username = 'john.doe@example.com'
password = 's3cr3tP_a55w0R)'
client = PolarisClient(domain, username, password, insecure=True)
print(client.get_storage_object_ids_ebs(tags = {"Class": "Management"}))
| 22.5 | 72 | 0.77037 |
92b86ef8042175ced0f5be6c5fb6656b4c301369 | 452 | py | Python | lizardanalysis.py | JojoReikun/ClimbingLizardDLCAnalysis | 6cc38090217a3ffd4860ef6d06ba7967d3c10b7c | [
"MIT"
] | 1 | 2021-03-09T19:12:44.000Z | 2021-03-09T19:12:44.000Z | lizardanalysis.py | JojoReikun/ClimbingLizardDLCAnalysis | 6cc38090217a3ffd4860ef6d06ba7967d3c10b7c | [
"MIT"
] | null | null | null | lizardanalysis.py | JojoReikun/ClimbingLizardDLCAnalysis | 6cc38090217a3ffd4860ef6d06ba7967d3c10b7c | [
"MIT"
] | null | null | null | """
LizardDLCAnalysis Toolbox
Johanna T. Schultz
Fabian Plum
Licensed under MIT License
----------------------------------------------------------
for testing and debugging in pycharm:
---> Tools
---> Python Console
---> (with ipython installed):
IN[1]: import lizardanalysis
---> run commands:
IN[2]: lizardanalysis.... | 17.384615 | 58 | 0.60177 |
92b8e094c1356c59ec88aeb2c5c608bf6256f530 | 5,221 | py | Python | run/set_model.py | Debatrix/Qtrain | 60b6ff9be1247c4f1c7f6154c4fc58915af301a4 | [
"Apache-2.0"
] | null | null | null | run/set_model.py | Debatrix/Qtrain | 60b6ff9be1247c4f1c7f6154c4fc58915af301a4 | [
"Apache-2.0"
] | null | null | null | run/set_model.py | Debatrix/Qtrain | 60b6ff9be1247c4f1c7f6154c4fc58915af301a4 | [
"Apache-2.0"
] | null | null | null | import torch
from torch.utils.data import DataLoader
from src import qmodel, rmodel
from src.loss import IQALoss, PredictLoss
from src.framework import IQAnModel, RecognitionModel, TripRecognitionModel
from src.dataset import get_eye_dataset, EyePairDataset, FaceDataset
| 39.255639 | 78 | 0.542808 |
92b908d1f507caf2b00b09a9d6cc2b497334bead | 3,535 | py | Python | logic/auth.py | enisimsar/watchtower-news | 222d2e52e76ef32ebb78eb325f4c32b64c0ba1a6 | [
"MIT"
] | 2 | 2019-02-21T18:29:09.000Z | 2021-01-27T14:52:46.000Z | logic/auth.py | enisimsar/watchtower-news | 222d2e52e76ef32ebb78eb325f4c32b64c0ba1a6 | [
"MIT"
] | 3 | 2018-11-22T08:34:04.000Z | 2021-06-01T22:47:19.000Z | logic/auth.py | enisimsar/watchtower-news | 222d2e52e76ef32ebb78eb325f4c32b64c0ba1a6 | [
"MIT"
] | 1 | 2019-06-13T10:45:46.000Z | 2019-06-13T10:45:46.000Z | import hashlib
import logging
import random
import string
import uuid
from mongoengine import DoesNotExist, NotUniqueError
from models.Invitation import Invitation
from models.User import User
__author__ = 'Enis Simsar'
# from http://www.pythoncentral.io/hashing-strings-with-python/
# from http://www.pythoncentr... | 28.97541 | 101 | 0.647808 |
92b9c455c74384b0f2054ab3fdb9826c43fde780 | 3,171 | py | Python | scripts/compare_spider.py | bayanistnahtc/seq2struct | 1b5597a4b91a405f19404a5c1df6c8671b9da119 | [
"MIT"
] | 25 | 2019-07-16T22:32:44.000Z | 2022-01-25T05:23:07.000Z | scripts/compare_spider.py | bayanistnahtc/seq2struct | 1b5597a4b91a405f19404a5c1df6c8671b9da119 | [
"MIT"
] | 19 | 2018-12-17T20:42:11.000Z | 2020-02-12T21:29:51.000Z | scripts/compare_spider.py | bayanistnahtc/seq2struct | 1b5597a4b91a405f19404a5c1df6c8671b9da119 | [
"MIT"
] | 22 | 2019-03-16T05:57:27.000Z | 2020-10-25T04:34:54.000Z | # Merge outputs of infer.py and other models for comparison.
# Outputs to a CSV file.
import argparse
import csv
import json
import os
from third_party.spider import evaluation
if __name__ == '__main__':
main()
| 31.39604 | 90 | 0.578997 |
92b9ef953f90ad50edd4071667fa6e30e30d0ede | 854 | py | Python | src/server.py | atomicfruitcake/colonel | 1f34ae91991146b3efddbbaba10b99d5aa20640a | [
"MIT"
] | null | null | null | src/server.py | atomicfruitcake/colonel | 1f34ae91991146b3efddbbaba10b99d5aa20640a | [
"MIT"
] | null | null | null | src/server.py | atomicfruitcake/colonel | 1f34ae91991146b3efddbbaba10b99d5aa20640a | [
"MIT"
] | null | null | null | import kore
# Handler called for /httpclient
| 29.448276 | 77 | 0.626464 |
2b7ba4ab1cf3dd66d4fbb9e770b9f307a58c473f | 8,055 | py | Python | UCP/discussion/functions.py | BuildmLearn/University-Campus-Portal-UCP | 3cac50bd58f2ef4365522a76a8378d0a6f599832 | [
"BSD-3-Clause"
] | 13 | 2016-04-24T10:44:28.000Z | 2020-09-07T01:23:18.000Z | UCP/discussion/functions.py | BuildmLearn/University-Campus-Portal-UCP | 3cac50bd58f2ef4365522a76a8378d0a6f599832 | [
"BSD-3-Clause"
] | 16 | 2016-09-05T10:35:41.000Z | 2018-08-25T10:27:13.000Z | UCP/discussion/functions.py | BuildmLearn/University-Campus-Portal-UCP | 3cac50bd58f2ef4365522a76a8378d0a6f599832 | [
"BSD-3-Clause"
] | 24 | 2016-06-25T08:20:12.000Z | 2018-01-11T20:46:24.000Z | """
Functions file for discussion app
consists of common functions used by both api.py and views.py file
"""
from django.contrib.auth.models import User
from django.contrib.auth import authenticate, login
from django.core.mail import send_mail
from django.shortcuts import render
from django.template import Context
fro... | 31.342412 | 145 | 0.644693 |
2b7bc8e032cf86f470d11cf32fc4958ecf2316e4 | 22,525 | py | Python | Tama/Plugins/tama_drawer/tamaframe.py | just-drive/Tama | 7102c2855d1625a8ecef3d7d7d17680a4a0820f4 | [
"BSD-3-Clause"
] | 2 | 2021-02-08T20:55:56.000Z | 2021-03-04T02:26:17.000Z | Tama/Plugins/tama_drawer/tamaframe.py | just-drive/Tama | 7102c2855d1625a8ecef3d7d7d17680a4a0820f4 | [
"BSD-3-Clause"
] | 4 | 2021-02-02T05:34:12.000Z | 2021-10-21T06:02:26.000Z | Tama/Plugins/tama_drawer/tamaframe.py | just-drive/Tama | 7102c2855d1625a8ecef3d7d7d17680a4a0820f4 | [
"BSD-3-Clause"
] | null | null | null | from win32ctypes.pywin32 import win32api
import win32.lib.win32con as win32con
import win32.win32gui as win32gui
from wx.lib.delayedresult import startWorker
import PIL
import wx
import wx.aui as aui
import wx.adv as adv
import wx.lib.newevent
import os
import threading
import datetime
import random
import mouse
from s... | 42.024254 | 239 | 0.610699 |
2b7ebd9c78bff500ac5913c95ab0dfa1a49349f8 | 1,940 | py | Python | examples/08_compute_shader.py | dougbrion/ModernGL | 6de8938ccd0042c1389a32b697af5f9c9d279e41 | [
"MIT"
] | null | null | null | examples/08_compute_shader.py | dougbrion/ModernGL | 6de8938ccd0042c1389a32b697af5f9c9d279e41 | [
"MIT"
] | null | null | null | examples/08_compute_shader.py | dougbrion/ModernGL | 6de8938ccd0042c1389a32b697af5f9c9d279e41 | [
"MIT"
] | 1 | 2020-07-10T23:26:36.000Z | 2020-07-10T23:26:36.000Z |
'''
example of using compute shader.
requirements:
- numpy
- imageio (for output)
'''
import os
import moderngl
import numpy as np
import imageio # for output
def source(uri, consts):
''' read gl code '''
with open(uri, 'r') as fp:
content = fp.read()
# feed constant values... | 24.25 | 77 | 0.659794 |
2b809f699739184b5a2cfa529c9aff5901c0adf0 | 2,816 | py | Python | src/third_party/pcap2har/main.py | ashumeow/pcaphar | 68d20b74bb16fa1b4183ebe04753ffcecf9daedf | [
"Apache-2.0"
] | null | null | null | src/third_party/pcap2har/main.py | ashumeow/pcaphar | 68d20b74bb16fa1b4183ebe04753ffcecf9daedf | [
"Apache-2.0"
] | null | null | null | src/third_party/pcap2har/main.py | ashumeow/pcaphar | 68d20b74bb16fa1b4183ebe04753ffcecf9daedf | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 Google Inc. 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 a... | 25.834862 | 78 | 0.667259 |
2b832fc4edfc9eb726a140832521968248c37fd7 | 1,223 | py | Python | chapter_2/name_cases.py | superbe/PythonCrashCourse | c8781f68b0e9e68e54d48cce5224ecb6a5625ae2 | [
"MIT"
] | null | null | null | chapter_2/name_cases.py | superbe/PythonCrashCourse | c8781f68b0e9e68e54d48cce5224ecb6a5625ae2 | [
"MIT"
] | null | null | null | chapter_2/name_cases.py | superbe/PythonCrashCourse | c8781f68b0e9e68e54d48cce5224ecb6a5625ae2 | [
"MIT"
] | null | null | null | name = 'eric Pearson'
# 3.
message = f'Hello {name}, would you like to learn some Python today?'
print(message)
# 4.
message = f'Hello {name.lower()}, would you like to learn some Python today?'
print(message)
message = f'Hello {name.upper()}, would you like to learn some Python today?'
print(message)
message = f'H... | 38.21875 | 109 | 0.732625 |
2b841955f5296b5807aadaca8de6d7eb61f48da2 | 1,891 | py | Python | ccdproc/tests/test_ccdproc_logging.py | cdeil/ccdproc | 1bcfb0142669243325bfce05b4f2fc45ea013f02 | [
"BSD-3-Clause"
] | null | null | null | ccdproc/tests/test_ccdproc_logging.py | cdeil/ccdproc | 1bcfb0142669243325bfce05b4f2fc45ea013f02 | [
"BSD-3-Clause"
] | null | null | null | ccdproc/tests/test_ccdproc_logging.py | cdeil/ccdproc | 1bcfb0142669243325bfce05b4f2fc45ea013f02 | [
"BSD-3-Clause"
] | null | null | null | from astropy.extern import six
from astropy.tests.helper import pytest
import astropy.units as u
from ..ccdproc import create_variance, Keyword
| 33.175439 | 73 | 0.64146 |
2b85a8cfcce972531e03d79d1f89a1b7627c598a | 3,102 | py | Python | harvester/sharekit/tests/factories.py | surfedushare/search-portal | 708a0d05eee13c696ca9abd7e84ab620d3900fbe | [
"MIT"
] | 2 | 2021-08-19T09:40:59.000Z | 2021-12-14T11:08:20.000Z | harvester/sharekit/tests/factories.py | surfedushare/search-portal | 708a0d05eee13c696ca9abd7e84ab620d3900fbe | [
"MIT"
] | 159 | 2020-05-14T14:17:34.000Z | 2022-03-23T10:28:13.000Z | harvester/sharekit/tests/factories.py | nppo/search-portal | aedf21e334f178c049f9d6cf37cafd6efc07bc0d | [
"MIT"
] | 1 | 2021-11-11T13:37:22.000Z | 2021-11-11T13:37:22.000Z | import os
import factory
from datetime import datetime
from urllib.parse import quote
from django.conf import settings
from django.utils.timezone import make_aware
from sharekit.models import SharekitMetadataHarvest
| 36.069767 | 112 | 0.645068 |
2b85b84ca70ad679c297d70925380a546779f12d | 588 | py | Python | kunai/torch_utils/seed.py | mjun0812/kunai | 6a457c7242ed98dadb29f7002a3c0385ae6c1701 | [
"MIT"
] | null | null | null | kunai/torch_utils/seed.py | mjun0812/kunai | 6a457c7242ed98dadb29f7002a3c0385ae6c1701 | [
"MIT"
] | null | null | null | kunai/torch_utils/seed.py | mjun0812/kunai | 6a457c7242ed98dadb29f7002a3c0385ae6c1701 | [
"MIT"
] | null | null | null | import random
import numpy as np
import torch
def worker_init_fn(worker_id):
"""Reset numpy random seed in PyTorch Dataloader
Args:
worker_id (int): random seed value
"""
np.random.seed(np.random.get_state()[1][0] + worker_id)
def fix_seed(seed):
"""fix seed on random, numpy, torch mo... | 17.294118 | 59 | 0.634354 |
2b8606d666e17ddbca292ed6f0207c8119aff103 | 5,393 | py | Python | paper/plots.py | vishakad/animate | 0da18be596bf7e462d47bef86aff4c71fc9cffbb | [
"MIT"
] | 5 | 2019-01-23T18:03:51.000Z | 2019-11-22T23:06:04.000Z | paper/plots.py | vishakad/animate | 0da18be596bf7e462d47bef86aff4c71fc9cffbb | [
"MIT"
] | 5 | 2019-03-27T21:47:04.000Z | 2019-08-07T00:22:34.000Z | paper/plots.py | vishakad/animate | 0da18be596bf7e462d47bef86aff4c71fc9cffbb | [
"MIT"
] | 4 | 2019-02-14T23:18:24.000Z | 2019-05-08T04:08:32.000Z | import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib import rcParams
from matplotlib import cm
from matplotlib import gridspec
from matplotlib import colors as mplcolors
import CBcm
import numpy as np
import util
rcParams['svg.fonttype'] = 'none'
| 34.350318 | 198 | 0.595031 |
2b8700d29d570214a09d942f5f9f7ee6ff8ff4f6 | 4,195 | py | Python | tests/world/test_world.py | Finistere/antidote | 97751e0e6a1b8bd638a1c33212345c7a84ad97b8 | [
"MIT"
] | 52 | 2017-12-17T19:52:37.000Z | 2022-03-29T10:24:04.000Z | tests/world/test_world.py | Finistere/antidote | 97751e0e6a1b8bd638a1c33212345c7a84ad97b8 | [
"MIT"
] | 32 | 2018-11-02T08:49:16.000Z | 2022-03-25T22:23:30.000Z | tests/world/test_world.py | Finistere/antidote | 97751e0e6a1b8bd638a1c33212345c7a84ad97b8 | [
"MIT"
] | 5 | 2019-05-17T18:26:14.000Z | 2021-12-25T23:13:31.000Z | from typing import Callable
import pytest
from antidote import From, FromArg, Get, Service, factory, world
from antidote._compatibility.typing import Annotated
from antidote._internal.world import LazyDependency
from antidote._providers import FactoryProvider, ServiceProvider
from antidote.exceptions import Dependenc... | 23.971429 | 73 | 0.647676 |
2b871dae8f560cf13fae7b1febeb4db0dbbc9651 | 2,355 | py | Python | MessageBoard.py | dntoll/pycom-lora-mesh-with-ap | 445ea5871b96f46e887514cdbe79940ca76d0023 | [
"MIT"
] | 1 | 2020-05-28T16:50:13.000Z | 2020-05-28T16:50:13.000Z | MessageBoard.py | dntoll/pycom-lora-mesh-with-ap | 445ea5871b96f46e887514cdbe79940ca76d0023 | [
"MIT"
] | null | null | null | MessageBoard.py | dntoll/pycom-lora-mesh-with-ap | 445ea5871b96f46e887514cdbe79940ca76d0023 | [
"MIT"
] | 1 | 2021-03-07T06:30:45.000Z | 2021-03-07T06:30:45.000Z | #!/usr/bin/env python
#
# Copyright (c) 2019, Pycom Limited.
#
# This software is licensed under the GNU GPL version 3 or any
# later version, with permitted additional terms. For more information
# see the Pycom Licence v1.0 document supplied with this file, or
# available at https://www.pycom.io/opensource/licensing
... | 30.584416 | 101 | 0.609766 |
2b8826183338e351fe4dbe3ffb007fda739ce1c8 | 467 | py | Python | datastrucutre/array/find_given_sum_in_array.py | abhishektyagi2912/python-dsa | 8f51f15a091ee76e00fb34abc232c23cb68440cb | [
"MIT"
] | 1 | 2021-05-02T05:43:34.000Z | 2021-05-02T05:43:34.000Z | datastrucutre/array/find_given_sum_in_array.py | abhishektyagi2912/python-dsa | 8f51f15a091ee76e00fb34abc232c23cb68440cb | [
"MIT"
] | null | null | null | datastrucutre/array/find_given_sum_in_array.py | abhishektyagi2912/python-dsa | 8f51f15a091ee76e00fb34abc232c23cb68440cb | [
"MIT"
] | null | null | null |
arr = [15, 2, 4, 8, 9, 5, 10, 23]
print(find_sum(arr, 6))
| 18.68 | 65 | 0.466809 |
2b88c5258ed3a32b0f868be74797639d674d4da1 | 256 | py | Python | Part_3_advanced/m08_abstract_protocol/abstract_class/homework_1_start/new_movies/rental_directory.py | Mikma03/InfoShareacademy_Python_Courses | 3df1008c8c92831bebf1625f960f25b39d6987e6 | [
"MIT"
] | null | null | null | Part_3_advanced/m08_abstract_protocol/abstract_class/homework_1_start/new_movies/rental_directory.py | Mikma03/InfoShareacademy_Python_Courses | 3df1008c8c92831bebf1625f960f25b39d6987e6 | [
"MIT"
] | null | null | null | Part_3_advanced/m08_abstract_protocol/abstract_class/homework_1_start/new_movies/rental_directory.py | Mikma03/InfoShareacademy_Python_Courses | 3df1008c8c92831bebf1625f960f25b39d6987e6 | [
"MIT"
] | null | null | null | from new_movies.random_data_utility import random_generator
available_movies = random_generator.generate_random_movies(movies_number=15)
available_games = random_generator.generate_random_games()
| 28.444444 | 76 | 0.859375 |
2b8975fc52de46e8e473c2014db381061743a8e1 | 598 | py | Python | mall/apps/goods/views.py | codedaliu/meiduo | 909d75eb55e52f9dae8879c5ad1d48ffb52fa498 | [
"MIT"
] | null | null | null | mall/apps/goods/views.py | codedaliu/meiduo | 909d75eb55e52f9dae8879c5ad1d48ffb52fa498 | [
"MIT"
] | null | null | null | mall/apps/goods/views.py | codedaliu/meiduo | 909d75eb55e52f9dae8879c5ad1d48ffb52fa498 | [
"MIT"
] | null | null | null | from django.shortcuts import render
# Create your views here.
from rest_framework.views import APIView
from contents.serializers import HotSKUListSerializer
from goods.models import SKU
'''
'''
from rest_framework.generics import ListAPIView | 19.290323 | 81 | 0.779264 |
2b8a843980224263fdf89972e3e7e0691943f2f7 | 216 | py | Python | tests/test_winterspringbl.py | lamter/slavewg | c3a4098b6c2cbfd232f8ed2290141b7f61d7db6f | [
"Apache-2.0"
] | 3 | 2020-08-13T15:04:33.000Z | 2021-03-12T16:12:39.000Z | tests/test_winterspringbl.py | lamter/slavewg | c3a4098b6c2cbfd232f8ed2290141b7f61d7db6f | [
"Apache-2.0"
] | null | null | null | tests/test_winterspringbl.py | lamter/slavewg | c3a4098b6c2cbfd232f8ed2290141b7f61d7db6f | [
"Apache-2.0"
] | null | null | null | import slavewg
from threading import Event
from queue import Queue
| 15.428571 | 41 | 0.680556 |
2b8bd9a6050ec09b335cae1c2fa6fb5dd7da1961 | 16,475 | py | Python | src/sdk/python/TeraSdk.py | yvxiang/tera | 55fd460efb33a96b5f72527469843189c04b5410 | [
"BSD-3-Clause"
] | null | null | null | src/sdk/python/TeraSdk.py | yvxiang/tera | 55fd460efb33a96b5f72527469843189c04b5410 | [
"BSD-3-Clause"
] | null | null | null | src/sdk/python/TeraSdk.py | yvxiang/tera | 55fd460efb33a96b5f72527469843189c04b5410 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tera Python SDK. It needs a libtera_c.so
TODO(taocipian) __init__.py
"""
from ctypes import CFUNCTYPE, POINTER
from ctypes import byref, cdll, string_at
from ctypes import c_bool, c_char_p, c_void_p
from ctypes import c_int32, c_int64, c_ubyte, c_uint64
MUTATION_CALLBACK = CFUNCTYPE(... | 31.990291 | 79 | 0.588407 |
2b8cd12ab30cf14546818a1c84e84c64173a25c5 | 2,218 | py | Python | thesis_scripts/train_probs_plot.py | jizongFox/kaggle-seizure-prediction | 9439d1c8ca9b4282fcd630a20d0d7946b790e218 | [
"MIT"
] | 55 | 2015-03-17T16:54:49.000Z | 2022-03-10T13:49:08.000Z | thesis_scripts/train_probs_plot.py | jizongFox/kaggle-seizure-prediction | 9439d1c8ca9b4282fcd630a20d0d7946b790e218 | [
"MIT"
] | 2 | 2018-05-12T20:29:52.000Z | 2021-08-10T11:27:05.000Z | thesis_scripts/train_probs_plot.py | jizongFox/kaggle-seizure-prediction | 9439d1c8ca9b4282fcd630a20d0d7946b790e218 | [
"MIT"
] | 18 | 2015-03-20T03:03:17.000Z | 2022-03-10T13:49:20.000Z | import numpy as np
import json
import cPickle
import matplotlib.pyplot as plt
from theano import config
import matplotlib.cm as cmx
import matplotlib.colors as colors
from sklearn.metrics import roc_curve
from utils.loader import load_train_data
from utils.config_name_creator import *
from utils.data_scaler import sc... | 32.617647 | 104 | 0.681695 |
2b8d3ea059089d5ddd2f32278051ab1cf1181bdf | 2,464 | py | Python | tms_ts/tms_ts_smach/scripts/20141120_193027.py | SigmaHayashi/ros_tms_for_smart_previewed_reality | 4ace908bd3da0519246b3c45d0230cbd02e49da0 | [
"BSD-3-Clause"
] | null | null | null | tms_ts/tms_ts_smach/scripts/20141120_193027.py | SigmaHayashi/ros_tms_for_smart_previewed_reality | 4ace908bd3da0519246b3c45d0230cbd02e49da0 | [
"BSD-3-Clause"
] | null | null | null | tms_ts/tms_ts_smach/scripts/20141120_193027.py | SigmaHayashi/ros_tms_for_smart_previewed_reality | 4ace908bd3da0519246b3c45d0230cbd02e49da0 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import roslib; roslib.load_manifest('tms_ts_smach')
import rospy
import smach
import smach_ros
from smach_ros import ServiceState
from smach import Concurrence
from tms_msg_rp.srv import *
from tms_msg_ts.srv import *
if __name__ == '__main__':
main()
| 36.235294 | 110 | 0.505276 |
2b8d46e20478051b98cf25878001dd95e0c89cd8 | 47,862 | py | Python | google/cloud/bigtable_admin_v2/proto/bigtable_table_admin_pb2_grpc.py | ryanyuan/python-bigtable | e55ca07561f9c946276f3bde599e69947769f560 | [
"Apache-2.0"
] | null | null | null | google/cloud/bigtable_admin_v2/proto/bigtable_table_admin_pb2_grpc.py | ryanyuan/python-bigtable | e55ca07561f9c946276f3bde599e69947769f560 | [
"Apache-2.0"
] | null | null | null | google/cloud/bigtable_admin_v2/proto/bigtable_table_admin_pb2_grpc.py | ryanyuan/python-bigtable | e55ca07561f9c946276f3bde599e69947769f560 | [
"Apache-2.0"
] | null | null | null | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from google.cloud.bigtable_admin_v2.proto import (
bigtable_table_admin_pb2 as google_dot_cloud_dot_bigtable__admin__v2_dot_proto_dot_bigtable__table__admin_... | 43.869844 | 166 | 0.704672 |
2b8eb6f4aea8446268376f43354cab9bc858fe41 | 9,313 | py | Python | jaeun.py | catubc/ensembles | cf4bd380a6ac300e477d555a6b708363100f974b | [
"MIT"
] | null | null | null | jaeun.py | catubc/ensembles | cf4bd380a6ac300e477d555a6b708363100f974b | [
"MIT"
] | null | null | null | jaeun.py | catubc/ensembles | cf4bd380a6ac300e477d555a6b708363100f974b | [
"MIT"
] | null | null | null | # Kang Miller et al 2014 method for computing ensembles
#
#
#
import numpy as np
import matplotlib.pyplot as plt
import os
import scipy.stats
#Load ROI countour data first
roi_filename = '/media/cat/250GB/in_vivo/alejandro/G2M4/joint/all_registered_processed_ROIs.npz'
data_in = np.load(roi_filename, encoding= ... | 36.521569 | 131 | 0.600021 |
2b8f14ec9702e12886e533477032b0cf4a2e6d8f | 1,918 | py | Python | tests/test_analysis_status_response.py | s0b0lev/mythx-models | 0fc14fef9e41a68a7d97e0bb170fd0eca5693d9a | [
"MIT"
] | null | null | null | tests/test_analysis_status_response.py | s0b0lev/mythx-models | 0fc14fef9e41a68a7d97e0bb170fd0eca5693d9a | [
"MIT"
] | null | null | null | tests/test_analysis_status_response.py | s0b0lev/mythx-models | 0fc14fef9e41a68a7d97e0bb170fd0eca5693d9a | [
"MIT"
] | null | null | null | import json
import pytest
from mythx_models.exceptions import ValidationError
from mythx_models.response import Analysis, AnalysisStatusResponse
from mythx_models.util import serialize_api_timestamp
from . import common as testdata
| 34.872727 | 84 | 0.792492 |
2b8f31f3a6c54f4ea76713cf603b83eb2e6cd549 | 5,945 | py | Python | pytorch_wide_n_deep/usingpytorch.py | whatbeg/Data-Analysis | b1f878564448527ca730f6d869dc3cb0d9b678d7 | [
"Apache-2.0"
] | 1 | 2019-01-23T05:02:22.000Z | 2019-01-23T05:02:22.000Z | pytorch_wide_n_deep/usingpytorch.py | whatbeg/Data-Analysis | b1f878564448527ca730f6d869dc3cb0d9b678d7 | [
"Apache-2.0"
] | null | null | null | pytorch_wide_n_deep/usingpytorch.py | whatbeg/Data-Analysis | b1f878564448527ca730f6d869dc3cb0d9b678d7 | [
"Apache-2.0"
] | 3 | 2015-05-11T07:11:05.000Z | 2016-01-22T14:08:38.000Z | from __future__ import print_function
import numpy as np
import dataprocessing as proc
import argparse
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.autograd import Variable
# Training settings
parser = argparse.ArgumentParser(description='BASE Model')
parser... | 41 | 139 | 0.621699 |
2b90c3926774337c71effdf292464f2dc4a520d0 | 1,152 | py | Python | test1.py | penghangph/python | 2a45e6ff8935a60731447ed3489ee410e9422f12 | [
"Apache-2.0"
] | null | null | null | test1.py | penghangph/python | 2a45e6ff8935a60731447ed3489ee410e9422f12 | [
"Apache-2.0"
] | null | null | null | test1.py | penghangph/python | 2a45e6ff8935a60731447ed3489ee410e9422f12 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
#
import requests
import re
import urllib.request
from bs4 import BeautifulSoup
import os
import lxml
#
url = "http://www.yvtc.edu.cn"
data = url_open(url)
soup = BeautifulSoup(data, "lxml")
tag = soup.select('a[href^="/news/show"]')
s = ""
for item in tag:
s += item.get("href") + "," + item.ge... | 25.043478 | 134 | 0.600694 |
2b90fc8674ef1dbf04e090bf10431e1e1fe2bc12 | 1,464 | py | Python | setup.py | JimCircadian/model-ensembler | 68dc0cb80a2837209f51319fbbf29f62b49d19ed | [
"MIT"
] | 4 | 2021-02-19T13:05:59.000Z | 2021-12-13T12:40:55.000Z | setup.py | JimCircadian/model-ensembler | 68dc0cb80a2837209f51319fbbf29f62b49d19ed | [
"MIT"
] | 27 | 2021-06-24T11:06:18.000Z | 2022-03-31T20:26:51.000Z | setup.py | JimCircadian/model-ensembler | 68dc0cb80a2837209f51319fbbf29f62b49d19ed | [
"MIT"
] | null | null | null | import setuptools
from setuptools import setup
"""Setup module for model_ensembler
"""
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="model-ensembler",
version="0.5.2",
author="James Byrne",
author_email="jambyr@bas.ac.uk",
description="Model Ensemble for batch... | 28.705882 | 80 | 0.622951 |
2b91b64bcf9fb63e83545e349af03a180f049619 | 3,012 | py | Python | fun/fnotification/migrations/0001_initial.py | larryw3i/osp | d9526a179876053a6b93e5a110d2de730376f511 | [
"MIT"
] | 1 | 2022-01-01T11:14:58.000Z | 2022-01-01T11:14:58.000Z | fun/fnotification/migrations/0001_initial.py | larryw3i/osp | d9526a179876053a6b93e5a110d2de730376f511 | [
"MIT"
] | null | null | null | fun/fnotification/migrations/0001_initial.py | larryw3i/osp | d9526a179876053a6b93e5a110d2de730376f511 | [
"MIT"
] | null | null | null | # Generated by Django 4.0 on 2022-01-13 10:17
import uuid
import ckeditor_uploader.fields
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
| 35.857143 | 161 | 0.479748 |
2b9247e4df10a952e35c2f7d168d1b670abd566a | 3,919 | py | Python | flight_computer/lib/bq25883.py | stanford-ssi/sequoia-software | 63b023e229c65f2a12e365366442fab3b196817f | [
"MIT"
] | 4 | 2020-09-16T02:19:34.000Z | 2021-02-07T03:10:50.000Z | flight_computer/lib/bq25883.py | stanford-ssi/sequoia-software | 63b023e229c65f2a12e365366442fab3b196817f | [
"MIT"
] | 33 | 2020-09-24T06:52:37.000Z | 2021-02-25T03:29:51.000Z | flight_computer/lib/bq25883.py | stanford-ssi/sequoia-software | 63b023e229c65f2a12e365366442fab3b196817f | [
"MIT"
] | 2 | 2021-02-07T03:10:53.000Z | 2022-01-07T06:06:15.000Z | """
`bq25883`
====================================================
CircuitPython driver for the BQ25883 2-cell USB boost-mode charger.
* Author(s): Max Holliday
Implementation Notes
--------------------
"""
from micropython import const
from adafruit_bus_device.i2c_device import I2CDevice
from ada... | 31.861789 | 68 | 0.588671 |
2b92b611127a05b1d87d98fdcdf787a237a82dc6 | 129 | py | Python | faced/const.py | hseguro/faced | 4ad42c54fb8e8679fb5feda30af5db3ac74ccc8c | [
"MIT"
] | 575 | 2018-08-27T18:30:53.000Z | 2022-03-31T03:25:36.000Z | faced/const.py | 18718615232/faced | 31ef0d30e1567a06113f49ff4a1202760d952df2 | [
"MIT"
] | 35 | 2018-09-04T08:16:59.000Z | 2022-02-03T18:28:29.000Z | faced/const.py | 18718615232/faced | 31ef0d30e1567a06113f49ff4a1202760d952df2 | [
"MIT"
] | 172 | 2018-08-31T16:55:50.000Z | 2022-02-28T12:03:58.000Z | import os
MODELS_PATH = os.path.join(os.path.dirname(__file__), "models")
YOLO_SIZE = 288
YOLO_TARGET = 9
CORRECTOR_SIZE = 50
| 14.333333 | 63 | 0.744186 |
2b946538ca5653fc5a315cf1136426e8c8360806 | 1,418 | py | Python | volatility/models.py | larrys54321/quant_corner | 3dc6f3f3d1ce1fa002c226bd5c5f845b91710687 | [
"MIT"
] | null | null | null | volatility/models.py | larrys54321/quant_corner | 3dc6f3f3d1ce1fa002c226bd5c5f845b91710687 | [
"MIT"
] | null | null | null | volatility/models.py | larrys54321/quant_corner | 3dc6f3f3d1ce1fa002c226bd5c5f845b91710687 | [
"MIT"
] | null | null | null | import yfinance as yf
from datetime import datetime
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from arch import arch_model
from volatility.utils import get_percent_chg
start = datetime(2000, 1, 1)
end = datetime(2020, 9, 11)
symbol = 'SPY'
tickerData = yf.Ticker(symbol)
df = tickerData.hist... | 32.227273 | 74 | 0.685472 |
2b95c55be0557da724a633f006455d098498c600 | 5,880 | py | Python | Bio/SeqUtils/lcc.py | barendt/biopython | 391bcdbee7f821bff3e12b75c635a06bc1b2dcea | [
"PostgreSQL"
] | 1 | 2016-05-09T13:17:59.000Z | 2016-05-09T13:17:59.000Z | Bio/SeqUtils/lcc.py | cymon/biopython-github-master | 7be9697599296401b0a7126d23b5eda391a94116 | [
"PostgreSQL"
] | null | null | null | Bio/SeqUtils/lcc.py | cymon/biopython-github-master | 7be9697599296401b0a7126d23b5eda391a94116 | [
"PostgreSQL"
] | null | null | null | # Copyright 2003, 2007 by Sebastian Bassi. sbassi@genesdigitales.com
# All rights reserved. This code is part of the Biopython
# distribution and governed by its license.
# Please see the LICENSE file that should have been included as part
# of this package.
import math
def lcc_mult(seq,wsize):
"""Local Composi... | 36.07362 | 78 | 0.541667 |
2b96e0991964b2437d682f1fd12e74f747085a34 | 302 | py | Python | skippa/__init__.py | data-science-lab-amsterdam/skippa | 1349317c441f1e46e22f4c02a8aceae767aea5fe | [
"BSD-3-Clause"
] | 33 | 2021-12-15T22:56:12.000Z | 2022-02-26T12:33:56.000Z | skippa/__init__.py | data-science-lab-amsterdam/skippa | 1349317c441f1e46e22f4c02a8aceae767aea5fe | [
"BSD-3-Clause"
] | null | null | null | skippa/__init__.py | data-science-lab-amsterdam/skippa | 1349317c441f1e46e22f4c02a8aceae767aea5fe | [
"BSD-3-Clause"
] | 1 | 2022-01-20T15:41:35.000Z | 2022-01-20T15:41:35.000Z | """Top-level package for skippa.
The pipeline module defines the main Skippa methods
The transformers subpackage contains various transformers used in the pipeline.
"""
__author__ = """Robert van Straalen"""
__email__ = 'tech@datasciencelab.nl'
from .pipeline import Skippa, SkippaPipeline, columns
| 27.454545 | 79 | 0.788079 |
2b9799f7570f968fd082853bb9689a42c333baf1 | 115 | py | Python | mini-scripts/Python_Casting_(float).txt.py | Web-Dev-Collaborative/PYTHON_PRAC | 856f902fb43dcccae168d34ee6aacc02427a7ac6 | [
"MIT"
] | 5 | 2021-06-02T23:44:25.000Z | 2021-12-27T16:21:57.000Z | mini-scripts/Python_Casting_(float).txt.py | Web-Dev-Collaborative/PYTHON_PRAC | 856f902fb43dcccae168d34ee6aacc02427a7ac6 | [
"MIT"
] | 22 | 2021-05-31T01:33:25.000Z | 2021-10-18T18:32:39.000Z | mini-scripts/Python_Casting_(float).txt.py | Web-Dev-Collaborative/PYTHON_PRAC | 856f902fb43dcccae168d34ee6aacc02427a7ac6 | [
"MIT"
] | 3 | 2021-06-19T03:37:47.000Z | 2021-08-31T00:49:51.000Z | x = float(1)
y = float(2.8)
z = float("3")
w = float("4.2")
print(x)
print(y)
print(z)
print(w)
# Author: Bryan G
| 11.5 | 18 | 0.573913 |
2b97ae2edf5d76e8856d7d9435e4757b132c023d | 5,833 | py | Python | Grid.py | ivcafe413/corinthian-football | 7374f4439bc58085bc50bcd1fb7fb7973c5a1515 | [
"MIT"
] | null | null | null | Grid.py | ivcafe413/corinthian-football | 7374f4439bc58085bc50bcd1fb7fb7973c5a1515 | [
"MIT"
] | null | null | null | Grid.py | ivcafe413/corinthian-football | 7374f4439bc58085bc50bcd1fb7fb7973c5a1515 | [
"MIT"
] | null | null | null | import logging
import random
from collections import namedtuple
from typing import NamedTuple
from queue import PriorityQueue
from objects import BaseObject
from constants import NORTH, SOUTH, EAST, WEST
Space = namedtuple("Space", ["x", "y"])
# TODO: Big TODO - Re-implement space with z/t value for terrain???
# Sp... | 31.52973 | 111 | 0.646837 |
2b97eff95c0bd2b394c9963727e6fead9c0d98c4 | 471 | py | Python | BubbleSort.py | Jutraman/SortingProblem | f3f1ea91fdfd44bc5fe523bd3a1dd7949222e71b | [
"BSD-3-Clause"
] | null | null | null | BubbleSort.py | Jutraman/SortingProblem | f3f1ea91fdfd44bc5fe523bd3a1dd7949222e71b | [
"BSD-3-Clause"
] | null | null | null | BubbleSort.py | Jutraman/SortingProblem | f3f1ea91fdfd44bc5fe523bd3a1dd7949222e71b | [
"BSD-3-Clause"
] | null | null | null | """
Project name: SortingProblem
File name: BubbleSort.py
Description:
version:
Author: Jutraman
Email: jutraman@hotmail.com
Date: 04/07/2021 21:49
LastEditors: Jutraman
LastEditTime: 04/07/2021
Github: https://github.com/Jutraman
"""
| 22.428571 | 63 | 0.643312 |
2b97f27689c29817d3fc17a2b5b71b9419f2063e | 6,023 | py | Python | indexerNew.py | philophilo/searchingReddit | 5c10dc70ecf6a614863403f28a91efe73c11fede | [
"MIT"
] | null | null | null | indexerNew.py | philophilo/searchingReddit | 5c10dc70ecf6a614863403f28a91efe73c11fede | [
"MIT"
] | null | null | null | indexerNew.py | philophilo/searchingReddit | 5c10dc70ecf6a614863403f28a91efe73c11fede | [
"MIT"
] | null | null | null | #!/home/master00/anaconda23/bin/python
from util import *
import argparse
import base64
import os
import json
from collections import defaultdict
# Two main type of indexes
# -- Forward index
# -- Inverted index
# Forward index
# doc1 -> [learning, python, how, to]
# doc2 -> [learning, c++]
# ...
# doc3 -> [python, c... | 37.64375 | 120 | 0.65034 |
2b99df630754e76cc6e5831dd642cb6b5cc27841 | 3,169 | py | Python | main/cogs/commands.py | ParzivalEugene/Samurai | ff6236f4477c070b1f3ef3568256791324fc2bbf | [
"Apache-2.0"
] | 4 | 2021-04-04T16:21:58.000Z | 2021-07-13T20:33:41.000Z | main/cogs/commands.py | ParzivalEugene/Samurai | ff6236f4477c070b1f3ef3568256791324fc2bbf | [
"Apache-2.0"
] | null | null | null | main/cogs/commands.py | ParzivalEugene/Samurai | ff6236f4477c070b1f3ef3568256791324fc2bbf | [
"Apache-2.0"
] | 2 | 2021-06-20T17:06:57.000Z | 2021-06-20T17:07:48.000Z | from types import SimpleNamespace
commands_names_dict = {
"chatting": {
"help": "help",
},
"birthdays": {
"help": "bd_help",
"set_chat": "bd_set_chat",
"up_chat": "bd_up_chat",
"del_chat": "bd_del_chat",
"show_chat": "bd_show_chat",
... | 30.180952 | 51 | 0.408015 |
2b9b72a609da9b50aea8bfaf7b95a744bb5c29be | 1,831 | py | Python | scripts/practice/FB/NestedListWeightSum.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | scripts/practice/FB/NestedListWeightSum.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | 8 | 2020-09-05T16:04:31.000Z | 2022-02-27T09:57:51.000Z | scripts/practice/FB/NestedListWeightSum.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | """
Nested List Weight Sum
You are given a nested list of integers nestedList. Each element is either an integer or a
list whose elements may also be integers or other lists.
The depth of an integer is the number of lists that it is inside of. For example,
the nested list [1,[2,2],[[3],2],1] has each integer's val... | 23.474359 | 92 | 0.592572 |
2b9c734ead852fe398bcf4cfccc73af317c3a224 | 52 | py | Python | torrenttv/utils/list_utils/__init__.py | AlexCovizzi/torrenttv | 25ae5490568110a7ea1f2e5eb74505ef8eea002d | [
"MIT"
] | null | null | null | torrenttv/utils/list_utils/__init__.py | AlexCovizzi/torrenttv | 25ae5490568110a7ea1f2e5eb74505ef8eea002d | [
"MIT"
] | 19 | 2020-05-03T17:06:24.000Z | 2021-03-11T05:26:57.000Z | torrenttv/utils/list_utils/__init__.py | AlexCovizzi/torrenttv | 25ae5490568110a7ea1f2e5eb74505ef8eea002d | [
"MIT"
] | 1 | 2020-05-04T19:00:00.000Z | 2020-05-04T19:00:00.000Z | from .flatten import flatten
__all__ = ["flatten"]
| 13 | 28 | 0.730769 |
2b9d72d72fd5c63abb08e7957792d60430f4fc1f | 490 | py | Python | metadeploy/api/migrations/0045_product_license_requirements.py | sfdc-qbranch/MetaDeploy | d22547b3814dbec6aefa4d86b9f81c6f175c1b67 | [
"BSD-3-Clause"
] | 33 | 2019-03-20T15:34:39.000Z | 2022-03-30T15:59:40.000Z | metadeploy/api/migrations/0045_product_license_requirements.py | sfdc-qbranch/MetaDeploy | d22547b3814dbec6aefa4d86b9f81c6f175c1b67 | [
"BSD-3-Clause"
] | 2,718 | 2019-02-27T19:46:07.000Z | 2022-03-11T23:18:09.000Z | metadeploy/api/migrations/0045_product_license_requirements.py | sfdc-qbranch/MetaDeploy | d22547b3814dbec6aefa4d86b9f81c6f175c1b67 | [
"BSD-3-Clause"
] | 28 | 2019-03-28T04:57:16.000Z | 2022-02-04T16:49:25.000Z | # Generated by Django 2.1.5 on 2019-01-28 21:04
import sfdo_template_helpers.fields
from django.db import migrations
| 24.5 | 61 | 0.640816 |
2b9eb938fe54fa2c98c7980b235b4562b7169504 | 742 | py | Python | Zoom.py | NotSharwan/Zoom-Python-Bot | 2b063913ae24f0bee11a980a8b3b5d5f764a8ffe | [
"MIT"
] | null | null | null | Zoom.py | NotSharwan/Zoom-Python-Bot | 2b063913ae24f0bee11a980a8b3b5d5f764a8ffe | [
"MIT"
] | null | null | null | Zoom.py | NotSharwan/Zoom-Python-Bot | 2b063913ae24f0bee11a980a8b3b5d5f764a8ffe | [
"MIT"
] | null | null | null | import webbrowser
import time
import datetime
# Calling the Function
zoomJoin(h, m, Link)
# h = Hour in 24 format
# m = Minutes in 24 format
# Link = Paste the Zoom link in " " or ' '
"""
EXAMPLE:
zoomJoin(10, 00, "https://zoom.us/w/xxxxxxxxx")
"""
| 23.1875 | 71 | 0.638814 |
2b9fa2a8d5732bafdcbd0c0f7502d06854051c46 | 3,992 | py | Python | syspy/io/pandasshp/pandaskml.py | systragroup/quetzal | bb7934bcae588cddf0f0da810d75114d1c64768f | [
"CECILL-B"
] | 25 | 2018-11-20T16:33:02.000Z | 2022-03-03T12:46:52.000Z | syspy/io/pandasshp/pandaskml.py | systragroup/quetzal | bb7934bcae588cddf0f0da810d75114d1c64768f | [
"CECILL-B"
] | 14 | 2019-06-13T13:26:20.000Z | 2022-01-13T03:51:07.000Z | syspy/io/pandasshp/pandaskml.py | systragroup/quetzal | bb7934bcae588cddf0f0da810d75114d1c64768f | [
"CECILL-B"
] | 4 | 2020-01-31T18:34:59.000Z | 2022-03-18T17:22:45.000Z | import itertools
import json
import os
import zipfile
import kml2geojson
import pandas as pd
import shapely
from shapely import geometry
from syspy.io.pandasshp import pandasshp
from tqdm import tqdm
| 27.916084 | 86 | 0.510271 |
2ba14a323b129afb523e5528fb8af1dd3e946a61 | 1,556 | py | Python | utils/plots.py | vovamedentsiy/mpdnn | 9d5966a95a27c8c9037c46cbc50d91fe8d387c1e | [
"MIT"
] | null | null | null | utils/plots.py | vovamedentsiy/mpdnn | 9d5966a95a27c8c9037c46cbc50d91fe8d387c1e | [
"MIT"
] | 1 | 2021-03-26T07:53:19.000Z | 2021-03-26T14:47:23.000Z | utils/plots.py | vovamedentsiy/mpdnn | 9d5966a95a27c8c9037c46cbc50d91fe8d387c1e | [
"MIT"
] | null | null | null | import matplotlib
matplotlib.use('PS')
from matplotlib import pyplot as plt
import seaborn as sns
import numpy as np
import random
def autolabel(rects, ax, coeff = 1):
"""Attach a text label above each bar in *rects*, displaying its height."""
for rect in rects:
height = rect.get_height()
#... | 30.509804 | 79 | 0.535347 |
2ba20cdbe21eded23a10e339852b7da8fa1eb902 | 948 | py | Python | conftest.py | dasap89/rest_accounts | e0daeece000391d93e1bc99db484b8fe45588046 | [
"MIT"
] | null | null | null | conftest.py | dasap89/rest_accounts | e0daeece000391d93e1bc99db484b8fe45588046 | [
"MIT"
] | null | null | null | conftest.py | dasap89/rest_accounts | e0daeece000391d93e1bc99db484b8fe45588046 | [
"MIT"
] | null | null | null | """Additional configuration for pytest"""
import datetime
import os
import pytest
from django.contrib.auth import get_user_model
from rest_framework.authtoken.models import Token
User = get_user_model()
# pylint: disable=redefined-outer-name,unused-argument,no-member
| 26.333333 | 64 | 0.714135 |
2ba38d92cac59d9afb0607dd598cb535e95a6b6e | 1,099 | py | Python | lib/rucio/db/sqla/migrate_repo/versions/35ef10d1e11b_change_index_on_table_requests.py | balrampariyarath/rucio | 8a68017af6b44485a9620566f1afc013838413c1 | [
"Apache-2.0"
] | 1 | 2017-08-07T13:34:55.000Z | 2017-08-07T13:34:55.000Z | lib/rucio/db/sqla/migrate_repo/versions/35ef10d1e11b_change_index_on_table_requests.py | pujanm/rucio | 355a997a5ea213c427a5d841ab151ceb01073eb4 | [
"Apache-2.0"
] | null | null | null | lib/rucio/db/sqla/migrate_repo/versions/35ef10d1e11b_change_index_on_table_requests.py | pujanm/rucio | 355a997a5ea213c427a5d841ab151ceb01073eb4 | [
"Apache-2.0"
] | 1 | 2021-06-17T14:15:15.000Z | 2021-06-17T14:15:15.000Z | """
Copyright European Organization for Nuclear Research (CERN)
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
Authors:
- Vincent Garonne, <vincent... | 27.475 | 97 | 0.730664 |
2ba3e284047fe1a855f0e6c487a5127e854e9da7 | 20,152 | py | Python | src/Connect.py | JurgenOS/net_node | 97f30263d7dd740f0eeeeb42f2555cab0bf2520e | [
"Apache-2.0"
] | 2 | 2021-04-05T08:26:05.000Z | 2021-04-05T08:26:10.000Z | src/Connect.py | JurgenOS/net_node | 97f30263d7dd740f0eeeeb42f2555cab0bf2520e | [
"Apache-2.0"
] | null | null | null | src/Connect.py | JurgenOS/net_node | 97f30263d7dd740f0eeeeb42f2555cab0bf2520e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import time
import re
import os
import paramiko
import telnetlib
from subprocess import run, PIPE, DEVNULL
from socket import socket, AF_INET, SOCK_STREAM
from multiprocessing.pool import ThreadPool as Pool
from src.ResponseParser import ResponseParser
from src.helpers.names_and_regex import HO... | 28.954023 | 105 | 0.507394 |
2ba537585718a0a24f20f73225113ab2e26600eb | 3,472 | py | Python | test/test_insert_documents.py | ShaneKilkelly/bedquilt | beaee513a015ed0dd633b738517b33eb7c4c42a3 | [
"MIT"
] | 288 | 2015-04-20T18:14:39.000Z | 2021-10-30T01:35:44.000Z | test/test_insert_documents.py | ShaneKilkelly/bedquilt | beaee513a015ed0dd633b738517b33eb7c4c42a3 | [
"MIT"
] | 21 | 2015-04-13T12:48:40.000Z | 2017-05-27T12:41:10.000Z | test/test_insert_documents.py | ShaneKilkelly/bedquilt | beaee513a015ed0dd633b738517b33eb7c4c42a3 | [
"MIT"
] | 19 | 2015-11-03T09:25:00.000Z | 2021-05-01T00:28:02.000Z | import testutils
import json
import string
import psycopg2
| 27.338583 | 59 | 0.489343 |
2ba5755aba035a21c8456b8d1f629b971c609de8 | 734 | py | Python | pywizard/PreEmphasizer.py | sintech/python_wizard | 397cac3abc2b74bc20a0ca202e3df0d990730dd4 | [
"MIT"
] | 28 | 2017-10-08T14:41:17.000Z | 2022-01-21T09:09:31.000Z | pywizard/PreEmphasizer.py | sintech/python_wizard | 397cac3abc2b74bc20a0ca202e3df0d990730dd4 | [
"MIT"
] | 17 | 2017-10-29T20:35:19.000Z | 2022-03-09T10:01:55.000Z | pywizard/PreEmphasizer.py | sintech/python_wizard | 397cac3abc2b74bc20a0ca202e3df0d990730dd4 | [
"MIT"
] | 12 | 2017-11-14T12:37:39.000Z | 2022-01-20T20:38:08.000Z | from pywizard.userSettings import settings
import scipy as sp
| 24.466667 | 66 | 0.644414 |
2ba6cae52049d7f6aac58f13b91780ebbd646035 | 3,528 | py | Python | model_measuring/kamal/slim/distillation/data_free/zskt.py | Gouzhong1223/Dubhe | 8959a51704410dc38b595a0926646b9928451c9a | [
"Apache-2.0"
] | 1 | 2022-01-11T07:14:37.000Z | 2022-01-11T07:14:37.000Z | model_measuring/kamal/slim/distillation/data_free/zskt.py | Gouzhong1223/Dubhe | 8959a51704410dc38b595a0926646b9928451c9a | [
"Apache-2.0"
] | 1 | 2022-03-04T07:19:43.000Z | 2022-03-04T07:19:43.000Z | model_measuring/kamal/slim/distillation/data_free/zskt.py | Gouzhong1223/Dubhe | 8959a51704410dc38b595a0926646b9928451c9a | [
"Apache-2.0"
] | 1 | 2022-03-20T13:09:14.000Z | 2022-03-20T13:09:14.000Z | """
Copyright 2020 Tianshu AI Platform. 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 ... | 35.28 | 155 | 0.604592 |
2ba7784bc827b850acbbb011ada9ad1f701f4989 | 11,442 | py | Python | crease_ga/shapes/vesicle/scatterer_generator.py | arthijayaraman-lab/crease-ga | e757811d73687b3cd1df2d40d607a37116a20a7d | [
"MIT"
] | null | null | null | crease_ga/shapes/vesicle/scatterer_generator.py | arthijayaraman-lab/crease-ga | e757811d73687b3cd1df2d40d607a37116a20a7d | [
"MIT"
] | 6 | 2021-07-27T16:26:35.000Z | 2022-03-14T19:47:01.000Z | crease_ga/shapes/vesicle/scatterer_generator.py | arthijayaraman-lab/crease_ga | e757811d73687b3cd1df2d40d607a37116a20a7d | [
"MIT"
] | 2 | 2021-07-20T18:04:32.000Z | 2021-07-20T18:10:27.000Z | import numpy as np
import random
import numexpr as ne
def LPFbead(qrange, sigmabead):
'''
Compute the spherical form factor given a range of q values.
Parameters
----------
qrange: numpy.array
array of values in q-space to compute form factor for.
sigmabead: float
diame... | 39.184932 | 210 | 0.549205 |
2ba7860171b35ef1fd22e6ca196a4bf0cdd6ce68 | 841 | py | Python | main.py | fmiju/fssg3 | ffda53e9e65a9ecd22c853e80a0af0226a4b22e4 | [
"BSD-3-Clause"
] | null | null | null | main.py | fmiju/fssg3 | ffda53e9e65a9ecd22c853e80a0af0226a4b22e4 | [
"BSD-3-Clause"
] | null | null | null | main.py | fmiju/fssg3 | ffda53e9e65a9ecd22c853e80a0af0226a4b22e4 | [
"BSD-3-Clause"
] | null | null | null | import pygame
from pygame.locals import *
gameState = 0
pygame.init()
while 1:
# print "state: ", gameState
# idle
if gameState == 0:
print pygame.event.get()
for event in pygame.event.get():
if (event.type == KEYDOWN and event.key == K_SPACE):
gameState = 1
# build ship
elif gameState == 1:
... | 21.025 | 55 | 0.630202 |
2bad3c5762b8c994d171a46e6e014d25fb8793f4 | 4,974 | py | Python | BikeAndBim.extension/BikeAnd.tab/View.panel/Edit_crop.pushbutton/script.py | appolimp/Revit_extensions_pyRevit | 1790b18c12e8bc603a6a726b2733678494180986 | [
"MIT"
] | 4 | 2021-02-04T06:24:27.000Z | 2022-01-29T20:24:22.000Z | BikeAndBim.extension/BikeAnd.tab/View.panel/Edit_crop.pushbutton/script.py | appolimp/Revit_extensions_pyRevit | 1790b18c12e8bc603a6a726b2733678494180986 | [
"MIT"
] | null | null | null | BikeAndBim.extension/BikeAnd.tab/View.panel/Edit_crop.pushbutton/script.py | appolimp/Revit_extensions_pyRevit | 1790b18c12e8bc603a6a726b2733678494180986 | [
"MIT"
] | null | null | null | # coding=utf-8
from rpw import db, DB, UI, uidoc, doc, logger
def task_dialog(msg):
"""
For create task dialog with error and message
:param msg: Message for window
:type msg: str
"""
window = UI.TaskDialog('Edit crop')
window.TitleAutoPrefix = False
window.MainIcon = UI.TaskDialogI... | 23.242991 | 96 | 0.65581 |
2bad9543f61fe85bae0ab93637dfc67e43dc0ae6 | 1,876 | py | Python | dm_verity_make_ext4fs.py | bigb123/samsung-android_bootable_recovery_libdmverity | 2f9ce00f76ed4f1a251d5244ae2533cf53417478 | [
"MIT"
] | 1 | 2020-06-28T00:49:21.000Z | 2020-06-28T00:49:21.000Z | dm_verity_make_ext4fs.py | bigb123/samsung-android_bootable_recovery_libdmverity | 2f9ce00f76ed4f1a251d5244ae2533cf53417478 | [
"MIT"
] | null | null | null | dm_verity_make_ext4fs.py | bigb123/samsung-android_bootable_recovery_libdmverity | 2f9ce00f76ed4f1a251d5244ae2533cf53417478 | [
"MIT"
] | 1 | 2021-03-05T16:54:52.000Z | 2021-03-05T16:54:52.000Z | #! /usr/bin/env python
# make_ext4fs -s -S /home/swei/p4/STA-ESG_SWEI_KLTE_ATT-TRUNK_DMV/android/out/target/product/klteatt/root/file_contexts -l 2654994432 -a system system.img.ext4 system
import os,posixpath,sys,getopt
reserve=1024*1024*32
if __name__ == "__main__":
ret = main()
sys.exit(ret)
| 28.861538 | 166 | 0.587953 |
2baea66c9dda1164b219c75b1a324b8723e5a8b9 | 2,787 | py | Python | rl/policies/action_selection_strategy.py | Sen-R/reinforcement-learning | 493788132f991d294b425cbf34c5673fbd18c8dd | [
"MIT"
] | null | null | null | rl/policies/action_selection_strategy.py | Sen-R/reinforcement-learning | 493788132f991d294b425cbf34c5673fbd18c8dd | [
"MIT"
] | null | null | null | rl/policies/action_selection_strategy.py | Sen-R/reinforcement-learning | 493788132f991d294b425cbf34c5673fbd18c8dd | [
"MIT"
] | null | null | null | """Strategies for selecting actions for value-based policies."""
from abc import ABC, abstractmethod
from typing import List, Optional
from numpy.typing import ArrayLike
import numpy as np
from rl.action_selectors import (
ActionSelector,
DeterministicActionSelector,
UniformDiscreteActionSelector,
Nois... | 30.626374 | 78 | 0.670972 |
2baeca8d8ff61c43fa93b0a9c182df48e8c05900 | 8,543 | py | Python | create_data_for_openke.py | nhutnamhcmus/KGC-Benchmark-Datasets | febed9fcc8c715c4dbdbce89a5355f7387c4c6ce | [
"Apache-2.0"
] | null | null | null | create_data_for_openke.py | nhutnamhcmus/KGC-Benchmark-Datasets | febed9fcc8c715c4dbdbce89a5355f7387c4c6ce | [
"Apache-2.0"
] | null | null | null | create_data_for_openke.py | nhutnamhcmus/KGC-Benchmark-Datasets | febed9fcc8c715c4dbdbce89a5355f7387c4c6ce | [
"Apache-2.0"
] | 1 | 2022-02-20T03:29:07.000Z | 2022-02-20T03:29:07.000Z | import pandas as pd
import numpy as np
from argparse import ArgumentParser
parser = ArgumentParser("Python scirpt for OpenKE dataset initialization.")
parser.add_argument("--folder", default="WN18RR/",
help="Name of dataset folder.")
args = parser.parse_args()
print(args)
print("[LOG] Init entit... | 29.357388 | 93 | 0.540677 |
2bafdb3d0198af653fa5dcfa1e0681df79a2f730 | 174 | py | Python | tests/iter_version_dev/V1_0_0/demo.py | liguodongIOT/nlp-app-samples | e0cc747e88c7b5c701b5099462d2dd6277c23381 | [
"Apache-2.0"
] | 1 | 2021-09-30T08:16:21.000Z | 2021-09-30T08:16:21.000Z | tests/iter_version_dev/V1_0_0/demo.py | liguodongIOT/nlp-app-samples | e0cc747e88c7b5c701b5099462d2dd6277c23381 | [
"Apache-2.0"
] | null | null | null | tests/iter_version_dev/V1_0_0/demo.py | liguodongIOT/nlp-app-samples | e0cc747e88c7b5c701b5099462d2dd6277c23381 | [
"Apache-2.0"
] | 1 | 2021-11-24T06:24:44.000Z | 2021-11-24T06:24:44.000Z | from nlp_app_samples.constants import APP_NAME
from tests.iter_version_dev.V1_0_0.classification_lr import TASK_DICT
print(APP_NAME)
print(TASK_DICT)
print("over....")
| 14.5 | 69 | 0.810345 |
2bb18f8af966069191addc5d4539af9522722cdb | 2,392 | py | Python | airflow/dags/xcom_dag.py | KoiDev13/airflow_lab | 40ce005615486356a59deff46f3594b2343a8b4d | [
"Apache-2.0"
] | null | null | null | airflow/dags/xcom_dag.py | KoiDev13/airflow_lab | 40ce005615486356a59deff46f3594b2343a8b4d | [
"Apache-2.0"
] | null | null | null | airflow/dags/xcom_dag.py | KoiDev13/airflow_lab | 40ce005615486356a59deff46f3594b2343a8b4d | [
"Apache-2.0"
] | null | null | null | from airflow import DAG
from airflow.operators.bash import BashOperator
from airflow.operators.python import PythonOperator, BranchPythonOperator #Looking for a way to choose one task or another according to condition
# from airflow.operators.subdag import SubDagOperator
from airflow.utils.task_group import TaskGroup #... | 31.473684 | 145 | 0.69607 |
2bb1dccf1a33e636469d941a73447ed64a4e5e90 | 9,281 | py | Python | v1/users/tests/user.py | buckyroberts/Website-API | e74d202a41533c7622acbe12c793d047d44012ad | [
"MIT"
] | 64 | 2020-10-02T02:58:06.000Z | 2022-01-29T20:00:50.000Z | v1/users/tests/user.py | buckyroberts/Website-API | e74d202a41533c7622acbe12c793d047d44012ad | [
"MIT"
] | 93 | 2020-10-04T22:53:46.000Z | 2022-03-05T18:17:46.000Z | v1/users/tests/user.py | buckyroberts/Website-API | e74d202a41533c7622acbe12c793d047d44012ad | [
"MIT"
] | 21 | 2020-10-11T14:16:13.000Z | 2021-11-09T17:50:25.000Z | from unittest.mock import ANY, MagicMock, patch
from django.utils.encoding import force_bytes
from django.utils.http import urlsafe_base64_encode
from freezegun import freeze_time
from rest_framework import serializers, status
from rest_framework.reverse import reverse
from ..factories.user import UserFactory
from .... | 30.833887 | 97 | 0.632798 |
2bb394837f98ad170af7ac4403fbc8f5bff79198 | 272 | py | Python | newbitcoin/newbitcoin/code-ch03/helper.py | tys-hiroshi/test_programmingbitcoin | 6eb6fb1c087f6dd2cb2b01f527488a904065efa6 | [
"MIT"
] | null | null | null | newbitcoin/newbitcoin/code-ch03/helper.py | tys-hiroshi/test_programmingbitcoin | 6eb6fb1c087f6dd2cb2b01f527488a904065efa6 | [
"MIT"
] | null | null | null | newbitcoin/newbitcoin/code-ch03/helper.py | tys-hiroshi/test_programmingbitcoin | 6eb6fb1c087f6dd2cb2b01f527488a904065efa6 | [
"MIT"
] | null | null | null | from unittest import TestSuite, TextTestRunner
import hashlib
def hash256(s):
'''two rounds of sha256'''
return hashlib.sha256(hashlib.sha256(s).digest()).digest()
| 18.133333 | 62 | 0.694853 |
2bb4e9663798a8ab2fb0c77692479485818ee0ff | 3,085 | py | Python | denoise.py | N11K6/Speech_DeNoiser_AE | 66e55faa430a66a74a4df27d9f96b756056047f2 | [
"MIT"
] | 1 | 2021-03-16T08:58:45.000Z | 2021-03-16T08:58:45.000Z | denoise.py | N11K6/Speech_DeNoiser_AE | 66e55faa430a66a74a4df27d9f96b756056047f2 | [
"MIT"
] | null | null | null | denoise.py | N11K6/Speech_DeNoiser_AE | 66e55faa430a66a74a4df27d9f96b756056047f2 | [
"MIT"
] | 1 | 2021-09-22T10:26:28.000Z | 2021-09-22T10:26:28.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Program to denoise a short speech sample using a pre-trained autoencoder.
PATH_TO_TRAINED_MODEL : path to the pre-trained model (.h5)
PATH_TO_AUDIO : path to the noisy audio file (.wav)
PATH_TO_SAVE : path to save the denoised audio output (.wav)
@author: nk
"""
#%% ... | 30.245098 | 80 | 0.625284 |
2bb629029f6d9ac0a63d285ca3b6e11796d43870 | 10,171 | py | Python | mcp2515.py | sifosifo/MCP2515LinuxDriver | 14e933a81626980ec7c9c9830335383fdd7abe3a | [
"BSD-3-Clause"
] | 3 | 2018-01-31T11:54:21.000Z | 2020-02-13T08:12:07.000Z | mcp2515.py | sifosifo/MCP2515LinuxDriver | 14e933a81626980ec7c9c9830335383fdd7abe3a | [
"BSD-3-Clause"
] | 1 | 2020-02-15T06:01:39.000Z | 2020-02-27T05:23:43.000Z | mcp2515.py | sifosifo/MCP2515LinuxDriver | 14e933a81626980ec7c9c9830335383fdd7abe3a | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
import spidev
| 22.256018 | 79 | 0.478714 |
2bb62b6a718f65b1214f64e28be9ca336c62449b | 3,809 | py | Python | model/grouptrack.py | janhradek/regaudio | e3ead0b19f016c645985e5f779414076306be7e0 | [
"Zlib"
] | null | null | null | model/grouptrack.py | janhradek/regaudio | e3ead0b19f016c645985e5f779414076306be7e0 | [
"Zlib"
] | null | null | null | model/grouptrack.py | janhradek/regaudio | e3ead0b19f016c645985e5f779414076306be7e0 | [
"Zlib"
] | null | null | null | import sqlalchemy
from .base import Base
from .track import Track
import model.tracktime
| 30.96748 | 111 | 0.593594 |