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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7252008c26b1662083a1400694c806c34e33ed67 | 910 | py | Python | graviteeio_cli/lint/functions/length.py | gravitee-io/gravitee-cli | 8e3bf9f2c0c2873e0f6e67f8fcaf0d3b6c44b3ca | [
"Apache-2.0"
] | 12 | 2019-05-29T20:06:01.000Z | 2020-10-07T07:40:27.000Z | graviteeio_cli/lint/functions/length.py | gravitee-io/graviteeio-cli | 0e0069b00ce40813efc7d40142a6dc4b4ec7a261 | [
"Apache-2.0"
] | 41 | 2019-11-04T18:18:18.000Z | 2021-04-22T16:12:51.000Z | graviteeio_cli/lint/functions/length.py | gravitee-io/gravitee-cli | 8e3bf9f2c0c2873e0f6e67f8fcaf0d3b6c44b3ca | [
"Apache-2.0"
] | 6 | 2019-06-18T04:27:49.000Z | 2021-06-02T17:52:24.000Z | from graviteeio_cli.lint.types.function_result import FunctionResult
def length(value, **kwargs):
"""Count the length of a string an or array, the number of properties in an object, or a numeric value, and define minimum and/or maximum values."""
min = None
max = None
if "min" in kwargs and type(kwar... | 26 | 152 | 0.597802 |
a0c60f619b683347cb7cc9f4f6e9936af96f0dbd | 27,874 | py | Python | smartrecruiters_python_client/apis/analytics_api.py | roksela/smartrecruiters-python-client | 6d0849d173a3d6718b5f0769098f4c76857f637d | [
"MIT"
] | 5 | 2018-03-27T08:20:13.000Z | 2022-03-30T06:23:38.000Z | smartrecruiters_python_client/apis/analytics_api.py | roksela/smartrecruiters-python-client | 6d0849d173a3d6718b5f0769098f4c76857f637d | [
"MIT"
] | null | null | null | smartrecruiters_python_client/apis/analytics_api.py | roksela/smartrecruiters-python-client | 6d0849d173a3d6718b5f0769098f4c76857f637d | [
"MIT"
] | 2 | 2018-12-05T04:48:37.000Z | 2020-12-17T12:12:12.000Z | # coding: utf-8
"""
Unofficial python library for the SmartRecruiters API
The SmartRecruiters API provides a platform to integrate services or applications, build apps and create fully customizable career sites. It exposes SmartRecruiters functionality and allows to connect and build software enhancing it.
... | 44.10443 | 280 | 0.583052 |
a0c68d4449b586355649b08e113c775fd8d862f6 | 398 | py | Python | Timofei-Khirianov-2019/lesson_001/003_anketa.py | anklav24/Python-Education | 49ebcfabda1376390ee71e1fe321a51e33831f9e | [
"Apache-2.0"
] | null | null | null | Timofei-Khirianov-2019/lesson_001/003_anketa.py | anklav24/Python-Education | 49ebcfabda1376390ee71e1fe321a51e33831f9e | [
"Apache-2.0"
] | null | null | null | Timofei-Khirianov-2019/lesson_001/003_anketa.py | anklav24/Python-Education | 49ebcfabda1376390ee71e1fe321a51e33831f9e | [
"Apache-2.0"
] | null | null | null | name = input('Hello! What is your name? : ')
print('Nice to meet you,', name + '!')
print()
age = int(input('How old are you ' + name + '? : '))
print()
x = age + 1
print(' ', x, end=' ')
if x >= 11 and x <= 19:
print('', end='')
elif x % 10 == 1:
print('', end='')
elif x % 10 >= 2 and x % 10 <= 4:
pri... | 19.9 | 52 | 0.502513 |
a0c69fd6e11617fc5f9eb586f7c2029856d0877b | 2,399 | py | Python | Technical_Indicators/rainbow_charts.py | vhn0912/Finance | 39cf49d4d778d322537531cee4ce3981cc9951f9 | [
"MIT"
] | 441 | 2020-04-22T02:21:19.000Z | 2022-03-29T15:00:24.000Z | Technical_Indicators/rainbow_charts.py | happydasch/Finance | 4f6c5ea8f60fb0dc3b965ffb9628df83c2ecef35 | [
"MIT"
] | 5 | 2020-07-06T15:19:58.000Z | 2021-07-23T18:32:29.000Z | Technical_Indicators/rainbow_charts.py | happydasch/Finance | 4f6c5ea8f60fb0dc3b965ffb9628df83c2ecef35 | [
"MIT"
] | 111 | 2020-04-21T11:40:39.000Z | 2022-03-20T07:26:17.000Z | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import warnings
warnings.filterwarnings("ignore")
import yfinance as yf
yf.pdr_override()
import datetime as dt
# input
symbol = 'AAPL'
start = dt.date.today() - dt.timedelta(days = 365*2)
end = dt.date.today()
# Read data
df = yf.download(symbol... | 36.348485 | 111 | 0.667361 |
a0c8d55fb37c691da19d42d22717e7769ad0fbbf | 1,670 | py | Python | UpWork_Projects/pdf_downloader.py | SurendraTamang/Web-Scrapping | 2bb60cce9010b4b68f5c11bf295940832bb5df50 | [
"MIT"
] | null | null | null | UpWork_Projects/pdf_downloader.py | SurendraTamang/Web-Scrapping | 2bb60cce9010b4b68f5c11bf295940832bb5df50 | [
"MIT"
] | null | null | null | UpWork_Projects/pdf_downloader.py | SurendraTamang/Web-Scrapping | 2bb60cce9010b4b68f5c11bf295940832bb5df50 | [
"MIT"
] | 1 | 2022-01-18T17:15:51.000Z | 2022-01-18T17:15:51.000Z | import requests
from urllib.request import urlopen
from urllib.request import urlretrieve
import cgi
import os.path
pdf_downloader() | 33.4 | 108 | 0.552096 |
a0cab7a3ae269edaac7fa1a7d902a54bd96a752d | 13,282 | py | Python | backend/app/vta/texdf/tex_df.py | megagonlabs/leam | f19830d4d6935bece7d163abbc533cfb4bc2e729 | [
"Apache-2.0"
] | 7 | 2020-09-14T07:03:51.000Z | 2022-01-13T10:11:53.000Z | backend/app/vta/texdf/tex_df.py | megagonlabs/leam | f19830d4d6935bece7d163abbc533cfb4bc2e729 | [
"Apache-2.0"
] | null | null | null | backend/app/vta/texdf/tex_df.py | megagonlabs/leam | f19830d4d6935bece7d163abbc533cfb4bc2e729 | [
"Apache-2.0"
] | 1 | 2020-09-07T22:26:27.000Z | 2020-09-07T22:26:27.000Z | import spacy
import json, os
import dill as pickle
import numpy as np
import pandas as pd
from sklearn.feature_extraction.text import TfidfVectorizer
from sqlalchemy import create_engine, select, MetaData, Table, Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import ... | 37.840456 | 100 | 0.595844 |
a0cc5ea31e6d19f7b084b456d80ccf0e5baf6865 | 1,604 | py | Python | orders-api/orders_api/models.py | kelvinducray/fastapi-orders-api | 37176329f717adf8ad8749be4ed50f7c875b0cf5 | [
"MIT"
] | null | null | null | orders-api/orders_api/models.py | kelvinducray/fastapi-orders-api | 37176329f717adf8ad8749be4ed50f7c875b0cf5 | [
"MIT"
] | null | null | null | orders-api/orders_api/models.py | kelvinducray/fastapi-orders-api | 37176329f717adf8ad8749be4ed50f7c875b0cf5 | [
"MIT"
] | null | null | null | from uuid import uuid4
from sqlalchemy import Boolean, Column, DateTime, Integer, String
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.orm import relationship
from .database import Base
# class User(Base):
# __tablename__ = "users"
# id = Column(Integer, primary_key=True, index=True)
#... | 27.655172 | 68 | 0.704489 |
a0cc745e3a8e279006b132f30ea4111764df2ce1 | 32,293 | py | Python | src/ID_meshes.py | faycalki/tainted-paths | 81cecf6c1fba903ec3b8043e22652d222892609d | [
"MIT"
] | 4 | 2019-09-26T21:34:32.000Z | 2021-11-18T19:31:15.000Z | src/ID_meshes.py | faycalki/tainted-paths | 81cecf6c1fba903ec3b8043e22652d222892609d | [
"MIT"
] | null | null | null | src/ID_meshes.py | faycalki/tainted-paths | 81cecf6c1fba903ec3b8043e22652d222892609d | [
"MIT"
] | null | null | null | mesh_pic_bandits = 0
mesh_pic_mb_warrior_1 = 1
mesh_pic_messenger = 2
mesh_pic_prisoner_man = 3
mesh_pic_prisoner_fem = 4
mesh_pic_prisoner_wilderness = 5
mesh_pic_siege_sighted = 6
mesh_pic_siege_sighted_fem = 7
mesh_pic_camp = 8
mesh_pic_payment = 9
mesh_pic_escape_1 = 10
mesh_pic_escape_1_fem = 11
mesh_pic_victory =... | 25.528063 | 58 | 0.843619 |
a0cc84ea1f11da3af87cb6aff03136b234f94184 | 30,936 | py | Python | q2_longitudinal/_vega.py | thermokarst/q2-longitudinal | 1967617214417b7097ce96e4a7dfdfbb5fd17faf | [
"BSD-3-Clause"
] | null | null | null | q2_longitudinal/_vega.py | thermokarst/q2-longitudinal | 1967617214417b7097ce96e4a7dfdfbb5fd17faf | [
"BSD-3-Clause"
] | null | null | null | q2_longitudinal/_vega.py | thermokarst/q2-longitudinal | 1967617214417b7097ce96e4a7dfdfbb5fd17faf | [
"BSD-3-Clause"
] | null | null | null | # ----------------------------------------------------------------------------
# Copyright (c) 2017-2018, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | 33.699346 | 79 | 0.230185 |
a0ce075406a832ed84007060dd79bad299dae4e6 | 11,696 | py | Python | state_workflow_sdk/api/state_workflow/state_workflow_client.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | state_workflow_sdk/api/state_workflow/state_workflow_client.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | state_workflow_sdk/api/state_workflow/state_workflow_client.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import sys
import state_workflow_sdk.api.state_workflow.callback_pb2
import state_workflow_sdk.api.state_workflow.createStateWorkflow_pb2
import state_workflow_sdk.model.state_workflow.stateWorkflow_pb2
import state_workflow_sdk.api.state_workflow.deleteStateWorkflow_pb2
import g... | 41.183099 | 254 | 0.658516 |
a0ceec8ec85ef44ddb9d9cd56199a36790b171fc | 4,171 | py | Python | tests/contour_classifiers/test_randomforest.py | yamathcy/motif | 3f43568e59f0879fbab5ef278e9e687b7cac3dd6 | [
"MIT"
] | 21 | 2016-08-22T22:00:49.000Z | 2020-03-29T04:15:19.000Z | tests/contour_classifiers/test_randomforest.py | yamathcy/motif | 3f43568e59f0879fbab5ef278e9e687b7cac3dd6 | [
"MIT"
] | 22 | 2016-08-28T01:07:08.000Z | 2018-02-07T14:38:26.000Z | tests/contour_classifiers/test_randomforest.py | yamathcy/motif | 3f43568e59f0879fbab5ef278e9e687b7cac3dd6 | [
"MIT"
] | 3 | 2017-01-12T10:04:27.000Z | 2022-01-06T13:25:48.000Z | """Test for motif.classify.mvgaussian
"""
from __future__ import print_function
import unittest
import numpy as np
from motif.contour_classifiers import random_forest
| 32.585938 | 76 | 0.529369 |
a0cf8257e1729da63a070f7fb21ed2b3279418e3 | 7,365 | py | Python | awsenv/profile.py | KensoDev/awsenv | 4bf759106d2e0d79221d0ca9188ed7686e119b2c | [
"Apache-2.0"
] | 6 | 2016-09-11T08:39:50.000Z | 2018-10-22T13:41:34.000Z | awsenv/profile.py | KensoDev/awsenv | 4bf759106d2e0d79221d0ca9188ed7686e119b2c | [
"Apache-2.0"
] | 1 | 2017-01-09T23:58:20.000Z | 2017-01-09T23:58:20.000Z | awsenv/profile.py | KensoDev/awsenv | 4bf759106d2e0d79221d0ca9188ed7686e119b2c | [
"Apache-2.0"
] | 5 | 2017-01-09T23:26:12.000Z | 2021-09-08T09:35:59.000Z | """
Profile-aware session wrapper.
"""
from os import environ
from botocore.exceptions import ProfileNotFound
from botocore.session import Session
from awsenv.cache import CachedSession
def get_default_profile_name():
"""
Get the default profile name from the environment.
"""
return environ.get("AWS... | 31.075949 | 91 | 0.60611 |
a0d0d288568d1ad31c787944a756b68fdcfc394c | 13,358 | py | Python | cail/algo/twoiwil.py | Stanford-ILIAD/Confidence-Aware-Imitation-Learning | 1d8af0e4ab87a025885133a2384d5a937329b2f5 | [
"MIT"
] | 16 | 2021-10-30T15:19:37.000Z | 2022-03-23T12:57:49.000Z | cail/algo/twoiwil.py | syzhang092218-source/Confidence-Aware-Imitation-Learning | 1d8af0e4ab87a025885133a2384d5a937329b2f5 | [
"MIT"
] | null | null | null | cail/algo/twoiwil.py | syzhang092218-source/Confidence-Aware-Imitation-Learning | 1d8af0e4ab87a025885133a2384d5a937329b2f5 | [
"MIT"
] | 2 | 2021-11-29T11:28:16.000Z | 2022-03-06T14:12:47.000Z | import torch
import os
import torch.nn.functional as F
import numpy as np
import copy
from torch import nn
from torch.optim import Adam
from torch.autograd import Variable
from torch.utils.tensorboard import SummaryWriter
from tqdm import tqdm
from typing import Tuple
from .ppo import PPO, PPOExpert
from ... | 34.786458 | 105 | 0.586166 |
a0d0f0826bf05af84c68e2d12e3788dc07ebfcd6 | 7,327 | py | Python | data/generation_scripts/MantaFlow/scripts3D/compactifyData.py | tum-pbs/VOLSIM | 795a31c813bf072eb88289126d7abd9fba8b0e54 | [
"MIT"
] | 7 | 2022-01-28T09:40:15.000Z | 2022-03-07T01:52:00.000Z | data/generation_scripts/MantaFlow/scripts3D/compactifyData.py | tum-pbs/VOLSIM | 795a31c813bf072eb88289126d7abd9fba8b0e54 | [
"MIT"
] | null | null | null | data/generation_scripts/MantaFlow/scripts3D/compactifyData.py | tum-pbs/VOLSIM | 795a31c813bf072eb88289126d7abd9fba8b0e54 | [
"MIT"
] | 1 | 2022-03-14T22:08:47.000Z | 2022-03-14T22:08:47.000Z | import numpy as np
import os, shutil
import imageio
baseDir = "data/train_verbose"
outDir = "data/train"
#baseDir = "data/test_verbose"
#outDir = "data/test"
outDirVidCopy = "data/videos"
combineVidsAll = {"smoke" : ["densMean", "densSlice", "velMean", "velSlice", "presMean", "presSlice"],
"liquid": ["... | 43.613095 | 153 | 0.512079 |
a0d159678318f4de46108d8e3c19f4a355d8744f | 14,238 | py | Python | qiskit/aqua/operators/base_operator.py | Sahar2/qiskit-aqua | a228fbe6b9613cff43e47796a7e4843deba2b051 | [
"Apache-2.0"
] | null | null | null | qiskit/aqua/operators/base_operator.py | Sahar2/qiskit-aqua | a228fbe6b9613cff43e47796a7e4843deba2b051 | [
"Apache-2.0"
] | null | null | null | qiskit/aqua/operators/base_operator.py | Sahar2/qiskit-aqua | a228fbe6b9613cff43e47796a7e4843deba2b051 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modif... | 44.633229 | 122 | 0.666877 |
a0d37d7e9574c755f53a5c193de3f30cb81ee61a | 4,447 | py | Python | DataAnalysis/utils.py | Timlo512/AnomalyStockDetection | 29f9aaef14f1d9823980d8022cdce1f7f6310813 | [
"MIT"
] | 2 | 2020-12-19T05:24:29.000Z | 2021-05-15T19:35:40.000Z | DataAnalysis/utils.py | Timlo512/AnomalyStockDetection | 29f9aaef14f1d9823980d8022cdce1f7f6310813 | [
"MIT"
] | null | null | null | DataAnalysis/utils.py | Timlo512/AnomalyStockDetection | 29f9aaef14f1d9823980d8022cdce1f7f6310813 | [
"MIT"
] | 5 | 2020-11-21T02:25:13.000Z | 2022-01-31T12:46:02.000Z | import pandas as pd
import numpy as np
from sklearn.metrics import confusion_matrix
import re
def convert_data_sparse_matrix(df, row_label = 'stock_code', col_label = 'name_of_ccass_participant', value_label = 'shareholding'):
"""
Pivot table
"""
try:
# Prepare zero matrix
row_dim =... | 32.698529 | 132 | 0.614796 |
a0d5155e320c1b2b6704a06d42d9b58088cb485b | 1,429 | py | Python | scripts/prepare_upload_files.py | MaayanLab/scAVI | 7f3f83657d749520243535581db1080075e48aa5 | [
"Apache-2.0"
] | 3 | 2020-01-23T08:48:33.000Z | 2021-07-21T02:42:28.000Z | scripts/prepare_upload_files.py | MaayanLab/scAVI | 7f3f83657d749520243535581db1080075e48aa5 | [
"Apache-2.0"
] | 21 | 2019-10-25T15:38:37.000Z | 2022-01-27T16:04:04.000Z | scripts/prepare_upload_files.py | MaayanLab/scAVI | 7f3f83657d749520243535581db1080075e48aa5 | [
"Apache-2.0"
] | 1 | 2019-10-24T18:15:26.000Z | 2019-10-24T18:15:26.000Z | '''
Prepare some files to test the upload functionality.
'''
import sys
sys.path.append('../')
from database import *
from pymongo import MongoClient
mongo = MongoClient(MONGOURI)
db = mongo['SCV']
coll = db['dataset']
from gene_expression import *
expr_df, meta_doc = load_read_counts_and_meta(organism='mouse', gse... | 30.404255 | 105 | 0.751575 |
a0d646ba03a4465fe2514a5e2b0f73386fb45c4c | 2,321 | py | Python | app/api/V1/views/products.py | Paulvitalis200/Store-Manager-API | d61e91bff7fc242da2a93d1caf1012465c7c904a | [
"MIT"
] | null | null | null | app/api/V1/views/products.py | Paulvitalis200/Store-Manager-API | d61e91bff7fc242da2a93d1caf1012465c7c904a | [
"MIT"
] | 4 | 2018-10-21T18:28:03.000Z | 2018-10-24T12:48:24.000Z | app/api/V1/views/products.py | Paulstar200/Store-Manager-API | d61e91bff7fc242da2a93d1caf1012465c7c904a | [
"MIT"
] | null | null | null | from flask import Flask, request
from flask_restful import Resource, reqparse
from flask_jwt_extended import create_access_token, jwt_required
from app.api.V1.models import Product, products
# Get a single specific product
| 35.166667 | 111 | 0.616545 |
a0d68497a4530b9b9bb8366ff9da7d608dd9a751 | 1,155 | py | Python | 51-100/p87.py | YiWeiShen/Project-Euler-Hints | a79cacab075dd98d393516f083aaa7ffc6115a06 | [
"MIT"
] | 1 | 2019-02-25T13:00:31.000Z | 2019-02-25T13:00:31.000Z | 51-100/p87.py | YiWeiShen/Project-Euler-Hints | a79cacab075dd98d393516f083aaa7ffc6115a06 | [
"MIT"
] | null | null | null | 51-100/p87.py | YiWeiShen/Project-Euler-Hints | a79cacab075dd98d393516f083aaa7ffc6115a06 | [
"MIT"
] | null | null | null | import time
from multiprocessing.pool import Pool
if __name__ == '__main__':
t = time.time()
p1 = Pool(processes=30)
p2 = Pool(processes=30)
p3 = Pool(processes=30)
num1 = range(2, 7072)
num2 = range(2, 369)
num3 = range(2, 85)
prime_list1 = p1.map(is_prime, num1)
p1.close()
p... | 26.860465 | 65 | 0.587013 |
a0d6b47a07ed18120ebb9b10352d658a22a11ecb | 267 | py | Python | Clean Word/index.py | Sudani-Coder/python | 9c35f04a0521789ba91b7058695139ed074f7796 | [
"MIT"
] | null | null | null | Clean Word/index.py | Sudani-Coder/python | 9c35f04a0521789ba91b7058695139ed074f7796 | [
"MIT"
] | null | null | null | Clean Word/index.py | Sudani-Coder/python | 9c35f04a0521789ba91b7058695139ed074f7796 | [
"MIT"
] | null | null | null | # recursion function (Clean Word)
print(CleanWord("wwwooooorrrrllddd"))
| 19.071429 | 44 | 0.58427 |
a0d7aa3f87b3b51ae56654591cba7faff73f9f8f | 665 | py | Python | commands/rotatecamera.py | 1757WestwoodRobotics/mentorbot | 3db344f3b35c820ada4e1aef3eca9b1fc4c5b85a | [
"MIT"
] | 2 | 2021-11-13T20:18:44.000Z | 2021-11-13T20:27:04.000Z | commands/rotatecamera.py | 1757WestwoodRobotics/mentorbot | 3db344f3b35c820ada4e1aef3eca9b1fc4c5b85a | [
"MIT"
] | null | null | null | commands/rotatecamera.py | 1757WestwoodRobotics/mentorbot | 3db344f3b35c820ada4e1aef3eca9b1fc4c5b85a | [
"MIT"
] | 1 | 2021-11-14T01:38:53.000Z | 2021-11-14T01:38:53.000Z | import typing
from commands2 import CommandBase
from subsystems.cameracontroller import CameraSubsystem
| 28.913043 | 70 | 0.667669 |
a0d85ead79155e87bca877ab2df552ddd4292930 | 8,188 | py | Python | instapp/views.py | uwamahororachel/instagram | d5b7127e62047287dfadec15743676df48f278a9 | [
"MIT"
] | null | null | null | instapp/views.py | uwamahororachel/instagram | d5b7127e62047287dfadec15743676df48f278a9 | [
"MIT"
] | null | null | null | instapp/views.py | uwamahororachel/instagram | d5b7127e62047287dfadec15743676df48f278a9 | [
"MIT"
] | null | null | null | from django.shortcuts import render,redirect
from django.http import HttpResponse, Http404,HttpResponseRedirect
import datetime as dt
from .models import Post,Comment,Follow,Profile
from django.contrib.auth.decorators import login_required
from .forms import NewPostForm, NewCommentForm, AddProfileForm
from django.contr... | 36.882883 | 151 | 0.626282 |
a0d898d83393f9e2a6f4299d21f948ceddccd556 | 238 | py | Python | 2008/wxpytris/wxpytris.py | mikiec84/code-for-blog | 79b2264f9a808eb14f624cb3c5ae7624038c043a | [
"Unlicense"
] | 1,199 | 2015-01-06T14:09:37.000Z | 2022-03-29T19:39:51.000Z | 2008/wxpytris/wxpytris.py | mikiec84/code-for-blog | 79b2264f9a808eb14f624cb3c5ae7624038c043a | [
"Unlicense"
] | 25 | 2016-07-29T15:44:01.000Z | 2021-11-19T16:21:01.000Z | 2008/wxpytris/wxpytris.py | mikiec84/code-for-blog | 79b2264f9a808eb14f624cb3c5ae7624038c043a | [
"Unlicense"
] | 912 | 2015-01-04T00:39:50.000Z | 2022-03-29T06:50:22.000Z | import sys
import wx
sys.path.insert(0, 'lib.zip')
from lib.TetrisGame import TetrisGame
if __name__ == '__main__':
app = wx.PySimpleApp()
frame = TetrisGame(None)
frame.Show(True)
app.MainLoop()
| 11.9 | 38 | 0.617647 |
a0d89d58810bc392058c43540e5719fda8ed9934 | 6,822 | py | Python | cfg.py | alexandonian/relational-set-abstraction | 8af6a6a58883ce59c7b29e4161ff970e3bded642 | [
"MIT"
] | 9 | 2020-09-17T23:09:42.000Z | 2021-12-29T09:56:24.000Z | cfg.py | alexandonian/relational-set-abstraction | 8af6a6a58883ce59c7b29e4161ff970e3bded642 | [
"MIT"
] | null | null | null | cfg.py | alexandonian/relational-set-abstraction | 8af6a6a58883ce59c7b29e4161ff970e3bded642 | [
"MIT"
] | 1 | 2021-01-16T07:19:42.000Z | 2021-01-16T07:19:42.000Z | import argparse
import torch
import logger
import models
import utils
NUM_NODES = {
'moments': 391,
'multimoments': 391,
'kinetics': 608,
}
CRITERIONS = {
'CE': {'func': torch.nn.CrossEntropyLoss},
'MSE': {'func': torch.nn.MSELoss},
'BCE': {'func': torch.nn.BCEWithLogitsLoss},
}
OPTIMIZERS =... | 32.956522 | 86 | 0.650836 |
a0dac9d01fbc63e4052a6ea761aeaa779debac1b | 2,021 | py | Python | Spider/SpiderLab/lab3/lab3/spiders/spider_msg.py | JimouChen/python-application | b7b16506a17e2c304d1c5fabd6385e96be211c56 | [
"Apache-2.0"
] | 1 | 2020-08-09T12:47:27.000Z | 2020-08-09T12:47:27.000Z | Spider/SpiderLab/lab3/lab3/spiders/spider_msg.py | JimouChen/Python_Application | b7b16506a17e2c304d1c5fabd6385e96be211c56 | [
"Apache-2.0"
] | null | null | null | Spider/SpiderLab/lab3/lab3/spiders/spider_msg.py | JimouChen/Python_Application | b7b16506a17e2c304d1c5fabd6385e96be211c56 | [
"Apache-2.0"
] | null | null | null | import scrapy
from bs4 import BeautifulSoup
from lab3.items import Lab3Item
| 40.42 | 102 | 0.568036 |
a0db51a733ae0c8c54da89e34dba10cbd38f7150 | 1,236 | py | Python | Aditya/Parametric_Models/WeiExpLog.py | cipheraxat/Survival-Analysis | fb7ecbe4a61fc72785a4327c86e0f81a58c5b3df | [
"Apache-2.0"
] | 7 | 2020-06-14T20:43:55.000Z | 2020-06-23T06:07:08.000Z | Aditya/Parametric_Models/WeiExpLog.py | Abhijit2505/Survival-Analysis | 94c0c386aacfe03a9f2f018511236292f36c4ed9 | [
"Apache-2.0"
] | 14 | 2020-06-20T06:28:50.000Z | 2020-09-08T15:54:29.000Z | Aditya/Parametric_Models/WeiExpLog.py | Abhijit2505/Survival-Analysis | 94c0c386aacfe03a9f2f018511236292f36c4ed9 | [
"Apache-2.0"
] | 9 | 2020-06-19T03:50:21.000Z | 2021-05-10T18:19:26.000Z | import matplotlib.pyplot as plt
from lifelines import (WeibullFitter, ExponentialFitter,
LogNormalFitter, LogLogisticFitter)
import pandas as pd
data = pd.read_csv('Dataset/telco_customer.csv')
data['tenure'] = pd.to_numeric(data['tenure'])
data = data[data['tenure'] > 0]
# Replace yes and No ... | 34.333333 | 97 | 0.711974 |
a0de95c4112c071280835a86de6b15a92fec2e83 | 2,260 | py | Python | spoteno/steps/numbers.py | Z-80/spoteno | 5d2ae7da437cfd8f9cf351b9602269c115dcd46f | [
"MIT"
] | 2 | 2020-01-16T10:23:05.000Z | 2021-11-17T15:44:29.000Z | spoteno/steps/numbers.py | Z-80/spoteno | 5d2ae7da437cfd8f9cf351b9602269c115dcd46f | [
"MIT"
] | null | null | null | spoteno/steps/numbers.py | Z-80/spoteno | 5d2ae7da437cfd8f9cf351b9602269c115dcd46f | [
"MIT"
] | 2 | 2021-03-25T12:06:36.000Z | 2021-11-17T15:44:30.000Z | import re
import num2words
INT_PATTERN = re.compile(r'^-?[0-9]+$')
FLOAT_PATTERN = re.compile(r'^-?[0-9]+[,\.][0-9]+$')
ORDINAL_PATTERN = re.compile(r'^[0-9]+\.?$')
NUM_PATTERN = re.compile(r'^-?[0-9]+([,\.][0-9]+$)?')
| 23.541667 | 61 | 0.511504 |
a0e1d41f3732cef98c2895b100facec425069d9c | 4,252 | py | Python | src/django_website/django_website/tests/test_views.py | jdheinz/project-ordo_ab_chao | 4063f93b297bab43cff6ca64fa5ba103f0c75158 | [
"MIT"
] | 2 | 2019-09-23T18:42:32.000Z | 2019-09-27T00:33:38.000Z | src/django_website/django_website/tests/test_views.py | jdheinz/project-ordo_ab_chao | 4063f93b297bab43cff6ca64fa5ba103f0c75158 | [
"MIT"
] | 6 | 2021-03-19T03:25:33.000Z | 2022-02-10T08:48:14.000Z | src/django_website/django_website/tests/test_views.py | jdheinz/project-ordo_ab_chao | 4063f93b297bab43cff6ca64fa5ba103f0c75158 | [
"MIT"
] | 6 | 2019-09-23T18:53:41.000Z | 2020-02-06T00:20:06.000Z | from django.test import TransactionTestCase
from django.test import TestCase
from django.urls import reverse
from home_page.models import Search
from ebaysdk.finding import Connection as finding
| 38.654545 | 107 | 0.670508 |
a0e28476be0fa65ebedd554ed275a8386f751e73 | 869 | py | Python | tests/string/generate_string.py | om719/Bloom-Filter-CPP | 8093448b3ea357831b6de25aee9e0e7271b762fa | [
"MIT"
] | 3 | 2021-05-31T18:41:34.000Z | 2021-06-01T04:44:15.000Z | tests/string/generate_string.py | om719/Bloom-Filter-CPP | 8093448b3ea357831b6de25aee9e0e7271b762fa | [
"MIT"
] | null | null | null | tests/string/generate_string.py | om719/Bloom-Filter-CPP | 8093448b3ea357831b6de25aee9e0e7271b762fa | [
"MIT"
] | 2 | 2021-05-31T18:41:48.000Z | 2021-05-31T18:47:14.000Z | from key_generator.key_generator import generate
all_sizes_required = [(100, '100'), (500, '500'), (1000, '1K'), (5000, '5K'), (10000, '10K'), (50000, '50K'), (100000, '100K'), (500000, '500K')]
for file_size in all_sizes_required:
OUTPUT_PATH = "./string_test_" + file_size[1] + ".txt"
STRING_COUNT = file_size[0]
... | 22.868421 | 145 | 0.611047 |
a0e444f5e01631d54753ab517309246502cc9089 | 4,950 | py | Python | resources/portfolio_book.py | basgir/bibliotek | 42456ced804a2c9570227b393de662847283c76f | [
"MIT"
] | null | null | null | resources/portfolio_book.py | basgir/bibliotek | 42456ced804a2c9570227b393de662847283c76f | [
"MIT"
] | null | null | null | resources/portfolio_book.py | basgir/bibliotek | 42456ced804a2c9570227b393de662847283c76f | [
"MIT"
] | null | null | null | ###########################################
# Author : Bastien Girardet, Deborah De Wolff
# Date : 13.05.2018
# Course : Applications in Object-oriented Programming and Databases
# Teachers : Binswanger Johannes, Zrcher Ruben
# Project : Bibliotek
# Name : portfolio_book.py Portfolio_book Flask_restful reso... | 40.57377 | 149 | 0.625051 |
a0e4dae891748b8a01307ae7aac7bc7715d4cc4e | 9,199 | py | Python | examples/the-feeling-of-success/run_experiments.py | yujialuo/erdos | 7a631b55895f1a473b0f4d38a0d6053851e65b5d | [
"Apache-2.0"
] | null | null | null | examples/the-feeling-of-success/run_experiments.py | yujialuo/erdos | 7a631b55895f1a473b0f4d38a0d6053851e65b5d | [
"Apache-2.0"
] | null | null | null | examples/the-feeling-of-success/run_experiments.py | yujialuo/erdos | 7a631b55895f1a473b0f4d38a0d6053851e65b5d | [
"Apache-2.0"
] | null | null | null | import logging
from absl import app
from sensor_msgs.msg import Image
from insert_table_op import InsertTableOperator
from insert_block_op import InsertBlockOperator
from init_robot_op import InitRobotOperator
from gel_sight_op import GelSightOperator
from mock_loc_obj_op import MockLocateObjectOperator
from goto_xyz_... | 35.245211 | 79 | 0.655941 |
a0e5feb7c20a84c78be8423f81add0bb2c5c4589 | 2,686 | py | Python | junction/tickets/migrations/0001_initial.py | theSage21/junction | ac713edcf56c41eb3f066da776a0a5d24e55b46a | [
"MIT"
] | 192 | 2015-01-12T06:21:24.000Z | 2022-03-10T09:57:37.000Z | junction/tickets/migrations/0001_initial.py | theSage21/junction | ac713edcf56c41eb3f066da776a0a5d24e55b46a | [
"MIT"
] | 621 | 2015-01-01T09:19:17.000Z | 2021-05-28T09:27:35.000Z | junction/tickets/migrations/0001_initial.py | theSage21/junction | ac713edcf56c41eb3f066da776a0a5d24e55b46a | [
"MIT"
] | 207 | 2015-01-05T16:39:06.000Z | 2022-02-15T13:18:15.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import jsonfield.fields
from django.conf import settings
from django.db import migrations, models
| 35.813333 | 87 | 0.44341 |
a0e63766143621d523ba6066faa521d14ec9c390 | 1,300 | py | Python | src/bin/calc_stats.py | sw005320/PytorchWaveNetVocoder | b92d7af7d5f2794291e0d462694c0719f75ca469 | [
"Apache-2.0"
] | 1 | 2021-01-18T06:22:30.000Z | 2021-01-18T06:22:30.000Z | src/bin/calc_stats.py | sw005320/PytorchWaveNetVocoder | b92d7af7d5f2794291e0d462694c0719f75ca469 | [
"Apache-2.0"
] | null | null | null | src/bin/calc_stats.py | sw005320/PytorchWaveNetVocoder | b92d7af7d5f2794291e0d462694c0719f75ca469 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2017 Tomoki Hayashi (Nagoya University)
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
from __future__ import print_function
import argparse
import numpy as np
from sklearn.preprocessing import StandardScaler
from utils import read_hdf5
from ut... | 24.074074 | 60 | 0.665385 |
a0e69b24115a09b931149b369f1062a566ff2b61 | 727 | py | Python | python/p002.py | RUiNtheExtinct/project-euler | 5c3e64c7dfcbf52d5213df88d2310550f4ee9ce1 | [
"MIT"
] | null | null | null | python/p002.py | RUiNtheExtinct/project-euler | 5c3e64c7dfcbf52d5213df88d2310550f4ee9ce1 | [
"MIT"
] | null | null | null | python/p002.py | RUiNtheExtinct/project-euler | 5c3e64c7dfcbf52d5213df88d2310550f4ee9ce1 | [
"MIT"
] | null | null | null | # from decimal import Decimal
import collections as coll
import sys
import math as mt
# import random as rd
# import bisect as bi
import time
sys.setrecursionlimit(1000000)
# import numpy as np
# Starting Time
time1 = time.time()
######## CODE STARTS FROM HERE ########
n = uno()
a, b, c, ans = 0, 1, 0, 0
whi... | 14.836735 | 57 | 0.612105 |
a0e7af4439dc68e76e3dc02f0c28bddc41d0fe5c | 7,662 | py | Python | robosuite/models/objects/xml_objects.py | ClaireLC/robosuite | b5c37f1110aefc02106ffd2aed0dfb106bc1bb33 | [
"MIT"
] | 1 | 2021-12-22T13:10:46.000Z | 2021-12-22T13:10:46.000Z | robosuite/models/objects/xml_objects.py | wangcongrobot/robosuite-jr | 738be7a3a83447e78763f6a082faafc8b479c95d | [
"MIT"
] | null | null | null | robosuite/models/objects/xml_objects.py | wangcongrobot/robosuite-jr | 738be7a3a83447e78763f6a082faafc8b479c95d | [
"MIT"
] | 1 | 2020-12-29T01:38:01.000Z | 2020-12-29T01:38:01.000Z | from robosuite.models.objects import MujocoXMLObject
from robosuite.utils.mjcf_utils import xml_path_completion, array_to_string, string_to_array
| 26.512111 | 111 | 0.658053 |
a0e9174ff5dee90055733752e0b8cd4f3423f64e | 1,654 | py | Python | SoftUni-Python-Programming-Course/Exam-Preparation/medicines_in_carton.py | vladislav-karamfilov/Python-Playground | ed83a693d37ff0c1565ece49d2a5d9ecd32c9aac | [
"MIT"
] | 1 | 2019-04-07T23:10:27.000Z | 2019-04-07T23:10:27.000Z | SoftUni-Python-Programming-Course/Exam-Preparation/medicines_in_carton.py | vladislav-karamfilov/Python-Playground | ed83a693d37ff0c1565ece49d2a5d9ecd32c9aac | [
"MIT"
] | null | null | null | SoftUni-Python-Programming-Course/Exam-Preparation/medicines_in_carton.py | vladislav-karamfilov/Python-Playground | ed83a693d37ff0c1565ece49d2a5d9ecd32c9aac | [
"MIT"
] | null | null | null | # Problem description: http://python3.softuni.bg/student/lecture/assignment/56b749af7e4f59b649b7e626/
if __name__ == '__main__':
main()
| 29.535714 | 107 | 0.638452 |
a0e9473241e626ba8085d5563079fd7bc9d6eeb6 | 1,111 | py | Python | var/app_template/views.py | michailbrynard/django-skeleton | 772cd579cad1b8853ed6f1a2c14cbacac2ba41da | [
"MIT"
] | null | null | null | var/app_template/views.py | michailbrynard/django-skeleton | 772cd579cad1b8853ed6f1a2c14cbacac2ba41da | [
"MIT"
] | null | null | null | var/app_template/views.py | michailbrynard/django-skeleton | 772cd579cad1b8853ed6f1a2c14cbacac2ba41da | [
"MIT"
] | null | null | null | # LOGGING
# ---------------------------------------------------------------------------------------------------------------------#
import logging
logger = logging.getLogger('django')
# IMPORTS
# ---------------------------------------------------------------------------------------------------------------------#
# sho... | 32.676471 | 120 | 0.407741 |
a0e9bc2b96c3d8a0da5092d2ce1abf89a56a046d | 858 | py | Python | circuitpy_examples/week1/04_ramp_LED_brightness.py | WSU-Physics/phys150 | 043ebf8212b56a988ef8e41a4464400bec5a7dc1 | [
"MIT"
] | null | null | null | circuitpy_examples/week1/04_ramp_LED_brightness.py | WSU-Physics/phys150 | 043ebf8212b56a988ef8e41a4464400bec5a7dc1 | [
"MIT"
] | null | null | null | circuitpy_examples/week1/04_ramp_LED_brightness.py | WSU-Physics/phys150 | 043ebf8212b56a988ef8e41a4464400bec5a7dc1 | [
"MIT"
] | null | null | null | # Adam Beardsley
# starting from from adafruit example
# https://learn.adafruit.com/welcome-to-circuitpython/creating-and-editing-code
#
import board
import digitalio
import time
led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT
ramp_time = 3 # Time to ramp up, in seconds
period = 0.... | 28.6 | 79 | 0.698135 |
a0ead277852aac4f9b24d58dbb1630e69b9f9cac | 1,099 | py | Python | __main__.py | Makeeyaf/SiteChecker | 969bdedd2d5df36220ff9fcc41e44cf1db0cca00 | [
"MIT"
] | 1 | 2021-01-06T01:45:41.000Z | 2021-01-06T01:45:41.000Z | __main__.py | Makeeyaf/SiteChecker | 969bdedd2d5df36220ff9fcc41e44cf1db0cca00 | [
"MIT"
] | 2 | 2021-01-03T13:25:39.000Z | 2021-01-03T15:57:01.000Z | __main__.py | Makeeyaf/SiteChecker | 969bdedd2d5df36220ff9fcc41e44cf1db0cca00 | [
"MIT"
] | null | null | null | import argparse
from site_checker import SiteChecker
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Check sites text.")
parser.add_argument("config", type=str, nargs=1, help="Path to config json file.")
parser.add_argument(
"-a",
dest="apiKey",
type=str,
... | 26.166667 | 86 | 0.586897 |
a0eb34e703fb20df0982cbdc1702ff56c69d7bb6 | 1,563 | py | Python | autop-listener/autop-listener.py | yuriel-v/ansible | f6e8fcb1edfbef550da2fe217cfd84941523f692 | [
"MIT"
] | null | null | null | autop-listener/autop-listener.py | yuriel-v/ansible | f6e8fcb1edfbef550da2fe217cfd84941523f692 | [
"MIT"
] | null | null | null | autop-listener/autop-listener.py | yuriel-v/ansible | f6e8fcb1edfbef550da2fe217cfd84941523f692 | [
"MIT"
] | null | null | null | import os
from pathlib import Path
from datetime import datetime
from json import dumps
import flask as fsk
from flask import request, jsonify, Response
app = fsk.Flask(__name__)
app.config['DEBUG'] = False
homedir = os.getenv('HOME')
if __name__ == "__main__":
app.run(host='0.0.0.0', port=4960)
| 32.5625 | 136 | 0.658989 |
a0ed35cd2a2fcaf79d84a20f492250006d069eb3 | 3,586 | py | Python | dz_se_comm.py | strebrah/Solaredge_Domoticz_Modbus | 802bfde4f4b458ad0d30d3a9433315e12e3aa837 | [
"MIT"
] | null | null | null | dz_se_comm.py | strebrah/Solaredge_Domoticz_Modbus | 802bfde4f4b458ad0d30d3a9433315e12e3aa837 | [
"MIT"
] | null | null | null | dz_se_comm.py | strebrah/Solaredge_Domoticz_Modbus | 802bfde4f4b458ad0d30d3a9433315e12e3aa837 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
####################################################################################################
# Created by EH (NL) https://github.com/strebrah/Solaredge_Domoticz_Modbus #
# Date: August 2020 ... | 59.766667 | 118 | 0.499721 |
a0edb39559fc23e931152b94ffea25ac01150fa0 | 10,632 | py | Python | parse_mitchell.py | cfwelch/targeted_sentiment | 1c1b063339cdead8f5860df784a0fa170bcdd3ef | [
"MIT"
] | 1 | 2020-12-28T13:51:02.000Z | 2020-12-28T13:51:02.000Z | parse_mitchell.py | cfwelch/targeted_sentiment | 1c1b063339cdead8f5860df784a0fa170bcdd3ef | [
"MIT"
] | 2 | 2018-04-23T02:13:44.000Z | 2018-04-25T04:58:35.000Z | parse_mitchell.py | cfwelch/targeted_sentiment | 1c1b063339cdead8f5860df784a0fa170bcdd3ef | [
"MIT"
] | null | null | null |
import senti_lexis
import datetime, string, numpy, spwrap, random time, sys, re
from sklearn import svm
from sklearn import cross_validation
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.cross_validation import KFold
from scipy.sparse import csr_matrix
if __name__ == "__main__":
main()
| 28.891304 | 93 | 0.60506 |
a0ee65cec9b822e4705a0e2c457a3bbab820bf6b | 1,314 | py | Python | cryptographyMachine/cryptographyMachine.py | anuranjan08/CryptoMachine | 5a1d68adbe88708f21902d1d44a636c043f6ed28 | [
"MIT"
] | null | null | null | cryptographyMachine/cryptographyMachine.py | anuranjan08/CryptoMachine | 5a1d68adbe88708f21902d1d44a636c043f6ed28 | [
"MIT"
] | null | null | null | cryptographyMachine/cryptographyMachine.py | anuranjan08/CryptoMachine | 5a1d68adbe88708f21902d1d44a636c043f6ed28 | [
"MIT"
] | null | null | null |
print(machine())
| 27.375 | 89 | 0.547945 |
a0ee8d887762a2061e866ff6d3e72e86639288e1 | 645 | py | Python | tests/test_ioeeg_abf.py | wonambi-python/wonambi | 4e2834cdd799576d1a231ecb48dfe4da1364fe3a | [
"BSD-3-Clause"
] | 63 | 2017-12-30T08:11:17.000Z | 2022-01-28T10:34:20.000Z | tests/test_ioeeg_abf.py | wonambi-python/wonambi | 4e2834cdd799576d1a231ecb48dfe4da1364fe3a | [
"BSD-3-Clause"
] | 23 | 2017-09-08T08:29:49.000Z | 2022-03-17T08:19:13.000Z | tests/test_ioeeg_abf.py | wonambi-python/wonambi | 4e2834cdd799576d1a231ecb48dfe4da1364fe3a | [
"BSD-3-Clause"
] | 12 | 2017-09-18T12:48:36.000Z | 2021-09-22T07:16:07.000Z | from numpy import isnan
from wonambi import Dataset
from .paths import axon_abf_file
d = Dataset(axon_abf_file)
| 21.5 | 59 | 0.662016 |
a0f1fbf8cfec77c2b1ef56f17fd04592b977c305 | 9,115 | py | Python | tests/Preprocessing_Test.py | Maxence-Labesse/MLKit | 7f8d92b5d3e025dc3719c3bbaf1f2e55afda5107 | [
"MIT"
] | 1 | 2022-01-11T14:13:22.000Z | 2022-01-11T14:13:22.000Z | tests/Preprocessing_Test.py | Maxence-Labesse/MLKit | 7f8d92b5d3e025dc3719c3bbaf1f2e55afda5107 | [
"MIT"
] | null | null | null | tests/Preprocessing_Test.py | Maxence-Labesse/MLKit | 7f8d92b5d3e025dc3719c3bbaf1f2e55afda5107 | [
"MIT"
] | 1 | 2020-07-10T09:51:22.000Z | 2020-07-10T09:51:22.000Z | from AutoMxL.Preprocessing.Categorical import *
from AutoMxL.Preprocessing.Date import *
from AutoMxL.Preprocessing.Outliers import *
from AutoMxL.Preprocessing.Missing_Values import *
import unittest
import pandas as pd
import math
# test config
df = pd.read_csv('tests/df_test_bis.csv')
"""
-----------------------... | 43.822115 | 120 | 0.622929 |
a0f259a7948c591dd236fbcc2a29325e01018267 | 218 | py | Python | PythonTutor/session-4/conditionIfelse.py | krishnamanchikalapudi/examples.py | 7a373d24df06b8882d07b850435b268a24317b1e | [
"MIT"
] | null | null | null | PythonTutor/session-4/conditionIfelse.py | krishnamanchikalapudi/examples.py | 7a373d24df06b8882d07b850435b268a24317b1e | [
"MIT"
] | 1 | 2020-02-14T13:24:01.000Z | 2020-02-14T13:24:01.000Z | PythonTutor/session-4/conditionIfelse.py | krishnamanchikalapudi/examples.py | 7a373d24df06b8882d07b850435b268a24317b1e | [
"MIT"
] | 2 | 2020-02-14T13:21:20.000Z | 2021-06-30T00:50:33.000Z | """
Session: 4
Topic: Conditional: IF ELSE statement
"""
x = 20
y = 100
if (x > y):
print ('x > y is true')
print ('new line 1')
else:
print('x > y is false')
print('new line 2')
print ('new line 3')
| 13.625 | 37 | 0.550459 |
a0f3c7164fd5d0e03360ed4d29df99912a368e12 | 915 | py | Python | day02/day02.py | pogross/adventofcode2021 | 33fc177d30e1104a6203e435f83594c4d3774cdb | [
"MIT"
] | null | null | null | day02/day02.py | pogross/adventofcode2021 | 33fc177d30e1104a6203e435f83594c4d3774cdb | [
"MIT"
] | null | null | null | day02/day02.py | pogross/adventofcode2021 | 33fc177d30e1104a6203e435f83594c4d3774cdb | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
with open("input.txt") as f:
raw = f.read()
commands = [x for x in raw.split("\n")]
horizontal, depth = chain_commands(commands)
print(f"First answer is {horizontal*depth}")
# print(f"Second answer is {count_increasing(measurements, 3)}")
| 26.911765 | 68 | 0.636066 |
a0f92a83ae88dda1724d8249cb3715aea8d6c4ad | 2,073 | py | Python | execute.py | r-kapoor/ranking-extractions | 59ed7f23d120d1bc7f0ee2af48ffa61817fd1715 | [
"MIT"
] | null | null | null | execute.py | r-kapoor/ranking-extractions | 59ed7f23d120d1bc7f0ee2af48ffa61817fd1715 | [
"MIT"
] | null | null | null | execute.py | r-kapoor/ranking-extractions | 59ed7f23d120d1bc7f0ee2af48ffa61817fd1715 | [
"MIT"
] | null | null | null | import codecs
import json
import rank
import train_ranker
#Files to be present in home dir
TRAINING_FILE_CITIES = 'manual_7_cities.jl'
TRAINING_FILE_NAMES = 'manual_50_names.jl'
TRAINING_FILE_ETHNICITIES = 'manual_50_ethnicities.jl'
ACTUAL_FILE_CITIES = 'manual_50_cities.jl'
ACTUAL_FILE_NAMES = 'manual_50_names.jl'
A... | 29.614286 | 97 | 0.721177 |
a0f9341f558e2700ed30e7586738a7942212308d | 336 | py | Python | Python-codes-CeV/32-Leap_year.py | engcristian/Python | 726a53e9499fd5d0594572298e59e318f98e2d36 | [
"MIT"
] | 1 | 2021-02-22T03:53:23.000Z | 2021-02-22T03:53:23.000Z | Python-codes-CeV/32-Leap_year.py | engcristian/Python | 726a53e9499fd5d0594572298e59e318f98e2d36 | [
"MIT"
] | null | null | null | Python-codes-CeV/32-Leap_year.py | engcristian/Python | 726a53e9499fd5d0594572298e59e318f98e2d36 | [
"MIT"
] | null | null | null | ''' Calculat the leap year'''
from datetime import date
year = int(input('What year do you want to analyse? Type 0 for the current year.'))
if year == 0:
year = date.today().year
if year%4 ==0 and year%100 != 0 or year%400 == 0:
print(F"The year {year} it's a LEAP year.".)
else:
print(F"The year {year} isn'... | 37.333333 | 84 | 0.645833 |
a0f9bbfc405c03e8dff904c969ce60482f1a635c | 567 | py | Python | thesis/code/fairness/gen.py | fz1989/master-thesis | e47af8c90d8d18d87f906a7a4bcadb64669e70db | [
"MIT"
] | null | null | null | thesis/code/fairness/gen.py | fz1989/master-thesis | e47af8c90d8d18d87f906a7a4bcadb64669e70db | [
"MIT"
] | null | null | null | thesis/code/fairness/gen.py | fz1989/master-thesis | e47af8c90d8d18d87f906a7a4bcadb64669e70db | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#coding=utf-8
import numpy
if __name__ == "__main__":
task_list = get_task_list()
for task in task_list:
print "%d\t%d" % (task.cpu, task.mem)
| 21 | 47 | 0.589065 |
a0fa30f527e6c86b6cb9dc5b7f38c0821721deb9 | 71 | py | Python | tests/routes/__init__.py | Bachhofer/spottydata | e9334c2a32bb65018b57d83fc4522ae241427db7 | [
"MIT"
] | null | null | null | tests/routes/__init__.py | Bachhofer/spottydata | e9334c2a32bb65018b57d83fc4522ae241427db7 | [
"MIT"
] | null | null | null | tests/routes/__init__.py | Bachhofer/spottydata | e9334c2a32bb65018b57d83fc4522ae241427db7 | [
"MIT"
] | null | null | null | # This is an empty python file to expose this directory to it's parent
| 35.5 | 70 | 0.774648 |
a0fccc7e51abcecde4662d4c35aa618544e6087c | 7,500 | py | Python | Perceptual Hash -Asher/ex1/example_solution.py | kidist-amde/image-search-engine | 467d022f7248a74822dd9ae938b5b86333ce417a | [
"MIT"
] | null | null | null | Perceptual Hash -Asher/ex1/example_solution.py | kidist-amde/image-search-engine | 467d022f7248a74822dd9ae938b5b86333ce417a | [
"MIT"
] | null | null | null | Perceptual Hash -Asher/ex1/example_solution.py | kidist-amde/image-search-engine | 467d022f7248a74822dd9ae938b5b86333ce417a | [
"MIT"
] | null | null | null | import os
import cv2
from sklearn.cluster import KMeans, DBSCAN, MiniBatchKMeans
from scipy import spatial
from sklearn.preprocessing import StandardScaler
import numpy as np
from tqdm import tqdm
import argparse
parser = argparse.ArgumentParser(description='Challenge presentation example')
parser.add_argument('--data... | 34.246575 | 122 | 0.608133 |
a0fd132d4d35c39d83a7f211d5d4e4443ddf2030 | 1,399 | py | Python | src/modeling/train_test.py | samsonq/Macroeconomic-Default-Analysis | 1a155873f951b1584c33c2d91bd525b67f78136d | [
"MIT"
] | 4 | 2020-06-12T22:20:48.000Z | 2021-08-08T15:49:38.000Z | src/modeling/train_test.py | samsonq/Macroeconomic-Default-Analysis | 1a155873f951b1584c33c2d91bd525b67f78136d | [
"MIT"
] | 1 | 2020-04-15T07:11:43.000Z | 2020-04-15T07:11:43.000Z | src/modeling/train_test.py | samsonq/Macroeconomic-Default-Analysis | 1a155873f951b1584c33c2d91bd525b67f78136d | [
"MIT"
] | 3 | 2020-09-18T02:27:58.000Z | 2021-10-30T21:22:10.000Z | """
Prepare training, validation, and testing data after preprocessing of the large dataset. Used in
training and evaluating models.
"""
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
def feature_selection(data, features):
"""
Choose which features to use for trai... | 35.871795 | 114 | 0.735525 |
a0fd2af6803ffa9be2e8f4bfae48a6a7e68eb4ea | 179,927 | py | Python | cyberradiodriver/CyberRadioDriver/radio.py | CyberRadio/CyberRadioDriver | 44e6fc0e805981981514e6edc18d11d5fa33e659 | [
"MIT"
] | null | null | null | cyberradiodriver/CyberRadioDriver/radio.py | CyberRadio/CyberRadioDriver | 44e6fc0e805981981514e6edc18d11d5fa33e659 | [
"MIT"
] | null | null | null | cyberradiodriver/CyberRadioDriver/radio.py | CyberRadio/CyberRadioDriver | 44e6fc0e805981981514e6edc18d11d5fa33e659 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
###############################################################
# \package CyberRadioDriver.radio
#
# \brief Defines basic functionality for radio handler objects.
#
# \note This module defines basic behavior only. To customize
# a radio handler class for a particular radio, derive a new
# ... | 43.884634 | 168 | 0.591156 |
a0fde969f3e2acaa6481f6fe003e765cdca46b4c | 1,686 | py | Python | alpha_zero/NeuralNet.py | blekinge/alpha-zero-general | 7cc33e9b2e40602549b59fe753956e69a56f51f1 | [
"MIT"
] | null | null | null | alpha_zero/NeuralNet.py | blekinge/alpha-zero-general | 7cc33e9b2e40602549b59fe753956e69a56f51f1 | [
"MIT"
] | null | null | null | alpha_zero/NeuralNet.py | blekinge/alpha-zero-general | 7cc33e9b2e40602549b59fe753956e69a56f51f1 | [
"MIT"
] | null | null | null | from typing import List, Tuple
import numpy as np
from alpha_zero.Board import Board
| 31.222222 | 102 | 0.6293 |
a0fef1eaf1459e3aa6754a55ca8204b402a0ab05 | 785 | py | Python | server/app/forms.py | zhancongc/bugaboo | ac78e7e0274492273554b089122196b7869e8bfb | [
"Apache-2.0"
] | null | null | null | server/app/forms.py | zhancongc/bugaboo | ac78e7e0274492273554b089122196b7869e8bfb | [
"Apache-2.0"
] | null | null | null | server/app/forms.py | zhancongc/bugaboo | ac78e7e0274492273554b089122196b7869e8bfb | [
"Apache-2.0"
] | null | null | null | """
Project : bugaboo
Filename : forms.py
Author : zhancongc
Description :
"""
from flask_wtf import FlaskForm
from wtforms import StringField, BooleanField, TextAreaField, SelectField, FileField, IntegerField, PasswordField, SubmitField
from wtforms.validators import DataRequired
| 23.787879 | 126 | 0.718471 |
9d006b0d7e89fe26f4e43d422a80339277272355 | 3,836 | py | Python | synthdid/variance.py | MasaAsami/pysynthdid | 01afe33ae22f513c65f9cfdec56a4b21ca547c28 | [
"Apache-2.0"
] | null | null | null | synthdid/variance.py | MasaAsami/pysynthdid | 01afe33ae22f513c65f9cfdec56a4b21ca547c28 | [
"Apache-2.0"
] | null | null | null | synthdid/variance.py | MasaAsami/pysynthdid | 01afe33ae22f513c65f9cfdec56a4b21ca547c28 | [
"Apache-2.0"
] | 2 | 2022-03-11T03:13:36.000Z | 2022-03-20T22:55:13.000Z | import pandas as pd
import numpy as np
from tqdm import tqdm
| 36.884615 | 88 | 0.516945 |
9d01bb83bee5f2c4612c59332de6ea7b9e34ac2f | 681 | py | Python | todo/views.py | arascch/Todo_list | a4c88abaa4e6c1e158135b4fce4bcfbf64cb86e2 | [
"Apache-2.0"
] | 1 | 2020-03-24T09:26:23.000Z | 2020-03-24T09:26:23.000Z | todo/views.py | arascch/Todo_list | a4c88abaa4e6c1e158135b4fce4bcfbf64cb86e2 | [
"Apache-2.0"
] | null | null | null | todo/views.py | arascch/Todo_list | a4c88abaa4e6c1e158135b4fce4bcfbf64cb86e2 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from django.utils import timezone
from todo.models import Todo
from django.http import HttpResponseRedirect
| 35.842105 | 82 | 0.737151 |
9d02e73cfc6d5e0a0462f594bbcafd9199cb2c88 | 816 | py | Python | Easy/Hangman/HangMan - Stage 6.py | michael-act/HyperSkill | ce16eb3b6f755f7f8f21a57ef2679fcb8a4bd55c | [
"MIT"
] | 1 | 2020-11-17T18:09:30.000Z | 2020-11-17T18:09:30.000Z | Easy/Hangman/HangMan - Stage 6.py | michael-act/HyperSkill | ce16eb3b6f755f7f8f21a57ef2679fcb8a4bd55c | [
"MIT"
] | null | null | null | Easy/Hangman/HangMan - Stage 6.py | michael-act/HyperSkill | ce16eb3b6f755f7f8f21a57ef2679fcb8a4bd55c | [
"MIT"
] | null | null | null | import random
category = ['python', 'java', 'kotlin', 'javascript']
computer = random.choice(category)
hidden = list(len(computer) * "-")
print("H A N G M A N")
counter = 8
while counter > 0:
print()
print("".join(hidden))
letter = input("Input a letter: ")
if (letter in hidden) or (letter in hidden... | 24 | 61 | 0.616422 |
9d03157b2910202ba3c53d84197f7000003a404d | 6,536 | py | Python | sklcc/taskEdit.py | pyxuweitao/MSZ_YCL | 23323c4660f44af0a45d6ab81cd496b81976f5a0 | [
"Apache-2.0"
] | null | null | null | sklcc/taskEdit.py | pyxuweitao/MSZ_YCL | 23323c4660f44af0a45d6ab81cd496b81976f5a0 | [
"Apache-2.0"
] | null | null | null | sklcc/taskEdit.py | pyxuweitao/MSZ_YCL | 23323c4660f44af0a45d6ab81cd496b81976f5a0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
task
"""
__author__ = "XuWeitao"
import CommonUtilities
import rawSql
def getTasksList(UserID):
"""
:param UserID:IDALL
:return:{
"SerialNo":, "CreateTime":, "LastModifiedTime":,
"ProductNo":, "ColorNo":, "ArriveTime":, "Name":,
"GongYingShang":{"id":, "name":},
"WuLiao":{"... | 41.106918 | 140 | 0.671665 |
9d07e918f729733a967e2d67e465e2cf7ce7d2a4 | 11,417 | py | Python | tensor2tensor/models/revnet.py | ysglh/tensor2tensor | f55462a9928f3f8af0b1275a4fb40d13cae6cc79 | [
"Apache-2.0"
] | null | null | null | tensor2tensor/models/revnet.py | ysglh/tensor2tensor | f55462a9928f3f8af0b1275a4fb40d13cae6cc79 | [
"Apache-2.0"
] | null | null | null | tensor2tensor/models/revnet.py | ysglh/tensor2tensor | f55462a9928f3f8af0b1275a4fb40d13cae6cc79 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2017 The Tensor2Tensor Authors.
#
# 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... | 38.441077 | 80 | 0.681177 |
9d08e38fa29119640133acdff959362b1c00409d | 4,166 | py | Python | tests/unit/test_services.py | BlooAM/Online-shopping-app | aa68d258fe32bf5a792e534dddd9def7c25460e2 | [
"MIT"
] | null | null | null | tests/unit/test_services.py | BlooAM/Online-shopping-app | aa68d258fe32bf5a792e534dddd9def7c25460e2 | [
"MIT"
] | null | null | null | tests/unit/test_services.py | BlooAM/Online-shopping-app | aa68d258fe32bf5a792e534dddd9def7c25460e2 | [
"MIT"
] | null | null | null | import pytest
from datetime import date, timedelta
from adapters import repository
from domain.model import Batch, OrderLine, allocate, OutOfStock
from domain import model
from service_layer import handlers, unit_of_work
today = date.today()
tomorrow = today + timedelta(days=1)
later = tomorrow + timedelta(days=1... | 32.046154 | 89 | 0.702112 |
9d08ebe64750ed4ee86af0207bca624b0391ff75 | 1,786 | py | Python | DQMOffline/L1Trigger/python/L1TEGammaOffline_cfi.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | DQMOffline/L1Trigger/python/L1TEGammaOffline_cfi.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | DQMOffline/L1Trigger/python/L1TEGammaOffline_cfi.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | import FWCore.ParameterSet.Config as cms
electronEfficiencyThresholds = [36, 68, 128, 176]
electronEfficiencyBins = []
electronEfficiencyBins.extend(list(xrange(0, 120, 10)))
electronEfficiencyBins.extend(list(xrange(120, 180, 20)))
electronEfficiencyBins.extend(list(xrange(180, 300, 40)))
electronEfficiencyBins.exte... | 37.208333 | 75 | 0.783875 |
9d092f6e945eea14883d51652329fcd4951dee46 | 18,548 | py | Python | ion_networks/numba_functions.py | swillems/ion_networks | 5304a92248ec007ac2253f246a3d44bdb58ae110 | [
"MIT"
] | 2 | 2020-10-28T16:11:56.000Z | 2020-12-03T13:19:18.000Z | ion_networks/numba_functions.py | swillems/ion_networks | 5304a92248ec007ac2253f246a3d44bdb58ae110 | [
"MIT"
] | null | null | null | ion_networks/numba_functions.py | swillems/ion_networks | 5304a92248ec007ac2253f246a3d44bdb58ae110 | [
"MIT"
] | null | null | null | #!python
# external
import numpy as np
import numba
| 34.864662 | 82 | 0.630418 |
9d099c325b8e8eb13555bc61afea2a208b9050c9 | 241 | py | Python | Programming Fundamentals/Dictionaries/bakery.py | antonarnaudov/SoftUniProjects | 01cbdce2b350b57240045d1bc3e21d34f9d0351d | [
"MIT"
] | null | null | null | Programming Fundamentals/Dictionaries/bakery.py | antonarnaudov/SoftUniProjects | 01cbdce2b350b57240045d1bc3e21d34f9d0351d | [
"MIT"
] | null | null | null | Programming Fundamentals/Dictionaries/bakery.py | antonarnaudov/SoftUniProjects | 01cbdce2b350b57240045d1bc3e21d34f9d0351d | [
"MIT"
] | null | null | null |
tokens = input().split(' ')
print(result(tokens)) | 18.538462 | 40 | 0.564315 |
9d0ab807d87d356a4a4fb529654e22486400f676 | 1,525 | py | Python | vtrace/const.py | rnui2k/vivisect | b7b00f2d03defef28b4b8c912e3a8016e956c5f7 | [
"ECL-2.0",
"Apache-2.0"
] | 716 | 2015-01-01T14:41:11.000Z | 2022-03-28T06:51:50.000Z | vtrace/const.py | rnui2k/vivisect | b7b00f2d03defef28b4b8c912e3a8016e956c5f7 | [
"ECL-2.0",
"Apache-2.0"
] | 266 | 2015-01-01T15:07:27.000Z | 2022-03-30T15:19:26.000Z | vtrace/const.py | rnui2k/vivisect | b7b00f2d03defef28b4b8c912e3a8016e956c5f7 | [
"ECL-2.0",
"Apache-2.0"
] | 159 | 2015-01-01T16:19:44.000Z | 2022-03-21T21:55:34.000Z | # Order must match format junk
# NOTIFY_ALL is kinda special, if you registerNotifier
# with it, you get ALL notifications.
NOTIFY_ALL = 0 # Get all notifications
NOTIFY_SIGNAL = 1 # Callback on signal/exception
NOTIFY_BREAK = 2 # Callback on breakpoint / sigtrap
NOTIFY_STEP = 3 # Callback... | 33.152174 | 66 | 0.733115 |
9d0d12599f8d63386d38681b6e12a10636886357 | 3,248 | py | Python | src/ezdxf/groupby.py | jkjt/ezdxf | 2acc5611b81476ea16b98063b9f55446a9182b81 | [
"MIT"
] | 515 | 2017-01-25T05:46:52.000Z | 2022-03-29T09:52:27.000Z | src/ezdxf/groupby.py | jkjt/ezdxf | 2acc5611b81476ea16b98063b9f55446a9182b81 | [
"MIT"
] | 417 | 2017-01-25T10:01:17.000Z | 2022-03-29T09:22:04.000Z | src/ezdxf/groupby.py | jkjt/ezdxf | 2acc5611b81476ea16b98063b9f55446a9182b81 | [
"MIT"
] | 149 | 2017-02-01T15:52:02.000Z | 2022-03-17T10:33:38.000Z | # Purpose: Grouping entities by DXF attributes or a key function.
# Copyright (c) 2017-2021, Manfred Moitzi
# License: MIT License
from typing import Iterable, Hashable, Dict, List, TYPE_CHECKING
from ezdxf.lldxf.const import DXFValueError, DXFAttributeError
if TYPE_CHECKING:
from ezdxf.eztypes import DXFEntity, ... | 35.692308 | 79 | 0.601293 |
9d0e38af685d991cde1a6a41f4c243ad673af7b8 | 1,839 | py | Python | tests/test_basic.py | nk412/companycase | 5b93478a79293a4bc93112b805eff56c44756f18 | [
"MIT"
] | 7 | 2016-09-08T15:25:33.000Z | 2022-02-01T13:21:40.000Z | tests/test_basic.py | nk412/companycase | 5b93478a79293a4bc93112b805eff56c44756f18 | [
"MIT"
] | 1 | 2016-07-12T10:36:02.000Z | 2016-07-12T10:36:02.000Z | tests/test_basic.py | nk412/companycase | 5b93478a79293a4bc93112b805eff56c44756f18 | [
"MIT"
] | 2 | 2016-09-17T17:41:28.000Z | 2020-02-29T22:58:09.000Z | # coding=utf-8
import unittest
from companycase import CompanyCase
if __name__ == '__main__':
unittest.main()
| 39.12766 | 113 | 0.659598 |
9d0eed15b3c0630d157c26b0aac4e458a282e19f | 8,527 | py | Python | main_single.py | wang-chen/AirLoop | 12fb442c911002427a51f00d43f747ef593bd186 | [
"BSD-3-Clause"
] | 39 | 2021-09-28T19:48:13.000Z | 2022-03-17T06:44:19.000Z | main_single.py | wang-chen/AirLoop | 12fb442c911002427a51f00d43f747ef593bd186 | [
"BSD-3-Clause"
] | null | null | null | main_single.py | wang-chen/AirLoop | 12fb442c911002427a51f00d43f747ef593bd186 | [
"BSD-3-Clause"
] | 3 | 2021-10-04T01:26:17.000Z | 2022-02-12T04:48:50.000Z | #!/usr/bin/env python3
import os
import tqdm
import torch
import random
import numpy as np
import torch.nn as nn
import configargparse
import torch.optim as optim
from tensorboard import program
from torch.utils.tensorboard import SummaryWriter
import yaml
from models import FeatureNet
from datasets import get_datase... | 45.844086 | 137 | 0.673273 |
9d0fc4d37e8008ce4ffedc8ff1748729bd11a8f1 | 271 | py | Python | skilletlib/skillet/__init__.py | annabarone/skilletlib | d1298218a1a0be35eb9fac2ae79323df600d8900 | [
"Apache-2.0"
] | 6 | 2020-04-27T18:08:02.000Z | 2022-01-14T13:27:19.000Z | skilletlib/skillet/__init__.py | annabarone/skilletlib | d1298218a1a0be35eb9fac2ae79323df600d8900 | [
"Apache-2.0"
] | 85 | 2019-10-28T19:13:55.000Z | 2021-07-14T13:00:28.000Z | skilletlib/skillet/__init__.py | annabarone/skilletlib | d1298218a1a0be35eb9fac2ae79323df600d8900 | [
"Apache-2.0"
] | 7 | 2019-12-05T20:17:16.000Z | 2021-12-09T01:16:58.000Z | # from .panos import PanosSkillet
# from .docker import DockerSkillet
# from .pan_validation import PanValidationSkillet
# from .python3 import Python3Skillet
# from .rest import RestSkillet
# from .template import TemplateSkillet
# from .workflow import WorkflowSkillet
| 33.875 | 50 | 0.819188 |
9d10f233df729f37438c93bc6d49f9504b03d459 | 1,192 | py | Python | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/rss_proxy/views.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 3 | 2021-12-15T04:58:18.000Z | 2022-02-06T12:15:37.000Z | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/rss_proxy/views.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | null | null | null | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/rss_proxy/views.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 1 | 2019-01-02T14:38:50.000Z | 2019-01-02T14:38:50.000Z | """
Views for the rss_proxy djangoapp.
"""
import requests
from django.conf import settings
from django.core.cache import cache
from django.http import HttpResponse, HttpResponseNotFound
from lms.djangoapps.rss_proxy.models import WhitelistedRssUrl
CACHE_KEY_RSS = "rss_proxy.{url}"
def proxy(request):
"""
... | 29.8 | 84 | 0.653523 |
9d1115c99ef6af6ee80e12df2bf5eac7ff811ea7 | 149 | py | Python | CorePythonProg/ch02/0206.py | mallius/CppPrimer | 0285fabe5934492dfed0a9cf67ba5650982a5f76 | [
"MIT"
] | null | null | null | CorePythonProg/ch02/0206.py | mallius/CppPrimer | 0285fabe5934492dfed0a9cf67ba5650982a5f76 | [
"MIT"
] | null | null | null | CorePythonProg/ch02/0206.py | mallius/CppPrimer | 0285fabe5934492dfed0a9cf67ba5650982a5f76 | [
"MIT"
] | 1 | 2022-01-25T15:51:34.000Z | 2022-01-25T15:51:34.000Z | #!/usr/bin/env python
numTemp = raw_input('Enter a number: ')
num = int(numTemp)
if num > 0:
print '>0'
elif num ==0:
print '0'
else:
print '<0'
| 13.545455 | 39 | 0.61745 |
9d123f052b89aece17eb457b8ad9cafa6d71e501 | 314 | py | Python | bootcamp/accounts/urls.py | elbakouchi/bootcamp | 2c7a0cd2ddb7632acb3009f94d728792ddf9644f | [
"MIT"
] | null | null | null | bootcamp/accounts/urls.py | elbakouchi/bootcamp | 2c7a0cd2ddb7632acb3009f94d728792ddf9644f | [
"MIT"
] | null | null | null | bootcamp/accounts/urls.py | elbakouchi/bootcamp | 2c7a0cd2ddb7632acb3009f94d728792ddf9644f | [
"MIT"
] | null | null | null | from django.conf.urls import url
from .views import *
app_name = "accounts"
urlpatterns = [
url(r"^signup/$", CustomSignupView.as_view(), name="custom_signup"),
url(r"^destroy/$", AjaxLogoutView.as_view(), name="destroy"),
url(r"^(?P<username>[\w.@+-]+)/$", ProfileView.as_view(), name="profile"),
]
| 28.545455 | 78 | 0.652866 |
9d1277aded11ab70c99a610d14fb0758ed951638 | 8,195 | py | Python | utils/mininet/mininet_builder.py | jstavr/SDN_Project | 9fe5a65f46eadf15e1da43d9f8125b8c15161bbd | [
"Apache-2.0"
] | null | null | null | utils/mininet/mininet_builder.py | jstavr/SDN_Project | 9fe5a65f46eadf15e1da43d9f8125b8c15161bbd | [
"Apache-2.0"
] | null | null | null | utils/mininet/mininet_builder.py | jstavr/SDN_Project | 9fe5a65f46eadf15e1da43d9f8125b8c15161bbd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
Description: Load topology in Mininet
Author: James Hongyi Zeng (hyzeng_at_stanford.edu)
'''
from argparse import ArgumentParser
from socket import gethostbyname
from os import getuid
from mininet.log import lg, info
from mininet.cli import CLI
from mininet.net import Mininet
from ... | 39.210526 | 150 | 0.598292 |
9d1338f96592532b4f49b0f4d8c0180dee99ffe0 | 1,833 | py | Python | tests/integration/test_translated_content.py | asmeurer/nikola | ea1c651bfed0fd6337f1d22cf8dd99899722912c | [
"MIT"
] | 1,901 | 2015-01-02T02:49:51.000Z | 2022-03-30T23:31:35.000Z | tests/integration/test_translated_content.py | asmeurer/nikola | ea1c651bfed0fd6337f1d22cf8dd99899722912c | [
"MIT"
] | 1,755 | 2015-01-01T08:17:16.000Z | 2022-03-24T18:02:22.000Z | tests/integration/test_translated_content.py | asmeurer/nikola | ea1c651bfed0fd6337f1d22cf8dd99899722912c | [
"MIT"
] | 421 | 2015-01-02T18:06:37.000Z | 2022-03-28T23:18:54.000Z | """
Test a site with translated content.
Do not test titles as we remove the translation.
"""
import io
import os
import shutil
import lxml.html
import pytest
import nikola.plugins.command.init
from nikola import __main__
from .helper import cd
from .test_empty_build import ( # NOQA
test_archive_exists,
t... | 29.095238 | 88 | 0.681942 |
9d13de1d5fcb7bb17eb81bbe83f7d14929b0ec78 | 8,826 | py | Python | src/train.py | weiyi1991/UA_Concurrent | 11238c778c60095abf326800d6e6a13a643bf071 | [
"MIT"
] | null | null | null | src/train.py | weiyi1991/UA_Concurrent | 11238c778c60095abf326800d6e6a13a643bf071 | [
"MIT"
] | 1 | 2020-09-02T12:24:59.000Z | 2020-09-02T12:24:59.000Z | src/train.py | weiyi1991/UA_Concurrent | 11238c778c60095abf326800d6e6a13a643bf071 | [
"MIT"
] | null | null | null | import argparse
import os
import torch
import torch.nn.functional as F
from model_ST import *
import data
import numpy as np
import matplotlib.pyplot as plt
from torch.utils.data import Dataset, DataLoader
import sys
from predict import evaluate_MA
from tensorboardX import SummaryWriter
# print model parameter
# Trai... | 41.051163 | 140 | 0.643327 |
9d192ebb1226024bcb7fe7faa5cd19ef549419f8 | 130 | py | Python | illud/exceptions/quit_exception.py | AustinScola/illud | a6aca1de38bbe9d5a795aaa084bcbd6731767d18 | [
"MIT"
] | 1 | 2020-12-05T00:59:15.000Z | 2020-12-05T00:59:15.000Z | illud/exceptions/quit_exception.py | AustinScola/illud | a6aca1de38bbe9d5a795aaa084bcbd6731767d18 | [
"MIT"
] | 112 | 2021-01-15T21:42:27.000Z | 2021-04-17T19:11:21.000Z | illud/exceptions/quit_exception.py | AustinScola/illud | a6aca1de38bbe9d5a795aaa084bcbd6731767d18 | [
"MIT"
] | null | null | null | """Raised to quit."""
from illud.exception import IlludException
| 18.571429 | 42 | 0.723077 |
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
| 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
| 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'
| 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
default_applications = ['Utilities','App Store.app','Automator.app','Calculator.app','Calendar.app','Chess.app','Contacts.app','Dashboard.app','Dictionary.app','DVD Player.app','FaceTime.app','Font Book.app','iBooks.app','Image Capture.app','iTunes.app','Launchpa... | 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
| 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
| 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
| 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 |
# a = rwh_primes2(100)
# print(a)
# http://stackoverflow.com/questions/2068372/fastest-way-to-list-all-primes-below-n-in-python/3035188#3035188
""" Input n>=6, Returns a list of primes, 2 <= p < n """
print(sieve_for_primes_to(3))
print(sieve_for_primes_to(1))
print(sieve_for_primes_to(100))
| 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
# push the competitive center
if __name__ == '__main__':
competitive_k_means()
| 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
| 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
| 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
if __name__ == '__main__':
test_functional_api()
test_regression()
test_cifar()
| 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 trueif 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].
E... | 20.196078 | 77 | 0.586408 |
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
| 27.189189 | 74 | 0.614314 |