hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fa3cbfd8b261691f0db27a183a13227b321d7c35 | 1,782 | py | Python | neopixel/main.py | morgulbrut/wemos-mupy | fbe425c6a383c9c28f36f48a23c70aae98bf62cd | [
"MIT"
] | null | null | null | neopixel/main.py | morgulbrut/wemos-mupy | fbe425c6a383c9c28f36f48a23c70aae98bf62cd | [
"MIT"
] | null | null | null | neopixel/main.py | morgulbrut/wemos-mupy | fbe425c6a383c9c28f36f48a23c70aae98bf62cd | [
"MIT"
] | null | null | null | from machine import Pin
import neopixel
import time
class NeoMatrix:
def __init__(self, x, y):
self.colors = []
for i in range(x):
for j in range(x):
colors[i][j] = Color(0,0,0)
self.np = neopixel.NeoPixel(Pin(4, Pin.OUT),x*y)
self.np.write()
def set_pixel(self,x,y,r=0,g=0,b=0):
self.colors[x]... | 20.964706 | 82 | 0.537037 | 381 | 0.213805 | 0 | 0 | 0 | 0 | 0 | 0 | 1,285 | 0.7211 |
fa3d7b7b58127ec40c852f915a22ddc033b65684 | 377 | py | Python | tests/unit/request/request_builders/recurring_get_schedule_builder_test.py | Zhenay/python-sdk | 53161cc591fe2ec54ecfefad4fc4d5625a97afd9 | [
"MIT"
] | 3 | 2018-06-08T12:21:28.000Z | 2020-04-07T12:54:04.000Z | tests/unit/request/request_builders/recurring_get_schedule_builder_test.py | Zhenay/python-sdk | 53161cc591fe2ec54ecfefad4fc4d5625a97afd9 | [
"MIT"
] | 2 | 2017-09-21T15:43:46.000Z | 2019-07-22T08:20:50.000Z | tests/unit/request/request_builders/recurring_get_schedule_builder_test.py | Zhenay/python-sdk | 53161cc591fe2ec54ecfefad4fc4d5625a97afd9 | [
"MIT"
] | 4 | 2020-09-21T07:11:22.000Z | 2022-03-21T09:42:51.000Z | import unittest
from platron.request.request_builders.recurring_get_schedule_builder import RecurringGetScheduleBuilder
class RecurringGetScheduleBuilderTest(unittest.TestCase):
def test_get_params(self):
builder = RecurringGetScheduleBuilder('12345')
params = builder.get_params()
self.a... | 31.416667 | 103 | 0.787798 | 254 | 0.67374 | 0 | 0 | 0 | 0 | 0 | 0 | 36 | 0.095491 |
fa401c88954339276304ae936fc6f58c6bc88be6 | 2,372 | py | Python | malleus/api/domain/protos/timings_pb2.py | joelgerard/malleus | 763850ef270a449829b89a998cdce8febf5020ef | [
"Apache-2.0"
] | null | null | null | malleus/api/domain/protos/timings_pb2.py | joelgerard/malleus | 763850ef270a449829b89a998cdce8febf5020ef | [
"Apache-2.0"
] | 2 | 2021-02-08T20:22:50.000Z | 2021-06-01T22:07:40.000Z | malleus/api/domain/protos/timings_pb2.py | joelgerard/malleus | 763850ef270a449829b89a998cdce8febf5020ef | [
"Apache-2.0"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: malleus/api/domain/protos/timings.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf i... | 32.493151 | 231 | 0.778246 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 692 | 0.291737 |
fa404fc0c53d88f5afc112d22c40c258e0d8ffc9 | 2,191 | py | Python | basic_newsletter/utils.py | CIGIHub/newsletter_generator | 2af3e183ffedce55ad26bf998c488282f94d477e | [
"MIT"
] | null | null | null | basic_newsletter/utils.py | CIGIHub/newsletter_generator | 2af3e183ffedce55ad26bf998c488282f94d477e | [
"MIT"
] | null | null | null | basic_newsletter/utils.py | CIGIHub/newsletter_generator | 2af3e183ffedce55ad26bf998c488282f94d477e | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import os.path
from django.core.files.storage import default_storage as storage
from django.core.files.uploadedfile import SimpleUploadedFile
from django.utils.six import StringIO
from django.utils.encoding import smart_text
try:
import Image
except ImportError:
try:
... | 33.19697 | 81 | 0.554998 | 1,751 | 0.799178 | 0 | 0 | 0 | 0 | 0 | 0 | 195 | 0.089 |
fa4086e519738ecfec5f5446255b7086204a17f6 | 872 | py | Python | Virtual-Air-Painting-master/Virtual-Air-Painting-master/app.py | NikisCodes/Machine-Learning | 649b5edcacd9063e6c37f596c8f930d578c84838 | [
"MIT"
] | 2 | 2021-08-30T08:04:04.000Z | 2021-09-27T06:01:05.000Z | Virtual-Air-Painting-master/Virtual-Air-Painting-master/app.py | NikisCodes/Machine-Learning | 649b5edcacd9063e6c37f596c8f930d578c84838 | [
"MIT"
] | 1 | 2022-02-08T00:01:16.000Z | 2022-02-08T00:01:16.000Z | Virtual-Air-Painting-master/Virtual-Air-Painting-master/app.py | NikisCodes/Machine-Learning | 649b5edcacd9063e6c37f596c8f930d578c84838 | [
"MIT"
] | 2 | 2021-10-02T01:10:57.000Z | 2021-10-02T11:06:32.000Z | from flask import Flask, render_template, Response
import cam
import os
import cv2
app = Flask(__name__,template_folder='templates')
overlay_image=[]
header_img = "Images"
header_img_list = os.listdir(header_img)
for i in header_img_list:
image = cv2.imread(f'{header_img}/{i}')
overlay_image.append(image)
... | 26.424242 | 73 | 0.668578 | 0 | 0 | 248 | 0.284404 | 213 | 0.244266 | 0 | 0 | 202 | 0.231651 |
fa41338567fef89f70ecebac376ac6af788cc919 | 3,159 | py | Python | src/kolibree-changelog/commit_parser.py | kolibree-git/gitchangelog | 267c29104b68db2b6665a8e6414876f7fe73d5dc | [
"BSD-3-Clause"
] | 2 | 2021-01-12T15:10:37.000Z | 2021-09-15T03:41:45.000Z | src/kolibree-changelog/commit_parser.py | kolibree-git/gitchangelog | 267c29104b68db2b6665a8e6414876f7fe73d5dc | [
"BSD-3-Clause"
] | 5 | 2021-01-13T11:14:43.000Z | 2021-04-22T08:06:47.000Z | src/kolibree-changelog/commit_parser.py | kolibree-git/gitchangelog | 267c29104b68db2b6665a8e6414876f7fe73d5dc | [
"BSD-3-Clause"
] | null | null | null | import os
import re
from pathlib import Path
from urllib.parse import urlparse
from github import Github
class CommitParser(object):
github_access_token: str
repository: str
jira_project: str
jira_server: str
def __init__(self, repository, jira_project, jira_server, github_access_token):
... | 40.5 | 110 | 0.639443 | 3,050 | 0.965495 | 0 | 0 | 96 | 0.030389 | 0 | 0 | 506 | 0.160177 |
fa41ceb73f01b6ed99614aa176053160f3a545b8 | 95 | py | Python | flask_api/celery_tasks/sms/constants.py | FanLgchen/Celery- | 409a609f476a84c421f718b9f1266c822bef1366 | [
"MIT"
] | 2 | 2020-06-18T09:39:13.000Z | 2020-10-05T03:11:33.000Z | flask_api/celery_tasks/sms/constants.py | FanLgchen/Celery- | 409a609f476a84c421f718b9f1266c822bef1366 | [
"MIT"
] | null | null | null | flask_api/celery_tasks/sms/constants.py | FanLgchen/Celery- | 409a609f476a84c421f718b9f1266c822bef1366 | [
"MIT"
] | null | null | null | # 短信签名
SMS_SIGN = 'demo'
# 短信验证码模板ID
SMS_VERIFICATION_CODE_TEMPLATE_ID = 'SMS_151231777'
| 15.833333 | 52 | 0.747368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.529915 |
fa42531a7368418d99794fa9d35b9936dd54e1ab | 1,548 | py | Python | intepreter_DM.py | arkasarius/python-IMDB-TFG | b375861f414b5402d150060479f33bc7391075d8 | [
"MIT"
] | 1 | 2021-12-20T16:41:47.000Z | 2021-12-20T16:41:47.000Z | intepreter_DM.py | arkasarius/python-IMDB-TFG | b375861f414b5402d150060479f33bc7391075d8 | [
"MIT"
] | 13 | 2020-01-28T22:14:38.000Z | 2022-03-11T23:58:02.000Z | intepreter_DM.py | arkasarius/python-IMDB-TFG | b375861f414b5402d150060479f33bc7391075d8 | [
"MIT"
] | null | null | null | import calculos as c
import os
import matplotlib.pyplot as plt
import numpy as np
movie="Men in black"
m="moviesdata"
g="actordata"
s='/'
apidata=os.listdir(m+s+movie)
actordata=os.listdir(g+s+movie)
print(movie)
print(apidata)
print(actordata)
DM=0.0 # 0.0 distancia minima posible
AM=0 # 1.0 angle maxim posible
x=... | 28.145455 | 139 | 0.584625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 460 | 0.297158 |
fa4355bb0816a184b890c91eceeef6ab585e1c75 | 6,972 | py | Python | treqs/main.py | doctorgaby/treqs | 3b29d6dcb4e6a8b25682d0e8da936f30d4848f09 | [
"MIT"
] | 1 | 2019-05-20T16:52:41.000Z | 2019-05-20T16:52:41.000Z | treqs/main.py | doctorgaby/treqs | 3b29d6dcb4e6a8b25682d0e8da936f30d4848f09 | [
"MIT"
] | 5 | 2019-05-14T18:27:25.000Z | 2019-05-29T10:51:52.000Z | treqs/main.py | doctorgaby/treqs | 3b29d6dcb4e6a8b25682d0e8da936f30d4848f09 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import getopt, sys, datetime, os
from treqs import mUSProcessor, mSysReqProcessor, mTCProcessor
def main(argv):
#Default paths for respective files (user stories, test cases, system requirements). Can be provided as function arguments.
usDir = 'requirements'
tcDir = 'tests'
sysR... | 39.84 | 141 | 0.65218 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,611 | 0.374498 |
fa43b597655c8ece381492f9839c331ed4d476a7 | 1,836 | py | Python | nudging/model/xregressor.py | UtrechtUniversity/nudging | 9eb1b77749f36059d0c03e60338308ed2e1ebe3d | [
"MIT"
] | 1 | 2021-11-08T15:14:07.000Z | 2021-11-08T15:14:07.000Z | nudging/model/xregressor.py | UtrechtUniversity/nudging | 9eb1b77749f36059d0c03e60338308ed2e1ebe3d | [
"MIT"
] | 6 | 2021-12-07T11:05:19.000Z | 2022-03-21T09:05:52.000Z | nudging/model/xregressor.py | UtrechtUniversity/nudging | 9eb1b77749f36059d0c03e60338308ed2e1ebe3d | [
"MIT"
] | null | null | null | import numpy as np
from sklearn.base import clone
from nudging.model.base import BaseModel
from nudging.model.biregressor import BiRegressor
class XRegressor(BaseModel):
"""Class for X-learner regression
See https://www.pnas.org/cgi/doi/10.1073/pnas.1804597116. It trains
two BiRegressors (T-learners) an... | 41.727273 | 88 | 0.70098 | 1,691 | 0.921024 | 0 | 0 | 0 | 0 | 0 | 0 | 185 | 0.100763 |
fa44f06aa862871b09d8f10126a6cb038bef569f | 47 | py | Python | manabi/apps/manabi_auth/tests.py | aehlke/manabi | 1dfdd4ecb9c1214b6a70268be0dcfeda9da8754b | [
"MIT"
] | 14 | 2015-10-03T07:34:28.000Z | 2021-09-20T07:10:29.000Z | manabi/apps/manabi_auth/tests.py | aehlke/manabi | 1dfdd4ecb9c1214b6a70268be0dcfeda9da8754b | [
"MIT"
] | 23 | 2019-10-25T08:47:23.000Z | 2022-01-30T02:00:45.000Z | manabi/apps/manabi_auth/tests.py | aehlke/manabi | 1dfdd4ecb9c1214b6a70268be0dcfeda9da8754b | [
"MIT"
] | 7 | 2016-10-04T08:10:36.000Z | 2021-09-20T07:10:33.000Z | from manabi.test_helpers import ManabiTestCase
| 23.5 | 46 | 0.893617 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fa45ee2b30c21b649c70d296ce4c04a107be0de7 | 437 | py | Python | v1/convert.py | jelson/aqi | 96e3d9646130a8128aba9c190dcb85d7a7efba50 | [
"MIT"
] | 7 | 2021-08-25T08:00:22.000Z | 2022-01-10T19:04:08.000Z | v1/convert.py | jelson/aqi | 96e3d9646130a8128aba9c190dcb85d7a7efba50 | [
"MIT"
] | null | null | null | v1/convert.py | jelson/aqi | 96e3d9646130a8128aba9c190dcb85d7a7efba50 | [
"MIT"
] | 1 | 2021-11-03T04:20:05.000Z | 2021-11-03T04:20:05.000Z | #!/usr/bin/env python3
# One-time use script to convert previous log file format into JSON
import json
out = {}
for line in open("old-airq").readlines():
fields = line.split()
if 'PM 1.0' in line:
date = " ".join(fields[0:3])
out['pm1.0'] = fields[6]
if 'PM 2.5' in line:
out['pm2.5... | 24.277778 | 67 | 0.558352 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 174 | 0.398169 |
fa4698576c49e303d27410cd349021ad4c704508 | 1,796 | py | Python | src/vocab.py | janoschhaber/textstyletransfer | 0960e695437910b420abbe5cf76dc680b8af7643 | [
"Apache-2.0"
] | null | null | null | src/vocab.py | janoschhaber/textstyletransfer | 0960e695437910b420abbe5cf76dc680b8af7643 | [
"Apache-2.0"
] | null | null | null | src/vocab.py | janoschhaber/textstyletransfer | 0960e695437910b420abbe5cf76dc680b8af7643 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from numpy import linalg as LA
import pickle
from collections import Counter
import csv
class Vocabulary(object):
def __init__(self, vocab_file, emb_file='', dim_emb=0):
with open(vocab_file, 'rb') as f:
self.size, self.word2id, self.id2word = pickle.load(f)
self.dim_emb = dim_emb
... | 35.92 | 88 | 0.611359 | 698 | 0.388641 | 0 | 0 | 0 | 0 | 0 | 0 | 278 | 0.154788 |
fa47150e782b7ef30a60052a4f1b959b3b1766a3 | 432 | py | Python | model/algorithms/__init__.py | nertsam/DAGsched | dcd431384fe1dd3f0f55a9287fc980f2b445beaf | [
"MIT"
] | null | null | null | model/algorithms/__init__.py | nertsam/DAGsched | dcd431384fe1dd3f0f55a9287fc980f2b445beaf | [
"MIT"
] | null | null | null | model/algorithms/__init__.py | nertsam/DAGsched | dcd431384fe1dd3f0f55a9287fc980f2b445beaf | [
"MIT"
] | null | null | null |
def required_model(name: object, kwargs: object) -> object:
required_fields = kwargs['required_fields'] if 'required_fields' in kwargs else []
task_f = kwargs['required_task_fields'] if 'required_task_fields' in kwargs else []
proc_f = kwargs['required_proc_fields'] if 'required_proc_fields' in kwargs else []
disp... | 43.2 | 84 | 0.761574 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 150 | 0.347222 |
fa47561e4fca5e7d0a34320e88d5fab9b997b427 | 4,929 | py | Python | tests/test_ERC721_Pausable.py | georgercarder/cairo-contracts | b661e1b65686820fa020c47c3c29a4951bb04547 | [
"MIT"
] | null | null | null | tests/test_ERC721_Pausable.py | georgercarder/cairo-contracts | b661e1b65686820fa020c47c3c29a4951bb04547 | [
"MIT"
] | null | null | null | tests/test_ERC721_Pausable.py | georgercarder/cairo-contracts | b661e1b65686820fa020c47c3c29a4951bb04547 | [
"MIT"
] | null | null | null | import pytest
import asyncio
from starkware.starknet.testing.starknet import Starknet
from utils import Signer, str_to_felt, assert_revert
signer = Signer(123456789987654321)
# bools (for readability)
false = 0
true = 1
# random uint256 tokenIDs
first_token_id = (5042, 0)
second_token_id = (7921, 1)
third_token_id ... | 27.082418 | 86 | 0.64435 | 0 | 0 | 0 | 0 | 4,468 | 0.906472 | 4,286 | 0.869548 | 637 | 0.129235 |
fa483b3f10489cad64a57007f1b02b4ab7eddb87 | 445 | py | Python | python_scripts/countries_dates.py | tuxskar/elpythonista | ac0cd45e97dffcf6a40d1566fdee5b01380f535a | [
"MIT"
] | 2 | 2021-09-13T16:26:26.000Z | 2021-10-04T04:40:11.000Z | python_scripts/countries_dates.py | tuxskar/elpythonista | ac0cd45e97dffcf6a40d1566fdee5b01380f535a | [
"MIT"
] | null | null | null | python_scripts/countries_dates.py | tuxskar/elpythonista | ac0cd45e97dffcf6a40d1566fdee5b01380f535a | [
"MIT"
] | null | null | null | from datetime import datetime
import pytz
if __name__ == '__main__':
places_tz = ['Asia/Tokyo', 'Europe/Madrid', 'America/Argentina/Buenos_Aires', 'US/eastern', 'US/Pacific', 'UTC']
cities_name = ['Tokyo', 'Madrid', 'Buenos Aires', 'New York', 'California', 'UTC']
for place_tz, city_name in zip(places_tz, ... | 44.5 | 116 | 0.678652 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 191 | 0.429213 |
fa48f487c0f61d98b503010843e5e1dd19fce9a8 | 5,871 | py | Python | algebra_utilities/structures/semigroup.py | computational-group-the-golden-ticket/AlgebraUtilities | d5c7c2806b6bd394564ae4146a2c5164f4ebe882 | [
"MIT"
] | null | null | null | algebra_utilities/structures/semigroup.py | computational-group-the-golden-ticket/AlgebraUtilities | d5c7c2806b6bd394564ae4146a2c5164f4ebe882 | [
"MIT"
] | null | null | null | algebra_utilities/structures/semigroup.py | computational-group-the-golden-ticket/AlgebraUtilities | d5c7c2806b6bd394564ae4146a2c5164f4ebe882 | [
"MIT"
] | null | null | null | from algebra_utilities.objects.baseobjects import *
from algebra_utilities.structures.baseobjects import Printable
from algebra_utilities.utils.errors import UnexpectedTypeError
from algebra_utilities.utils.errors import NonAssociativeSetError
from algebra_utilities.utils.errors import ElementsOverflow
class... | 35.79878 | 107 | 0.607392 | 5,554 | 0.946006 | 0 | 0 | 0 | 0 | 0 | 0 | 2,092 | 0.356328 |
fa49a5157a06abdd46d0a0ba0bf6a84c8195c2b0 | 254 | py | Python | output/models/nist_data/atomic/duration/schema_instance/nistschema_sv_iv_atomic_duration_pattern_1_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/nist_data/atomic/duration/schema_instance/nistschema_sv_iv_atomic_duration_pattern_1_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/nist_data/atomic/duration/schema_instance/nistschema_sv_iv_atomic_duration_pattern_1_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.nist_data.atomic.duration.schema_instance.nistschema_sv_iv_atomic_duration_pattern_1_xsd.nistschema_sv_iv_atomic_duration_pattern_1 import NistschemaSvIvAtomicDurationPattern1
__all__ = [
"NistschemaSvIvAtomicDurationPattern1",
]
| 42.333333 | 194 | 0.893701 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0.149606 |
fa4a9590535f2f2f51967fa4d5315e7a3e030581 | 1,590 | py | Python | venv/lib/python3.7/site-packages/tigeropen/common/consts/service_types.py | CatTiger/vnpy | 7901a0fb80a5b44d6fc752bd4b2b64ec62c8f84b | [
"MIT"
] | null | null | null | venv/lib/python3.7/site-packages/tigeropen/common/consts/service_types.py | CatTiger/vnpy | 7901a0fb80a5b44d6fc752bd4b2b64ec62c8f84b | [
"MIT"
] | 1 | 2020-04-21T02:42:32.000Z | 2020-04-21T02:42:32.000Z | venv/lib/python3.7/site-packages/tigeropen/common/consts/service_types.py | CatTiger/vnpy | 7901a0fb80a5b44d6fc752bd4b2b64ec62c8f84b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on 2018/9/20
@author: gaoan
"""
ORDER_NO = "order_no"
PREVIEW_ORDER = "preview_order"
PLACE_ORDER = "place_order"
CANCEL_ORDER = "cancel_order"
MODIFY_ORDER = "modify_order"
"""
账户/资产
"""
ACCOUNTS = "accounts"
ASSETS = "assets"
POSITIONS = "positions"
ORDERS = "orders"
ACTIVE_ORDE... | 23.382353 | 69 | 0.784906 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 893 | 0.535372 |
fa4b58e784df0a2ddab274bac344bf702ab449fb | 540 | py | Python | setup.py | ianhalpern/python-payment-processor | 64fb785373082da19a572097b738da4dd71bd985 | [
"MIT"
] | 12 | 2016-11-11T10:31:25.000Z | 2022-03-25T12:51:22.000Z | setup.py | ianhalpern/python-payment-processor | 64fb785373082da19a572097b738da4dd71bd985 | [
"MIT"
] | null | null | null | setup.py | ianhalpern/python-payment-processor | 64fb785373082da19a572097b738da4dd71bd985 | [
"MIT"
] | 3 | 2017-09-06T15:06:29.000Z | 2019-03-22T14:20:31.000Z | #!/usr/bin/python
from distutils.core import setup
setup(
name = 'payment_processor',
version = '0.2.0',
description = 'A simple payment gateway api wrapper',
author = 'Ian Halpern',
author_email = 'ian@ian-halpern.com',
url = 'https://launchpad.net/python-payment',
download_url = '... | 27 | 65 | 0.681481 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 330 | 0.611111 |
fa4b934831124cd9b5f4a62ff35dd46a0ab12e15 | 6,513 | py | Python | src/ranking_utils/lightning/datasets.py | fknauf/ranking-utils | ce1a0be4e560d5f156a76cb5c0e3751793c67648 | [
"MIT"
] | null | null | null | src/ranking_utils/lightning/datasets.py | fknauf/ranking-utils | ce1a0be4e560d5f156a76cb5c0e3751793c67648 | [
"MIT"
] | null | null | null | src/ranking_utils/lightning/datasets.py | fknauf/ranking-utils | ce1a0be4e560d5f156a76cb5c0e3751793c67648 | [
"MIT"
] | null | null | null | from pathlib import Path
from typing import Any, Tuple
import abc
import h5py
from torch.utils.data import Dataset
# inputs vary for each model, hence we use Any here
Input = Any
PairwiseTrainingInput = Tuple[Input, Input]
PointwiseTrainingInput = Tuple[Input, int]
ValTestInput = Tuple[int, int, Input, int]
class ... | 29.206278 | 99 | 0.594043 | 6,192 | 0.950714 | 0 | 0 | 942 | 0.144634 | 0 | 0 | 3,231 | 0.496085 |
fa4c5e2c67d5f8e3cdc1d31a4e00b2fd7c6a269b | 6,301 | py | Python | tests/unit/lib/logs/test_formatter.py | OscarVanL/aws-sam-cli | 13e02ae53ac3a4484acd74c944123921e27823f3 | [
"Apache-2.0"
] | null | null | null | tests/unit/lib/logs/test_formatter.py | OscarVanL/aws-sam-cli | 13e02ae53ac3a4484acd74c944123921e27823f3 | [
"Apache-2.0"
] | null | null | null | tests/unit/lib/logs/test_formatter.py | OscarVanL/aws-sam-cli | 13e02ae53ac3a4484acd74c944123921e27823f3 | [
"Apache-2.0"
] | null | null | null | import json
from unittest import TestCase
from mock import Mock, patch, call
from nose_parameterized import parameterized
from samcli.lib.logs.formatter import LogsFormatter, LambdaLogMsgFormatters, KeywordHighlighter, JSONMsgFormatter
from samcli.lib.logs.event import LogEvent
class TestLogsFormatter_pretty_print_... | 38.187879 | 113 | 0.702746 | 5,945 | 0.943501 | 0 | 0 | 2,751 | 0.436597 | 0 | 0 | 837 | 0.132836 |
fa4c6f431c760c50f8930890bae505b1e114beff | 3,921 | py | Python | openconnect-cli.py | tcpipuk/OpenConnect-FE | d7d213cedb16b5eb30c7e100848e7e3b53467dd3 | [
"Apache-2.0"
] | null | null | null | openconnect-cli.py | tcpipuk/OpenConnect-FE | d7d213cedb16b5eb30c7e100848e7e3b53467dd3 | [
"Apache-2.0"
] | null | null | null | openconnect-cli.py | tcpipuk/OpenConnect-FE | d7d213cedb16b5eb30c7e100848e7e3b53467dd3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import argparse, pexpect
from getpass import getpass
from time import sleep
# Set up argument parser
parser = argparse.ArgumentParser(prog='openconnect-cli', description='Automate logins to the OpenConnect SSL VPN client')
# Type of VPN to initiate
parser_type = parser.add_mutually_exclusive_g... | 33.228814 | 132 | 0.683499 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,843 | 0.470033 |
fa4c79eb3a2bcc3c5bb9874b8d41fc99facf7f36 | 1,047 | py | Python | unittestdemo/unittestdemo01.py | caoyp2/PyProject01 | 1a7d022894908b400fa24da1bb74b47a87ec04e4 | [
"Apache-2.0"
] | null | null | null | unittestdemo/unittestdemo01.py | caoyp2/PyProject01 | 1a7d022894908b400fa24da1bb74b47a87ec04e4 | [
"Apache-2.0"
] | null | null | null | unittestdemo/unittestdemo01.py | caoyp2/PyProject01 | 1a7d022894908b400fa24da1bb74b47a87ec04e4 | [
"Apache-2.0"
] | null | null | null | import unittest
#4.定义测试类,父类为unittest.TestCase。
#可继承unittest.TestCase的方法,如setUp和tearDown方法,不过此方法可以在子类重写,覆盖父类方法。
#可继承unittest.TestCase的各种断言方法。
class Test(unittest.TestCase):
#5.定义setUp()方法用于测试用例执行前的初始化工作。
#注意,所有类中方法的入参为self,定义方法的变量也要“self.变量”
def setUp(self):
print("开始。。。。。。。。")
self.number = 10
#6... | 26.175 | 67 | 0.726839 | 1,058 | 0.621987 | 0 | 0 | 140 | 0.082305 | 0 | 0 | 1,263 | 0.742504 |
fa4d864c5607687ad1cc9e70a90a7da7550acda4 | 351 | py | Python | pytools/unit.py | ry-shika/Geister-cpp-lib | d8630185e19fe06c5b2bf63ee0f37d665d7f357b | [
"BSL-1.0"
] | 8 | 2021-03-12T00:06:44.000Z | 2022-01-15T20:09:51.000Z | pytools/unit.py | ry-shika/Geister-cpp-lib | d8630185e19fe06c5b2bf63ee0f37d665d7f357b | [
"BSL-1.0"
] | 40 | 2019-06-19T04:54:55.000Z | 2020-10-25T17:58:31.000Z | pytools/unit.py | ry-shika/Geister-cpp-lib | d8630185e19fe06c5b2bf63ee0f37d665d7f357b | [
"BSL-1.0"
] | 3 | 2021-05-25T08:26:26.000Z | 2021-06-22T08:26:39.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class Unit:
def __init__(self, x, y, color, name):
self.x = x
self.y = y
self.color = color
self.name = name
self.taken = False
class OpUnit(Unit):
def __init__(self, x, y, color, name):
super().__init__(x, y, color... | 21.9375 | 43 | 0.532764 | 301 | 0.85755 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.125356 |
fa4e2e368a0acbcb5f65a50b8b60acca846de6d5 | 1,752 | py | Python | pull_scp/config.py | FNNDSC/pl-pull_scp | 99b310e5ad88f1afdb1114f14d8cf10bb9b3657d | [
"MIT"
] | null | null | null | pull_scp/config.py | FNNDSC/pl-pull_scp | 99b310e5ad88f1afdb1114f14d8cf10bb9b3657d | [
"MIT"
] | null | null | null | pull_scp/config.py | FNNDSC/pl-pull_scp | 99b310e5ad88f1afdb1114f14d8cf10bb9b3657d | [
"MIT"
] | null | null | null | """Remote host configuration."""
from os import getenv, path
from dotenv import load_dotenv
from .log import LOGGER
import pudb
# Load environment variables from .env
# Originally set to the "installation" directory of the app...
BASE_DIR = path.abspath(path.dirname(__file__))
# But using /tmp might just ... | 31.854545 | 83 | 0.67637 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 789 | 0.450342 |
fa4f4c3b14304e975b24084156700a6ef4675a21 | 7,468 | py | Python | meltingpot/python/human_players/play_level_test.py | yunfanjiang/meltingpot | d1b93f9af805fc88498fa31617a375a1ca6f8dbd | [
"Apache-2.0"
] | null | null | null | meltingpot/python/human_players/play_level_test.py | yunfanjiang/meltingpot | d1b93f9af805fc88498fa31617a375a1ca6f8dbd | [
"Apache-2.0"
] | null | null | null | meltingpot/python/human_players/play_level_test.py | yunfanjiang/meltingpot | d1b93f9af805fc88498fa31617a375a1ca6f8dbd | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 41.955056 | 88 | 0.713042 | 4,250 | 0.569095 | 0 | 0 | 4,144 | 0.554901 | 0 | 0 | 1,579 | 0.211435 |
fa5091c977e174a89ee327dd53969b51dbce3e17 | 3,436 | py | Python | Development/NASTRAN TRANSLATOR.py | toni-lv/AeroComBAT2 | 6633ebd586570ea53d130748dcdf16f31840f84a | [
"MIT"
] | 2 | 2020-05-19T08:41:20.000Z | 2021-04-05T13:17:34.000Z | Development/NASTRAN TRANSLATOR.py | toni-lv/AeroComBAT2 | 6633ebd586570ea53d130748dcdf16f31840f84a | [
"MIT"
] | null | null | null | Development/NASTRAN TRANSLATOR.py | toni-lv/AeroComBAT2 | 6633ebd586570ea53d130748dcdf16f31840f84a | [
"MIT"
] | 1 | 2022-03-25T12:39:58.000Z | 2022-03-25T12:39:58.000Z | from pyNastran.bdf.bdf import BDF
model = BDF()
model.is_nx = True
section = 5
#filename = r'D:\SNC IAS\01 - FAST Program\05 - Modified Sections\01 - AeroComBAT Files\section_{}.dat'.format(section)
filename = r'C:\Users\benna\Desktop\Work Temp\SNC\FAST\SIMPLE_SECTIONS\CTRIA6_1_100.dat'
model.read_bdf(filename, xref=T... | 34.707071 | 119 | 0.563155 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,403 | 0.408324 |
fa50b1c117a73b73cdb56047b0035eccafe1e85c | 343 | py | Python | project-a/labels.py | achon22/cs231nLung | 37a1d46a36f737a8d8461f7ef9237f818a74493f | [
"MIT"
] | 2 | 2018-05-06T12:45:03.000Z | 2019-03-31T07:01:41.000Z | project-a/labels.py | achon22/cs231nLung | 37a1d46a36f737a8d8461f7ef9237f818a74493f | [
"MIT"
] | null | null | null | project-a/labels.py | achon22/cs231nLung | 37a1d46a36f737a8d8461f7ef9237f818a74493f | [
"MIT"
] | 1 | 2018-05-06T12:56:05.000Z | 2018-05-06T12:56:05.000Z | #!/usr/bin/env python
def main():
f = open('stage1_solution.csv')
ones = 0
zeros = 0
total = 0
for line in f:
if line[:3] == 'id,':
continue
line = line.strip().split(',')
label = int(line[1])
if label == 1:
ones += 1
total += 1
zeros = total-ones
print float(zeros)/total
f.close()
if __name__... | 16.333333 | 32 | 0.586006 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0.174927 |
fa518d531da2342c26be802a278f2c4aacb9c1db | 242 | py | Python | 03/code/Node.py | libchaos/algorithm-python | 9d5635e19c58c75bf1f14a3fba9d7340f77df863 | [
"MIT"
] | 2 | 2018-03-14T21:57:10.000Z | 2019-07-18T08:47:28.000Z | 03/code/Node.py | libchaos/algorithm-python | 9d5635e19c58c75bf1f14a3fba9d7340f77df863 | [
"MIT"
] | null | null | null | 03/code/Node.py | libchaos/algorithm-python | 9d5635e19c58c75bf1f14a3fba9d7340f77df863 | [
"MIT"
] | 2 | 2018-06-20T14:56:31.000Z | 2022-02-15T05:27:11.000Z | #!/usr/bin/env python
#coding: utf-8
class Node:
def __init__(self, elem=None, next=None):
self.elem = elem
self.next = next
if __name__ == "__main__":
n1 = Node(1, None)
n2 = Node(2, None)
n1.next = n2
| 14.235294 | 45 | 0.566116 | 108 | 0.446281 | 0 | 0 | 0 | 0 | 0 | 0 | 46 | 0.190083 |
fa53434fce13f8d24606feb5ccc693b179203f59 | 8,493 | py | Python | mc/history/History.py | zy-sunshine/falkon-pyqt5 | bc2b60aa21c9b136439bd57a11f391d68c736f99 | [
"MIT"
] | 1 | 2021-04-29T05:36:44.000Z | 2021-04-29T05:36:44.000Z | mc/history/History.py | zy-sunshine/falkon-pyqt5 | bc2b60aa21c9b136439bd57a11f391d68c736f99 | [
"MIT"
] | 1 | 2020-03-28T17:43:18.000Z | 2020-03-28T17:43:18.000Z | mc/history/History.py | zy-sunshine/falkon-pyqt5 | bc2b60aa21c9b136439bd57a11f391d68c736f99 | [
"MIT"
] | 1 | 2021-01-15T20:09:24.000Z | 2021-01-15T20:09:24.000Z | from PyQt5.Qt import QObject
from PyQt5.Qt import QDateTime
from PyQt5.Qt import QUrl
from PyQt5.Qt import pyqtSignal
from mc.app.Settings import Settings
from calendar import month_name
from .HistoryModel import HistoryModel
from mc.common.models import HistoryDbModel
from mc.common.models import IconsDbModel
from mc.... | 31.690299 | 103 | 0.566231 | 8,104 | 0.954198 | 0 | 0 | 645 | 0.075945 | 0 | 0 | 1,021 | 0.120217 |
fa5457d3656080bf562008a41abeb2ddba3062a6 | 1,184 | py | Python | pkg/iface/__init__.py | ToraNova/rapidflask | f42354b296659dac5be904d7bb68076b9458f79a | [
"MIT"
] | null | null | null | pkg/iface/__init__.py | ToraNova/rapidflask | f42354b296659dac5be904d7bb68076b9458f79a | [
"MIT"
] | null | null | null | pkg/iface/__init__.py | ToraNova/rapidflask | f42354b296659dac5be904d7bb68076b9458f79a | [
"MIT"
] | null | null | null |
from flask_socketio import send, emit
from pkg.system.servlog import srvlog
#----------------------------------------------------------------------------------------
# External calls
# introduced u7
# The livelog functions allows other functions which are not registered with
# socketio to emit a message.
# Generalizat... | 39.466667 | 89 | 0.588682 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 693 | 0.585304 |
fa5755c213e58345d8c0de7794177a485cfa6195 | 5,322 | py | Python | Co-Simulation/Sumo/run_tracis_synchronization.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | null | null | null | Co-Simulation/Sumo/run_tracis_synchronization.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | null | null | null | Co-Simulation/Sumo/run_tracis_synchronization.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | null | null | null | # coding: utf-8
import argparse
import logging
import os
import sys
from util.func import (
data_from_json,
)
if 'SUMO_HOME' in os.environ:
sys.path.append(os.path.join(os.environ['SUMO_HOME'], 'tools'))
import traci
else:
sys.exit("Please declare environment variable 'SUMO_HOME'")
# ----- GLOBAL_VA... | 34.335484 | 153 | 0.599211 | 3,361 | 0.63153 | 0 | 0 | 0 | 0 | 0 | 0 | 761 | 0.142991 |
fa57681709017fbba645c042551e1a13aa15f233 | 2,977 | py | Python | web/flask.py | ponyatov/metaLpy | 96149313e8083536ade1c331825242f6996f05b3 | [
"MIT"
] | null | null | null | web/flask.py | ponyatov/metaLpy | 96149313e8083536ade1c331825242f6996f05b3 | [
"MIT"
] | null | null | null | web/flask.py | ponyatov/metaLpy | 96149313e8083536ade1c331825242f6996f05b3 | [
"MIT"
] | null | null | null | ## @file
## @defgroup flask flask
## @brief minimized Flask-based backend
## @ingroup web
import config
from core.env import *
from core.io import Dir
from .web import Web
from core.meta import Module
from core.time import *
from gen.js import jsFile
from gen.s import S
from web.html import htmlFile
import os, re
... | 27.311927 | 87 | 0.570037 | 2,496 | 0.838428 | 0 | 0 | 706 | 0.237151 | 0 | 0 | 752 | 0.252603 |
fa585adced0045c21720dece6bf4df472dd95491 | 2,038 | py | Python | setup.py | iamsrp/pyfestival | 0c750d1874f9d065e6099ec69fd241e03f199fec | [
"BSD-2-Clause"
] | 8 | 2016-02-13T20:23:11.000Z | 2021-11-24T02:09:29.000Z | setup.py | iamsrp/pyfestival | 0c750d1874f9d065e6099ec69fd241e03f199fec | [
"BSD-2-Clause"
] | 11 | 2016-08-05T07:06:37.000Z | 2021-08-29T17:06:07.000Z | setup.py | iamsrp/pyfestival | 0c750d1874f9d065e6099ec69fd241e03f199fec | [
"BSD-2-Clause"
] | 21 | 2015-03-29T02:19:40.000Z | 2021-11-24T02:09:32.000Z | #!/usr/bin/env python
from distutils.core import setup, Extension
from distutils.util import get_platform
import os
festival_include = os.environ.get("FESTIVAL_INCLUDE", '/usr/include/festival')
speech_tools_include = os.environ.get("SPECCH_INCLUDE", '/usr/include/speech_tools')
festival_lib = os.environ.get("FESTIVAL... | 33.409836 | 113 | 0.695289 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,114 | 0.546614 |
fa59234ee5465427ecc4262b967741db7cd1ff69 | 838 | py | Python | main.py | jhkloss/libg3n_parsing_notebook | e7afef1cc0baf777df334350e967a5d1873998e2 | [
"Unlicense"
] | null | null | null | main.py | jhkloss/libg3n_parsing_notebook | e7afef1cc0baf777df334350e967a5d1873998e2 | [
"Unlicense"
] | null | null | null | main.py | jhkloss/libg3n_parsing_notebook | e7afef1cc0baf777df334350e967a5d1873998e2 | [
"Unlicense"
] | null | null | null |
from parse_manual.parser import parse as parse_manual
from parse_pyparsing.parser import parse as parse_pyparsing
from parse_yaml.parser import parse as parse_yaml
from parse_xml.parser import parse as parse_xml
from timer.PerformanceTimer import PerformanceTimer
# Manual Parsing
manual_timer = PerformanceTimer('Man... | 29.928571 | 67 | 0.826969 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 164 | 0.195704 |
fa5eb07c8e71475d3547c240435a4985faf8004b | 3,152 | py | Python | src/test/python/apache/aurora/client/test_base.py | wfarner/aurora | 68447b3852d47e8e5f97b8a8df873ca13ab716e0 | [
"Apache-2.0"
] | null | null | null | src/test/python/apache/aurora/client/test_base.py | wfarner/aurora | 68447b3852d47e8e5f97b8a8df873ca13ab716e0 | [
"Apache-2.0"
] | null | null | null | src/test/python/apache/aurora/client/test_base.py | wfarner/aurora | 68447b3852d47e8e5f97b8a8df873ca13ab716e0 | [
"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 ... | 38.91358 | 100 | 0.716688 | 2,398 | 0.760787 | 0 | 0 | 0 | 0 | 0 | 0 | 897 | 0.284581 |
fa5edf57ae9919a788f538f6d462693bbb54ecba | 23,204 | py | Python | ms_deisotope/data_source/_vendor/AgilentD.py | mobiusklein/ms_deisotope | 5b05b40b3f75ace38d03b823499ea3ebc74efad4 | [
"Apache-2.0"
] | 18 | 2017-09-01T12:26:12.000Z | 2022-02-23T02:31:29.000Z | ms_deisotope/data_source/_vendor/AgilentD.py | mobiusklein/ms_deisotope | 5b05b40b3f75ace38d03b823499ea3ebc74efad4 | [
"Apache-2.0"
] | 19 | 2017-03-12T20:40:36.000Z | 2022-03-31T22:50:47.000Z | ms_deisotope/data_source/_vendor/AgilentD.py | mobiusklein/ms_deisotope | 5b05b40b3f75ace38d03b823499ea3ebc74efad4 | [
"Apache-2.0"
] | 14 | 2016-05-06T02:25:30.000Z | 2022-03-31T14:40:06.000Z | import os
import glob
import warnings
import logging
from collections import deque
from six import string_types as basestring
from lxml import etree
try:
log = logging.getLogger(os.path.basename(__file__))
except Exception:
log = None
from collections import OrderedDict, defaultdict
from weakref import WeakV... | 31.146309 | 98 | 0.616704 | 16,977 | 0.731641 | 1,944 | 0.083779 | 774 | 0.033356 | 0 | 0 | 4,610 | 0.198673 |
fa5f942835d516a7601b80f50c40625787b25076 | 12,080 | py | Python | prospector/client/cli/prospector_client.py | pombredanne/vulnerability-assessment-kb | 3a32e3eea5413b7acd6ac70a6cba46ccc84e83d2 | [
"Apache-2.0"
] | 41 | 2019-02-21T03:27:21.000Z | 2020-06-04T13:39:52.000Z | prospector/client/cli/prospector_client.py | pombredanne/vulnerability-assessment-kb | 3a32e3eea5413b7acd6ac70a6cba46ccc84e83d2 | [
"Apache-2.0"
] | 3 | 2019-02-28T19:07:34.000Z | 2020-05-18T19:34:28.000Z | prospector/client/cli/prospector_client.py | pombredanne/vulnerability-assessment-kb | 3a32e3eea5413b7acd6ac70a6cba46ccc84e83d2 | [
"Apache-2.0"
] | 32 | 2019-02-26T16:09:35.000Z | 2020-05-30T13:47:40.000Z | import logging
import sys
from datetime import datetime
import requests
from tqdm import tqdm
import log
from datamodel.advisory import AdvisoryRecord
from datamodel.commit import Commit
from filtering.filter import filter_commits
from git.git import GIT_CACHE, Git
from git.version_to_tag import get_tag_for_version
f... | 38.842444 | 125 | 0.59048 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,494 | 0.454801 |
fa5fa0507088e412dac0381129f186b5aaf9c2d7 | 34 | py | Python | masteronly.py | mbs5mz/cs3240-labdemo | bc6f04f136686394248e6629aeba0cd3bed7770f | [
"MIT"
] | null | null | null | masteronly.py | mbs5mz/cs3240-labdemo | bc6f04f136686394248e6629aeba0cd3bed7770f | [
"MIT"
] | null | null | null | masteronly.py | mbs5mz/cs3240-labdemo | bc6f04f136686394248e6629aeba0cd3bed7770f | [
"MIT"
] | null | null | null | print("This is the master branch") | 34 | 34 | 0.764706 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.794118 |
fa601fe1d2a43b58da3a5908f30d4dd1e67e4207 | 2,507 | py | Python | pyethereum/config.py | CJentzsch/pyethereum | 35c67e28ea1279b63ac40f3a987a741d6d994022 | [
"MIT"
] | null | null | null | pyethereum/config.py | CJentzsch/pyethereum | 35c67e28ea1279b63ac40f3a987a741d6d994022 | [
"MIT"
] | null | null | null | pyethereum/config.py | CJentzsch/pyethereum | 35c67e28ea1279b63ac40f3a987a741d6d994022 | [
"MIT"
] | 2 | 2020-09-09T20:01:12.000Z | 2021-09-01T15:47:10.000Z |
import os
import uuid
import StringIO
import ConfigParser
from pyethereum.utils import data_dir
from pyethereum.packeter import Packeter
from pyethereum.utils import sha3
def default_data_dir():
data_dir._set_default()
return data_dir.path
def default_config_path():
return os.path.join(default_data_dir(... | 21.991228 | 75 | 0.70004 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,352 | 0.53929 |
fa60dfbb5a27f65a90d0edd2f3424a73f6bf1539 | 290 | py | Python | sb_backend/app/service/setup/service_noseriesline.py | DmitriyGrigoriev/sb-fastapi | 1aef3db6ce26ea054e048e5927552d48c2eccbfb | [
"MIT"
] | null | null | null | sb_backend/app/service/setup/service_noseriesline.py | DmitriyGrigoriev/sb-fastapi | 1aef3db6ce26ea054e048e5927552d48c2eccbfb | [
"MIT"
] | null | null | null | sb_backend/app/service/setup/service_noseriesline.py | DmitriyGrigoriev/sb-fastapi | 1aef3db6ce26ea054e048e5927552d48c2eccbfb | [
"MIT"
] | null | null | null | from sqlmodel import SQLModel
from sb_backend.app.service.base.base_service import ServiceBase
from sb_backend.app.crud.setup.crud_noseriesline import CRUDBase, noseriesline
class ServiceBase(ServiceBase[CRUDBase, SQLModel, SQLModel]):
pass
noseriesline_s = ServiceBase(noseriesline)
| 32.222222 | 78 | 0.841379 | 70 | 0.241379 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fa610e2a204d0b2414477f21c38684441a0652cb | 543 | py | Python | AllSpiders/00_Spider/29_js2.py | GongkunJiang/MySpider | 8c088f696679b13568843af521279f9f25f40314 | [
"MIT"
] | null | null | null | AllSpiders/00_Spider/29_js2.py | GongkunJiang/MySpider | 8c088f696679b13568843af521279f9f25f40314 | [
"MIT"
] | null | null | null | AllSpiders/00_Spider/29_js2.py | GongkunJiang/MySpider | 8c088f696679b13568843af521279f9f25f40314 | [
"MIT"
] | null | null | null | # coding=utf-8
from selenium import webdriver
import time
driver = webdriver.PhantomJS(executable_path=r'E:\Documents\Apps\phantomjs-2.1.1-windows\bin\phantomjs.exe')
driver.get("https://movie.douban.com/typerank?type_name=剧情&type=11&interval_id=100:90&action=")
# 向下滚动10000像素
js = "document.body.scrollTop=10000"
#js... | 22.625 | 108 | 0.782689 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 351 | 0.593909 |
fa6414e49146863505731712674d2bc44a0b263b | 113 | py | Python | pony/orm/tests/test_f_strings.py | luckydonald/pony | e733f14ef4e21514b49248b7b72aae0728029852 | [
"Apache-2.0"
] | 2,628 | 2015-01-02T17:55:28.000Z | 2022-03-31T10:36:42.000Z | pony/orm/tests/test_f_strings.py | luckydonald/pony | e733f14ef4e21514b49248b7b72aae0728029852 | [
"Apache-2.0"
] | 525 | 2015-01-03T20:30:08.000Z | 2022-03-23T12:30:01.000Z | pony/orm/tests/test_f_strings.py | luckydonald/pony | e733f14ef4e21514b49248b7b72aae0728029852 | [
"Apache-2.0"
] | 256 | 2015-01-02T17:55:31.000Z | 2022-03-20T17:01:37.000Z | from sys import version_info
if version_info[:2] >= (3, 6):
from pony.orm.tests.py36_test_f_strings import * | 28.25 | 52 | 0.734513 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fa64885ad634e2c117f27b9037fa2f92f06d7384 | 1,042 | py | Python | setup.py | hoosiki/notion-as-db | cd7ef9b26b4eb86e1e7fcb7b48053cb361cb9710 | [
"BSD-2-Clause"
] | null | null | null | setup.py | hoosiki/notion-as-db | cd7ef9b26b4eb86e1e7fcb7b48053cb361cb9710 | [
"BSD-2-Clause"
] | null | null | null | setup.py | hoosiki/notion-as-db | cd7ef9b26b4eb86e1e7fcb7b48053cb361cb9710 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
with open('README.md') as readme_file:
readme = readme_file.read()
install_requireent = []
setup_requires = [
'pandas',
'config2',
... | 23.681818 | 120 | 0.675624 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 413 | 0.396353 |
fa65b4e9e09e4d5ff6693e3667dc5ce68e121420 | 435 | py | Python | python/alejo/hackerrank_contact_list.py | alejodeveloper/algorithms-practices | 55c2f388c9b37f0f48bcc946045d4a6d75589e6f | [
"MIT"
] | null | null | null | python/alejo/hackerrank_contact_list.py | alejodeveloper/algorithms-practices | 55c2f388c9b37f0f48bcc946045d4a6d75589e6f | [
"MIT"
] | 1 | 2020-04-29T19:33:15.000Z | 2020-04-29T19:33:15.000Z | python/alejo/hackerrank_contact_list.py | alejodeveloper/algorithms-practices | 55c2f388c9b37f0f48bcc946045d4a6d75589e6f | [
"MIT"
] | null | null | null | import sys
from collections import defaultdict
sys.stdin.readline()
my_results = defaultdict(int)
def add_contact(contact):
for index, _ in enumerate(contact):
my_contact = contact[0:index]
my_results[my_contact] +=1
for line in sys.stdin.readlines():
operation, contact = line.strip().split... | 18.913043 | 48 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.018391 |
fa66baebed871b04ea5017870ffe52df882a7abb | 10,658 | py | Python | stacker_blueprints/asg.py | aengelas/stacker_blueprints | 70131511714a5a3595ee56b7d6ea569ff41aa3b6 | [
"BSD-2-Clause"
] | 43 | 2015-12-30T13:47:57.000Z | 2020-12-05T00:36:57.000Z | stacker_blueprints/asg.py | aengelas/stacker_blueprints | 70131511714a5a3595ee56b7d6ea569ff41aa3b6 | [
"BSD-2-Clause"
] | 87 | 2015-12-22T23:00:43.000Z | 2019-07-25T15:27:11.000Z | stacker_blueprints/asg.py | aengelas/stacker_blueprints | 70131511714a5a3595ee56b7d6ea569ff41aa3b6 | [
"BSD-2-Clause"
] | 40 | 2016-01-25T12:27:38.000Z | 2020-12-28T14:48:22.000Z | import copy
from troposphere import (
Ref, FindInMap, Not, Equals, And, Condition, Join, ec2, autoscaling,
If, GetAtt, Output
)
from troposphere import elasticloadbalancing as elb
from troposphere.autoscaling import Tag as ASTag
from troposphere.route53 import RecordSetType
from stacker.blueprints.base import... | 37.396491 | 78 | 0.561644 | 9,990 | 0.937324 | 0 | 0 | 0 | 0 | 0 | 0 | 2,993 | 0.280822 |
fa6881de69c9929008a699b6ce522f86648d2221 | 403 | py | Python | input/migrations/0016_auto_20190524_0055.py | JianaXu/productivity | f7478ce2f154538185f071d58a0e4a2cc0b17ee8 | [
"bzip2-1.0.6"
] | null | null | null | input/migrations/0016_auto_20190524_0055.py | JianaXu/productivity | f7478ce2f154538185f071d58a0e4a2cc0b17ee8 | [
"bzip2-1.0.6"
] | 10 | 2019-05-15T06:25:36.000Z | 2022-02-10T08:46:38.000Z | input/migrations/0016_auto_20190524_0055.py | JianaXu/productivity | f7478ce2f154538185f071d58a0e4a2cc0b17ee8 | [
"bzip2-1.0.6"
] | 1 | 2019-05-21T03:01:48.000Z | 2019-05-21T03:01:48.000Z | # Generated by Django 2.1.1 on 2019-05-24 00:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('input', '0015_auto_20190524_0052'),
]
operations = [
migrations.AlterField(
model_name='post',
name='c... | 21.210526 | 55 | 0.57072 | 304 | 0.754342 | 0 | 0 | 0 | 0 | 0 | 0 | 93 | 0.230769 |
fa6b5b623f434c261ce5c85dbe3b4296800991aa | 3,038 | py | Python | tools/decompiler/basicblock.py | miniupnp/sundog | eb48447d1791e8bbd9ce4afe872a541dc67fcca1 | [
"MIT"
] | 54 | 2017-01-31T08:14:04.000Z | 2022-03-18T23:26:35.000Z | tools/decompiler/basicblock.py | miniupnp/sundog | eb48447d1791e8bbd9ce4afe872a541dc67fcca1 | [
"MIT"
] | 9 | 2018-02-25T15:28:55.000Z | 2021-10-15T14:29:44.000Z | tools/decompiler/basicblock.py | miniupnp/sundog | eb48447d1791e8bbd9ce4afe872a541dc67fcca1 | [
"MIT"
] | 13 | 2017-01-29T12:38:26.000Z | 2021-12-22T23:57:35.000Z | # Copyright (c) 2017 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import opcodes
####### Basic blocks ########
class BasicBlock:
'''Basic block of instructions'''
def __init__(self, addr):
... | 31.645833 | 89 | 0.618828 | 858 | 0.282423 | 0 | 0 | 0 | 0 | 0 | 0 | 1,064 | 0.35023 |
fa6e2940900591d9470ba01c2dd2e48f3b5615c8 | 1,136 | py | Python | data-pipeline/src/data_pipeline/datasets/exac/exac_regional_missense_constraint.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 38 | 2018-02-24T02:33:52.000Z | 2020-03-03T23:17:04.000Z | data-pipeline/src/data_pipeline/datasets/exac/exac_regional_missense_constraint.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 385 | 2018-02-21T16:53:13.000Z | 2020-03-04T00:52:40.000Z | data-pipeline/src/data_pipeline/datasets/exac/exac_regional_missense_constraint.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 13 | 2020-05-01T13:03:54.000Z | 2022-02-28T13:12:57.000Z | import hail as hl
def prepare_exac_regional_missense_constraint(path):
ds = hl.import_table(
path,
missing="",
types={
"transcript": hl.tstr,
"gene": hl.tstr,
"chr": hl.tstr,
"amino_acids": hl.tstr,
"genomic_start": hl.tint,
... | 29.894737 | 115 | 0.601232 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 208 | 0.183099 |
fa6ed198a2d394bfc16d45930d5a58eda8c180fc | 2,426 | py | Python | smokey/ranger/ranger.py | godatadriven/hdp-smokey | b60c6941d77b66b4f84747d5fe10c972db88f7f7 | [
"Apache-2.0"
] | 1 | 2018-02-11T14:05:06.000Z | 2018-02-11T14:05:06.000Z | smokey/ranger/ranger.py | godatadriven/hdp-smokey | b60c6941d77b66b4f84747d5fe10c972db88f7f7 | [
"Apache-2.0"
] | null | null | null | smokey/ranger/ranger.py | godatadriven/hdp-smokey | b60c6941d77b66b4f84747d5fe10c972db88f7f7 | [
"Apache-2.0"
] | 1 | 2021-01-29T18:08:53.000Z | 2021-01-29T18:08:53.000Z | import os
import logging
import requests
import ambari.api as api
from utils.utils import logmethodcall
class RangerRequestError(Exception):
pass
class Ranger:
def __init__(self, request_timeout=10):
self.timeout = request_timeout
self.ranger_schema = os.environ.get('RANGER_SCHEMA', 'http'... | 38.507937 | 116 | 0.640148 | 2,314 | 0.953833 | 0 | 0 | 1,650 | 0.680132 | 0 | 0 | 376 | 0.154988 |
fa6fa5a701f70f4832c2cbf824364381684d1511 | 4,567 | py | Python | tests/player_state_test.py | the-gigi/dominion | 2bccad2e51a574c881372d32819e2e3049d93e78 | [
"MIT"
] | 2 | 2020-04-16T03:21:25.000Z | 2022-01-15T18:24:08.000Z | tests/player_state_test.py | the-gigi/dominion | 2bccad2e51a574c881372d32819e2e3049d93e78 | [
"MIT"
] | 36 | 2020-07-03T04:42:50.000Z | 2020-07-05T18:30:57.000Z | tests/player_state_test.py | the-gigi/dominion | 2bccad2e51a574c881372d32819e2e3049d93e78 | [
"MIT"
] | null | null | null | import unittest
from dominion_game_engine.card_util import *
from dominion_game_engine.cards import *
from dominion_game_engine.player_state import PlayerState
class TestPlayerState(unittest.TestCase):
def setUp(self):
card_types = get_card_types().values()
piles = setup_piles(card_types, 4)
... | 38.378151 | 99 | 0.662798 | 4,358 | 0.953402 | 0 | 0 | 0 | 0 | 0 | 0 | 1,104 | 0.241523 |
fa7021d6098d58c035a0d3dad7302d599a66813a | 923 | py | Python | setup.py | hyong/mercury-python | b93806926253497e5af3a9578078f523a7b1eb8e | [
"Apache-2.0"
] | null | null | null | setup.py | hyong/mercury-python | b93806926253497e5af3a9578078f523a7b1eb8e | [
"Apache-2.0"
] | null | null | null | setup.py | hyong/mercury-python | b93806926253497e5af3a9578078f523a7b1eb8e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(name='mercury',
version='1.12.9',
description='Python Language pack for Mercury',
author='Eric Law',
author_email='eric.law@accenture.com',
url='https://github.com/Accenture/mercury-python',
project_ur... | 32.964286 | 66 | 0.588299 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 549 | 0.5948 |
fa71facc34b7918ebfa76bd5b5238004818e6414 | 926 | py | Python | nailgun/nailgun/notifier.py | Zipfer/fuel-web | c6c4032eb6e29474e2be0318349265bdb566454c | [
"Apache-2.0"
] | 1 | 2021-04-06T16:13:35.000Z | 2021-04-06T16:13:35.000Z | nailgun/nailgun/notifier.py | Zipfer/fuel-web | c6c4032eb6e29474e2be0318349265bdb566454c | [
"Apache-2.0"
] | null | null | null | nailgun/nailgun/notifier.py | Zipfer/fuel-web | c6c4032eb6e29474e2be0318349265bdb566454c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 33.071429 | 78 | 0.684665 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 667 | 0.720302 |
fa7209a12d727d51c6c0d529030ddf8254ae67ef | 316,484 | py | Python | mxfold2/param_turner2004.py | proterabio/mxfold2 | 571ba83a9caa562f3fef4701648602469fde8ebe | [
"MIT"
] | 46 | 2020-09-17T04:50:22.000Z | 2022-03-22T08:14:15.000Z | mxfold2/param_turner2004.py | proterabio/mxfold2 | 571ba83a9caa562f3fef4701648602469fde8ebe | [
"MIT"
] | 7 | 2021-02-09T10:09:03.000Z | 2022-01-14T21:19:02.000Z | mxfold2/param_turner2004.py | proterabio/mxfold2 | 571ba83a9caa562f3fef4701648602469fde8ebe | [
"MIT"
] | 20 | 2020-10-15T09:03:59.000Z | 2022-03-09T07:16:20.000Z | import numpy as np
score_stack = np.array([
[ 0, 0, 0, 0, 0, 0, 0, 0, ],
[ 0, -240, -330, -210, -140, -210, -210, -140, ],
[ 0, -330, -340, -250, -150, -220, -240, -150, ],
[ 0, -210, -250, 130, -50, -140, -130, 130, ],
[ 0, -140, -150, -50, 30, -60, -100, 30, ],
[ 0, -210, -220, -140, -60, -110, -90, -60,... | 25.451066 | 218 | 0.238603 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fa720fd284632ca043a6e9fbc3f2ae675f312343 | 1,687 | py | Python | tests/ansible/lib/callback/nice_stdout.py | jrosser/mitogen | 898c06f1b9f1417b9f7c18465bee78eda7df2ec0 | [
"BSD-3-Clause"
] | null | null | null | tests/ansible/lib/callback/nice_stdout.py | jrosser/mitogen | 898c06f1b9f1417b9f7c18465bee78eda7df2ec0 | [
"BSD-3-Clause"
] | null | null | null | tests/ansible/lib/callback/nice_stdout.py | jrosser/mitogen | 898c06f1b9f1417b9f7c18465bee78eda7df2ec0 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
import io
from ansible.module_utils import six
try:
from ansible.plugins import callback_loader
except ImportError:
from ansible.plugins.loader import callback_loader
def printi(tio, obj, key=None, indent=0):
def write(s, *args):
if args:
s %= ... | 28.59322 | 63 | 0.55898 | 327 | 0.193835 | 0 | 0 | 0 | 0 | 0 | 0 | 122 | 0.072318 |
3af82b0bc4790111d93fd0095599d158eeba1d2c | 13,386 | py | Python | dialRL/rl_train/callback.py | PawelMlyniec/Dail-a-ride | 2b8954f9041b7635bcf8fa44e9129f2cd391f457 | [
"MIT"
] | 1 | 2020-12-24T22:08:52.000Z | 2020-12-24T22:08:52.000Z | dialRL/rl_train/callback.py | Thibaud-Ardoin/Dial-a-Ride | 7d9b3cd904d3194dccad31fec2533e2cf58cad0c | [
"MIT"
] | null | null | null | dialRL/rl_train/callback.py | Thibaud-Ardoin/Dial-a-Ride | 7d9b3cd904d3194dccad31fec2533e2cf58cad0c | [
"MIT"
] | null | null | null | import os
import numpy as np
import csv
import matplotlib.pyplot as plt
from moviepy.editor import *
from matplotlib.image import imsave
import matplotlib
matplotlib.use('Agg')
# import tensorflow as tf
# from stable_baselines.common.callbacks import BaseCallback, EvalCallback
# from stable_baselines.common.vec_env im... | 45.686007 | 165 | 0.554983 | 13,047 | 0.974675 | 0 | 0 | 0 | 0 | 0 | 0 | 3,322 | 0.24817 |
3af87716a5a3d2e4d00d68925f64456996df98b4 | 8,196 | py | Python | train.py | tna-hub/text2sql | 15b0d3392be03c5f794a38bcaf336b60916dc4d1 | [
"BSD-3-Clause"
] | null | null | null | train.py | tna-hub/text2sql | 15b0d3392be03c5f794a38bcaf336b60916dc4d1 | [
"BSD-3-Clause"
] | null | null | null | train.py | tna-hub/text2sql | 15b0d3392be03c5f794a38bcaf336b60916dc4d1 | [
"BSD-3-Clause"
] | null | null | null | import json
import torch
from sqlnet.utils import *
from sqlnet.model.seq2sql import Seq2SQL
from sqlnet.model.sqlnet import SQLNet
import numpy as np
import datetime
#import mxnet as mx
#from bert_embedding import BertEmbedding
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser()
pars... | 48.211765 | 134 | 0.587726 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,495 | 0.182406 |
3af8f1e275cd19adaa5bb2394843a71b553551e5 | 758 | py | Python | py/py_0685_inverse_digit_sum_ii.py | lcsm29/project-euler | fab794ece5aa7a11fc7c2177f26250f40a5b1447 | [
"MIT"
] | null | null | null | py/py_0685_inverse_digit_sum_ii.py | lcsm29/project-euler | fab794ece5aa7a11fc7c2177f26250f40a5b1447 | [
"MIT"
] | null | null | null | py/py_0685_inverse_digit_sum_ii.py | lcsm29/project-euler | fab794ece5aa7a11fc7c2177f26250f40a5b1447 | [
"MIT"
] | null | null | null | # Solution of;
# Project Euler Problem 685: Inverse Digit Sum II
# https://projecteuler.net/problem=685
#
# Writing down the numbers which have a digit sum of 10 in ascending order, we
# get:$19, 28, 37, 46,55,64,73,82,91,109, 118,\dots$Let $f(n,m)$ be the
# $m^{\text{th}}$ occurrence of the digit sum $n$. For examp... | 30.32 | 79 | 0.633245 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 605 | 0.798153 |
3af9c8ef389a9995607211ee0514625e68a7c702 | 189 | py | Python | {{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/apps/profiles/choices.py | powerdefy/cookiecutter-django-rest | 8841d7c959e588f34f260405af167206eaf47376 | [
"MIT"
] | null | null | null | {{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/apps/profiles/choices.py | powerdefy/cookiecutter-django-rest | 8841d7c959e588f34f260405af167206eaf47376 | [
"MIT"
] | null | null | null | {{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/apps/profiles/choices.py | powerdefy/cookiecutter-django-rest | 8841d7c959e588f34f260405af167206eaf47376 | [
"MIT"
] | null | null | null | from django.db import models
class Role(models.IntegerChoices):
ADMIN = 0, 'Admin'
GENERAL = 1, 'General'
GUEST = 2, 'Guest'
ACCOUNTING = 3, 'Accounting'
IT = 4, 'IT'
| 18.9 | 34 | 0.613757 | 157 | 0.830688 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 0.206349 |
3afa222274ac5c4cc6f82d844f11e23c6709df36 | 2,196 | py | Python | test_scripts/json_over_tcp.py | luozh05/Doc | 3471a9c8578d6530abf5c3ee3100488b0dc1e447 | [
"Apache-2.0"
] | null | null | null | test_scripts/json_over_tcp.py | luozh05/Doc | 3471a9c8578d6530abf5c3ee3100488b0dc1e447 | [
"Apache-2.0"
] | null | null | null | test_scripts/json_over_tcp.py | luozh05/Doc | 3471a9c8578d6530abf5c3ee3100488b0dc1e447 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import socket
import sys
import json
#HOST="localhost"
HOST="172.20.1.11"
PORT=37568
def send_and_receive_msg(msg):
# Create a socket (SOCK_STREAM means a TCP socket)
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# Connect host:port
sock.connect((HOST, PORT))
# ... | 26.780488 | 76 | 0.607013 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 839 | 0.382058 |
3afc9808039be0c4906a8ad82c7a46e1f069e435 | 5,628 | py | Python | test_api.py | atifar/mini-key-value | 0efe621260aa0a1aaa22ed721d05b4173b4171dd | [
"MIT"
] | null | null | null | test_api.py | atifar/mini-key-value | 0efe621260aa0a1aaa22ed721d05b4173b4171dd | [
"MIT"
] | null | null | null | test_api.py | atifar/mini-key-value | 0efe621260aa0a1aaa22ed721d05b4173b4171dd | [
"MIT"
] | null | null | null | def test_check_sanity(client):
resp = client.get('/sanity')
assert resp.status_code == 200
assert 'Sanity check passed.' == resp.data.decode()
# 'list collections' tests
def test_get_api_root(client):
resp = client.get('/', content_type='application/json')
assert resp.status_code == 200
resp_d... | 31.266667 | 78 | 0.643923 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,444 | 0.256574 |
3afca77e1d303804e80011de9994eebd4cd184b7 | 31 | py | Python | demo.py | TOMMYWHY/acnet_mobilenet | 6ebd21510cb6cca84f498d86daa081321a585b08 | [
"MIT"
] | null | null | null | demo.py | TOMMYWHY/acnet_mobilenet | 6ebd21510cb6cca84f498d86daa081321a585b08 | [
"MIT"
] | null | null | null | demo.py | TOMMYWHY/acnet_mobilenet | 6ebd21510cb6cca84f498d86daa081321a585b08 | [
"MIT"
] | null | null | null |
p = touch.autograd.Variable()
| 10.333333 | 29 | 0.709677 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3afcf96dc2192ab7589903691b5438ff0a9e7099 | 3,251 | py | Python | cosmoscope/server.py | cosmoscope/cosmo-server | a51e0f77bbf07d731eece176fffc2c14d311a90b | [
"MIT"
] | null | null | null | cosmoscope/server.py | cosmoscope/cosmo-server | a51e0f77bbf07d731eece176fffc2c14d311a90b | [
"MIT"
] | 85 | 2018-05-24T17:41:45.000Z | 2019-02-05T18:55:38.000Z | cosmoscope/server.py | cosmoscope/cosmoscope | a51e0f77bbf07d731eece176fffc2c14d311a90b | [
"MIT"
] | null | null | null | import logging
import signal
import gevent
import msgpack
from zerorpc import Publisher, Puller, Pusher, Server
import numpy as np
import jsonpickle
from .store import store
from .data import Data
from .operations.operation import Operation
from .utils.singleton import Singleton
__all__ = ['ServerAPI']
class Serve... | 28.025862 | 100 | 0.649339 | 2,114 | 0.650261 | 0 | 0 | 0 | 0 | 0 | 0 | 864 | 0.265764 |
3afde623e923bb16765921cd6884a6f3f7f37e8e | 3,612 | py | Python | cexapi/cexapi.py | codarrenvelvindron/cex.io-api-python | 5e54ca7d4d98e509e18d1ecda311da544649ea60 | [
"MIT"
] | 1 | 2021-11-09T18:47:44.000Z | 2021-11-09T18:47:44.000Z | cexapi/cexapi.py | codarrenvelvindron/cex.io-api-python | 5e54ca7d4d98e509e18d1ecda311da544649ea60 | [
"MIT"
] | null | null | null | cexapi/cexapi.py | codarrenvelvindron/cex.io-api-python | 5e54ca7d4d98e509e18d1ecda311da544649ea60 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Author: t0pep0
# e-mail: t0pep0.gentoo@gmail.com
# Jabber: t0pep0@jabber.ru
# BTC : 1ipEA2fcVyjiUnBqUx7PVy5efktz2hucb
# donate free =)
# Forked and modified by Codarren Velvindron
# Compatible Python3
import hmac
import hashlib
import time
import urllib.request, urllib.parse, urllib.error
i... | 36.484848 | 122 | 0.614341 | 3,278 | 0.90753 | 0 | 0 | 0 | 0 | 0 | 0 | 932 | 0.258029 |
3afe20d5d7e69d6cf6f226fe42a4f3f4119240fa | 1,125 | py | Python | Fourier/FourierType.py | SymmetricChaos/FiniteFields | 65258e06b7f04ce15223c1bc0c2384ef5e9cec1a | [
"MIT"
] | 1 | 2021-08-22T15:03:59.000Z | 2021-08-22T15:03:59.000Z | Fourier/FourierType.py | SymmetricChaos/NumberTheory | 65258e06b7f04ce15223c1bc0c2384ef5e9cec1a | [
"MIT"
] | null | null | null | Fourier/FourierType.py | SymmetricChaos/NumberTheory | 65258e06b7f04ce15223c1bc0c2384ef5e9cec1a | [
"MIT"
] | null | null | null | import numpy as np
from GeneralUtils import list_to_sum
class Fourier:
def __init__(self,amp=[1],freq=[1],ph=[0]):
self.amp = amp
self.freq = freq
self.ph = ph
def __str__(self):
out = []
for i in range(len(self.amp)):
if self.amp[i] != 1:
... | 22.959184 | 47 | 0.396444 | 862 | 0.766222 | 0 | 0 | 0 | 0 | 0 | 0 | 75 | 0.066667 |
3afe29425779a97835f8aa292d16b97d3ebe99af | 13,194 | py | Python | src/glados/es/ws2es/mappings_skeletons/es_chembl_tissue_mapping.py | chembl/GLaDOS | 044ed5f927b45dd5033c9383085ad5922c61f331 | [
"Apache-2.0"
] | 33 | 2017-09-21T11:38:44.000Z | 2022-03-19T06:41:47.000Z | src/glados/es/ws2es/mappings_skeletons/es_chembl_tissue_mapping.py | chembl/GLaDOS | 044ed5f927b45dd5033c9383085ad5922c61f331 | [
"Apache-2.0"
] | 739 | 2016-08-22T09:32:17.000Z | 2022-03-22T09:29:32.000Z | src/glados/es/ws2es/mappings_skeletons/es_chembl_tissue_mapping.py | chembl/GLaDOS | 044ed5f927b45dd5033c9383085ad5922c61f331 | [
"Apache-2.0"
] | 5 | 2020-06-12T01:51:41.000Z | 2021-09-17T10:32:53.000Z | # Elastic search mapping definition for the Molecule entity
from glados.es.ws2es.es_util import DefaultMappings
# Shards size - can be overridden from the default calculated value here
# shards = 3,
replicas = 1
analysis = DefaultMappings.COMMON_ANALYSIS
mappings = \
{
'properties':
{
... | 66.301508 | 120 | 0.488176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8,350 | 0.632863 |
d70045662563ef27515bc31c292104985de68053 | 2,733 | py | Python | top_book/book/views.py | mfarjami/DRF-top | 914ed9068ed73d7d8a692c8ed2e77cba96cee5b1 | [
"MIT"
] | null | null | null | top_book/book/views.py | mfarjami/DRF-top | 914ed9068ed73d7d8a692c8ed2e77cba96cee5b1 | [
"MIT"
] | null | null | null | top_book/book/views.py | mfarjami/DRF-top | 914ed9068ed73d7d8a692c8ed2e77cba96cee5b1 | [
"MIT"
] | null | null | null | from rest_framework.decorators import api_view
from rest_framework.views import APIView
from rest_framework import status
from rest_framework.response import Response
from .models import Book
from .serializers import BookSerializer
# Create your views here.
class GetAllData(APIView):
def get(self, request):
... | 35.960526 | 82 | 0.691914 | 1,848 | 0.67618 | 0 | 0 | 599 | 0.219173 | 0 | 0 | 77 | 0.028174 |
d700ee43fe0eef5ccc9227c82691c00f27054812 | 1,463 | py | Python | mysite/urls.py | mnithya/cs3240-s15-team06-test | 58f5d152f43f87c46e12252b2e52da98dcb443fb | [
"MIT"
] | null | null | null | mysite/urls.py | mnithya/cs3240-s15-team06-test | 58f5d152f43f87c46e12252b2e52da98dcb443fb | [
"MIT"
] | null | null | null | mysite/urls.py | mnithya/cs3240-s15-team06-test | 58f5d152f43f87c46e12252b2e52da98dcb443fb | [
"MIT"
] | null | null | null | from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
urlpatterns = [
# Examples:
# url(r'^$', 'mysite.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^$', '... | 36.575 | 73 | 0.598086 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 908 | 0.620643 |
d701a6651f142786ed830a72df90c9d0bacf6951 | 4,338 | py | Python | source/cf/defaults/lambdas/libs/videostream/videostream/__init__.py | vteremasov/aws-iot-kickstart | de6313b02cd35519febbf43ae56aa7a01513cbc1 | [
"Apache-2.0"
] | 8 | 2019-08-14T06:36:32.000Z | 2021-08-08T05:59:40.000Z | source/cf/defaults/lambdas/libs/videostream/videostream/__init__.py | vteremasov/aws-iot-kickstart | de6313b02cd35519febbf43ae56aa7a01513cbc1 | [
"Apache-2.0"
] | null | null | null | source/cf/defaults/lambdas/libs/videostream/videostream/__init__.py | vteremasov/aws-iot-kickstart | de6313b02cd35519febbf43ae56aa7a01513cbc1 | [
"Apache-2.0"
] | 4 | 2019-11-25T06:14:08.000Z | 2021-03-21T14:56:10.000Z | '''
Module camera provides the VideoStream class which
offers a threaded interface to multiple types of cameras.
'''
from threading import Thread
import io
import os
import platform
import numpy as np # pylint: disable=import-error
class VideoStream:
'''
Instantiate the VideoStream class.
Use the method r... | 35.557377 | 104 | 0.581374 | 4,103 | 0.945828 | 0 | 0 | 0 | 0 | 0 | 0 | 1,438 | 0.331489 |
d70221e578207ce862200803a43004bc9a1ee74c | 23,838 | py | Python | JaxCQL/model.py | yisu0005/JaxCQL | 6cb404c34dc02c99ac9a2ea551c28f867f78f9f7 | [
"MIT"
] | null | null | null | JaxCQL/model.py | yisu0005/JaxCQL | 6cb404c34dc02c99ac9a2ea551c28f867f78f9f7 | [
"MIT"
] | null | null | null | JaxCQL/model.py | yisu0005/JaxCQL | 6cb404c34dc02c99ac9a2ea551c28f867f78f9f7 | [
"MIT"
] | null | null | null | from functools import partial
from matplotlib.pyplot import xcorr
import numpy as np
import jax
import jax.numpy as jnp
import flax
from flax import linen as nn
import distrax
from .jax_utils import batch_to_jax, extend_and_repeat, next_rng
def update_target_network(main_params, target_params, tau):
return jax.... | 37.958599 | 131 | 0.615068 | 20,127 | 0.844324 | 0 | 0 | 10,212 | 0.428392 | 0 | 0 | 1,820 | 0.076349 |
d7051e18592cfcaabdc61f04c12bac4c5a8c6910 | 423 | py | Python | prophet-gpl/tools/return_counter.py | jyi/ITSP | 0553f683f99403efb5ef440af826c1d229a52376 | [
"MIT"
] | 18 | 2017-06-14T07:55:45.000Z | 2022-03-24T09:32:43.000Z | prophet-gpl/tools/return_counter.py | jyi/ITSP | 0553f683f99403efb5ef440af826c1d229a52376 | [
"MIT"
] | 2 | 2017-07-25T13:44:39.000Z | 2018-03-16T06:43:40.000Z | prophet-gpl/tools/return_counter.py | jyi/ITSP | 0553f683f99403efb5ef440af826c1d229a52376 | [
"MIT"
] | 5 | 2017-07-29T19:09:37.000Z | 2021-04-10T16:39:48.000Z | #!/usr/bin/env python
f = open("repair.log", "r");
lines = f.readlines();
cnt = 0;
for line in lines:
tokens = line.strip().split();
if (len(tokens) > 3):
if (tokens[0] == "Total") and (tokens[1] == "return"):
cnt += int(tokens[3]);
if (tokens[0] == "Total") and (tokens[2] == "differ... | 32.538462 | 93 | 0.520095 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 91 | 0.21513 |
d705f14bd1a2d796545981606b203d6d8aee15de | 4,968 | py | Python | pytorch_toolkit/instance_segmentation/segmentoly/rcnn/openvino_net.py | morkovka1337/openvino_training_extensions | 846db45c264d6b061505213f51763520b9432ba9 | [
"Apache-2.0"
] | 3 | 2020-12-29T02:47:32.000Z | 2021-11-12T08:12:51.000Z | pytorch_toolkit/instance_segmentation/segmentoly/rcnn/openvino_net.py | morkovka1337/openvino_training_extensions | 846db45c264d6b061505213f51763520b9432ba9 | [
"Apache-2.0"
] | 28 | 2020-09-25T22:40:36.000Z | 2022-03-12T00:37:36.000Z | pytorch_toolkit/instance_segmentation/segmentoly/rcnn/openvino_net.py | morkovka1337/openvino_training_extensions | 846db45c264d6b061505213f51763520b9432ba9 | [
"Apache-2.0"
] | 1 | 2021-04-02T07:51:01.000Z | 2021-04-02T07:51:01.000Z | """
Copyright (c) 2019 Intel Corporation
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 wri... | 44.357143 | 117 | 0.618357 | 4,262 | 0.85789 | 0 | 0 | 0 | 0 | 0 | 0 | 1,154 | 0.232287 |
d707022831c9689c8fc33323a8b72036d852d9e5 | 96 | py | Python | scuole/cohorts/apps.py | texastribune/scuole | 8ab316ee50ef0d8e71b94b50dc889d10c6e83412 | [
"MIT"
] | 1 | 2019-03-12T04:30:02.000Z | 2019-03-12T04:30:02.000Z | scuole/cohorts/apps.py | texastribune/scuole | 8ab316ee50ef0d8e71b94b50dc889d10c6e83412 | [
"MIT"
] | 616 | 2017-08-18T21:15:39.000Z | 2022-03-25T11:17:10.000Z | scuole/cohorts/apps.py | texastribune/scuole | 8ab316ee50ef0d8e71b94b50dc889d10c6e83412 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class CohortsConfig(AppConfig):
name = 'scuole.cohorts'
| 16 | 33 | 0.760417 | 59 | 0.614583 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.166667 |
d7075ae50fe80531ab2a8eb41c4eb490a0897696 | 297 | py | Python | conftest.py | gousteris/git-diff-conditional-buildkite-plugin | 517442ca9ebe21021e1078debf88c231ba8e8dff | [
"MIT"
] | 19 | 2020-03-27T11:53:11.000Z | 2021-04-14T23:11:27.000Z | conftest.py | segmentio/git-diff-conditional-buildkite-plugin | 62a276000149da0bbf4e152634211c75966a8558 | [
"MIT"
] | 7 | 2020-03-27T11:59:51.000Z | 2021-08-06T14:01:42.000Z | conftest.py | segmentio/git-diff-conditional-buildkite-plugin | 62a276000149da0bbf4e152634211c75966a8558 | [
"MIT"
] | 6 | 2020-03-28T20:49:49.000Z | 2022-01-19T17:48:02.000Z | """Place fixtures in this file for use across all test files"""
import pytest
@pytest.fixture(scope="function")
def logger(caplog):
caplog.set_level("DEBUG")
return caplog
@pytest.fixture
def log_and_exit_mock(mocker):
return mocker.patch("scripts.generate_pipeline.log_and_exit")
| 21.214286 | 65 | 0.754209 | 0 | 0 | 0 | 0 | 213 | 0.717172 | 0 | 0 | 120 | 0.40404 |
d709950f1405568464eefb85068efdc744532b55 | 3,763 | py | Python | subthalamic.py | ModelDBRepository/256624 | 9b9b0ca38baa34f8e34e822ffd366f56f5cfd979 | [
"MIT"
] | null | null | null | subthalamic.py | ModelDBRepository/256624 | 9b9b0ca38baa34f8e34e822ffd366f56f5cfd979 | [
"MIT"
] | null | null | null | subthalamic.py | ModelDBRepository/256624 | 9b9b0ca38baa34f8e34e822ffd366f56f5cfd979 | [
"MIT"
] | null | null | null | import numpy as np
import moch
import soch
import os
import sys
import scipy.io
import thorns
def main(parseID):
parseIn = parseID + 'In.mat'
parseOut = parseID + 'Out.mat'
parse = scipy.io.loadmat(parseIn)
os.remove(parseIn)
lagSpace = 1. * parse['lagSpace'] / 1000
parsStruct =... | 32.162393 | 78 | 0.513952 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 900 | 0.239171 |
d70aa5b75b6b2e9f5fff4f2b801da5ec7145cca9 | 8,911 | py | Python | env/lib/python3.5/site-packages/cartopy/tests/test_img_tiles.py | project-pantheon/pantheon_glob_planner | c0d50a53b36c4678192ec75ad7a4cd68c570daef | [
"BSD-3-Clause"
] | null | null | null | env/lib/python3.5/site-packages/cartopy/tests/test_img_tiles.py | project-pantheon/pantheon_glob_planner | c0d50a53b36c4678192ec75ad7a4cd68c570daef | [
"BSD-3-Clause"
] | null | null | null | env/lib/python3.5/site-packages/cartopy/tests/test_img_tiles.py | project-pantheon/pantheon_glob_planner | c0d50a53b36c4678192ec75ad7a4cd68c570daef | [
"BSD-3-Clause"
] | null | null | null | # (C) British Crown Copyright 2011 - 2018, Met Office
#
# This file is part of cartopy.
#
# cartopy is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option)... | 36.670782 | 79 | 0.606778 | 0 | 0 | 0 | 0 | 911 | 0.102233 | 0 | 0 | 1,838 | 0.206262 |
d70ba27847eddad0f8d65da93714b0825a9609bc | 8,310 | py | Python | utils/process_data.py | JiatianWu/tf-monodepth2 | 8f8ade9ac1268ec2c80db41386df47d26074eaf8 | [
"MIT"
] | null | null | null | utils/process_data.py | JiatianWu/tf-monodepth2 | 8f8ade9ac1268ec2c80db41386df47d26074eaf8 | [
"MIT"
] | null | null | null | utils/process_data.py | JiatianWu/tf-monodepth2 | 8f8ade9ac1268ec2c80db41386df47d26074eaf8 | [
"MIT"
] | null | null | null | import os
import pdb
import h5py
import pickle
import numpy as np
from scipy.io import loadmat
import cv2
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
import csv
import bisect
import matplotlib as mpl
import matplotlib.... | 31.123596 | 153 | 0.59651 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,341 | 0.161372 |
d70bfa071ce979b042b3019dc6f0957d42a9409f | 808 | py | Python | src/genome/visibles/sphere_gene.py | stu-smith/blender-evolution | 644b92d4dc30e82708b2e78da4f274c9ab142704 | [
"MIT"
] | null | null | null | src/genome/visibles/sphere_gene.py | stu-smith/blender-evolution | 644b92d4dc30e82708b2e78da4f274c9ab142704 | [
"MIT"
] | null | null | null | src/genome/visibles/sphere_gene.py | stu-smith/blender-evolution | 644b92d4dc30e82708b2e78da4f274c9ab142704 | [
"MIT"
] | null | null | null | from ..gene import Gene
from ..scalar_gene_property import ScalarGeneProperty
from ..color_gene_property import ColorGeneProperty
from ...visible_objects.sphere import Sphere
class SphereGene(Gene):
def __init__(self):
self._size_property = ScalarGeneProperty(min=0.1, max=20, value=2)
self._colo... | 29.925926 | 74 | 0.689356 | 629 | 0.778465 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 0.048267 |
d70e4ccae007401a0990ed92fad1c07898cb2c3c | 4,092 | py | Python | thrift/test/testset/generator.py | danobi/fbthrift | 46cb6c481e34a6569929314cff432333689f3a5b | [
"Apache-2.0"
] | null | null | null | thrift/test/testset/generator.py | danobi/fbthrift | 46cb6c481e34a6569929314cff432333689f3a5b | [
"Apache-2.0"
] | null | null | null | thrift/test/testset/generator.py | danobi/fbthrift | 46cb6c481e34a6569929314cff432333689f3a5b | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# 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 ... | 32.736 | 121 | 0.663978 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,929 | 0.471408 |
d7107b0e3157b6073b0e042c74159c3a2d63cd03 | 540 | py | Python | test/test_runner.py | antsankov/cufcq-new | 93899232a281aee59840746c0131af5d56eae272 | [
"MIT"
] | null | null | null | test/test_runner.py | antsankov/cufcq-new | 93899232a281aee59840746c0131af5d56eae272 | [
"MIT"
] | null | null | null | test/test_runner.py | antsankov/cufcq-new | 93899232a281aee59840746c0131af5d56eae272 | [
"MIT"
] | null | null | null | from tornado.testing import AsyncHTTPTestCase
import unittest
def run_tests(application):
BaseAsyncTest.application = application
BaseAsyncTest.database_name = application.settings['database_name']
BaseAsyncTest.conn = application.settings['conn']
testsuite = unittest.TestLoader().discover('test')
... | 27 | 71 | 0.751852 | 157 | 0.290741 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.053704 |
d7108aaef549127c37482205d3e95284067ddf78 | 189 | py | Python | uber/views.py | sami-mai/Carpool-R-Us | 306c60788e3dc123c3ac85e0c40ac5a291590709 | [
"MIT"
] | null | null | null | uber/views.py | sami-mai/Carpool-R-Us | 306c60788e3dc123c3ac85e0c40ac5a291590709 | [
"MIT"
] | 5 | 2020-02-12T00:43:34.000Z | 2021-06-10T20:18:42.000Z | uber/views.py | sami-mai/Carpool-R-Us | 306c60788e3dc123c3ac85e0c40ac5a291590709 | [
"MIT"
] | null | null | null | from django.shortcuts import render
# Create your views here.
def landing(request):
title = "Home"
context = {"title": title}
return render(request, 'landing.html', context)
| 18.9 | 51 | 0.687831 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 52 | 0.275132 |
d710c8f60cb9024bad5b455bf64fd5e34f00636a | 736 | py | Python | PIP/Class Program/ClassQuestion5.py | ankitrajbiswal/SEM_5 | db716e242e77149a4091e0e564356ddc724aeff0 | [
"Apache-2.0"
] | 10 | 2021-04-24T11:46:48.000Z | 2022-01-17T05:14:37.000Z | PIP/Class Program/ClassQuestion5.py | ankitrajbiswal/SEM_5 | db716e242e77149a4091e0e564356ddc724aeff0 | [
"Apache-2.0"
] | 2 | 2021-06-28T11:51:50.000Z | 2021-11-01T08:21:53.000Z | PIP/Class Program/ClassQuestion5.py | ankitrajbiswal/SEM_5 | db716e242e77149a4091e0e564356ddc724aeff0 | [
"Apache-2.0"
] | 16 | 2021-04-24T11:46:58.000Z | 2022-03-02T05:08:19.000Z | '''def operations(a,b,c):
if(c=='+'):
return a+b
elif(c=='-'):
return a-b
elif(c=='*'):
return a*b
elif(c=='/'):
return a/b
elif(c=='%'):
return a%b
elif(c=='**'):
return a**b
elif(c=='//'):
return a//b
else:
... | 26.285714 | 88 | 0.509511 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 681 | 0.925272 |
d71227084c2c9e3c8560447c816cdd1517d2990e | 1,491 | py | Python | flaskr/data/data_loader.py | bathlarajat/chartjsExamples | 2b65e7933b5abb63069f14be5c21400ae0339402 | [
"MIT"
] | 3 | 2021-01-04T20:38:42.000Z | 2022-03-21T22:37:22.000Z | flaskr/data/data_loader.py | datahappy1/flask_chartjs_drilldown_example_project | 48013697bc5eb71950cc923bc053488ff7b1a706 | [
"MIT"
] | null | null | null | flaskr/data/data_loader.py | datahappy1/flask_chartjs_drilldown_example_project | 48013697bc5eb71950cc923bc053488ff7b1a706 | [
"MIT"
] | null | null | null | import os
import csv
import itertools
from datetime import datetime
class DataLoader:
def __init__(self):
self.file_name = os.path.join(os.getcwd(), 'data', 'covid_19_data.csv')
self.data_set_full = []
self.data_set_grouped = []
def prepare_data_set_full(self):
"""
pre... | 36.365854 | 114 | 0.550637 | 1,420 | 0.952381 | 0 | 0 | 0 | 0 | 0 | 0 | 309 | 0.207243 |
d712411aa65ad60106f946dcc651e825873ac55d | 1,430 | py | Python | plugins/dnspark.py | mmannerm/ddupdate | 4822689898def7200a90ca5c4a98dcb8f316c078 | [
"MIT"
] | 34 | 2018-02-08T16:25:49.000Z | 2022-03-17T00:38:54.000Z | plugins/dnspark.py | mmannerm/ddupdate | 4822689898def7200a90ca5c4a98dcb8f316c078 | [
"MIT"
] | 56 | 2017-12-30T10:05:17.000Z | 2022-03-30T15:53:38.000Z | plugins/dnspark.py | mmannerm/ddupdate | 4822689898def7200a90ca5c4a98dcb8f316c078 | [
"MIT"
] | 25 | 2019-01-09T01:39:14.000Z | 2022-03-29T21:45:59.000Z | """
ddupdate plugin updating data on dnspark.com.
See: ddupdate(8)
See: https://dnspark.zendesk.com/hc/en-us/articles/
216322723-Dynamic-DNS-API-Documentation
"""
from ddupdate.ddplugin import ServicePlugin, ServiceError
from ddupdate.ddplugin import http_basic_auth_setup, get_response
class DnsparkPlugin(... | 30.425532 | 76 | 0.678322 | 1,129 | 0.78951 | 0 | 0 | 0 | 0 | 0 | 0 | 909 | 0.635664 |
d712e45f32f1e75fade001b57a11c6b19a4548c1 | 714 | py | Python | userbot/modules/__helpme.py | sekret666/codeaz | 141d9a656326f4a5a6c149d3433e39cf7396a8d2 | [
"MIT"
] | null | null | null | userbot/modules/__helpme.py | sekret666/codeaz | 141d9a656326f4a5a6c149d3433e39cf7396a8d2 | [
"MIT"
] | null | null | null | userbot/modules/__helpme.py | sekret666/codeaz | 141d9a656326f4a5a6c149d3433e39cf7396a8d2 | [
"MIT"
] | 1 | 2021-12-15T06:27:45.000Z | 2021-12-15T06:27:45.000Z | # C O D E A Z/ Samil
from userbot import BOT_USERNAME
from userbot.events import register
# ██████ LANGUAGE CONSTANTS ██████ #
from userbot.language import get_value
LANG = get_value("__helpme")
# ████████████████████████████████ #
@register(outgoing=True, pattern="^.yard[iı]m|^.help")
async def yardim(event):
... | 23.8 | 54 | 0.584034 | 0 | 0 | 0 | 0 | 476 | 0.592777 | 420 | 0.523039 | 228 | 0.283935 |
d7141ae014ac95863434646bbd6943b07b157f83 | 216 | py | Python | Ex-15.py | gilmartins83/Guanabara-Python | 43128c35fcd601db1f72c80a9c76f4b4f4085c7f | [
"MIT"
] | null | null | null | Ex-15.py | gilmartins83/Guanabara-Python | 43128c35fcd601db1f72c80a9c76f4b4f4085c7f | [
"MIT"
] | null | null | null | Ex-15.py | gilmartins83/Guanabara-Python | 43128c35fcd601db1f72c80a9c76f4b4f4085c7f | [
"MIT"
] | null | null | null | dias = int(input("quantos dias voce deseja alugar o carro? "))
km = float(input("Quantos kilometros você andou? "))
pago = dias * 60 + (km * 0.15)
print("o valor do aluguel do carro foi de R$ {:.2f}" .format(pago))
| 36 | 67 | 0.662037 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 123 | 0.56682 |
d714611ff086011342bf685f42497f2e7b46e1e3 | 9,010 | py | Python | cirq/contrib/quimb/density_matrix.py | lilies/Cirq | 519b8b70ba4d2d92d1c034c398161ebdbd23e2e7 | [
"Apache-2.0"
] | 3 | 2020-09-26T03:56:28.000Z | 2020-09-27T13:21:04.000Z | cirq/contrib/quimb/density_matrix.py | lilies/Cirq | 519b8b70ba4d2d92d1c034c398161ebdbd23e2e7 | [
"Apache-2.0"
] | null | null | null | cirq/contrib/quimb/density_matrix.py | lilies/Cirq | 519b8b70ba4d2d92d1c034c398161ebdbd23e2e7 | [
"Apache-2.0"
] | 1 | 2020-04-14T15:29:29.000Z | 2020-04-14T15:29:29.000Z | from functools import lru_cache
from typing import Sequence, Dict, Union, Tuple, List, Optional, cast, Iterable
import numpy as np
import quimb
import quimb.tensor as qtn
import cirq
@lru_cache()
def _qpos_tag(qubits: Union[cirq.LineQubit, Tuple[cirq.LineQubit]]):
"""Given a qubit or qubits, return a "position ... | 42.300469 | 80 | 0.56515 | 0 | 0 | 0 | 0 | 1,060 | 0.117647 | 0 | 0 | 3,605 | 0.400111 |
d7168d63372783b7232cd178045b15c0e30dc43a | 9,150 | py | Python | plugins/mgba_bridge/script_disassembler/script_disassembler.py | notyourav/the-little-hat | f52b38b18b762e704b36cef06c07656348ea6995 | [
"MIT"
] | null | null | null | plugins/mgba_bridge/script_disassembler/script_disassembler.py | notyourav/the-little-hat | f52b38b18b762e704b36cef06c07656348ea6995 | [
"MIT"
] | null | null | null | plugins/mgba_bridge/script_disassembler/script_disassembler.py | notyourav/the-little-hat | f52b38b18b762e704b36cef06c07656348ea6995 | [
"MIT"
] | 2 | 2021-10-05T20:40:12.000Z | 2022-01-05T00:17:36.000Z | from dataclasses import dataclass
import struct
from typing import Tuple
from plugins.mgba_bridge.script_disassembler.utils import barray_to_u16_hex, u16_to_hex
from plugins.mgba_bridge.script_disassembler.definitions import get_pointer, commands, parameters, get_script_label, used_labels
# Disassembler for tmc scrip... | 37.044534 | 132 | 0.594317 | 110 | 0.012022 | 0 | 0 | 132 | 0.014426 | 0 | 0 | 3,736 | 0.408306 |
d717ca185441b7405138c795fdcfae7c8f70ce12 | 3,366 | py | Python | gcloud/apigw/views/query_task_count.py | ZhuoZhuoCrayon/bk-sops | d1475d53c19729915727ce7adc24e3226f15e332 | [
"Apache-2.0"
] | 1 | 2020-08-16T09:21:58.000Z | 2020-08-16T09:21:58.000Z | gcloud/apigw/views/query_task_count.py | ZhuoZhuoCrayon/bk-sops | d1475d53c19729915727ce7adc24e3226f15e332 | [
"Apache-2.0"
] | null | null | null | gcloud/apigw/views/query_task_count.py | ZhuoZhuoCrayon/bk-sops | d1475d53c19729915727ce7adc24e3226f15e332 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2020 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 35.0625 | 115 | 0.686275 | 0 | 0 | 0 | 0 | 1,934 | 0.566823 | 0 | 0 | 1,216 | 0.356389 |
d71a3783efcdfcf37cb4cd953c69e007c41c2a7b | 28,222 | py | Python | applications/MultilevelMonteCarloApplication/python_scripts/statistical_variable_utilities.py | lkusch/Kratos | e8072d8e24ab6f312765185b19d439f01ab7b27b | [
"BSD-4-Clause"
] | 778 | 2017-01-27T16:29:17.000Z | 2022-03-30T03:01:51.000Z | applications/MultilevelMonteCarloApplication/python_scripts/statistical_variable_utilities.py | lkusch/Kratos | e8072d8e24ab6f312765185b19d439f01ab7b27b | [
"BSD-4-Clause"
] | 6,634 | 2017-01-15T22:56:13.000Z | 2022-03-31T15:03:36.000Z | applications/MultilevelMonteCarloApplication/python_scripts/statistical_variable_utilities.py | lkusch/Kratos | e8072d8e24ab6f312765185b19d439f01ab7b27b | [
"BSD-4-Clause"
] | 224 | 2017-02-07T14:12:49.000Z | 2022-03-06T23:09:34.000Z | # Import Python libraries
import numpy as np
# Import distributed framework
from exaqute import *
try:
init()
except:
pass
try:
computing_units_auxiliar_utilities = int(os.environ["computing_units_auxiliar_utilities"])
except:
computing_units_auxiliar_utilities = 1
"""
auxiliary function of UpdateO... | 51.59415 | 215 | 0.704734 | 14,632 | 0.518461 | 0 | 0 | 7,545 | 0.267345 | 0 | 0 | 10,056 | 0.356318 |
d71aa4de2d66c237cc707eb9393bb1bbbb06c886 | 75 | py | Python | test/test_maximum_average_subarray_i.py | spencercjh/sync-leetcode-today-problem-python3-example | 4957e5eadb697334741df0fc297bec2edaa9e2ab | [
"Apache-2.0"
] | null | null | null | test/test_maximum_average_subarray_i.py | spencercjh/sync-leetcode-today-problem-python3-example | 4957e5eadb697334741df0fc297bec2edaa9e2ab | [
"Apache-2.0"
] | null | null | null | test/test_maximum_average_subarray_i.py | spencercjh/sync-leetcode-today-problem-python3-example | 4957e5eadb697334741df0fc297bec2edaa9e2ab | [
"Apache-2.0"
] | null | null | null | solution = MaximumAverageSubarrayI()
assert X == solution.findMaxAverage( ) | 37.5 | 38 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d71b31a775449f37fd1fbb33703f6b57df4d8967 | 6,310 | py | Python | test/test_http.py | mikiec84/gaffer | 8c5d5b5e2ff3fcb1f7cc7c8fbfc623f97dd0da8d | [
"MIT",
"Unlicense"
] | null | null | null | test/test_http.py | mikiec84/gaffer | 8c5d5b5e2ff3fcb1f7cc7c8fbfc623f97dd0da8d | [
"MIT",
"Unlicense"
] | null | null | null | test/test_http.py | mikiec84/gaffer | 8c5d5b5e2ff3fcb1f7cc7c8fbfc623f97dd0da8d | [
"MIT",
"Unlicense"
] | 1 | 2018-10-28T00:59:17.000Z | 2018-10-28T00:59:17.000Z | # -*- coding: utf-8 -
#
# This file is part of gaffer. See the NOTICE for more information.
import os
import time
import pytest
import pyuv
from gaffer import __version__
from gaffer.manager import Manager
from gaffer.http_handler import HttpEndpoint, HttpHandler
from gaffer.httpclient import (Server, Process, Proce... | 22.862319 | 73 | 0.601426 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 495 | 0.078447 |
d71c193d332979ad562f8d1039609bbf9888baf0 | 1,366 | py | Python | tmi/api/io.py | fish2000/TMI | e849545644b99c132ecde24427531edd45213614 | [
"BSD-3-Clause"
] | null | null | null | tmi/api/io.py | fish2000/TMI | e849545644b99c132ecde24427531edd45213614 | [
"BSD-3-Clause"
] | null | null | null | tmi/api/io.py | fish2000/TMI | e849545644b99c132ecde24427531edd45213614 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function
from enum import unique
import sys
from clu.enums import AliasingEnum, alias
from clu.exporting import Exporter
exporter = Exporter(path=__file__)
export = exporter.decorator()
@unique
class Status(AliasingEnum):
DISCARD = 200
RE... | 22.393443 | 65 | 0.614934 | 584 | 0.426901 | 0 | 0 | 592 | 0.432749 | 0 | 0 | 295 | 0.215643 |
d71cffea04fc4afe67a3b3abc9d1b2f6ae38f8e9 | 4,256 | py | Python | Numpy/Num.py | shreejitverma/Data-Scientist | 03c06936e957f93182bb18362b01383e5775ffb1 | [
"MIT"
] | 2 | 2022-03-12T04:53:03.000Z | 2022-03-27T12:39:21.000Z | Numpy/Num.py | shivaniverma1/Data-Scientist | f82939a411484311171465591455880c8e354750 | [
"MIT"
] | null | null | null | Numpy/Num.py | shivaniverma1/Data-Scientist | f82939a411484311171465591455880c8e354750 | [
"MIT"
] | 2 | 2022-03-12T04:52:21.000Z | 2022-03-27T12:45:32.000Z | # Create list baseball
import numpy as np
baseball = [180, 215, 210, 210, 188, 176, 209, 200]
# Import the numpy package as np
# Create a numpy array from baseball: np_baseball
np_baseball = np.array(baseball)
# Print out type of np_baseball
print(type(np_baseball))
# height is available as a regular list
# Import... | 22.638298 | 78 | 0.743186 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,503 | 0.588111 |
d71d1bf7f27ba4c1c44e668d8bb681ca4183dc5f | 3,469 | py | Python | REMARKs/SolvingMicroDSOPs/Calibration/SetupSCFdata.py | ngkratts/REMARK | 92c057a93a7d10a890696db55f874d5fde394b91 | [
"Apache-2.0"
] | 18 | 2019-01-28T13:17:39.000Z | 2021-09-10T16:29:55.000Z | REMARKs/SolvingMicroDSOPs/Calibration/SetupSCFdata.py | ngkratts/REMARK | 92c057a93a7d10a890696db55f874d5fde394b91 | [
"Apache-2.0"
] | 89 | 2019-01-06T19:32:34.000Z | 2021-08-30T13:30:48.000Z | REMARKs/SolvingMicroDSOPs/Calibration/SetupSCFdata.py | ngkratts/REMARK | 92c057a93a7d10a890696db55f874d5fde394b91 | [
"Apache-2.0"
] | 50 | 2018-08-01T16:33:06.000Z | 2021-10-05T20:20:26.000Z | '''
Sets up the SCF data for use in the SolvingMicroDSOPs estimation.
'''
from __future__ import division # Use new division function
from __future__ import print_function
from __future__ import absolute_import
from builtins import zip
from builtins import str
from builtins import range
import os, sys
# Find pat... | 41.795181 | 114 | 0.763909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,725 | 0.497261 |
d71d1d8702943a9a53fdd7509061a707d77261fd | 31,436 | py | Python | build/lib/app/routes.py | Dialjini/BarsCrm_backend | 490894b676f27de846c33af9dd67a7ad8677818c | [
"Apache-2.0"
] | null | null | null | build/lib/app/routes.py | Dialjini/BarsCrm_backend | 490894b676f27de846c33af9dd67a7ad8677818c | [
"Apache-2.0"
] | null | null | null | build/lib/app/routes.py | Dialjini/BarsCrm_backend | 490894b676f27de846c33af9dd67a7ad8677818c | [
"Apache-2.0"
] | null | null | null | from app import app
from flask import render_template, redirect, session, request, send_from_directory
from app import models, db, reqs
from flask_socketio import SocketIO, emit
import json
from xhtml2pdf import pisa
import os
from datetime import datetime
socketio = SocketIO(app)
if __name__ == '__main__':
socke... | 32.677755 | 110 | 0.594637 | 344 | 0.0109 | 0 | 0 | 27,834 | 0.881939 | 0 | 0 | 5,709 | 0.180894 |
d71dbac43bd9efda4e60dfd4b71b2414be991d39 | 790 | py | Python | ch2Perceptron/example2.py | junseokpark/deepLearningFromScratch | 07c225a86502a16f4475a3a6a346fd6203bf9f40 | [
"MIT"
] | null | null | null | ch2Perceptron/example2.py | junseokpark/deepLearningFromScratch | 07c225a86502a16f4475a3a6a346fd6203bf9f40 | [
"MIT"
] | null | null | null | ch2Perceptron/example2.py | junseokpark/deepLearningFromScratch | 07c225a86502a16f4475a3a6a346fd6203bf9f40 | [
"MIT"
] | null | null | null | import numpy as np
x = np.array([0,1])
w = np.array([0.5,0.5])
b = -0.7
print(w*x)
print(np.sum(w*x))
print(np.sum(w*x)+b)
def AND(x1,x2):
x = np.array([x1,x2])
w = np.array([0.5,0.5])
b = -0.7
tmp = np.sum(w*x)+b
if tmp <= 0:
return 0
else:
return 1
def NAND(x1,x2):
x = n... | 15.8 | 29 | 0.46962 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d71ede6a1c08ec38b1d5adae7fd269d6b1aa94ed | 2,413 | py | Python | model/custom_resnet.py | gkdivya/torch-cv-wrapper | fe30c32e0a6293c1301521ce45a72a9d63354942 | [
"MIT"
] | 2 | 2021-08-03T12:16:32.000Z | 2021-09-04T07:36:31.000Z | model/custom_resnet.py | gkdivya/torch-cv-wrapper | fe30c32e0a6293c1301521ce45a72a9d63354942 | [
"MIT"
] | null | null | null | model/custom_resnet.py | gkdivya/torch-cv-wrapper | fe30c32e0a6293c1301521ce45a72a9d63354942 | [
"MIT"
] | 3 | 2021-07-03T15:04:14.000Z | 2021-08-05T11:08:09.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
class BasicBlock(nn.Module):
def __init__(self, in_planes, planes, stride=1):
super(BasicBlock, self).__init__()
self.conv1 = nn.Conv2d(
in_planes, planes, kernel_size=3, stride=stride, padding=1, bias=False)
s... | 29.072289 | 83 | 0.528802 | 2,282 | 0.945711 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.004973 |
d720aec2d84e6036038a117411622fba835ee1b0 | 12,810 | py | Python | playground/test_condconv_weights/test_routing_weights.py | harry11162/detectron2 | d5d41e23cd5317b9d80d5f9e4886771ba53c1a3a | [
"Apache-2.0"
] | null | null | null | playground/test_condconv_weights/test_routing_weights.py | harry11162/detectron2 | d5d41e23cd5317b9d80d5f9e4886771ba53c1a3a | [
"Apache-2.0"
] | null | null | null | playground/test_condconv_weights/test_routing_weights.py | harry11162/detectron2 | d5d41e23cd5317b9d80d5f9e4886771ba53c1a3a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates.
"""
Detectron2 training script with a plain training loop.
This script reads a given config file and runs the training or evaluation.
It is an entry point that is able to train standard models in detectron2.
In order to let one script support tr... | 39.294479 | 117 | 0.676581 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,760 | 0.293521 |