hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 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.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79646d890c6b6f0a6a0f969a6813a1ab31dc03dd | 4,128 | py | Python | google/ads/google_ads/v6/proto/resources/campaign_audience_view_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v6/proto/resources/campaign_audience_view_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v6/proto/resources/campaign_audience_view_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/ads/googleads/v6/resources/campaign_audience_view.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf imp... | 52.923077 | 845 | 0.815407 |
79646dd141a65a77d89189f47cad8e701172acd3 | 897 | py | Python | WebDetector/urls.py | jordonyang/WebDetector | e765853f9c427bff014514c22663e1b29c5a1fce | [
"MIT"
] | 5 | 2018-08-02T13:18:14.000Z | 2019-10-12T13:33:41.000Z | WebDetector/urls.py | jordonyang/WebDetector | e765853f9c427bff014514c22663e1b29c5a1fce | [
"MIT"
] | null | null | null | WebDetector/urls.py | jordonyang/WebDetector | e765853f9c427bff014514c22663e1b29c5a1fce | [
"MIT"
] | 2 | 2020-09-15T17:14:27.000Z | 2021-04-07T08:50:02.000Z | """DjiangoLearning URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Cla... | 30.931034 | 77 | 0.687848 |
79646dec99db38b6ddd6bfd96db09a2561b7e2a9 | 3,236 | py | Python | Paper_Specific_Versions/2018_NeuroImage/Code/experiments/4-influence_of_dataset/3-49s_ADNI_on_70s_datasets/ADNI_on_OASIS_run_classifications_region.py | adamwild/AD-ML | e4ac0b7d312ab482b9b52bb3f5c6745cc06431e9 | [
"MIT"
] | null | null | null | Paper_Specific_Versions/2018_NeuroImage/Code/experiments/4-influence_of_dataset/3-49s_ADNI_on_70s_datasets/ADNI_on_OASIS_run_classifications_region.py | adamwild/AD-ML | e4ac0b7d312ab482b9b52bb3f5c6745cc06431e9 | [
"MIT"
] | null | null | null | Paper_Specific_Versions/2018_NeuroImage/Code/experiments/4-influence_of_dataset/3-49s_ADNI_on_70s_datasets/ADNI_on_OASIS_run_classifications_region.py | adamwild/AD-ML | e4ac0b7d312ab482b9b52bb3f5c6745cc06431e9 | [
"MIT"
] | null | null | null |
import os
from os import path
import pandas as pd
import numpy as np
from clinica.pipelines.machine_learning.input import CAPSRegionBasedInput
import clinica.pipelines.machine_learning.svm_utils as utils
from sklearn.metrics import roc_auc_score
caps_dir = '/OASIS/CAPS'
adni_caps_dir = '/ADNI/CAPS'
adni_output_di... | 38.52381 | 137 | 0.585909 |
79646e38e4f80bcc56c170f3a3a7e7294a4fc326 | 2,060 | py | Python | e_A2C/A2C_model_load_and_play.py | linklab/minimal_rl | 382d99ca355ea405414c4ed1077fb4e8ed3532a9 | [
"MIT"
] | null | null | null | e_A2C/A2C_model_load_and_play.py | linklab/minimal_rl | 382d99ca355ea405414c4ed1077fb4e8ed3532a9 | [
"MIT"
] | null | null | null | e_A2C/A2C_model_load_and_play.py | linklab/minimal_rl | 382d99ca355ea405414c4ed1077fb4e8ed3532a9 | [
"MIT"
] | 1 | 2021-10-17T14:09:05.000Z | 2021-10-17T14:09:05.000Z | import sys
import time
import gym
import torch
import os
from torch.distributions import Categorical
CURRENT_PATH = os.path.dirname(os.path.realpath(__file__))
PROJECT_HOME = os.path.abspath(os.path.join(CURRENT_PATH, os.pardir))
if PROJECT_HOME not in sys.path:
sys.path.append(PROJECT_HOME)
from a_common.b_mod... | 26.075949 | 90 | 0.666505 |
79646ecbc3424a232a17dd5d01066973410c7c98 | 763 | py | Python | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/GLX/VERSION/GLX_1_1.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/GLX/VERSION/GLX_1_1.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/GLX/VERSION/GLX_1_1.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | '''OpenGL extension VERSION.GLX_1_1
This module customises the behaviour of the
OpenGL.raw.GLX.VERSION.GLX_1_1 to provide a more
Python-friendly API
The official definition of this extension is available here:
http://www.opengl.org/registry/specs/VERSION/GLX_1_1.txt
'''
from OpenGL import platform, constan... | 33.173913 | 72 | 0.778506 |
79646f761f31a018d904a8e683e179e476b9786e | 18,065 | py | Python | python/pyarrow/compute.py | toppyy/arrow | 71ce8db417fda0066adc64e5e37cbf0da7fb0da2 | [
"Apache-2.0"
] | 1 | 2019-09-10T13:51:16.000Z | 2019-09-10T13:51:16.000Z | python/pyarrow/compute.py | toppyy/arrow | 71ce8db417fda0066adc64e5e37cbf0da7fb0da2 | [
"Apache-2.0"
] | 1 | 2021-07-15T22:21:54.000Z | 2021-07-15T22:21:54.000Z | python/pyarrow/compute.py | vdavalon01/arrow | 99f7c3cf3e6c2a9555ceff3d48ef73e485ede546 | [
"CC-BY-3.0",
"Apache-2.0",
"CC0-1.0",
"MIT"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 30.933219 | 79 | 0.632992 |
79646f8bb1359d6e17e7f50bbe1818b4504e97f3 | 1,143 | py | Python | request.py | guemues/epfl-section-check | 7e6172deb0f50b4907b1a79eeed80f29e34e23b5 | [
"MIT"
] | null | null | null | request.py | guemues/epfl-section-check | 7e6172deb0f50b4907b1a79eeed80f29e34e23b5 | [
"MIT"
] | null | null | null | request.py | guemues/epfl-section-check | 7e6172deb0f50b4907b1a79eeed80f29e34e23b5 | [
"MIT"
] | null | null | null | import requests
url = "https://isa.epfl.ch/imoniteur_ISAP/%21PORTAL14S.portalCell"
querystring = {"ww_k_cell":"1809191822","zz_n_xmlBufferKey":"107242052","ww_n_cellkey":"9845106311","ww_n_ctrlKey":"145587473"}
headers = {
'upgrade-insecure-requests': "1",
'user-agent': "Mozilla/5.0 (Macintosh; Intel Mac OS ... | 57.15 | 328 | 0.735783 |
79646fbd591297dbae579b2f27acc30ee3d7ee4f | 1,696 | py | Python | QUICK_START/NODE_DEEPLABV3SEG_CUSTER/src/script/squeezeseg/nets/__init__.py | Hqss/DINK | 5fecaa65e2f9da48eb8ac38ef709aa555fca8766 | [
"BSD-3-Clause"
] | 189 | 2019-01-16T03:05:23.000Z | 2020-09-14T14:54:16.000Z | QUICK_START/NODE_DEEPLABV3SEG_CUSTER/src/script/squeezeseg/nets/__init__.py | jtpils/DINK | 5f6b3eaba279126f79ae6607f965311002d7451c | [
"BSD-3-Clause"
] | 3 | 2019-02-11T06:20:15.000Z | 2020-04-05T07:03:53.000Z | QUICK_START/NODE_DEEPLABV3SEG_CUSTER/src/script/squeezeseg/nets/__init__.py | jtpils/DINK | 5f6b3eaba279126f79ae6607f965311002d7451c | [
"BSD-3-Clause"
] | 25 | 2019-01-16T03:05:24.000Z | 2020-04-04T21:07:53.000Z | # BSD 3-Clause License
#
# Copyright (c) 2019, FPAI
# Copyright (c) 2019, SeriouslyHAO
# Copyright (c) 2019, xcj2019
# Copyright (c) 2019, Leonfirst
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are... | 48.457143 | 80 | 0.777712 |
796470ab8f7724fcf9fede5a762dd20fb8e01cdb | 1,386 | py | Python | dataset/imagenet/real_labels.py | vcowwy/CvT_paddle | de8c28fbbc83e2c6c2479d44971020b15e7b12ec | [
"MIT"
] | null | null | null | dataset/imagenet/real_labels.py | vcowwy/CvT_paddle | de8c28fbbc83e2c6c2479d44971020b15e7b12ec | [
"MIT"
] | null | null | null | dataset/imagenet/real_labels.py | vcowwy/CvT_paddle | de8c28fbbc83e2c6c2479d44971020b15e7b12ec | [
"MIT"
] | null | null | null | import os
import json
import numpy as np
class RealLabelsImagenet:
def __init__(self, filenames, real_json='real.json', topk=(1, 5)):
with open(real_json) as real_labels:
real_labels = json.load(real_labels)
real_labels = {f'ILSVRC2012_val_{i + 1:08d}.JPEG': labels for i... | 33 | 111 | 0.573593 |
796471ba8287e79311a6a1b85a0471c33e7587d8 | 10,674 | py | Python | deep_qa/layers/knowledge_combiners.py | mrbot-ai/deep_qa | a1731331e12b921b4dbb43433f9c028b362495e8 | [
"Apache-2.0"
] | 2 | 2017-01-26T13:07:13.000Z | 2019-03-27T16:11:56.000Z | deep_qa-master/deep_qa/layers/knowledge_combiners.py | RTHMaK/RPGOne | 3f3ada7db1762781668bfb2377154fdc00e17212 | [
"Apache-2.0"
] | null | null | null | deep_qa-master/deep_qa/layers/knowledge_combiners.py | RTHMaK/RPGOne | 3f3ada7db1762781668bfb2377154fdc00e17212 | [
"Apache-2.0"
] | 1 | 2019-01-04T13:08:27.000Z | 2019-01-04T13:08:27.000Z | """
Knowledge combiners take:
- Encoded representations of background facts related to the sentence
- Attention weights over the background as a single tensor.
These are then combined in some way to return a single representation of the
background knowledge per sample. The simplest way for this to happen is simply
ta... | 48.518182 | 114 | 0.644932 |
79647212feaaabd771dd7d6133c3b4abb63b96f7 | 213 | py | Python | flutterapi/myapp/models.py | pisit4449/Todolist | 07b3e733c083b8587e48eea0e2b039492879057a | [
"MIT"
] | null | null | null | flutterapi/myapp/models.py | pisit4449/Todolist | 07b3e733c083b8587e48eea0e2b039492879057a | [
"MIT"
] | null | null | null | flutterapi/myapp/models.py | pisit4449/Todolist | 07b3e733c083b8587e48eea0e2b039492879057a | [
"MIT"
] | null | null | null | from django.db import models
class Todolist(models.Model):
title = models.CharField(max_length=100)
detail = models.TextField(null=True,blank=True)
def __str__(self):
return self.title | 26.625 | 52 | 0.694836 |
7964721d839324a8294f58fc9be54d56cc938204 | 5,366 | py | Python | nnunet/dataset_conversion/Task159_MyoPS2020.py | mikami520/nnUNet | ab0a12a0fa36f38fbae3b8f8a1e63cefefdc481a | [
"Apache-2.0"
] | 1 | 2022-02-10T10:48:10.000Z | 2022-02-10T10:48:10.000Z | nnunet/dataset_conversion/Task159_MyoPS2020.py | mikami520/nnUNet | ab0a12a0fa36f38fbae3b8f8a1e63cefefdc481a | [
"Apache-2.0"
] | null | null | null | nnunet/dataset_conversion/Task159_MyoPS2020.py | mikami520/nnUNet | ab0a12a0fa36f38fbae3b8f8a1e63cefefdc481a | [
"Apache-2.0"
] | 1 | 2022-03-15T03:15:02.000Z | 2022-03-15T03:15:02.000Z | import SimpleITK
import numpy as np
from batchgenerators.utilities.file_and_folder_operations import *
import shutil
import SimpleITK as sitk
from nnunet.paths import nnUNet_raw_data
from nnunet.dataset_conversion.utils import generate_dataset_json
from nnunet.utilities.sitk_stuff import copy_geometry
def convert_la... | 50.622642 | 120 | 0.658964 |
79647235a10186da9b5f6665bea74e2c23ae7f1c | 25,456 | py | Python | electrum/gui/qt/installwizard.py | BubuLeMag/electrum-pushi | 8bb59fcc3c235d971df9669afc1d7ac5a226e6ba | [
"MIT"
] | null | null | null | electrum/gui/qt/installwizard.py | BubuLeMag/electrum-pushi | 8bb59fcc3c235d971df9669afc1d7ac5a226e6ba | [
"MIT"
] | null | null | null | electrum/gui/qt/installwizard.py | BubuLeMag/electrum-pushi | 8bb59fcc3c235d971df9669afc1d7ac5a226e6ba | [
"MIT"
] | null | null | null |
import os
import sys
import threading
import traceback
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from electrum.wallet import Wallet
from electrum.storage import WalletStorage
from electrum.util import UserCancelled, InvalidPassword
from electrum.base_wizard import BaseWizard,... | 39.466667 | 140 | 0.590784 |
79647339955244eeef1da975993c3de004415aeb | 1,433 | py | Python | Diskreet/Client/Distribution/launcher.py | woflydev/general-projects | 4ab637fabd2b8ff563ec1637eccefed780bce163 | [
"MIT"
] | 1 | 2022-03-13T22:46:43.000Z | 2022-03-13T22:46:43.000Z | Diskreet/Client/Distribution/launcher.py | woflydev/general-projects | 4ab637fabd2b8ff563ec1637eccefed780bce163 | [
"MIT"
] | null | null | null | Diskreet/Client/Distribution/launcher.py | woflydev/general-projects | 4ab637fabd2b8ff563ec1637eccefed780bce163 | [
"MIT"
] | null | null | null | import os
import sys
import time
from http.server import HTTPServer, CGIHTTPRequestHandler
if getattr(sys, 'frozen', False):
application_path = os.path.dirname(os.path.abspath(sys.executable)) + '\\diskreet'
else:
application_path = os.path.dirname(os.path.abspath(__file__)) + '\\diskreet'
os.chdir(applicatio... | 37.710526 | 151 | 0.731333 |
796473f46bd306743baf517dbb0265998931b6cc | 12,971 | py | Python | qa/qa_group.py | modulus-sa/ganeti | 592c0e945cc2c7b0013f813ea8c9d8ec0d5bab98 | [
"BSD-2-Clause"
] | 396 | 2015-01-22T11:44:32.000Z | 2022-03-31T14:14:29.000Z | qa/qa_group.py | modulus-sa/ganeti | 592c0e945cc2c7b0013f813ea8c9d8ec0d5bab98 | [
"BSD-2-Clause"
] | 1,550 | 2015-04-05T09:53:50.000Z | 2022-03-28T17:42:20.000Z | qa/qa_group.py | modulus-sa/ganeti | 592c0e945cc2c7b0013f813ea8c9d8ec0d5bab98 | [
"BSD-2-Clause"
] | 119 | 2015-01-06T21:37:15.000Z | 2022-03-07T06:36:26.000Z | #
#
# Copyright (C) 2010, 2011, 2012 Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of con... | 35.151762 | 79 | 0.690926 |
7964740fade456c9e69e05b869853dd0d3d9bb90 | 920 | py | Python | day_12.py | nylocx/adventofcode2021 | b02dd570558321f23e90a29332cab75edf1641c4 | [
"MIT"
] | null | null | null | day_12.py | nylocx/adventofcode2021 | b02dd570558321f23e90a29332cab75edf1641c4 | [
"MIT"
] | null | null | null | day_12.py | nylocx/adventofcode2021 | b02dd570558321f23e90a29332cab75edf1641c4 | [
"MIT"
] | null | null | null | #%% Initialize
import networkx as nx
from collections import Counter
#%% Read input
with open("day_12_input.txt") as f:
graph = nx.from_edgelist([x.strip().split("-") for x in f])
#%% Part 1
def single_count_caves(cave, visited):
if cave == "end":
return 1
if cave.islower():
visited.add(c... | 22.439024 | 92 | 0.633696 |
7964754cdc73ab6556e4b07635d5ac44afe9208b | 562 | py | Python | examples/OpenCV/server_cv.py | BassmanBiff/NumpySocket | 67eb3a1bd7aaae4a08d17e8b76a7cb2f2e7bf2c9 | [
"MIT"
] | null | null | null | examples/OpenCV/server_cv.py | BassmanBiff/NumpySocket | 67eb3a1bd7aaae4a08d17e8b76a7cb2f2e7bf2c9 | [
"MIT"
] | null | null | null | examples/OpenCV/server_cv.py | BassmanBiff/NumpySocket | 67eb3a1bd7aaae4a08d17e8b76a7cb2f2e7bf2c9 | [
"MIT"
] | 1 | 2019-08-28T13:55:33.000Z | 2019-08-28T13:55:33.000Z | import cv2
from numpysocket import NumpySocket
from scipy.misc import imresize
host_ip = 'localhost' # change me
cap = cv2.VideoCapture(0)
npSocket = NumpySocket()
npSocket.startServer(host_ip, 9999)
# Read until video is completed
while cap.isOpened():
ret, frame = cap.read()
ref_frame = cv2.cvtColor(frame,... | 24.434783 | 56 | 0.729537 |
7964755e00bae05d70d491423366811d7cf92b91 | 157,684 | py | Python | DoorShuffle.py | codemann8/ALttPDoorRandomizer | b4a873755ec068418360c30481159090ca92bdb9 | [
"MIT"
] | 3 | 2021-08-06T14:14:42.000Z | 2022-01-23T19:45:35.000Z | DoorShuffle.py | codemann8/ALttPDoorRandomizer | b4a873755ec068418360c30481159090ca92bdb9 | [
"MIT"
] | 2 | 2021-05-01T00:22:47.000Z | 2021-05-24T09:33:27.000Z | DoorShuffle.py | codemann8/ALttPDoorRandomizer | b4a873755ec068418360c30481159090ca92bdb9 | [
"MIT"
] | null | null | null | import RaceRandom as random
from collections import defaultdict, deque
import logging
import time
from enum import unique, Flag
from typing import DefaultDict, Dict, List
from BaseClasses import RegionType, Region, Door, DoorType, Direction, Sector, CrystalBarrier, DungeonInfo, dungeon_keys
from Doors import reset_por... | 50.685953 | 261 | 0.643578 |
796475d1e9dd67c44452dca765f705ae940115d1 | 4,815 | py | Python | edalize/vivado.py | yottahawk/edalize | f656a6897740359605a5270566359bd2739fe32e | [
"BSD-2-Clause"
] | 2 | 2020-01-14T03:14:55.000Z | 2022-02-18T16:55:36.000Z | edalize/vivado.py | yottahawk/edalize | f656a6897740359605a5270566359bd2739fe32e | [
"BSD-2-Clause"
] | null | null | null | edalize/vivado.py | yottahawk/edalize | f656a6897740359605a5270566359bd2739fe32e | [
"BSD-2-Clause"
] | null | null | null | import logging
import os.path
import platform
from edalize.edatool import Edatool
logger = logging.getLogger(__name__)
""" Vivado Backend
A core (usually the system core) can add the following files:
- Standard design sources
- Constraints: Supply xdc files with file_type=xdc or unmanaged constraints with file_ty... | 35.145985 | 118 | 0.516096 |
7964765bdce7cdd0f8cd3d47e56705a932293ec8 | 4,378 | py | Python | dephell/commands/package_verify.py | OliverHofkens/dephell | 6303f416018910668f1635b70cd828a2fd2b2d9e | [
"MIT"
] | 1,880 | 2019-03-21T10:08:25.000Z | 2022-03-31T12:41:55.000Z | dephell/commands/package_verify.py | rachmadaniHaryono/dephell | 0ef500c8f2d5f05244bac191b1b1383f68464cd2 | [
"MIT"
] | 356 | 2019-03-21T19:08:56.000Z | 2021-01-08T17:45:43.000Z | dephell/commands/package_verify.py | rachmadaniHaryono/dephell | 0ef500c8f2d5f05244bac191b1b1383f68464cd2 | [
"MIT"
] | 157 | 2019-04-23T01:13:37.000Z | 2022-03-24T22:41:18.000Z | # built-in
from argparse import ArgumentParser
from pathlib import Path
from tempfile import TemporaryDirectory
# app
from ..actions import get_package, make_json
from ..config import builders
from ..imports import lazy_import
from ..networking import requests_session
from .base import BaseCommand
gnupg = lazy_impor... | 38.403509 | 90 | 0.574692 |
7964767527fd5adafe033893eed0cf28874311f2 | 4,137 | py | Python | main/py/hx711.py | windfallw/EngineeringCompetition | c666696bf07e74d2d4e786da96aed6493cfc7255 | [
"MIT"
] | null | null | null | main/py/hx711.py | windfallw/EngineeringCompetition | c666696bf07e74d2d4e786da96aed6493cfc7255 | [
"MIT"
] | null | null | null | main/py/hx711.py | windfallw/EngineeringCompetition | c666696bf07e74d2d4e786da96aed6493cfc7255 | [
"MIT"
] | 1 | 2021-06-06T15:12:51.000Z | 2021-06-06T15:12:51.000Z | from utime import sleep_us, time
from machine import Pin
from micropython import const
class HX711(object):
"""
Micropython driver for Avia Semiconductor's HX711
24-Bit Analog-to-Digital Converter
"""
CHANNEL_A_128 = const(1)
CHANNEL_A_64 = const(3)
CHANNEL_B_32 = const(2)
DATA_BITS =... | 29.76259 | 112 | 0.588107 |
7964773dff88d7a00317991a3950f29c0f74ba05 | 9,385 | py | Python | restrictnet_tensorflow.py | billpsomas/Traffic-Signs-Classification | 8f8068a92e57a271d6468733c70492a0c258efed | [
"MIT"
] | null | null | null | restrictnet_tensorflow.py | billpsomas/Traffic-Signs-Classification | 8f8068a92e57a271d6468733c70492a0c258efed | [
"MIT"
] | null | null | null | restrictnet_tensorflow.py | billpsomas/Traffic-Signs-Classification | 8f8068a92e57a271d6468733c70492a0c258efed | [
"MIT"
] | 1 | 2019-10-08T16:32:38.000Z | 2019-10-08T16:32:38.000Z | #Import the necassary libraries and files
import numpy as np
from sklearn.utils import shuffle
import os
import tensorflow as tf
from tensorflow.contrib.layers import flatten
import pandas as pd
from load_and_explore_data import X_train, y_train, X_valid, y_valid, X_test, y_test
class RestrictNet:
... | 49.136126 | 153 | 0.655834 |
7964778c58bf4615c3193dc7c0223f43d1dc366b | 7,850 | py | Python | deepchem/molnet/load_function/molnet_loader.py | BioGavin/deepchem | 8fce511537d0858adb10f0eee5c9d6bf39696c20 | [
"MIT"
] | 3 | 2022-03-06T11:43:46.000Z | 2022-03-07T07:22:06.000Z | deepchem/molnet/load_function/molnet_loader.py | BioGavin/deepchem | 8fce511537d0858adb10f0eee5c9d6bf39696c20 | [
"MIT"
] | null | null | null | deepchem/molnet/load_function/molnet_loader.py | BioGavin/deepchem | 8fce511537d0858adb10f0eee5c9d6bf39696c20 | [
"MIT"
] | null | null | null | """
Common code for loading MoleculeNet datasets.
"""
import os
import logging
import deepchem as dc
from deepchem.data import Dataset, DiskDataset
from typing import List, Optional, Tuple, Type, Union
logger = logging.getLogger(__name__)
class TransformerGenerator(object):
"""Create Transformers for Datasets.
... | 36.85446 | 87 | 0.689554 |
796479194e09c9e58fab50cb5d07b4cfef3c068f | 2,279 | py | Python | tests/model_test.py | johnschultz/pyramid_swagger | d47dfd9b6dbb728f2ccb67c53c01c61b9ae135b3 | [
"BSD-3-Clause"
] | null | null | null | tests/model_test.py | johnschultz/pyramid_swagger | d47dfd9b6dbb728f2ccb67c53c01c61b9ae135b3 | [
"BSD-3-Clause"
] | null | null | null | tests/model_test.py | johnschultz/pyramid_swagger | d47dfd9b6dbb728f2ccb67c53c01c61b9ae135b3 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Unit tests for the SwaggerSchema class.
"""
import mock
import pytest
from pyramid_swagger.ingest import compile_swagger_schema
from pyramid_swagger.ingest import get_resource_listing
from pyramid_swagger.model import PathNotMatchedError
from pyramid_swagger.model import partial_path_match
... | 28.135802 | 78 | 0.653357 |
79647aaa62c839e082b56da41627e3431805646b | 2,381 | py | Python | app/core/tests/test_models.py | ido777/newish | 298a3d5babf411ba1eb777101eb6e8f70b9e495f | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | ido777/newish | 298a3d5babf411ba1eb777101eb6e8f70b9e495f | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | ido777/newish | 298a3d5babf411ba1eb777101eb6e8f70b9e495f | [
"MIT"
] | null | null | null | import pytest
from django.contrib.auth import get_user_model
from unittest.mock import patch
from core import models
def sample_user(email='test@londonappdev.com', password='testpass'):
"""Create a sample user"""
return get_user_model().objects.create_user(email, password)
@pytest.mark.django_db
def test_cr... | 24.546392 | 85 | 0.693406 |
79647cecb550da10224144248304e07856b79a6f | 1,418 | py | Python | tests/test_meta.py | brandonwillard/symbolic-pymc3 | 13fa4a9f5b4639bc9dc63e4df71cde10aac4bb3b | [
"Apache-2.0"
] | 1 | 2020-12-29T17:49:46.000Z | 2020-12-29T17:49:46.000Z | tests/test_meta.py | brandonwillard/symbolic-pymc3 | 13fa4a9f5b4639bc9dc63e4df71cde10aac4bb3b | [
"Apache-2.0"
] | null | null | null | tests/test_meta.py | brandonwillard/symbolic-pymc3 | 13fa4a9f5b4639bc9dc63e4df71cde10aac4bb3b | [
"Apache-2.0"
] | null | null | null | import theano
import theano.tensor as tt
from unification import var
from symbolic_pymc.meta import (MetaSymbol, MetaTensorVariable, MetaTensorType,
mt)
from symbolic_pymc.utils import graph_equal
def test_meta_classes():
vec_tt = tt.vector('vec')
vec_m = MetaSymbol.from_obj(v... | 34.585366 | 79 | 0.706629 |
79647ddc39daab62db4635e3fc999233636d7603 | 17,016 | py | Python | note_seq/chords_lib.py | tetromino/note-seq | a71716327619d9d995cce3ca1e0d8442ab2e0d73 | [
"Apache-2.0"
] | 113 | 2020-06-17T15:59:30.000Z | 2022-03-15T08:01:05.000Z | note_seq/chords_lib.py | tetromino/note-seq | a71716327619d9d995cce3ca1e0d8442ab2e0d73 | [
"Apache-2.0"
] | 26 | 2020-06-17T18:04:40.000Z | 2021-12-08T11:04:19.000Z | note_seq/chords_lib.py | tetromino/note-seq | a71716327619d9d995cce3ca1e0d8442ab2e0d73 | [
"Apache-2.0"
] | 45 | 2020-06-17T18:05:03.000Z | 2022-02-11T17:07:14.000Z | # Copyright 2021 The Magenta 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 law or agreed to in ... | 35.97463 | 80 | 0.698695 |
79647de93e50038036fb3562226f66b6a0333693 | 843 | py | Python | app/core/admin.py | berlink2/recipe-app-api | c91aaa68cb8620f6905eb9571495363adcce143e | [
"MIT"
] | null | null | null | app/core/admin.py | berlink2/recipe-app-api | c91aaa68cb8620f6905eb9571495363adcce143e | [
"MIT"
] | null | null | null | app/core/admin.py | berlink2/recipe-app-api | c91aaa68cb8620f6905eb9571495363adcce143e | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.utils.translation import gettext as _
# Register your models here.
from core import models
class UserAdmin(BaseUserAdmin):
ordering = ['id']
list_display = ['email','name']
fieldsets = (
(None,... | 27.193548 | 82 | 0.567023 |
79647efa84f16ca28d73a8c15ce1495243ff663f | 3,435 | py | Python | filtrado.py | juancas9812/Procesamiento-de-Imagenes | 871d83c669da65704150a523c95c4c4e42485d48 | [
"MIT"
] | null | null | null | filtrado.py | juancas9812/Procesamiento-de-Imagenes | 871d83c669da65704150a523c95c4c4e42485d48 | [
"MIT"
] | null | null | null | filtrado.py | juancas9812/Procesamiento-de-Imagenes | 871d83c669da65704150a523c95c4c4e42485d48 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
def us_mask(original, kernel, amount):
blurred = cv2.GaussianBlur(original, kernel, 0)
result = original + (original-blurred)*amount
#result = cv2.convertScaleAbs(result)
im1 = cv2.addWeighted(original, 1.0 + amount, blurred, -amount, 0)
# im1 = im + 3.0*(im - im_blur... | 33.349515 | 78 | 0.609025 |
79648055670b9549f44ae56e9a1fc79b1f636e87 | 6,388 | py | Python | sparkdq/repairs/RepairSuite.py | PasaLab/SparkDQ | 16d50210747ef7de03cf36d689ce26ff7445f63a | [
"Apache-2.0"
] | 1 | 2021-02-08T07:49:54.000Z | 2021-02-08T07:49:54.000Z | sparkdq/repairs/RepairSuite.py | PasaLab/SparkDQ | 16d50210747ef7de03cf36d689ce26ff7445f63a | [
"Apache-2.0"
] | null | null | null | sparkdq/repairs/RepairSuite.py | PasaLab/SparkDQ | 16d50210747ef7de03cf36d689ce26ff7445f63a | [
"Apache-2.0"
] | null | null | null | from pyspark.sql.functions import col
from sparkdq.analytics.Preconditions import find_first_failing
from sparkdq.analytics.runners.StateProviderOptions import StateProviderOptions
from sparkdq.exceptions.TransformExceptions import UnknownTransformerException, TransformCalculationException
from sparkdq.repairs.transfo... | 42.586667 | 118 | 0.606919 |
796480cc3ab0d86702c4cd3bd13b1341a42ce5fb | 1,555 | py | Python | Lesson2-CyclicRotation.py | kuritan/codility-practice | 59543c37a4140039d060970113eecff046ceef04 | [
"MIT"
] | null | null | null | Lesson2-CyclicRotation.py | kuritan/codility-practice | 59543c37a4140039d060970113eecff046ceef04 | [
"MIT"
] | null | null | null | Lesson2-CyclicRotation.py | kuritan/codility-practice | 59543c37a4140039d060970113eecff046ceef04 | [
"MIT"
] | null | null | null | # An array A consisting of N integers is given.
# Rotation of the array means that each element is shifted right by one index,
# and the last element of the array is moved to the first place.
# For example, the rotation of array A = [3, 8, 9, 7, 6] is [6, 3, 8, 9, 7]
# (elements are shifted right by one index and 6... | 28.272727 | 105 | 0.589711 |
796481664488ee2164d6c0f163ab2cfe05c1d5c8 | 381 | py | Python | app.py | luispalacio22/ci-me-dice-on-demand | e55416a401d3a4f8f6a19359eeff4eae2574c2ef | [
"MIT"
] | null | null | null | app.py | luispalacio22/ci-me-dice-on-demand | e55416a401d3a4f8f6a19359eeff4eae2574c2ef | [
"MIT"
] | null | null | null | app.py | luispalacio22/ci-me-dice-on-demand | e55416a401d3a4f8f6a19359eeff4eae2574c2ef | [
"MIT"
] | 1 | 2021-09-11T20:12:58.000Z | 2021-09-11T20:12:58.000Z | from flask import Flask, render_template
#Only for FLASK
import os
app = Flask(__name__)
#Dice Main page
@app.route('/')
def dice_page():
return render_template('dice_page.html')
#Testing to check if it works
@app.route('/test')
def test():
return "Works!"
if __name__ == '__main__':
#PORT= int(os.environ.ge... | 20.052632 | 44 | 0.674541 |
79648336eaf4a62b988ab19b8b744df9d4ff4cfb | 3,816 | py | Python | user_test.py | FITSTARGILLY2643/Password-Locker | f7919edf5d103af97d4bbd2fb420f302b7d17a3f | [
"Unlicense",
"MIT"
] | null | null | null | user_test.py | FITSTARGILLY2643/Password-Locker | f7919edf5d103af97d4bbd2fb420f302b7d17a3f | [
"Unlicense",
"MIT"
] | null | null | null | user_test.py | FITSTARGILLY2643/Password-Locker | f7919edf5d103af97d4bbd2fb420f302b7d17a3f | [
"Unlicense",
"MIT"
] | null | null | null | import unittest
from user import User
from user import Credentials
class TestUser(unittest.TestCase):
def setUp(self):
"""
A method that runs before the test starts
"""
self.new_user = User("Fitstar","Gillie2021")
def tearDown(self):
'''
method that does clean up... | 34.378378 | 113 | 0.655922 |
7964855eb4731a1c91917ea673c19362e16d8013 | 2,273 | py | Python | Benchmark/ExtrapolationAnalyses/computation_complexity_ECU_Due.py | yang-sec/CAN-SessionKey | 3435dcc33e5e9fbb262c6271ba5dc805f2a34599 | [
"MIT"
] | 3 | 2020-08-26T01:55:20.000Z | 2021-10-01T03:23:54.000Z | Benchmark/ExtrapolationAnalyses/computation_complexity_ECU_Due.py | yang-sec/CAN-SessionKey | 3435dcc33e5e9fbb262c6271ba5dc805f2a34599 | [
"MIT"
] | null | null | null | Benchmark/ExtrapolationAnalyses/computation_complexity_ECU_Due.py | yang-sec/CAN-SessionKey | 3435dcc33e5e9fbb262c6271ba5dc805f2a34599 | [
"MIT"
] | null | null | null | # For ACSAC'20 Paper: "Session Key Distribution Made Practical for CAN and CAN-FD Message Authentication"
# Plotting the extrapolated total computation workload
#
# Yang Xiao <xiaoy@vt.edu>
import numpy as np
import matplotlib.pyplot as plt
N = [2,5,10] # Number of normal ECUs
M = [5,10,15,20,25,30,35,40,45,50] # ... | 39.189655 | 117 | 0.681918 |
79648578e84d9b3a583d2c25082079cb7a4b0141 | 3,006 | py | Python | mosfit/modules/transforms/diffusion_csm.py | legolason/MOSFiT | bb1924552a2929c58ca1b2c8cf71ecc532f719f0 | [
"MIT"
] | 1 | 2019-12-16T02:21:44.000Z | 2019-12-16T02:21:44.000Z | mosfit/modules/transforms/diffusion_csm.py | legolason/MOSFiT | bb1924552a2929c58ca1b2c8cf71ecc532f719f0 | [
"MIT"
] | null | null | null | mosfit/modules/transforms/diffusion_csm.py | legolason/MOSFiT | bb1924552a2929c58ca1b2c8cf71ecc532f719f0 | [
"MIT"
] | null | null | null | """Definitions for the `DiffusionCSM` class."""
from collections import OrderedDict
import numpy as np
from scipy.interpolate import interp1d
from mosfit.constants import C_CGS, DAY_CGS, M_SUN_CGS, AU_CGS
from mosfit.modules.transforms.transform import Transform
# Important: Only define one ``Module`` class per fil... | 36.216867 | 78 | 0.583167 |
79648698ff671a727d60e39ec763bf8d2c66c40b | 928 | py | Python | chapter2_training/cifar10/preprocess/src/extract_data.py | sudabon/ml-system-in-actions | 4fb1b3e53e4ed7c36e82f7d4b5570e3959aef525 | [
"MIT"
] | 133 | 2021-04-24T09:57:58.000Z | 2022-03-29T06:23:56.000Z | chapter2_training/cifar10/preprocess/src/extract_data.py | sudabon/ml-system-in-actions | 4fb1b3e53e4ed7c36e82f7d4b5570e3959aef525 | [
"MIT"
] | 6 | 2021-04-24T09:58:40.000Z | 2021-11-19T04:04:40.000Z | chapter2_training/cifar10/preprocess/src/extract_data.py | sudabon/ml-system-in-actions | 4fb1b3e53e4ed7c36e82f7d4b5570e3959aef525 | [
"MIT"
] | 40 | 2021-05-21T23:32:40.000Z | 2022-03-30T00:33:08.000Z | import os
import pickle
from typing import List
import numpy as np
from PIL import Image
def unpickle(file):
with open(file, "rb") as fo:
dict = pickle.load(fo, encoding="bytes")
return dict
def parse_pickle(rawdata, rootdir) -> List[List[str]]:
for i in range(10):
directory = f"{rootdi... | 29 | 59 | 0.621767 |
796486f8d0b1c4d34db260af5b6775f359e07fc4 | 1,011 | py | Python | scripts/images.py | FranciscoGutierrez/FoodRS | 56916a3967c27cb26a0e8fd48d7e1fb127870640 | [
"MIT"
] | null | null | null | scripts/images.py | FranciscoGutierrez/FoodRS | 56916a3967c27cb26a0e8fd48d7e1fb127870640 | [
"MIT"
] | 1 | 2017-04-26T18:14:13.000Z | 2017-04-26T18:14:13.000Z | scripts/images.py | FranciscoGutierrez/FoodRS | 56916a3967c27cb26a0e8fd48d7e1fb127870640 | [
"MIT"
] | null | null | null | import json
import urllib2
import keys
import csv
import requests
from pymongo import MongoClient
client = MongoClient(keys.URI)
db = client['healthyfoods']
products = list(db.products.find())
table = []
for a in products:
# print a["_id"]
table.append(a["_id"])
with open('eggs.csv', 'w') as csvfile:
wr... | 29.735294 | 78 | 0.585559 |
7964875de001ecfda04253d2a71c118f44330ae8 | 616 | py | Python | tests/test_line.py | Hofsmo/SinFactory | 51699d4a396b877277fa57d695aec03ad454c6f0 | [
"MIT"
] | 1 | 2021-02-12T10:25:39.000Z | 2021-02-12T10:25:39.000Z | tests/test_line.py | Hofsmo/SinFactory | 51699d4a396b877277fa57d695aec03ad454c6f0 | [
"MIT"
] | 23 | 2020-10-20T05:27:14.000Z | 2021-06-18T07:13:40.000Z | tests/test_line.py | Hofsmo/SinFactory | 51699d4a396b877277fa57d695aec03ad454c6f0 | [
"MIT"
] | null | null | null | """Test the line class."""
import pytest
from sinfactory.pfactorygrid import PFactoryGrid
@pytest.fixture(scope="module")
def test_system():
"""Create the test system."""
project_name = "test_grid_sinfactory"
return PFactoryGrid(project_name=project_name)
@pytest.fixture(scope="module")
def test_line(... | 22.814815 | 65 | 0.714286 |
79648797bee7901298a3692686ed1254c9168f6e | 10,873 | py | Python | lenet5cifar102.py | InnocentK/Practice-Neural-Network-Models | 3c50cec054a194394ea8de4d89445bc4037ad71a | [
"MIT"
] | null | null | null | lenet5cifar102.py | InnocentK/Practice-Neural-Network-Models | 3c50cec054a194394ea8de4d89445bc4037ad71a | [
"MIT"
] | null | null | null | lenet5cifar102.py | InnocentK/Practice-Neural-Network-Models | 3c50cec054a194394ea8de4d89445bc4037ad71a | [
"MIT"
] | null | null | null | import argparse
import os, sys
import time
import datetime
# Import pytorch dependencies
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision
import torchvision.transforms as transforms
import torch.optim as optim
from tqdm import tqdm_notebook as tqdm
# You cannot change this line.
f... | 36.364548 | 155 | 0.63322 |
796488290592e309644a70c8a5e4a690579f30c7 | 6,965 | py | Python | atomate/vasp/tests/test_vasp_powerups.py | srshivani/atomate | 1e851d70a5f107736e3b9c6775e2e9e4a2de7a5d | [
"BSD-3-Clause-LBNL"
] | 1 | 2021-01-15T23:48:43.000Z | 2021-01-15T23:48:43.000Z | atomate/vasp/tests/test_vasp_powerups.py | srshivani/atomate | 1e851d70a5f107736e3b9c6775e2e9e4a2de7a5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | atomate/vasp/tests/test_vasp_powerups.py | srshivani/atomate | 1e851d70a5f107736e3b9c6775e2e9e4a2de7a5d | [
"BSD-3-Clause-LBNL"
] | 2 | 2017-11-14T21:38:29.000Z | 2017-11-14T21:42:14.000Z | # coding: utf-8
import unittest
from fireworks import Firework, ScriptTask, Workflow
from atomate.vasp.powerups import add_priority, use_custodian, add_trackers, \
add_modify_incar, add_small_gap_multiply, use_scratch_dir, remove_custodian, \
add_tags, add_wf_metadata, add_modify_potcar, clean_up_files
from ... | 38.269231 | 98 | 0.573726 |
796488a849eb9e08f8bf2f59e072b65b085917b7 | 8,129 | py | Python | sdk/python/pulumi_azure_nextgen/network/v20190901/get_p2s_vpn_gateway.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/network/v20190901/get_p2s_vpn_gateway.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/network/v20190901/get_p2s_vpn_gateway.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 38.709524 | 270 | 0.673392 |
796488e9b8bb08360ca321f4794076f1bfa05c17 | 5,049 | py | Python | njupass/__init__.py | lafmdp/interesting_nju_tool | a2506fa6a9a7ef78ea259a6a0e6814465000fb4d | [
"MIT"
] | null | null | null | njupass/__init__.py | lafmdp/interesting_nju_tool | a2506fa6a9a7ef78ea259a6a0e6814465000fb4d | [
"MIT"
] | null | null | null | njupass/__init__.py | lafmdp/interesting_nju_tool | a2506fa6a9a7ef78ea259a6a0e6814465000fb4d | [
"MIT"
] | null | null | null | """
DESCRIPTION:
Tools for getting Authorization websites of Nanjing University
PACKAGES:
NjuUiaAuth
NjuEliteAuth
"""
import execjs
import requests
import re
import os
from io import BytesIO
import time
URL_NJU_UIA_AUTH = 'https://authserver.nju.edu.cn/authserver/login'
URL_NJU_ELITE_LOGIN = 'http://elite.... | 33.217105 | 219 | 0.584076 |
7964891d72b78719709b0d98b2a9a7b27e495d06 | 158 | py | Python | tests/web_platform/CSS2/normal_flow/test_max_width_percentage.py | fletchgraham/colosseum | 77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f | [
"BSD-3-Clause"
] | null | null | null | tests/web_platform/CSS2/normal_flow/test_max_width_percentage.py | fletchgraham/colosseum | 77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f | [
"BSD-3-Clause"
] | null | null | null | tests/web_platform/CSS2/normal_flow/test_max_width_percentage.py | fletchgraham/colosseum | 77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f | [
"BSD-3-Clause"
] | 1 | 2020-01-16T01:56:41.000Z | 2020-01-16T01:56:41.000Z | from tests.utils import W3CTestCase
class TestMaxWidthPercentage(W3CTestCase):
vars().update(W3CTestCase.find_tests(__file__, 'max-width-percentage-'))
| 26.333333 | 76 | 0.797468 |
79648982cc1bbbdfd7aa2d23510330c14fa0ab3e | 2,297 | py | Python | docs/conf.py | CharlesPikachu/paperdl | 95fac75f268759d894ff31d8fb01438216022834 | [
"Apache-2.0"
] | 11 | 2022-02-22T16:01:12.000Z | 2022-03-26T05:23:42.000Z | docs/conf.py | CharlesPikachu/paperdl | 95fac75f268759d894ff31d8fb01438216022834 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | CharlesPikachu/paperdl | 95fac75f268759d894ff31d8fb01438216022834 | [
"Apache-2.0"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 31.902778 | 79 | 0.663474 |
796489b84428ddee66ded751c78426a9efa7fb3c | 962 | py | Python | zendesk/komand_zendesk/actions/delete_membership/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2020-03-18T09:14:55.000Z | 2020-03-18T09:14:55.000Z | zendesk/komand_zendesk/actions/delete_membership/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2021-02-23T23:57:37.000Z | 2021-02-23T23:57:37.000Z | zendesk/komand_zendesk/actions/delete_membership/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | null | null | null | import komand
import zenpy
from .schema import DeleteMembershipInput, DeleteMembershipOutput
# Custom imports below
class DeleteMembership(komand.Action):
def __init__(self):
super(self.__class__, self).__init__(
name='delete_membership',
description='Delete organization m... | 31.032258 | 101 | 0.632017 |
796489f786411f989a2d7dce230549856752953f | 39,509 | py | Python | pipenv/project.py | GPHemsley/pipenv | f640fcba77fb148b8c3a1fefbc540764d8e4010d | [
"MIT"
] | null | null | null | pipenv/project.py | GPHemsley/pipenv | f640fcba77fb148b8c3a1fefbc540764d8e4010d | [
"MIT"
] | null | null | null | pipenv/project.py | GPHemsley/pipenv | f640fcba77fb148b8c3a1fefbc540764d8e4010d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import base64
import fnmatch
import glob
import hashlib
import io
import json
import operator
import os
import re
import sys
import six
import toml
import tomlkit
import vistir
import pipfile
import pipfile.api
from .vendor.cached_property import cached_property
from .cmdparse import Script
... | 36.246789 | 120 | 0.598471 |
79648aa9e34e92b0d7f2d5581adf6e1d243e59bf | 1,197 | py | Python | models/quantizer.py | AshivDhondea/DFTS_compat_v1 | 976e6087ff629c45f7bbc79a3de25718ed143db5 | [
"MIT"
] | 3 | 2020-05-11T21:16:34.000Z | 2021-10-05T10:47:21.000Z | models/quantizer.py | AshivDhondea/DFTS | beed3c195d1129de3523012d7e7738f1542a63aa | [
"MIT"
] | 14 | 2020-01-28T22:25:02.000Z | 2022-03-11T23:25:21.000Z | models/quantizer.py | AshivDhondea/DFTS | beed3c195d1129de3523012d7e7738f1542a63aa | [
"MIT"
] | 1 | 2020-05-14T21:46:50.000Z | 2020-05-14T21:46:50.000Z | import numpy as np
import time
class QLayer(object):
"""Defines the quantization layer."""
def __init__(self, nBits):
"""
# Arguments
nBits: number of bits of quantization
"""
super(QLayer, self).__init__()
self.nBits = nBits
def bitQuantizer(self, data)... | 30.692308 | 114 | 0.585631 |
79648b7998bcd9e76c70c2e04817f3bf339dc5d8 | 2,532 | py | Python | examples/python/gp2y0a.py | engagementlab/upm | 9be920dbcd4ff9f333bce27e937a6e72e46899d6 | [
"MIT"
] | 1 | 2018-11-08T03:59:01.000Z | 2018-11-08T03:59:01.000Z | examples/python/gp2y0a.py | engagementlab/upm | 9be920dbcd4ff9f333bce27e937a6e72e46899d6 | [
"MIT"
] | null | null | null | examples/python/gp2y0a.py | engagementlab/upm | 9be920dbcd4ff9f333bce27e937a6e72e46899d6 | [
"MIT"
] | 1 | 2018-11-08T03:59:04.000Z | 2018-11-08T03:59:04.000Z | #!/usr/bin/python
# Author: Zion Orent <zorent@ics.com>
# Copyright (c) 2015 Intel Corporation.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limi... | 38.363636 | 82 | 0.721959 |
79648b83d106f81c95c26f5b68fd559b252f718a | 50 | py | Python | src/markers.py | fabianallendorf/agility-kata-questionnaire | 6792aafc5400f4171d11c97e9cc15f0444014741 | [
"MIT"
] | null | null | null | src/markers.py | fabianallendorf/agility-kata-questionnaire | 6792aafc5400f4171d11c97e9cc15f0444014741 | [
"MIT"
] | null | null | null | src/markers.py | fabianallendorf/agility-kata-questionnaire | 6792aafc5400f4171d11c97e9cc15f0444014741 | [
"MIT"
] | null | null | null | QUESTION_MARKER = "?"
CORRECT_ANSWER_MARKER = "*"
| 16.666667 | 27 | 0.72 |
79648b911e4b924bb802af338d3394c73e876005 | 3,070 | py | Python | tests/test_hmatrix.py | tbenthompson/BIE_tutorials | 02cd56ab7e63e36afc4a10db17072076541aab77 | [
"MIT"
] | null | null | null | tests/test_hmatrix.py | tbenthompson/BIE_tutorials | 02cd56ab7e63e36afc4a10db17072076541aab77 | [
"MIT"
] | null | null | null | tests/test_hmatrix.py | tbenthompson/BIE_tutorials | 02cd56ab7e63e36afc4a10db17072076541aab77 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
import sympy as sp
from kernels import kernel_types
from tectosaur2 import gauss_rule, integrate_term, panelize_symbolic_surface, tensor_dot
from tectosaur2.elastic2d import elastic_h, elastic_u
from tectosaur2.hmatrix.hmatrix import (
TempSurface,
aca_blocks,
build_tree,
... | 30.098039 | 88 | 0.645928 |
79648bb6a6d95d81f1070465e461bcc4cfc49264 | 3,787 | py | Python | deps/rocksdb/buckifier/targets_cfg.py | yasabi/GrinPlusPlus | 8e9a32b3d2171c3dea1d4de833a1fc5cb12981ea | [
"MIT"
] | null | null | null | deps/rocksdb/buckifier/targets_cfg.py | yasabi/GrinPlusPlus | 8e9a32b3d2171c3dea1d4de833a1fc5cb12981ea | [
"MIT"
] | null | null | null | deps/rocksdb/buckifier/targets_cfg.py | yasabi/GrinPlusPlus | 8e9a32b3d2171c3dea1d4de833a1fc5cb12981ea | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
rocksdb_target_header = """load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders")
load(... | 27.442029 | 93 | 0.679694 |
79648bd3b42d9d33e3ff016ab54346c7ed69c720 | 1,950 | py | Python | marvanZhouTutorial/06_try_activation_func_visualization.py | giraffe-tree/play-tf | 30f39f228d55fdeb35f1bd420b3bb29ecd3ade96 | [
"MIT"
] | null | null | null | marvanZhouTutorial/06_try_activation_func_visualization.py | giraffe-tree/play-tf | 30f39f228d55fdeb35f1bd420b3bb29ecd3ade96 | [
"MIT"
] | null | null | null | marvanZhouTutorial/06_try_activation_func_visualization.py | giraffe-tree/play-tf | 30f39f228d55fdeb35f1bd420b3bb29ecd3ade96 | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
# 本节在 try_activation_func.py 的基础上, 做可视化
# y = Wx
# y = AF(Wx)
# relu, sigmoid, tanh
# 注意这些激励函数是要可以微分的
# 梯度爆炸, 梯度消失
# 少量层结构
# CNN relu
# RNN relu tanh
def add_layer(inputs, in_size, out_size, activation_function=None):
'''
添加一个神经层
... | 23.214286 | 69 | 0.660513 |
79648bf72a9d3b047d238d9be2264be309f5184c | 807 | py | Python | setup.py | flegac/qt-widgets | fadb9a4c6ae20ff492399d4d07a3869a063400ee | [
"MIT"
] | null | null | null | setup.py | flegac/qt-widgets | fadb9a4c6ae20ff492399d4d07a3869a063400ee | [
"MIT"
] | null | null | null | setup.py | flegac/qt-widgets | fadb9a4c6ae20ff492399d4d07a3869a063400ee | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name='qt-widgets',
version='0.0.1-dev7',
author='flegac',
description='Qt widgets library',
long_description=long_description,
long_description_content_type... | 28.821429 | 69 | 0.655514 |
79648c673b451c4532af325079fd6253e152903c | 41 | py | Python | ihashmap/__init__.py | C2Devel/ihashmap | d3b19357171ec7cfcd3f170de86c8e60d843f306 | [
"MIT"
] | null | null | null | ihashmap/__init__.py | C2Devel/ihashmap | d3b19357171ec7cfcd3f170de86c8e60d843f306 | [
"MIT"
] | 1 | 2021-05-29T21:30:27.000Z | 2021-05-29T21:30:27.000Z | ihashmap/__init__.py | C2Devel/ihashmap | d3b19357171ec7cfcd3f170de86c8e60d843f306 | [
"MIT"
] | 1 | 2021-08-16T12:10:08.000Z | 2021-08-16T12:10:08.000Z | from . import cache, index # noqa: F401
| 20.5 | 40 | 0.682927 |
79648c9483ff41353a2784bfca42160b493c93b2 | 2,001 | py | Python | src/ControlServer.py | TimKam/crazyflie-on-voice | fca6c0ba9aed38a133d708410ff0040b85701dd0 | [
"MIT"
] | 4 | 2018-05-21T12:18:04.000Z | 2021-02-27T14:15:12.000Z | src/ControlServer.py | TimKam/crazyflie-on-voice | fca6c0ba9aed38a133d708410ff0040b85701dd0 | [
"MIT"
] | null | null | null | src/ControlServer.py | TimKam/crazyflie-on-voice | fca6c0ba9aed38a133d708410ff0040b85701dd0 | [
"MIT"
] | null | null | null | # Author: Christopher Blöcker, Timotheus Kampik, Tobias Sundqvist
from http.server import HTTPServer, BaseHTTPRequestHandler
from json import loads, dumps
from json.decoder import JSONDecodeError
from src.controller import *
class CrazyHandler(BaseHTTPRequestHandler):
"""
The request handler for commands tha... | 31.265625 | 82 | 0.593703 |
79648d45dba4786dbfdf47b2e2fdf002c87e4dfe | 15,742 | py | Python | tests/storage/test_monthly_active_users.py | mlakkadshaw/synapse | 74a2365bd5066955567cc551e72632d6cece94b9 | [
"Apache-2.0"
] | null | null | null | tests/storage/test_monthly_active_users.py | mlakkadshaw/synapse | 74a2365bd5066955567cc551e72632d6cece94b9 | [
"Apache-2.0"
] | 2 | 2022-03-01T08:22:45.000Z | 2022-03-11T08:13:55.000Z | tests/storage/test_monthly_active_users.py | mlakkadshaw/synapse | 74a2365bd5066955567cc551e72632d6cece94b9 | [
"Apache-2.0"
] | 1 | 2022-03-31T09:03:27.000Z | 2022-03-31T09:03:27.000Z | # Copyright 2018 New Vector
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 38.583333 | 88 | 0.680091 |
79648d57a397afcdb04143bae8daac5aa90b7c05 | 612 | py | Python | main.py | conorf50/pycom-us100 | e4c3102e346edc9547b71b93529583c86b2b3e0d | [
"MIT"
] | null | null | null | main.py | conorf50/pycom-us100 | e4c3102e346edc9547b71b93529583c86b2b3e0d | [
"MIT"
] | null | null | null | main.py | conorf50/pycom-us100 | e4c3102e346edc9547b71b93529583c86b2b3e0d | [
"MIT"
] | null | null | null | from machine import UART
import utime
import us100
import pycom
'''
Based on code written by Kai Fricke, available here:
https://github.com/kfricke/micropython-us100
Ported to Pycom based boards by Conor Farrell
https://github.com/conorf50/pycom-us100
'''
# The SiPy has two serial ports, one is used to communicate w... | 21.103448 | 87 | 0.743464 |
79648db9c96bf873e79f51e74b9d03606b3a9a0d | 5,884 | py | Python | sdk/python/pulumi_azure/batch/get_certificate.py | aangelisc/pulumi-azure | 71dd9c75403146e16f7480e5a60b08bc0329660e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/batch/get_certificate.py | aangelisc/pulumi-azure | 71dd9c75403146e16f7480e5a60b08bc0329660e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/batch/get_certificate.py | aangelisc/pulumi-azure | 71dd9c75403146e16f7480e5a60b08bc0329660e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 36.09816 | 167 | 0.665024 |
79648e6ae030410e055f47dae8f06609e1f39759 | 324 | py | Python | src/olympia/tags/admin.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 10 | 2018-08-16T04:55:06.000Z | 2022-01-08T16:09:39.000Z | src/olympia/tags/admin.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 1,398 | 2020-10-08T06:32:26.000Z | 2022-03-31T12:06:24.000Z | src/olympia/tags/admin.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 12 | 2018-08-01T16:46:09.000Z | 2022-01-08T16:09:46.000Z | from django.contrib import admin
from .models import Tag
class TagAdmin(admin.ModelAdmin):
list_display = ('tag_text', 'popularity', 'created', 'denied')
list_editable = ('denied',)
list_filter = ('denied',)
ordering = ('-created',)
search_fields = ('^tag_text',)
admin.site.register(Tag, TagAdm... | 21.6 | 66 | 0.67284 |
796491fa85f174ca7c624fd55a623e3c2c74e23f | 250 | py | Python | pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/yang/ospf.py | miott/genielibs | 6464642cdd67aa2367bdbb12561af4bb060e5e62 | [
"Apache-2.0"
] | 94 | 2018-04-30T20:29:15.000Z | 2022-03-29T13:40:31.000Z | pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/yang/ospf.py | miott/genielibs | 6464642cdd67aa2367bdbb12561af4bb060e5e62 | [
"Apache-2.0"
] | 67 | 2018-12-06T21:08:09.000Z | 2022-03-29T18:00:46.000Z | pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/yang/ospf.py | miott/genielibs | 6464642cdd67aa2367bdbb12561af4bb060e5e62 | [
"Apache-2.0"
] | 49 | 2018-06-29T18:59:03.000Z | 2022-03-10T02:07:59.000Z | from genie.ops.base import Context
from genie.libs.ops.ospf.iosxr.ospf import Ospf as b_ospf
class Ospf(b_ospf):
'''Ospf Ops Object'''
# To keep short names
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
| 25 | 57 | 0.672 |
7964922c24746b2457f8da97b7c3b88fda90c323 | 3,529 | py | Python | python/example_code/lambda/test/test_api_gateway_rest.py | iconara/aws-doc-sdk-examples | 52706b31b4fce8fb89468e56743edf5369e69628 | [
"Apache-2.0"
] | 5,166 | 2016-09-02T08:48:38.000Z | 2022-03-31T19:12:43.000Z | python/example_code/lambda/test/test_api_gateway_rest.py | iconara/aws-doc-sdk-examples | 52706b31b4fce8fb89468e56743edf5369e69628 | [
"Apache-2.0"
] | 1,186 | 2016-09-28T23:05:19.000Z | 2022-03-31T18:07:47.000Z | python/example_code/lambda/test/test_api_gateway_rest.py | iconara/aws-doc-sdk-examples | 52706b31b4fce8fb89468e56743edf5369e69628 | [
"Apache-2.0"
] | 4,003 | 2016-08-29T19:51:40.000Z | 2022-03-31T16:40:02.000Z | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
Unit tests for api_gateway_rest.py functions.
"""
import boto3
from botocore.exceptions import ClientError
import pytest
import api_gateway_rest
@pytest.mark.parametrize('error_code,stop_on_method', [
... | 39.651685 | 84 | 0.698215 |
7964926acc5f29e79440018cd1daa6a223e54918 | 45,562 | py | Python | katpoint/catalogue.py | ska-sa/katpoint | 7cbac9c2f461e4209a147bda93572b7f523531d4 | [
"BSD-3-Clause"
] | 1 | 2019-08-26T06:26:47.000Z | 2019-08-26T06:26:47.000Z | katpoint/catalogue.py | ska-sa/katpoint | 7cbac9c2f461e4209a147bda93572b7f523531d4 | [
"BSD-3-Clause"
] | 23 | 2018-11-20T15:41:40.000Z | 2021-08-03T20:39:21.000Z | katpoint/catalogue.py | ska-sa/katpoint | 7cbac9c2f461e4209a147bda93572b7f523531d4 | [
"BSD-3-Clause"
] | 4 | 2019-07-22T08:01:03.000Z | 2021-02-23T07:09:04.000Z | ################################################################################
# Copyright (c) 2009-2021, National Research Foundation (SARAO)
#
# Licensed under the BSD 3-Clause License (the "License"); you may not use
# this file except in compliance with the License. You may obtain a copy
# of the License at
#
# ... | 46.92276 | 119 | 0.621329 |
796492fffb52c2911d6a71f5d0596be0df9d5c44 | 14,011 | py | Python | modules/labelfusion/utils.py | hz-ants/LabelFusion-docker2- | 8dc116064a1bdcfa2c2dd814580b5f43d46c6f40 | [
"BSD-3-Clause"
] | 313 | 2017-07-16T02:00:16.000Z | 2022-03-31T11:00:10.000Z | modules/labelfusion/utils.py | hz-ants/LabelFusion-docker2- | 8dc116064a1bdcfa2c2dd814580b5f43d46c6f40 | [
"BSD-3-Clause"
] | 94 | 2017-07-16T19:59:06.000Z | 2022-03-30T08:14:22.000Z | modules/labelfusion/utils.py | hz-ants/LabelFusion-docker2- | 8dc116064a1bdcfa2c2dd814580b5f43d46c6f40 | [
"BSD-3-Clause"
] | 87 | 2017-07-14T16:01:54.000Z | 2022-03-23T17:33:47.000Z | import os
import numpy as np
import yaml
from director import visualization as vis
from director import objectmodel as om
from director import transformUtils
from director import ioUtils
from director import filterUtils
from director import vtkAll as vtk
from director.debugVis import DebugData
from director import segm... | 35.470886 | 116 | 0.72229 |
796493c4d55bc89dbe20595e5583ba4b7d211321 | 1,443 | py | Python | examples/axi_to_mem.py | robtaylor/iroha | e7713910ee64ca98f999b98b0c77c02fcfe2da09 | [
"BSD-3-Clause"
] | 34 | 2016-02-07T17:43:55.000Z | 2021-12-18T12:01:08.000Z | examples/axi_to_mem.py | robtaylor/iroha | e7713910ee64ca98f999b98b0c77c02fcfe2da09 | [
"BSD-3-Clause"
] | 5 | 2016-04-12T09:27:31.000Z | 2021-06-29T10:59:18.000Z | examples/axi_to_mem.py | robtaylor/iroha | e7713910ee64ca98f999b98b0c77c02fcfe2da09 | [
"BSD-3-Clause"
] | 5 | 2015-12-26T10:58:46.000Z | 2021-06-25T18:58:40.000Z | import sys
sys.path.append('../py')
from iroha import *
from iroha.iroha import *
d = IDesign()
mod_root = IModule(d, "mod_root")
mod = IModule(d, "mod")
mod.parent_module = mod_root
tab = ITable(mod)
st1 = IState(tab)
st2 = IState(tab)
st3 = IState(tab)
tab.initialSt = st1
tab.states.append(st1)
tab.states.append... | 24.457627 | 69 | 0.754678 |
79649400a74cd9431255b4613845ec4550faec62 | 389 | py | Python | tests/conftest.py | antarctica/sld-repository | 063639eefeb9ef58b37f6e1a13118a68be2cfe8d | [
"CNRI-Python",
"RSA-MD"
] | null | null | null | tests/conftest.py | antarctica/sld-repository | 063639eefeb9ef58b37f6e1a13118a68be2cfe8d | [
"CNRI-Python",
"RSA-MD"
] | null | null | null | tests/conftest.py | antarctica/sld-repository | 063639eefeb9ef58b37f6e1a13118a68be2cfe8d | [
"CNRI-Python",
"RSA-MD"
] | null | null | null | import pytest
from bas_sld_repository import create_app
from tests.bas_sld_repository.conftest.geoserver import MockGeoServerCatalogue
@pytest.fixture
def app():
app = create_app()
return app
@pytest.fixture
@pytest.mark.usefixtures('app')
def app_runner(app):
return app.test_cli_runner()
@pytest.fi... | 16.913043 | 78 | 0.77892 |
7964949b13fe93ce8cadf64dc6d70cad1e923270 | 10,937 | py | Python | jina/executors/indexers/__init__.py | yk/jina | ab66e233e74b956390f266881ff5dc4e0110d3ff | [
"Apache-2.0"
] | null | null | null | jina/executors/indexers/__init__.py | yk/jina | ab66e233e74b956390f266881ff5dc4e0110d3ff | [
"Apache-2.0"
] | null | null | null | jina/executors/indexers/__init__.py | yk/jina | ab66e233e74b956390f266881ff5dc4e0110d3ff | [
"Apache-2.0"
] | null | null | null | __copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"
import os
from typing import Tuple, Union, List, Iterator, Optional, Any
import numpy as np
from .. import BaseExecutor
from ..compound import CompoundExecutor
from ...helper import call_obj_fn, cached_property, get... | 34.720635 | 119 | 0.600896 |
79649576c22a12ce406355852b4099a4f155ae54 | 1,627 | py | Python | tweet/views.py | JonnySueck/TwitterClone | e7d16dfc60945a44ed32d970433d0a8dc2ee84eb | [
"MIT"
] | null | null | null | tweet/views.py | JonnySueck/TwitterClone | e7d16dfc60945a44ed32d970433d0a8dc2ee84eb | [
"MIT"
] | null | null | null | tweet/views.py | JonnySueck/TwitterClone | e7d16dfc60945a44ed32d970433d0a8dc2ee84eb | [
"MIT"
] | null | null | null | from tweet.models import Tweet
from django.shortcuts import render, HttpResponseRedirect
from .forms import TweetForm
from django.contrib.auth.decorators import login_required
from twitteruser.views import user_detail, following
from notification.models import notification
from notification.views import notifications
... | 29.581818 | 65 | 0.664413 |
7964964138e68275c656e93cd8a6fa18eba346f2 | 609 | py | Python | binder/run_notebooks.py | chrislit/comparable_words | 1a589596057ad18fb6f759c03a579ecff24ce28e | [
"BSD-2-Clause"
] | null | null | null | binder/run_notebooks.py | chrislit/comparable_words | 1a589596057ad18fb6f759c03a579ecff24ce28e | [
"BSD-2-Clause"
] | 1 | 2019-06-30T22:53:53.000Z | 2019-06-30T22:53:53.000Z | binder/run_notebooks.py | chrislit/comparable_words | 1a589596057ad18fb6f759c03a579ecff24ce28e | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
import os
import nbformat
from nbconvert.preprocessors import ExecutePreprocessor
notebooks = os.listdir('.')
notebooks = sorted(filter(lambda fn: fn.endswith('.ipynb') and fn[:2].isdigit(), notebooks))
ep = ExecutePreprocessor(timeout=600, kernel_name='python3')
for notebook_filename in noteb... | 32.052632 | 92 | 0.704433 |
79649649814c8f87c2d0f7fcb9620f86fa1a37c9 | 8,899 | py | Python | plots/mapplot.py | cebarbosa/muse-maps | 5748b443482d4d8ef915be544c196f589c6f16da | [
"MIT"
] | null | null | null | plots/mapplot.py | cebarbosa/muse-maps | 5748b443482d4d8ef915be544c196f589c6f16da | [
"MIT"
] | null | null | null | plots/mapplot.py | cebarbosa/muse-maps | 5748b443482d4d8ef915be544c196f589c6f16da | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on 10/02/16
Adapted on 24/03/2018 to use in hydraimf project
@author: Carlos Eduardo Barbosa
"""
import os
import numpy as np
from astropy.io import fits
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
from matplotlib.patches import Rectangle
import scipy... | 44.495 | 85 | 0.499382 |
7964968577103ec94cface93c6d6a922c63807ef | 9,715 | py | Python | platform/gsutil/gslib/commands/signurl.py | bopopescu/google-cloud-sdk | b34e6a18f1e89673508166acce816111c3421e4b | [
"Apache-2.0"
] | null | null | null | platform/gsutil/gslib/commands/signurl.py | bopopescu/google-cloud-sdk | b34e6a18f1e89673508166acce816111c3421e4b | [
"Apache-2.0"
] | null | null | null | platform/gsutil/gslib/commands/signurl.py | bopopescu/google-cloud-sdk | b34e6a18f1e89673508166acce816111c3421e4b | [
"Apache-2.0"
] | 1 | 2020-07-24T20:04:47.000Z | 2020-07-24T20:04:47.000Z | # Copyright 2014 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... | 32.600671 | 80 | 0.646938 |
796496d39e12ef383d5db01abad065a558a5d9d3 | 3,030 | py | Python | {{ cookiecutter.project_name }}/src/application/tests/test_user.py | donos-63/cookiecutter_tests | 528eb00c2c795195658227b056c3622aa6d9f8b8 | [
"MIT"
] | null | null | null | {{ cookiecutter.project_name }}/src/application/tests/test_user.py | donos-63/cookiecutter_tests | 528eb00c2c795195658227b056c3622aa6d9f8b8 | [
"MIT"
] | null | null | null | {{ cookiecutter.project_name }}/src/application/tests/test_user.py | donos-63/cookiecutter_tests | 528eb00c2c795195658227b056c3622aa6d9f8b8 | [
"MIT"
] | null | null | null | from flask import url_for
from {{cookiecutter.app_name}}.extensions import pwd_context
from {{cookiecutter.app_name}}.models import User
def test_get_user(client, db, user, admin_headers):
# test 404
user_url = url_for('users.user_by_id', user_id="100000")
rep = client.get(user_url, headers=admin_headers... | 29.705882 | 74 | 0.682838 |
796496f1934b11d61a96f17c4f8dce6f5ff1f8e0 | 8,155 | py | Python | pipeline/3_forces.py | pyomeca/pyosim_aws | 91c225b597d52523a1cf30839082c134fb88a4c9 | [
"Apache-2.0"
] | 2 | 2020-09-14T22:22:06.000Z | 2021-06-07T20:44:09.000Z | pipeline/3_forces.py | pyomeca/pyosim_aws | 91c225b597d52523a1cf30839082c134fb88a4c9 | [
"Apache-2.0"
] | 1 | 2020-04-03T16:41:23.000Z | 2020-04-03T16:41:23.000Z | pipeline/3_forces.py | pyomeca/pyosim_aws | 91c225b597d52523a1cf30839082c134fb88a4c9 | [
"Apache-2.0"
] | 1 | 2019-11-30T23:27:02.000Z | 2019-11-30T23:27:02.000Z | """
Export forces to sto
"""
from pathlib import Path
import matplotlib.pyplot as plt
import numpy as np
import yaml
from pyosim import Conf
from pyosim import Analogs3dOsim
aws_conf = yaml.safe_load(open("../conf.yml"))
local_or_distant = "distant" if aws_conf["distant_id"]["enable"] else "local"
conf = Conf(project... | 35 | 98 | 0.521398 |
7964974ff0c32a9d8803ef03b1885f4c00e69c1e | 891 | py | Python | src/z3c/rml/tests/test_pagetemplate.py | robertu/z3c.rml | 2d08a3837a0449619f647b5041258ecd63d3ccc5 | [
"ZPL-2.1"
] | null | null | null | src/z3c/rml/tests/test_pagetemplate.py | robertu/z3c.rml | 2d08a3837a0449619f647b5041258ecd63d3ccc5 | [
"ZPL-2.1"
] | null | null | null | src/z3c/rml/tests/test_pagetemplate.py | robertu/z3c.rml | 2d08a3837a0449619f647b5041258ecd63d3ccc5 | [
"ZPL-2.1"
] | null | null | null | # -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (c) 2005 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this... | 35.64 | 79 | 0.61055 |
796497d710b9743e40ff8799865747ead7f85386 | 874 | py | Python | adv/heinwald.py | KingMikeXS/dl | c05f1c2e96aa7d13f6a5e92df05fb4e7b00bcebd | [
"Apache-2.0"
] | null | null | null | adv/heinwald.py | KingMikeXS/dl | c05f1c2e96aa7d13f6a5e92df05fb4e7b00bcebd | [
"Apache-2.0"
] | null | null | null | adv/heinwald.py | KingMikeXS/dl | c05f1c2e96aa7d13f6a5e92df05fb4e7b00bcebd | [
"Apache-2.0"
] | null | null | null | import adv.adv_test
from core.advbase import *
from slot.a.all import *
from slot.d import *
def module():
return Heinwald
class Heinwald(Adv):
a1 = ('s',0.4,'hp70')
a3 = ('prep_charge','5%')
conf = {}
conf['acl'] = """
`s2, pin='prep'
`s2, cancel
`s1, cancel
`s3, ... | 21.317073 | 66 | 0.544622 |
79649839a9b3867254dc1267ca4ddf1c732c1dc5 | 2,867 | py | Python | umlayer/gui/line_handle_item.py | selforthis/umlayer | 8679af2ec46d346bc1b4adbcb70e3ebc6a52604a | [
"MIT"
] | null | null | null | umlayer/gui/line_handle_item.py | selforthis/umlayer | 8679af2ec46d346bc1b4adbcb70e3ebc6a52604a | [
"MIT"
] | null | null | null | umlayer/gui/line_handle_item.py | selforthis/umlayer | 8679af2ec46d346bc1b4adbcb70e3ebc6a52604a | [
"MIT"
] | 1 | 2021-11-28T17:26:00.000Z | 2021-11-28T17:26:00.000Z | from PySide6.QtCore import Qt, QRectF, Signal
from PySide6.QtGui import QPainter, QPainterPath
from PySide6.QtWidgets import (
QGraphicsItem,
QStyleOptionGraphicsItem,
QGraphicsObject,
QApplication,
)
from . import gui_utils, Settings
class LineHandleItem(QGraphicsObject):
selection_changed_signa... | 32.954023 | 92 | 0.667597 |
7964993ce88d6f7840bb634fd04ab9b7f021f3c8 | 3,123 | py | Python | tests/test_logging_compat.py | YoavCohen/logbook | 3e0badb395ed8d0038d02996d38aa0505441327e | [
"BSD-3-Clause"
] | 771 | 2015-11-07T12:55:07.000Z | 2022-03-16T09:37:44.000Z | tests/test_logging_compat.py | YoavCohen/logbook | 3e0badb395ed8d0038d02996d38aa0505441327e | [
"BSD-3-Clause"
] | 169 | 2015-11-08T06:56:55.000Z | 2022-02-28T06:58:50.000Z | tests/test_logging_compat.py | YoavCohen/logbook | 3e0badb395ed8d0038d02996d38aa0505441327e | [
"BSD-3-Clause"
] | 105 | 2015-11-07T14:11:07.000Z | 2021-12-31T17:46:36.000Z | import functools
from random import randrange
import logbook
import logbook.compat
from logbook.helpers import StringIO
import pytest
from .utils import capturing_stderr_context
__file_without_pyc__ = __file__
if __file_without_pyc__.endswith(".pyc"):
__file_without_pyc__ = __file_without_pyc__[:-1]
@pytest.... | 34.7 | 98 | 0.667947 |
7964995769ab2bcaafd17b40e53c8e245b73b97e | 1,461 | py | Python | model.py | gluttony2016/RNN | 8991f020abdb5b28d9f73062dbfcd88d30d760a8 | [
"MIT"
] | null | null | null | model.py | gluttony2016/RNN | 8991f020abdb5b28d9f73062dbfcd88d30d760a8 | [
"MIT"
] | null | null | null | model.py | gluttony2016/RNN | 8991f020abdb5b28d9f73062dbfcd88d30d760a8 | [
"MIT"
] | null | null | null | import tensorflow as tf
from pydoc import locate
from config.configurable import Configurable
from encoder import Encoder
from decoder import Decoder
from train_op import build_train_op
class DRGD(Configurable):
def __init__(self, mode=tf.contrib.learn.ModeKeys.TRAIN, name='DRGD'):
super(DRGD, self).__init... | 54.111111 | 207 | 0.70705 |
79649a692e46303a6b270869b56645ae74a94c6d | 585 | py | Python | filter_ads_from_comment/bert_allowed_lang/bert_allowed_lang.py | ZhengDeQuan/AAA | 7755c6aa1cfa484a2836ae6059bca721de2a90e8 | [
"MIT"
] | null | null | null | filter_ads_from_comment/bert_allowed_lang/bert_allowed_lang.py | ZhengDeQuan/AAA | 7755c6aa1cfa484a2836ae6059bca721de2a90e8 | [
"MIT"
] | null | null | null | filter_ads_from_comment/bert_allowed_lang/bert_allowed_lang.py | ZhengDeQuan/AAA | 7755c6aa1cfa484a2836ae6059bca721de2a90e8 | [
"MIT"
] | 1 | 2020-10-14T03:46:08.000Z | 2020-10-14T03:46:08.000Z | import pickle
from collections import defaultdict
import re
#语言缩写及其英文全称的对照表
# lang2code = defaultdict("NoneNuLL")
# with open("3.txt","r",encoding="utf-8") as fin:
# lines = fin.readlines()
# for line in lines:
# line = line.strip().split()
# line = line[:2]
# code , lang = line
# ... | 22.5 | 80 | 0.598291 |
79649aa3e8fead2496e341e69a2a7b9158832892 | 9,339 | py | Python | src/graphql/executor/context.py | btrekkie/graphql | 6c118550267eeb57a9653f4f46d7bbd6c5902110 | [
"MIT"
] | null | null | null | src/graphql/executor/context.py | btrekkie/graphql | 6c118550267eeb57a9653f4f46d7bbd6c5902110 | [
"MIT"
] | null | null | null | src/graphql/executor/context.py | btrekkie/graphql | 6c118550267eeb57a9653f4f46d7bbd6c5902110 | [
"MIT"
] | null | null | null | import logging
from graphql.document import GraphQlParseError
logger = logging.getLogger(__name__)
class GraphQlContext(object):
"""Provides context to GraphQlExecutor and controls execution.
A context object is passed to the GraphQlExecutor execution methods.
We may use GraphQlContext directly, or we ... | 42.83945 | 79 | 0.669129 |
79649ac66acd4175d9fffce5d6477e60c5a8424e | 439 | py | Python | examples/downloading_data.py | foxglove/py-data-platform | d5012652ac3ddab57ccfb85efdb6b7e05f135656 | [
"Apache-2.0"
] | null | null | null | examples/downloading_data.py | foxglove/py-data-platform | d5012652ac3ddab57ccfb85efdb6b7e05f135656 | [
"Apache-2.0"
] | 11 | 2022-02-21T15:43:53.000Z | 2022-03-29T12:14:41.000Z | examples/downloading_data.py | foxglove/py-data-platform | d5012652ac3ddab57ccfb85efdb6b7e05f135656 | [
"Apache-2.0"
] | null | null | null | import datetime
from datetime import datetime, timedelta
from foxglove_data_platform.client import Client
token = "<YOUR API TOKEN HERE>"
device_id = "<YOUR DEVICE ID>"
client = Client(token=token)
data = client.download_data(
device_id=device_id,
start=datetime.now() - timedelta(hours=3),
end=datetime.n... | 24.388889 | 49 | 0.719818 |
79649cc3d2839172dff35e986f64dc92ce5d3f36 | 52,080 | py | Python | n_utils/aws_infra_util.py | Jalle19/nameless-deploy-tools | 755b00ac4c87611cc57cabc3b593c8cafce2498b | [
"Apache-2.0"
] | null | null | null | n_utils/aws_infra_util.py | Jalle19/nameless-deploy-tools | 755b00ac4c87611cc57cabc3b593c8cafce2498b | [
"Apache-2.0"
] | null | null | null | n_utils/aws_infra_util.py | Jalle19/nameless-deploy-tools | 755b00ac4c87611cc57cabc3b593c8cafce2498b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2016-2017 Nitor Creations Oy
#
# 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 appli... | 36.343336 | 109 | 0.528437 |
79649cd2672382ec68b0f07eac555cb7b02c1289 | 148 | py | Python | djugl_demo_2/demo/apps.py | mbox/djugl-demo | d9189923cbd5f5fca60f75ddaf3a01ce74428420 | [
"Unlicense"
] | 8 | 2018-04-28T08:13:32.000Z | 2021-09-10T14:46:59.000Z | demo/apps.py | gmaclinuxer/webchat-demo | 629fcc430ea66d22abb7e0925ddcba81ab2144d5 | [
"MIT"
] | 7 | 2019-10-20T18:47:34.000Z | 2022-02-10T07:42:18.000Z | demo/apps.py | gmaclinuxer/webchat-demo | 629fcc430ea66d22abb7e0925ddcba81ab2144d5 | [
"MIT"
] | 3 | 2019-07-26T06:48:29.000Z | 2021-04-19T13:24:15.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps import AppConfig
class DemoConfig(AppConfig):
name = 'demo'
| 16.444444 | 39 | 0.722973 |
79649da5a83f311a86e9f41ef579a8b090adb828 | 10,499 | py | Python | v6.0.5/certificate/test_fortios_certificate_ca.py | fortinet-solutions-cse/ansible_fgt_modules | c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719 | [
"Apache-2.0"
] | 14 | 2018-09-25T20:35:25.000Z | 2021-07-14T04:30:54.000Z | v6.0.6/certificate/test_fortios_certificate_ca.py | fortinet-solutions-cse/ansible_fgt_modules | c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719 | [
"Apache-2.0"
] | 32 | 2018-10-09T04:13:42.000Z | 2020-05-11T07:20:28.000Z | v6.0.6/certificate/test_fortios_certificate_ca.py | fortinet-solutions-cse/ansible_fgt_modules | c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719 | [
"Apache-2.0"
] | 11 | 2018-10-09T00:14:53.000Z | 2021-11-03T10:54:09.000Z | # Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the... | 36.203448 | 142 | 0.624726 |
79649de8b08cbae33f1a6af9b5b861b177a9b2b6 | 6,578 | py | Python | tools/odrive/enums.py | john-bush/ODrive-1 | 190d026c6b567b53747f763fb3f7f0b9167abd73 | [
"MIT"
] | 1 | 2020-11-28T11:42:52.000Z | 2020-11-28T11:42:52.000Z | tools/odrive/enums.py | patternV/ODrive | f150114d7707dab3f2182d1deee29b5495c6210b | [
"MIT"
] | null | null | null | tools/odrive/enums.py | patternV/ODrive | f150114d7707dab3f2182d1deee29b5495c6210b | [
"MIT"
] | null | null | null |
# TODO: This file is dangerous because the enums could potentially change between API versions. Should transmit as part of the JSON.
# To regenerate this file, nagivate to the top level of the ODrive repository and run:
# python Firmware/interface_generator_stub.py --definitions Firmware/odrive-interface.yaml --temp... | 44.147651 | 158 | 0.671633 |
79649e4ce40aefe93c5e454d48918d2ea73b81e8 | 1,804 | py | Python | examples/torch/trpo_pendulum.py | neurips2020submission11699/metarl | ae4825d21478fa1fd0aa6b116941ea40caa152a5 | [
"MIT"
] | 2 | 2021-02-07T12:14:52.000Z | 2021-07-29T08:07:22.000Z | examples/torch/trpo_pendulum.py | neurips2020submission11699/metarl | ae4825d21478fa1fd0aa6b116941ea40caa152a5 | [
"MIT"
] | null | null | null | examples/torch/trpo_pendulum.py | neurips2020submission11699/metarl | ae4825d21478fa1fd0aa6b116941ea40caa152a5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""This is an example to train a task with TRPO algorithm (PyTorch).
Here it runs InvertedDoublePendulum-v2 environment with 100 iterations.
"""
import torch
from metarl import wrap_experiment
from metarl.envs import MetaRLEnv
from metarl.experiment import LocalRunner
from metarl.experiment.det... | 32.8 | 77 | 0.638581 |
79649e58d6f17e16a4bb8a6316e28e386804ca63 | 13,497 | py | Python | field_calculator/Field_Calculator_defs_2017_07_03.py | Dan-Patterson/Tools_for_ArcGIS_Pro | b5c253d59d57bd1abe7e2433a77aed7d3ea22567 | [
"Info-ZIP"
] | 23 | 2020-05-15T18:40:25.000Z | 2022-03-31T08:44:39.000Z | field_calculator/Field_Calculator_defs_2017_07_03.py | Dan-Patterson/Tools_for_ArcGIS_Pro | b5c253d59d57bd1abe7e2433a77aed7d3ea22567 | [
"Info-ZIP"
] | 1 | 2021-12-14T16:47:00.000Z | 2021-12-15T03:06:26.000Z | field_calculator/Field_Calculator_defs_2017_07_03.py | Dan-Patterson/Tools_for_ArcGIS_Pro | b5c253d59d57bd1abe7e2433a77aed7d3ea22567 | [
"Info-ZIP"
] | 3 | 2021-08-09T05:42:19.000Z | 2022-03-31T08:44:59.000Z | # -*- coding: UTF-8 -*-
"""
:Script: Field_Calculator_defs.py
:Author: Dan.Patterson@carleton.ca
:Created: 2013-??-??
:Modified: 2016-09-17
:Purpose: demonstration functions that can be used in the field calculator
:Useage:
: copy the function into the code block and put in the suggested format
: into t... | 27.488798 | 88 | 0.579018 |
79649fdc5f8d44734ed04e155cb82f34279c1594 | 2,928 | py | Python | openstack_dashboard/dashboards/project/data_processing/job_binaries/tables.py | maofutian/horizon | dab92e7d2f576caea8f81c8e22a516fb45633794 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/project/data_processing/job_binaries/tables.py | maofutian/horizon | dab92e7d2f576caea8f81c8e22a516fb45633794 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/project/data_processing/job_binaries/tables.py | maofutian/horizon | dab92e7d2f576caea8f81c8e22a516fb45633794 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | 31.148936 | 74 | 0.647541 |
7964a11025f5ea95c4025bc1bca50927e46f69b7 | 450 | py | Python | pajbot/migration_revisions/db/0016_user_connections_update.py | sgaweda/troybot | 7153c0ad387e31de57c71172893fd92c85259d1b | [
"MIT"
] | null | null | null | pajbot/migration_revisions/db/0016_user_connections_update.py | sgaweda/troybot | 7153c0ad387e31de57c71172893fd92c85259d1b | [
"MIT"
] | 2 | 2020-02-18T03:30:30.000Z | 2020-02-18T03:31:44.000Z | pajbot/migration_revisions/db/0016_user_connections_update.py | sgaweda/troybot | 7153c0ad387e31de57c71172893fd92c85259d1b | [
"MIT"
] | null | null | null | import logging
log = logging.getLogger("pajbot")
def up(cursor, bot):
cursor.execute('ALTER TABLE "user_connections" ADD COLUMN twitch_login text DEFAULT NULL')
cursor.execute(
"""
ALTER TABLE "user_connections"
ADD CONSTRAINT "Twitch ID" FOREIGN KEY (twitch_id)
REFERENCES... | 25 | 94 | 0.606667 |
7964a1fdd78dd5f76c1e6a737ae71bb45e09ab62 | 630 | py | Python | entities/attribute.py | bitmarc/Recomendautos_Server | 4db5ca2f07d97d2f025f5879b4a25553c2eb2e72 | [
"OML"
] | null | null | null | entities/attribute.py | bitmarc/Recomendautos_Server | 4db5ca2f07d97d2f025f5879b4a25553c2eb2e72 | [
"OML"
] | null | null | null | entities/attribute.py | bitmarc/Recomendautos_Server | 4db5ca2f07d97d2f025f5879b4a25553c2eb2e72 | [
"OML"
] | null | null | null | class Attribute:
def __init__(self, id, name, description):
self.__id=id
self.__name=name
self.__description=description
def getId(self):
return self.__id
def setId(self, id):
self.__id=id
def getName(self):
return self.__name
def setName(self, na... | 22.5 | 83 | 0.633333 |
7964a21b98e2284d634d912f381e25b6e46934d5 | 477 | py | Python | ebedke/plugins/sonkaarcok.py | ijanos/ebedke | 9a0f91cc6536a78d7da9aca1fab22924a56d38e2 | [
"Apache-2.0",
"MIT"
] | 35 | 2017-08-09T20:43:55.000Z | 2022-02-15T09:39:22.000Z | ebedke/plugins/sonkaarcok.py | ijanos/ebedke | 9a0f91cc6536a78d7da9aca1fab22924a56d38e2 | [
"Apache-2.0",
"MIT"
] | 8 | 2017-08-10T07:32:47.000Z | 2019-03-29T10:31:46.000Z | ebedke/plugins/sonkaarcok.py | ijanos/ebedke | 9a0f91cc6536a78d7da9aca1fab22924a56d38e2 | [
"Apache-2.0",
"MIT"
] | 11 | 2017-08-10T07:05:21.000Z | 2020-02-12T10:56:38.000Z | from datetime import timedelta
from ebedke.utils.date import on_workdays
from ebedke.pluginmanager import EbedkePlugin
FB_PAGE = "https://www.facebook.com/pg/sonkaarcok/posts"
FB_ID = "189659631174505"
@on_workdays
def getMenu(_today):
return []
plugin = EbedkePlugin(
enabled=True,
name='SonkaArcok',
... | 19.875 | 56 | 0.702306 |
7964a2517fa56557d185204532df7ebbd0bf3f28 | 2,148 | py | Python | var/spack/repos/builtin/packages/gridlab-d/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2020-09-10T22:50:08.000Z | 2021-01-12T22:18:54.000Z | var/spack/repos/builtin/packages/gridlab-d/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 14 | 2021-07-20T01:04:53.000Z | 2022-03-02T01:08:36.000Z | var/spack/repos/builtin/packages/gridlab-d/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2021-04-07T18:27:09.000Z | 2022-03-31T22:52:38.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class GridlabD(AutotoolsPackage):
"""
Autotools package for Gridlab-D, a new power distribut... | 35.8 | 79 | 0.654562 |
7964a53ee2b3fa5bae33713929916403bff1ba3e | 6,052 | py | Python | test/functional/wallet_txn_doublespend.py | rebitcoin/rebitcoin | 87a39edad2362c3f196a98d4703f6f23cde9c13e | [
"MIT"
] | 1 | 2019-12-05T08:16:41.000Z | 2019-12-05T08:16:41.000Z | test/functional/wallet_txn_doublespend.py | rebitcoin/rebitcoin | 87a39edad2362c3f196a98d4703f6f23cde9c13e | [
"MIT"
] | null | null | null | test/functional/wallet_txn_doublespend.py | rebitcoin/rebitcoin | 87a39edad2362c3f196a98d4703f6f23cde9c13e | [
"MIT"
] | 1 | 2020-11-04T06:59:41.000Z | 2020-11-04T06:59:41.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2019 The ReBitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the wallet accounts properly when there is a double-spend conflict."""
from decimal import Decim... | 42.321678 | 111 | 0.656808 |
7964a616812fe48c47bec68f709af48fc95f1c5e | 27,627 | py | Python | sdks/python/apache_beam/io/filebasedsource_test.py | dxichen/beam | d02b859cb37e3c9f565785e93384905f1078b409 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | sdks/python/apache_beam/io/filebasedsource_test.py | dxichen/beam | d02b859cb37e3c9f565785e93384905f1078b409 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | sdks/python/apache_beam/io/filebasedsource_test.py | dxichen/beam | d02b859cb37e3c9f565785e93384905f1078b409 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | 36.640584 | 80 | 0.695841 |
7964a685feecbee3d98cb430a26d4f2f8a77f9d2 | 25,543 | py | Python | apps/api/base.py | yiqiwang-17/bk-log | 7b356fced63b667baea300cfd194ad70a842c3ee | [
"MIT"
] | null | null | null | apps/api/base.py | yiqiwang-17/bk-log | 7b356fced63b667baea300cfd194ad70a842c3ee | [
"MIT"
] | null | null | null | apps/api/base.py | yiqiwang-17/bk-log | 7b356fced63b667baea300cfd194ad70a842c3ee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-LOG 蓝鲸日志平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-LOG 蓝鲸日志平台 is licensed under the MIT License.
License for BK-LOG 蓝鲸日志平台:
------------------------------------------------... | 34.894809 | 120 | 0.589633 |
7964a6bafb8f72880fe65ce2ee0dcff2f3579208 | 2,808 | py | Python | external/cclib/method/population.py | faribas/RMG-Py | 6149e29b642bf8da9537e2db98f15121f0e040c7 | [
"MIT"
] | 1 | 2017-12-18T18:43:22.000Z | 2017-12-18T18:43:22.000Z | external/cclib/method/population.py | speth/RMG-Py | 1d2c2b684580396e984459d9347628a5ceb80e2e | [
"MIT"
] | 72 | 2016-06-06T18:18:49.000Z | 2019-11-17T03:21:10.000Z | external/cclib/method/population.py | speth/RMG-Py | 1d2c2b684580396e984459d9347628a5ceb80e2e | [
"MIT"
] | 3 | 2017-09-22T15:47:37.000Z | 2021-12-30T23:51:47.000Z | """
cclib (http://cclib.sf.net) is (c) 2006, the cclib development team
and licensed under the LGPL (http://www.gnu.org/copyleft/lgpl.html).
"""
__revision__ = "$Revision: 733 $"
import logging
import numpy
from calculationmethod import Method
class Population(Method):
"""A base class for all population-type ... | 29.557895 | 81 | 0.549858 |
7964a767e67006f499e7b90415b0c4ca7b446e8c | 16,012 | py | Python | log_casp_act/model_555.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_casp_act/model_555.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_casp_act/model_555.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | # exported from PySB model 'model'
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD
Model()
Monomer('Ligand', ['Receptor'])
Monomer('ParpU', ['C3A'])
Monomer('C8A', ['BidU', 'C3pro'])
Monomer('BaxM', ['BidM', 'BaxA'])
Monomer('Apop', ['C... | 84.273684 | 614 | 0.812266 |
7964a82517dad012f2b8e956294743716beeccc9 | 510 | py | Python | image_captioning/models/encoder.py | tynski/ImageCaptioning | 232018d36d11e82a51af1dcc4a87fbe38e6c9709 | [
"MIT"
] | null | null | null | image_captioning/models/encoder.py | tynski/ImageCaptioning | 232018d36d11e82a51af1dcc4a87fbe38e6c9709 | [
"MIT"
] | 2 | 2020-02-20T02:55:11.000Z | 2020-03-31T15:21:10.000Z | image_captioning/models/encoder.py | tynski/ImageCaptioning | 232018d36d11e82a51af1dcc4a87fbe38e6c9709 | [
"MIT"
] | null | null | null | import tensorflow as tf
class CNN_Encoder(tf.keras.Model):
def __init__(self, embedding_dim):
super(CNN_Encoder, self).__init__()
# shape after fc == (batch_size, 64, embedding_dim)
self.fc = tf.keras.layers.Dense(embedding_dim)
def call(self, x):
x = self.fc(x)
x = tf... | 30 | 82 | 0.639216 |
7964a84adc7f005241f5b7db07f295bd1aa71a94 | 1,745 | py | Python | commands/load_metadata/countries.py | DataViva/dataviva-scripts | 1e36f11e2849c33b8118cefe1755d312b19c0ecd | [
"MIT"
] | 10 | 2015-05-20T14:41:23.000Z | 2020-05-27T22:36:19.000Z | commands/load_metadata/countries.py | DataViva/dataviva-scripts | 1e36f11e2849c33b8118cefe1755d312b19c0ecd | [
"MIT"
] | 11 | 2018-05-17T14:30:58.000Z | 2018-09-06T21:20:34.000Z | commands/load_metadata/countries.py | DataViva/dataviva-scripts | 1e36f11e2849c33b8118cefe1755d312b19c0ecd | [
"MIT"
] | 12 | 2015-07-14T13:46:41.000Z | 2019-09-20T00:47:10.000Z | import click
import pandas
import json
from clients import s3, redis
@click.command()
@click.option('--both', 'upload', flag_value='s3_and_redis', default=True, help='Upload metadata to both s3 and Redis')
@click.option('--s3', 'upload', flag_value='only_s3', help='Upload metadata only to s3')
@click.option('--redis'... | 28.145161 | 119 | 0.546132 |
7964aa073ff8c3e3eb73a37b56ae05c2ebbe5602 | 356 | py | Python | Leetcoding-Actions/my-weekly-DSA-challenge/2020-w44-p0153-Find-Minimum-in-Rotated-Sorted-Array.py | shoaibur/SWE | 1e114a2750f2df5d6c50b48c8e439224894d65da | [
"MIT"
] | 1 | 2020-11-14T18:28:13.000Z | 2020-11-14T18:28:13.000Z | Leetcoding-Actions/my-weekly-DSA-challenge/2020-w44-p0153-Find-Minimum-in-Rotated-Sorted-Array.py | shoaibur/SWE | 1e114a2750f2df5d6c50b48c8e439224894d65da | [
"MIT"
] | null | null | null | Leetcoding-Actions/my-weekly-DSA-challenge/2020-w44-p0153-Find-Minimum-in-Rotated-Sorted-Array.py | shoaibur/SWE | 1e114a2750f2df5d6c50b48c8e439224894d65da | [
"MIT"
] | null | null | null | class Solution:
def findMin(self, nums: List[int]) -> int:
'''
T: O(log n) and S: O(1)
'''
lo, hi = 0, len(nums) - 1
while lo < hi:
mid = lo + (hi - lo) // 2
if nums[mid] > nums[hi]:
lo = mid + 1
else:
hi = m... | 23.733333 | 46 | 0.356742 |
7964aa794c5b3068ddc34aaea20b5897efd38a65 | 3,649 | py | Python | tests/integration/shell/test_cp.py | yutiansut/salt | e96c0fa13a3d977f6bfa9ccb56b7e45534f78666 | [
"Apache-2.0"
] | null | null | null | tests/integration/shell/test_cp.py | yutiansut/salt | e96c0fa13a3d977f6bfa9ccb56b7e45534f78666 | [
"Apache-2.0"
] | 1 | 2021-08-16T13:42:35.000Z | 2021-08-16T13:42:35.000Z | tests/integration/shell/test_cp.py | yutiansut/salt | e96c0fa13a3d977f6bfa9ccb56b7e45534f78666 | [
"Apache-2.0"
] | 2 | 2021-05-21T06:31:03.000Z | 2021-05-24T04:14:59.000Z | # -*- coding: utf-8 -*-
'''
:codeauthor: Pedro Algarvio (pedro@algarvio.me)
tests.integration.shell.cp
~~~~~~~~~~~~~~~~~~~~~~~~~~
'''
# Import python libs
from __future__ import absolute_import
import os
import pipes
import logging
# Import Salt Testing libs
from tests.support.runtests import RUNTIME_VA... | 29.666667 | 76 | 0.505618 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.