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
a96d57b61d8688819ccbbbd9291ae22fdd80039b
566
py
Python
sqlite_framework/sql/item/constraint/table/base.py
alvarogzp/python-sqlite-framework
29db97a64f95cfe13eb7bae1d00b624b5a37b152
[ "Apache-2.0" ]
1
2020-08-29T12:42:11.000Z
2020-08-29T12:42:11.000Z
sqlite_framework/sql/item/constraint/table/base.py
alvarogzp/python-sqlite-framework
29db97a64f95cfe13eb7bae1d00b624b5a37b152
[ "Apache-2.0" ]
4
2018-05-07T19:36:30.000Z
2018-05-29T05:18:13.000Z
sqlite_framework/sql/item/constraint/table/base.py
alvarogzp/python-sqlite-framework
29db97a64f95cfe13eb7bae1d00b624b5a37b152
[ "Apache-2.0" ]
null
null
null
from sqlite_framework.sql.item.base import SqlItem from sqlite_framework.sql.item.column import Column class TableConstraint(SqlItem): def str(self): raise NotImplementedError() class ColumnListTableConstraint(TableConstraint): def __init__(self, constraint_type: str, *columns: Column): supe...
29.789474
75
0.701413
457
0.80742
0
0
0
0
0
0
24
0.042403
a97015a85173cf78e85bed10e73b68dc69502a9d
78
py
Python
pydemic/report/__init__.py
GCES-Pydemic/pydemic
f221aa16e6a32ed1303fa11ebf8a357643f683d5
[ "MIT" ]
null
null
null
pydemic/report/__init__.py
GCES-Pydemic/pydemic
f221aa16e6a32ed1303fa11ebf8a357643f683d5
[ "MIT" ]
null
null
null
pydemic/report/__init__.py
GCES-Pydemic/pydemic
f221aa16e6a32ed1303fa11ebf8a357643f683d5
[ "MIT" ]
null
null
null
from .report_group import GroupReport from .report_single import SingleReport
26
39
0.871795
0
0
0
0
0
0
0
0
0
0
a97282eeac0597449d543922ed87821479844a39
724
py
Python
src/baboon_tracking/mixins/history_frames_mixin.py
radioactivebean0/baboon-tracking
062351c514073aac8e1207b8b46ca89ece987928
[ "MIT" ]
6
2019-07-15T19:10:59.000Z
2022-02-01T04:25:26.000Z
src/baboon_tracking/mixins/history_frames_mixin.py
radioactivebean0/baboon-tracking
062351c514073aac8e1207b8b46ca89ece987928
[ "MIT" ]
86
2019-07-02T17:59:46.000Z
2022-02-01T23:23:08.000Z
src/baboon_tracking/mixins/history_frames_mixin.py
radioactivebean0/baboon-tracking
062351c514073aac8e1207b8b46ca89ece987928
[ "MIT" ]
7
2019-10-16T12:58:21.000Z
2022-03-08T00:31:32.000Z
""" Mixin for returning history frames. """ from collections import deque from typing import Deque from rx.core.typing import Observable from baboon_tracking.models.frame import Frame class HistoryFramesMixin: """ Mixin for returning history frames. """ def __init__(self, history_fr...
25.857143
84
0.68232
523
0.722376
0
0
0
0
0
0
172
0.237569
a972d95469a20ffc4d590103acea6ae8f6b2b426
1,746
py
Python
src/elm_doc/tasks/html.py
brilliantorg/elm-doc
69ddbcd57aee3da6283c2497d735951d95b85426
[ "BSD-3-Clause" ]
29
2017-02-01T11:58:44.000Z
2021-05-21T15:18:33.000Z
src/elm_doc/tasks/html.py
brilliantorg/elm-doc
69ddbcd57aee3da6283c2497d735951d95b85426
[ "BSD-3-Clause" ]
143
2017-07-26T17:34:44.000Z
2022-03-01T18:01:43.000Z
src/elm_doc/tasks/html.py
brilliantorg/elm-doc
69ddbcd57aee3da6283c2497d735951d95b85426
[ "BSD-3-Clause" ]
7
2018-03-09T10:04:45.000Z
2021-10-19T19:17:40.000Z
import json import html from pathlib import Path from elm_doc.utils import Namespace # Note: title tag is omitted, as the Elm app sets the title after # it's initialized. PAGE_TEMPLATE = ''' <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <link rel="shortcut icon" size="16x16, 32x32, 48x48, 64x64, 128...
30.103448
142
0.643757
245
0.140321
0
0
0
0
0
0
1,096
0.627721
a9747260a42549b174eafc1943184e3614f86276
1,031
py
Python
pyPico/2.传感器实验/6.水位传感器/main.py
01studio-lab/MicroPython_Examples
f06a1bee398674ceafebed2aac88d8413cc8abad
[ "MIT" ]
73
2020-05-02T13:48:27.000Z
2022-03-26T13:15:10.000Z
pyPico/2.传感器实验/6.水位传感器/main.py
01studio-lab/MicroPython_Examples
f06a1bee398674ceafebed2aac88d8413cc8abad
[ "MIT" ]
null
null
null
pyPico/2.传感器实验/6.水位传感器/main.py
01studio-lab/MicroPython_Examples
f06a1bee398674ceafebed2aac88d8413cc8abad
[ "MIT" ]
50
2020-05-15T13:57:28.000Z
2022-03-30T14:03:33.000Z
''' 实验名称:水位传感器 版本:v1.0 日期:2021.1 作者:01Studio 【www.01Studio.org】 说明:通过水位传感器对水位测量并显示。 ''' #导入相关模块 import time from machine import Pin,SoftI2C,ADC from ssd1306 import SSD1306_I2C #初始化oled i2c = SoftI2C(scl=Pin(10), sda=Pin(11)) #软件I2C初始化:scl--> 10, sda --> 11 oled = SSD1306_I2C(128, 64, i2c, addr=0x3c) #OLED显示屏初始化:128...
19.826923
81
0.651794
0
0
0
0
0
0
0
0
633
0.487298
a975a7568cae17acd3d7b4203c548d145cfe9d6a
147
py
Python
src/assisters/mytypes.py
khyreek/Codeforcescord-Bot
b47ce6b1bf779e6d3f904b3dcb2a811b74e90b17
[ "Apache-2.0" ]
null
null
null
src/assisters/mytypes.py
khyreek/Codeforcescord-Bot
b47ce6b1bf779e6d3f904b3dcb2a811b74e90b17
[ "Apache-2.0" ]
null
null
null
src/assisters/mytypes.py
khyreek/Codeforcescord-Bot
b47ce6b1bf779e6d3f904b3dcb2a811b74e90b17
[ "Apache-2.0" ]
null
null
null
from typing import Annotated Problem = Annotated[str, "code cfs problems have, ex. 1348B"] ProblemWidth = int CFSSectionsData = tuple[int, ...]
18.375
61
0.734694
0
0
0
0
0
0
0
0
35
0.238095
a9767449042e9e6827a47f70074761e36edb412a
2,666
py
Python
nb.py
corytaitchison/online-reviews
10de9218137658269ba36849dfa7e8f643335d01
[ "MIT" ]
null
null
null
nb.py
corytaitchison/online-reviews
10de9218137658269ba36849dfa7e8f643335d01
[ "MIT" ]
null
null
null
nb.py
corytaitchison/online-reviews
10de9218137658269ba36849dfa7e8f643335d01
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import matplotlib.pyplot as plt ### import nltk from nltk.corpus import stopwords from nltk.tokenize import word_tokenize # from nltk.stem import WordNetLemmatizer from nltk.stem import PorterStemmer ### from sklearn.naive_bayes import MultinomialNB from sklearn.metrics import con...
33.746835
122
0.686422
0
0
0
0
0
0
0
0
667
0.250188
a9767fe03cd95cd1ee4f89e2a2b53d9dc840600a
4,032
py
Python
1_Basics:warmup/2_TweetsFilter/twitter_exerciseB.py
ferreiro/Python_course
73eb41e248d702741a4109a78b15ef8e5e6341f2
[ "MIT" ]
2
2016-02-15T04:12:22.000Z
2021-09-05T23:26:53.000Z
1_Basics:warmup/2_TweetsFilter/twitter_exerciseB.py
ferreiro/Python-course
73eb41e248d702741a4109a78b15ef8e5e6341f2
[ "MIT" ]
10
2015-10-16T14:37:41.000Z
2015-11-16T22:29:39.000Z
2_TwitterAPI/twitter_exerciseB.py
ferreiro/Python
9a0292d4898571fcef95546eec977d3138c7c23b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import csv import json outdirectory = "outputCSV/" tweetsFile = "tweets.txt"; outputFile = "mostUsedHasgtags.csv"; tweetsList = [] # List that contains all the tweets readed from a file hashtagTable = {}; # Dictionary with key= hashtags and value= frecuency for this hashtag """ Returns ...
33.322314
202
0.726438
0
0
0
0
0
0
0
0
2,241
0.55484
a976a9884a077db66cbb3f3d300b2d865662f9c4
4,346
py
Python
docker-images/slack-prs/main.py
kiteco/kiteco-public
74aaf5b9b0592153b92f7ed982d65e15eea885e3
[ "BSD-3-Clause" ]
17
2022-01-10T11:01:50.000Z
2022-03-25T03:21:08.000Z
docker-images/slack-prs/main.py
kiteco/kiteco-public
74aaf5b9b0592153b92f7ed982d65e15eea885e3
[ "BSD-3-Clause" ]
1
2022-01-13T14:28:47.000Z
2022-01-13T14:28:47.000Z
docker-images/slack-prs/main.py
kiteco/kiteco-public
74aaf5b9b0592153b92f7ed982d65e15eea885e3
[ "BSD-3-Clause" ]
7
2022-01-07T03:58:10.000Z
2022-03-24T07:38:20.000Z
import time import json import argparse import websocket import requests import github MY_NAME = 'kit' # should be able to avoid this in the future TOKEN = 'XXXXXXX' GITHUB_USERNAME_BY_SLACK_USERNAME = { "adam": "adamsmith", # XXXXXXX ... } channel_ids_by_name = {} channel_names_by_id = {} next_id = 0 def send...
24.834286
102
0.685228
0
0
0
0
0
0
0
0
781
0.179705
a9775f738c3044fcff42b57c7ed49ac310db7479
656
py
Python
commands/meme.py
EFFLUX110/efflux-discord-bot
fe382fc822f852efab8d4742daa756045a17bff3
[ "MIT" ]
null
null
null
commands/meme.py
EFFLUX110/efflux-discord-bot
fe382fc822f852efab8d4742daa756045a17bff3
[ "MIT" ]
4
2022-02-03T18:24:32.000Z
2022-02-03T19:24:51.000Z
commands/meme.py
EFFLUX110/efflux-discord-bot
fe382fc822f852efab8d4742daa756045a17bff3
[ "MIT" ]
1
2022-02-03T18:12:44.000Z
2022-02-03T18:12:44.000Z
import discord import requests from discord.ext import commands class Meme(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command() async def meme(self,ctx): r=requests.get("https://memes.blademaker.tv/api?lang=en") res=r.json() title=res['title'] ...
28.521739
87
0.617378
547
0.833841
0
0
460
0.70122
436
0.664634
134
0.204268
a977697bb7ffe10b5b5f5a391df5f58451adfd57
717
py
Python
45.py
brianfl/project-euler
9f83a3c2da04fd0801a4a575081add665edccd5f
[ "MIT" ]
null
null
null
45.py
brianfl/project-euler
9f83a3c2da04fd0801a4a575081add665edccd5f
[ "MIT" ]
null
null
null
45.py
brianfl/project-euler
9f83a3c2da04fd0801a4a575081add665edccd5f
[ "MIT" ]
null
null
null
target_num = 0 j = 0 while target_num == 0: pent_ind = float((1 + ( 1 + 24*j*(2*j-1))**.5)/6) tri_ind = float((-1 + (1+8*j*(2*j-1)))/2) if pent_ind.is_integer() and tri_ind.is_integer(): num = j*(2*j-1) if num != 1 and num != 40755: target_num = num j += 1 print(target_num)...
29.875
71
0.661088
0
0
0
0
0
0
0
0
393
0.548117
a97827ef5e7685a79286da4ad9d58d63d84d97d6
801
py
Python
client.py
hani9/smartlockers
bd7a996be58769341367d58d5c80c70ad7bd1cb6
[ "MIT" ]
null
null
null
client.py
hani9/smartlockers
bd7a996be58769341367d58d5c80c70ad7bd1cb6
[ "MIT" ]
null
null
null
client.py
hani9/smartlockers
bd7a996be58769341367d58d5c80c70ad7bd1cb6
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Importo les llibreries import socket import RPi.GPIO as GPIO import time # Faig la configuració bàsica del GPIO GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) GPIO.setup(18, GPIO.OUT) # Només utilitzo el 18. Es podria fer un bucle per activar-ne diversos alhora. # Indico ...
26.7
103
0.705368
0
0
0
0
0
0
0
0
451
0.55886
a978a3e063f71ae417a8f86e87e70e36b033503d
16,820
py
Python
src/mlpro/rl/pool/envmodels/mlp_robotinhtm.py
fhswf/MLPro
e944b69bed9c2d5548677711270e4a4fe868aea9
[ "Apache-2.0" ]
5
2022-01-31T15:52:19.000Z
2022-03-21T18:34:27.000Z
src/mlpro/rl/pool/envmodels/mlp_robotinhtm.py
fhswf/MLPro
e944b69bed9c2d5548677711270e4a4fe868aea9
[ "Apache-2.0" ]
61
2021-12-17T13:03:59.000Z
2022-03-31T10:24:37.000Z
src/mlpro/rl/pool/envmodels/mlp_robotinhtm.py
fhswf/MLPro
e944b69bed9c2d5548677711270e4a4fe868aea9
[ "Apache-2.0" ]
null
null
null
## ------------------------------------------------------------------------------------------------- ## -- Project : MLPro - A Synoptic Framework for Standardized Machine Learning Tasks ## -- Package : mlpro.rl.envmodels ## -- Module : mlp_robotinhtm ## -----------------------------------------------------------------...
39.299065
146
0.542866
15,189
0.903032
0
0
0
0
0
0
2,363
0.140488
a979eac6a7daaac0fe50d966818c9860d5136601
3,474
py
Python
pyxlpr/data/icdar/__init__.py
XLPRUtils/pyUtils
3a62c14b0658ad3c24d83f953ee0d88530b02b23
[ "Apache-2.0" ]
15
2020-06-09T07:03:07.000Z
2022-02-25T06:59:34.000Z
pyxlpr/data/icdar/__init__.py
XLPRUtils/pyUtils
3a62c14b0658ad3c24d83f953ee0d88530b02b23
[ "Apache-2.0" ]
5
2020-08-08T07:11:21.000Z
2020-08-08T07:11:24.000Z
pyxlpr/data/icdar/__init__.py
XLPRUtils/pyUtils
3a62c14b0658ad3c24d83f953ee0d88530b02b23
[ "Apache-2.0" ]
2
2020-06-09T07:03:26.000Z
2020-12-31T06:50:37.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Author : 陈坤泽 # @Email : 877362867@qq.com # @Date : 2021/02/22 10:29 """ 对icdar2013的三种测评方法的接口封装 官方原版处理两个 zip 文件,这里扩展支持目录、内存对象 """ import re from pyxllib.xl import File, Dir, shorten class IcdarEval: """ >>> gt = {'1.abc': [[158, 128, 411, 181], [443, 128...
35.814433
97
0.600173
4,185
0.928762
0
0
820
0.18198
0
0
2,770
0.614736
a97a18817825892c952ac7174c04fcf55fabab56
6,441
py
Python
MTL/features.py
usc-sail/mica-riskybehavior-identification
dd8d1bb795ca1b8273625713887c6c4b747fd542
[ "MIT" ]
2
2020-11-19T21:22:53.000Z
2021-02-25T00:29:38.000Z
MTL/features.py
usc-sail/mica-riskybehavior-identification
dd8d1bb795ca1b8273625713887c6c4b747fd542
[ "MIT" ]
null
null
null
MTL/features.py
usc-sail/mica-riskybehavior-identification
dd8d1bb795ca1b8273625713887c6c4b747fd542
[ "MIT" ]
1
2021-02-05T22:45:51.000Z
2021-02-05T22:45:51.000Z
import os import numpy as np import torch from transformers import BertTokenizer from tensorflow.keras.utils import to_categorical from NewDataLoader import * from config import * import warnings class Features: def __init__(self, **kwargs): self.max_len = kwargs.get('max_len', 250) self.categor...
38.568862
127
0.621798
6,237
0.968328
0
0
0
0
0
0
1,107
0.171868
a97af6a55423ad89ce397dfb867db2824473473b
1,233
py
Python
project_4_data_pipelines/airflow/plugins/helpers/sparkify_dim_subdag.py
jpuris/udacity-data-engineering-submissions
e71e2569241c76b5e6c3cd074667b19bde4d7b9e
[ "MIT" ]
null
null
null
project_4_data_pipelines/airflow/plugins/helpers/sparkify_dim_subdag.py
jpuris/udacity-data-engineering-submissions
e71e2569241c76b5e6c3cd074667b19bde4d7b9e
[ "MIT" ]
null
null
null
project_4_data_pipelines/airflow/plugins/helpers/sparkify_dim_subdag.py
jpuris/udacity-data-engineering-submissions
e71e2569241c76b5e6c3cd074667b19bde4d7b9e
[ "MIT" ]
null
null
null
from airflow import DAG from operators import LoadDimensionOperator def load_dim_subdag( parent_dag_name: str, task_id: str, redshift_conn_id: str, sql_statement: str, do_truncate: bool, table_name: str, **kwargs, ): """ Airflow's subdag wrapper. Implements LoadDimensionOperator op...
26.804348
75
0.673155
0
0
0
0
0
0
0
0
673
0.545823
a97bced1b47f7e35fb054962b9c59fd468c4c16b
1,816
py
Python
inference.py
Retrospection/Yolo-v2-pytorch
d2028219a250e50e03340538faab197ac8ece8a8
[ "MIT" ]
null
null
null
inference.py
Retrospection/Yolo-v2-pytorch
d2028219a250e50e03340538faab197ac8ece8a8
[ "MIT" ]
null
null
null
inference.py
Retrospection/Yolo-v2-pytorch
d2028219a250e50e03340538faab197ac8ece8a8
[ "MIT" ]
1
2021-12-28T08:13:05.000Z
2021-12-28T08:13:05.000Z
# coding: utf-8 from __future__ import print_function from __future__ import absolute_import from __future__ import division from src.yolo_net import YoloTest, Yolo import torch import cv2 import numpy as np def read_image(path): img1 = cv2.imread(path) img1 = cv2.resize(img1, (224, 224)) img1 = img1.tr...
24.876712
80
0.680617
433
0.238436
0
0
0
0
0
0
1,017
0.560022
a97e81a89bda65fad9ab35f52160822fa9349f8c
11,572
py
Python
geetools/collection/modis.py
carderne/gee_tools
4003e75ffb0ffefc9f41b1a34d849eebdb486161
[ "MIT" ]
null
null
null
geetools/collection/modis.py
carderne/gee_tools
4003e75ffb0ffefc9f41b1a34d849eebdb486161
[ "MIT" ]
null
null
null
geetools/collection/modis.py
carderne/gee_tools
4003e75ffb0ffefc9f41b1a34d849eebdb486161
[ "MIT" ]
null
null
null
# coding=utf-8 """ Google Earth Engine MODIS Collections """ from . import Collection, TODAY, Band from functools import partial IDS = [ 'MODIS/006/MOD09GQ', 'MODIS/006/MYD09GQ', 'MODIS/006/MOD09GA', 'MODIS/006/MYD09GA', 'MODIS/006/MOD13Q1', 'MODIS/006/MYD13Q1' ] START = { 'MODIS/006/MOD09GQ': '2000-...
38.317881
89
0.497753
10,841
0.93683
0
0
773
0.066799
0
0
3,118
0.269443
a97f5a52d2112340dd02628abcf36314406fa57c
338
py
Python
random-py/app.py
traian-mihali/publishing-py
fa050b1169258b50678f00b97958499bc0210ca3
[ "MIT" ]
null
null
null
random-py/app.py
traian-mihali/publishing-py
fa050b1169258b50678f00b97958499bc0210ca3
[ "MIT" ]
null
null
null
random-py/app.py
traian-mihali/publishing-py
fa050b1169258b50678f00b97958499bc0210ca3
[ "MIT" ]
null
null
null
""" This module provides a method to generate a random number between 0 and the specified number """ import random import math def random_num(max): """ Generates a random number Parameters: max(int): the range upper limit Returns: int: the random number """ return math.floor(rando...
19.882353
100
0.668639
0
0
0
0
0
0
0
0
238
0.704142
a980ed05ffe9a9c97a1b948b9c9b922dc89fb870
847
py
Python
sympy/printing/printer.py
certik/sympy-oldcore
eb5bd061c309d88cdfb502bfd5df511b30368458
[ "BSD-3-Clause" ]
1
2016-05-08T17:54:57.000Z
2016-05-08T17:54:57.000Z
sympy/printing/printer.py
certik/sympy-oldcore
eb5bd061c309d88cdfb502bfd5df511b30368458
[ "BSD-3-Clause" ]
null
null
null
sympy/printing/printer.py
certik/sympy-oldcore
eb5bd061c309d88cdfb502bfd5df511b30368458
[ "BSD-3-Clause" ]
null
null
null
class Printer(object): """ """ def __init__(self): self._depth = -1 self._str = str self.emptyPrinter = str def doprint(self, expr): """Returns the pretty representation for expr (as a string)""" return self._str(self._print(expr)) def _print(self, expr): ...
27.322581
70
0.565525
845
0.997639
0
0
0
0
0
0
250
0.295159
a981fd9db88834f380bdfbae5402c0c579a7fa58
272
py
Python
pleiades/transforms.py
jcwright77/pleiades
e3e208e94feee299589a094f361b301131d1bd15
[ "MIT" ]
3
2020-03-27T19:27:01.000Z
2021-07-15T16:28:54.000Z
pleiades/transforms.py
jcwright77/pleiades
e3e208e94feee299589a094f361b301131d1bd15
[ "MIT" ]
6
2020-03-30T17:12:42.000Z
2020-07-14T03:07:02.000Z
pleiades/transforms.py
jcwright77/pleiades
e3e208e94feee299589a094f361b301131d1bd15
[ "MIT" ]
6
2020-03-30T17:05:58.000Z
2021-08-18T19:21:00.000Z
import math import numpy as np def rotate(pts, angle, pivot=(0., 0.)): pivot = np.asarray(pivot) angle = math.pi*angle/180 c, s = np.cos(angle), np.sin(angle) rotation = np.array([[c, -s], [s, c]]) return (np.asarray(pts) - pivot) @ rotation + pivot
24.727273
55
0.602941
0
0
0
0
0
0
0
0
0
0
a982f1f9c012c80b9c26e9e99c4415060d09e04a
166
py
Python
Project/Python/project/public/auto/__init__.py
renwei-release/dave
773301edd3bee6e7526e0d5587ff8af9f01e288f
[ "MIT" ]
null
null
null
Project/Python/project/public/auto/__init__.py
renwei-release/dave
773301edd3bee6e7526e0d5587ff8af9f01e288f
[ "MIT" ]
null
null
null
Project/Python/project/public/auto/__init__.py
renwei-release/dave
773301edd3bee6e7526e0d5587ff8af9f01e288f
[ "MIT" ]
null
null
null
import ctypes import struct from .dave_define import * from .dave_enum import * from .dave_msg_id import * from .dave_msg_struct import * from .dave_struct import *
18.444444
30
0.789157
0
0
0
0
0
0
0
0
0
0
a9840415a7cc2a3662940dac6af33c62299a8276
551
py
Python
Methods/Machine/Conductor/check.py
Superomeg4/pyleecan
2b695b5f39e77475a07aa0ea89489fb0a9659337
[ "Apache-2.0" ]
2
2020-06-29T13:48:37.000Z
2021-06-15T07:34:05.000Z
Methods/Machine/Conductor/check.py
Superomeg4/pyleecan
2b695b5f39e77475a07aa0ea89489fb0a9659337
[ "Apache-2.0" ]
null
null
null
Methods/Machine/Conductor/check.py
Superomeg4/pyleecan
2b695b5f39e77475a07aa0ea89489fb0a9659337
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """@package Methods.Machine.Conductor.check Check that the Conductor is correct @date Created on Thu Jan 22 17:50:02 2015 @copyright (C) 2015-2016 EOMYS ENGINEERING. @author pierre_b """ from pyleecan.Methods.Machine.LamSlotWind.check import Lam_WindCheckError def check(self): """Check th...
17.774194
73
0.658802
63
0.114338
0
0
0
0
0
0
382
0.693285
a98465a5dbaaa69b7d18d16711f08102c5a830eb
3,414
py
Python
wholeslidedata/annotation/write_mask2.py
kaczmarj/pathology-whole-slide-data
3adb86af716ca89f336b6c935f90bd13183572b7
[ "Apache-2.0" ]
1
2022-02-17T19:47:14.000Z
2022-02-17T19:47:14.000Z
wholeslidedata/annotation/write_mask2.py
kaczmarj/pathology-whole-slide-data
3adb86af716ca89f336b6c935f90bd13183572b7
[ "Apache-2.0" ]
null
null
null
wholeslidedata/annotation/write_mask2.py
kaczmarj/pathology-whole-slide-data
3adb86af716ca89f336b6c935f90bd13183572b7
[ "Apache-2.0" ]
null
null
null
from pathlib import Path from typing import List import cv2 import numpy as np from shapely import geometry from shapely.strtree import STRtree from wholeslidedata.annotation.structures import Annotation, Point, Polygon from wholeslidedata.image.wholeslideimage import WholeSlideImage from wholeslidedata.image.wholesli...
32.207547
86
0.621558
0
0
0
0
0
0
0
0
100
0.029291
a984e763170541feb20e89e4a6245f1b8e706963
578
py
Python
tuples_05/tests/test_slicing_tuples.py
njoroge33/py_learn
6ad55f37789045bc5c03f3dd668cf1ea497f4e84
[ "MIT" ]
null
null
null
tuples_05/tests/test_slicing_tuples.py
njoroge33/py_learn
6ad55f37789045bc5c03f3dd668cf1ea497f4e84
[ "MIT" ]
2
2019-04-15T06:29:55.000Z
2019-04-19T17:34:32.000Z
tuples_05/tests/test_slicing_tuples.py
njoroge33/py_learn
6ad55f37789045bc5c03f3dd668cf1ea497f4e84
[ "MIT" ]
1
2019-11-19T04:51:18.000Z
2019-11-19T04:51:18.000Z
import pytest from ..slicing_tuples import tuple_slice @pytest.mark.parametrize('names, ages, cities, expected', [ (('Gitau', 'Kanyoi', 'Ndegwa'), (13, 24, 5), ('Njogu-ini', 'Limuru', 'Kamae'), ( ('Gitau', 13, 'Njogu-ini'), ('Kanyoi', 24, 'Limuru'), ('Ndegwa', 5, 'Kamae') )), (('Totua', 'Suhi'...
36.125
88
0.570934
0
0
0
0
520
0.899654
0
0
198
0.342561
a9856cedef8243944a78d8985c56e556db9faae0
28,653
py
Python
dftimewolf/lib/state.py
hkhalifa/dftimewolf
0a6d62fdb362c8618bd373c18a7f446b959f1a0f
[ "Apache-2.0" ]
null
null
null
dftimewolf/lib/state.py
hkhalifa/dftimewolf
0a6d62fdb362c8618bd373c18a7f446b959f1a0f
[ "Apache-2.0" ]
null
null
null
dftimewolf/lib/state.py
hkhalifa/dftimewolf
0a6d62fdb362c8618bd373c18a7f446b959f1a0f
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """This class maintains the internal dfTimewolf state. Use it to track errors, abort on global failures, clean up after modules, etc. """ from dataclasses import dataclass from concurrent.futures import ThreadPoolExecutor, Future import importlib import logging import threading import tracebac...
36.640665
144
0.682965
27,376
0.955432
0
0
505
0.017625
0
0
12,843
0.448225
a98618135a8eb68ea555b4e82e1d790635fb2594
1,374
py
Python
DBManager.py
d0d0d0/Kerberos
38bf0b8388bc4f3571e790d5bc626d050df5d4dc
[ "MIT" ]
null
null
null
DBManager.py
d0d0d0/Kerberos
38bf0b8388bc4f3571e790d5bc626d050df5d4dc
[ "MIT" ]
null
null
null
DBManager.py
d0d0d0/Kerberos
38bf0b8388bc4f3571e790d5bc626d050df5d4dc
[ "MIT" ]
null
null
null
### Implements database management for Authentication Server and TGS ### from Query import * from sqlite3 import * from config import * class DBManager(object): def __init__(self, dbname): try: self.conn = connect(dbname) self.cursor = self.conn.cursor() except Exception as e: print str(e) def creat...
21.809524
72
0.697234
1,230
0.895197
0
0
0
0
0
0
114
0.082969
a987d4f7ac2585765bc67edb9138327e5465eec0
451
py
Python
people/views.py
kackey0-1/drf-sample
914907320bc317240b4d7c07968b6d4ea80b4511
[ "MIT" ]
null
null
null
people/views.py
kackey0-1/drf-sample
914907320bc317240b4d7c07968b6d4ea80b4511
[ "MIT" ]
6
2021-03-30T12:05:07.000Z
2021-04-05T14:21:46.000Z
people/views.py
kackey0-1/drf-sample
914907320bc317240b4d7c07968b6d4ea80b4511
[ "MIT" ]
null
null
null
from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework import status from .models import Person from .serializers import PersonSerializer @api_view(['GET']) def list_people(request): people = Person.objects.all() serializer = PersonSerializer(people, m...
22.55
60
0.75388
0
0
0
0
249
0.552106
0
0
13
0.028825
a98828e92b274eb6eae13e6556ae7fff3be2a963
8,867
py
Python
simple_soccer/two_dimension.py
RyoheiGoto/reinforcement_learning
ff2ddded7fd24c831a5103818b8a747a66a75f0c
[ "MIT" ]
2
2015-11-18T17:47:19.000Z
2016-03-20T08:22:42.000Z
simple_soccer/two_dimension.py
RyoheiGoto/reinforcement_learning
ff2ddded7fd24c831a5103818b8a747a66a75f0c
[ "MIT" ]
1
2015-11-19T18:15:13.000Z
2016-02-09T16:48:23.000Z
simple_soccer/two_dimension.py
RyoheiGoto/ReinforcementLearning
ff2ddded7fd24c831a5103818b8a747a66a75f0c
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt field_width = 396 #cm field_hight = 180 #cm goal_length = 180 #cm threshold = 36 field_width_threshold_num = field_width / threshold + 1 field_width_threshold = [Y * threshold - field_width / 2.0 for Y in xrange(field_width_threshold_num)] field_hight_threshold_num =...
33.587121
149
0.551483
7,811
0.880907
0
0
0
0
0
0
419
0.047254
a98a17680f92454408a66d8e581e032e851f1d31
1,089
py
Python
tests/test_molecular_signatures_db.py
krassowski/gsea-api
deb562ea55871b799eb501a798dd49a881ff9523
[ "MIT" ]
8
2020-03-06T02:03:40.000Z
2022-01-22T15:57:17.000Z
tests/test_molecular_signatures_db.py
krassowski/gsea-api
deb562ea55871b799eb501a798dd49a881ff9523
[ "MIT" ]
3
2020-03-06T01:48:53.000Z
2021-10-06T04:15:55.000Z
tests/test_molecular_signatures_db.py
krassowski/gsea-api
deb562ea55871b799eb501a798dd49a881ff9523
[ "MIT" ]
2
2019-12-01T18:41:07.000Z
2020-07-15T14:52:17.000Z
from pytest import raises from gsea_api.molecular_signatures_db import MolecularSignaturesDatabase def test_load(): msigdb_7_1 = MolecularSignaturesDatabase('tests/test_msigdb', version=7.1) assert msigdb_7_1.version == '7.1' assert msigdb_7_1.gene_sets == [ { 'name': 'c2.cp.reactome'...
38.892857
90
0.747475
0
0
0
0
0
0
0
0
337
0.309458
a98a271a4efe485ccb8f3daffb76dc91992cf6a3
11,387
py
Python
froide_govplan/admin.py
okfde/froide-govplan
1ae085c39c25af7c7a74d90ce39580119942a328
[ "MIT" ]
2
2022-03-13T14:49:46.000Z
2022-03-14T18:39:04.000Z
froide_govplan/admin.py
okfde/froide-govplan
1ae085c39c25af7c7a74d90ce39580119942a328
[ "MIT" ]
3
2022-03-18T11:52:46.000Z
2022-03-18T14:13:43.000Z
froide_govplan/admin.py
okfde/froide-govplan
1ae085c39c25af7c7a74d90ce39580119942a328
[ "MIT" ]
1
2022-03-18T09:36:20.000Z
2022-03-18T09:36:20.000Z
from django.contrib import admin, auth from django.contrib.auth.models import Group from django.shortcuts import get_object_or_404, redirect, render from django.urls import path, reverse, reverse_lazy from django.utils.translation import gettext_lazy as _ from adminsortable2.admin import SortableAdminMixin from froid...
30.859079
88
0.596557
9,290
0.815843
0
0
0
0
0
0
1,685
0.147976
a98a8630e0f08cab9b6667bd3db9422e0508306a
2,995
py
Python
tests/test_xmltompd.py
thiblahute/python-mpegdash
e7702dec59fe61668888ba5c9e1cb2f495b72c17
[ "MIT" ]
1
2021-06-08T04:25:04.000Z
2021-06-08T04:25:04.000Z
tests/test_xmltompd.py
thiblahute/python-mpegdash
e7702dec59fe61668888ba5c9e1cb2f495b72c17
[ "MIT" ]
null
null
null
tests/test_xmltompd.py
thiblahute/python-mpegdash
e7702dec59fe61668888ba5c9e1cb2f495b72c17
[ "MIT" ]
1
2021-09-27T12:57:51.000Z
2021-09-27T12:57:51.000Z
try: import unittest2 as unittest except: import unittest from mpegdash.parser import MPEGDASHParser class XML2MPDTestCase(unittest.TestCase): def test_xml2mpd_from_string(self): mpd_string = ''' <MPD xmlns="urn:mpeg:DASH:schema:MPD:2011" mediaPresentationDuration="PT0H1M52.43S" minBuffer...
50.762712
126
0.686477
2,882
0.96227
0
0
0
0
0
0
1,211
0.404341
a98cc0ed5054e6dba3e35b5238cafe5ac890c96b
513
py
Python
algorithm_toolbox/week_4/03_divide_and_conquer_1_search_array/iterativeBinSearch.py
dibyanshushekhardey/data_struct_and_algo_coursera
ce579ba0be19d0415dc5a9526fd04bcdb803dbc0
[ "MIT" ]
null
null
null
algorithm_toolbox/week_4/03_divide_and_conquer_1_search_array/iterativeBinSearch.py
dibyanshushekhardey/data_struct_and_algo_coursera
ce579ba0be19d0415dc5a9526fd04bcdb803dbc0
[ "MIT" ]
null
null
null
algorithm_toolbox/week_4/03_divide_and_conquer_1_search_array/iterativeBinSearch.py
dibyanshushekhardey/data_struct_and_algo_coursera
ce579ba0be19d0415dc5a9526fd04bcdb803dbc0
[ "MIT" ]
null
null
null
def BinarySearchIt(A, low, high, key): while low <= high: mid = low + ((high - low)//2) if key == A[mid]: return mid elif key < A[mid]: high = mid - 1 else: low = mid + 1 return low - 1 arr = [3, 5, 8, 10, 12, 15, 18, 20, 20, 50, 60] low = 1 ...
23.318182
60
0.502924
0
0
0
0
0
0
0
0
60
0.116959
a98fe624f9604a44b5865d4659413307a64a58db
2,133
py
Python
2016/day-02.py
mharty3/advent_of_code
f86e67eb772f4c328e30744610606fc154930aef
[ "MIT" ]
null
null
null
2016/day-02.py
mharty3/advent_of_code
f86e67eb772f4c328e30744610606fc154930aef
[ "MIT" ]
null
null
null
2016/day-02.py
mharty3/advent_of_code
f86e67eb772f4c328e30744610606fc154930aef
[ "MIT" ]
null
null
null
#--- Day 2: Bathroom Security --- from typing import List def parse(input_data: str) -> List[List[str]]: lines = input_data.strip().split() directions = [list(line) for line in lines] return directions def move1(x, y, direction): if direction == 'U': y -= 1 elif direction == 'D': ...
21.118812
50
0.449602
0
0
0
0
0
0
0
0
260
0.121894
a99348b5bc6c6ccf0bf508d81eb41b18d8e6cf18
2,875
py
Python
compose.py
gicmo/koji-osbuild
d8107f23478ca12cd376098a79c7465cc5dd12d1
[ "Apache-2.0" ]
null
null
null
compose.py
gicmo/koji-osbuild
d8107f23478ca12cd376098a79c7465cc5dd12d1
[ "Apache-2.0" ]
null
null
null
compose.py
gicmo/koji-osbuild
d8107f23478ca12cd376098a79c7465cc5dd12d1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 import argparse import koji import os from pprint import pprint def main(): parser = argparse.ArgumentParser(description="osbuild koji client") parser.add_argument("--url", metavar="URL", type=str, default="https://localhost/kojihub", help="T...
39.930556
88
0.631652
0
0
0
0
0
0
0
0
878
0.305391
a9939846090c5322d4926d75f10b1fc68c18dada
153
py
Python
{{cookiecutter.repo_name}}/{{cookiecutter.package_name}}/{{cookiecutter.package_name}}.py
numengo/cc-py-setup
392dfb85acb9052bf48586b9be98fc1f591d8991
[ "ISC", "Apache-2.0", "MIT" ]
3
2018-02-16T17:10:15.000Z
2018-03-01T19:38:54.000Z
{{cookiecutter.repo_name}}/{{cookiecutter.package_name}}/{{cookiecutter.package_name}}.py
numengo/cc-py-setup
392dfb85acb9052bf48586b9be98fc1f591d8991
[ "ISC", "Apache-2.0", "MIT" ]
null
null
null
{{cookiecutter.repo_name}}/{{cookiecutter.package_name}}/{{cookiecutter.package_name}}.py
numengo/cc-py-setup
392dfb85acb9052bf48586b9be98fc1f591d8991
[ "ISC", "Apache-2.0", "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Main module {{cookiecutter.project_name}} """ from __future__ import absolute_import from __future__ import unicode_literals
25.5
48
0.751634
0
0
0
0
0
0
0
0
71
0.464052
a995cea083a766e717127d27dd67556ccd2542a5
5,382
py
Python
src/models/def_features.py
jshcs/cfe
dc6ca928a124a3e0e0dd64a1d3667a9b313e8c50
[ "MIT" ]
null
null
null
src/models/def_features.py
jshcs/cfe
dc6ca928a124a3e0e0dd64a1d3667a9b313e8c50
[ "MIT" ]
null
null
null
src/models/def_features.py
jshcs/cfe
dc6ca928a124a3e0e0dd64a1d3667a9b313e8c50
[ "MIT" ]
null
null
null
from config import * from utils import * import datetime import pickle indir_vocab_jnames = VOCAB_JNAMES indir_bio_srt = BIO_SRT indir_sorted_fperson_fname = SORTED_FPERSON_FNAME indir_sorted_lperson_fname = SORTED_LPERSON_FNAME print indir_vocab_jnames with open(indir_vocab_jnames,'rb') as v: all_vocab=pickle...
31.290698
102
0.622074
4,566
0.848384
0
0
0
0
0
0
825
0.153289
a9971d06d9c16341c965038e22004beaf49e0586
2,182
py
Python
profile_python/profile.py
heroesofcode/profile-python
e4e6ee2f3739ea6edad30999b74b3d42f754a86c
[ "MIT" ]
null
null
null
profile_python/profile.py
heroesofcode/profile-python
e4e6ee2f3739ea6edad30999b74b3d42f754a86c
[ "MIT" ]
1
2021-10-09T01:26:29.000Z
2021-10-09T01:26:29.000Z
profile_python/profile.py
heroesofcode/profile-python
e4e6ee2f3739ea6edad30999b74b3d42f754a86c
[ "MIT" ]
null
null
null
from rich.console import Console from rich.table import Table from rich.progress import track from time import sleep import sys class Profile(object): def get_datas(self, datas): try: print(datas['login']) print(datas['name']) print(datas['bio']) print(data...
29.486486
76
0.47846
2,051
0.939963
0
0
0
0
0
0
468
0.214482
a99744e768b04af0c0bed6111d20060a12e0cfeb
2,459
py
Python
app/view/admin/notification_manage.py
G1NTOKI0522/WeChatterBot
1a5377713fd3d6c7a6bca1c20e8fdcf70e8215f5
[ "BSD-3-Clause" ]
1
2020-04-03T02:54:18.000Z
2020-04-03T02:54:18.000Z
app/view/admin/notification_manage.py
G1NTOKI0522/WeChatterBot
1a5377713fd3d6c7a6bca1c20e8fdcf70e8215f5
[ "BSD-3-Clause" ]
7
2020-04-11T13:22:50.000Z
2020-05-14T00:19:37.000Z
app/view/admin/notification_manage.py
G1NTOKI0522/WeChatterBot
1a5377713fd3d6c7a6bca1c20e8fdcf70e8215f5
[ "BSD-3-Clause" ]
3
2020-04-11T12:09:56.000Z
2020-12-16T13:26:20.000Z
# coding: utf-8 import datetime from flask_login import login_required, current_user from flask import Blueprint, request from app.libs.http import jsonify, error_jsonify from app.libs.db import session from app.serializer.notice import NoticeParaSchema from app.model.notice import Notice bp_admin_notification = B...
28.264368
99
0.699471
0
0
0
0
2,240
0.846241
0
0
451
0.170382
a998c1d627b7fcf20a5161fbb3c3b4a79699eea3
1,345
py
Python
test/test_delete_contact_from_group.py
schukinp/python_training
8140bbf1aae10052055f272c8deb3a7bdb7abcfb
[ "Apache-2.0" ]
null
null
null
test/test_delete_contact_from_group.py
schukinp/python_training
8140bbf1aae10052055f272c8deb3a7bdb7abcfb
[ "Apache-2.0" ]
null
null
null
test/test_delete_contact_from_group.py
schukinp/python_training
8140bbf1aae10052055f272c8deb3a7bdb7abcfb
[ "Apache-2.0" ]
null
null
null
from fixture.orm import ORMfixture from model.group import Group from model.contact import Contact import random db = ORMfixture(host='127.0.0.1', name='addressbook', user='root', password='') def test_delete_contact_from_group(app): if len(db.get_contact_list()) == 0: app.contact.create(Contact...
44.833333
130
0.710781
0
0
0
0
0
0
0
0
57
0.042379
a9993f306b253d20a5358a309289cc43d569a04f
323
py
Python
apps/accounts/views.py
martindwyer/Juntos
0aac3add432f5f3fc42befc720b70253d4fef2b4
[ "MIT" ]
null
null
null
apps/accounts/views.py
martindwyer/Juntos
0aac3add432f5f3fc42befc720b70253d4fef2b4
[ "MIT" ]
null
null
null
apps/accounts/views.py
martindwyer/Juntos
0aac3add432f5f3fc42befc720b70253d4fef2b4
[ "MIT" ]
null
null
null
from django.urls import reverse_lazy from django.contrib.auth import get_user_model from django.views.generic import CreateView from . import forms User = get_user_model() class SignUp(CreateView): form_class = forms.UserCreateForm success_url = reverse_lazy('login') template_name = 'accounts/signup.htm...
23.071429
46
0.783282
146
0.452012
0
0
0
0
0
0
29
0.089783
a99aa91e73c38055d1f2d643a8c77c56216293f4
6,498
py
Python
colossalai/engine/_base_engine.py
rahulgupta9202/ColossalAI
993088d45eaa032e39cf5959df2a506f0663bc2e
[ "Apache-2.0" ]
1
2022-03-12T04:49:19.000Z
2022-03-12T04:49:19.000Z
colossalai/engine/_base_engine.py
rahulgupta9202/ColossalAI
993088d45eaa032e39cf5959df2a506f0663bc2e
[ "Apache-2.0" ]
null
null
null
colossalai/engine/_base_engine.py
rahulgupta9202/ColossalAI
993088d45eaa032e39cf5959df2a506f0663bc2e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- encoding: utf-8 -*- from torch.nn import Module from torch.nn.modules.loss import _Loss from torch.optim import Optimizer from colossalai.builder import build_gradient_handler from colossalai.context import ParallelMode from colossalai.core import global_context as gpc from colossalai.logg...
36.711864
99
0.622499
5,986
0.921207
0
0
333
0.051247
0
0
2,238
0.344414
a99b36048f5d32ab6c9b6ad9baf0b5a681590fdd
718
py
Python
11. Optical Flow/optical_flow.py
farhan0syakir/OpenCv-tutorial
b3d78f3567f4ea61b8955190f51097b6ceb4b318
[ "MIT" ]
15
2021-05-04T15:03:14.000Z
2022-03-20T11:57:55.000Z
11. Optical Flow/optical_flow.py
farhan0syakir/OpenCv-tutorial
b3d78f3567f4ea61b8955190f51097b6ceb4b318
[ "MIT" ]
12
2020-09-24T16:57:45.000Z
2020-10-23T15:13:06.000Z
11. Optical Flow/optical_flow.py
farhan0syakir/OpenCv-tutorial
b3d78f3567f4ea61b8955190f51097b6ceb4b318
[ "MIT" ]
18
2020-09-21T13:01:37.000Z
2020-10-15T19:42:28.000Z
import numpy as np import cv2 cap = cv2.VideoCapture('motion.avi') ret, frame = cap.read() gs_im0 = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) points_prev = cv2.goodFeaturesToTrack(gs_im0, 100, 0.03, 9.0, False) while(cap.isOpened()): ret, frame = cap.read() gs_im1 = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)...
25.642857
88
0.650418
0
0
0
0
0
0
0
0
37
0.051532
a99d2fd19858a720fd9deb294de8995490e6da48
574
py
Python
game/rendering.py
rajbala5479/asteroid
73c6eab1bbdb68ff6c7f337c9517ba0ac1f34294
[ "MIT" ]
null
null
null
game/rendering.py
rajbala5479/asteroid
73c6eab1bbdb68ff6c7f337c9517ba0ac1f34294
[ "MIT" ]
null
null
null
game/rendering.py
rajbala5479/asteroid
73c6eab1bbdb68ff6c7f337c9517ba0ac1f34294
[ "MIT" ]
null
null
null
import math class Renderer: # Convenience methods def drawCircle( self, radius = 10, res = 30): pass class FilledPolygon(): def __init__(): pass def render(self): if len class PolyLine(): def __init__(): pass def make_circle(radius = 10, res = 20, filled = ...
19.793103
72
0.574913
252
0.439024
0
0
0
0
0
0
21
0.036585
a99e5850b3151bb654dd58f3e042f9310c260e3c
2,770
py
Python
tests/components/test_servo.py
Shivam60/j5
18069737644c8f1c95944386773c7643d5df5aeb
[ "MIT" ]
null
null
null
tests/components/test_servo.py
Shivam60/j5
18069737644c8f1c95944386773c7643d5df5aeb
[ "MIT" ]
null
null
null
tests/components/test_servo.py
Shivam60/j5
18069737644c8f1c95944386773c7643d5df5aeb
[ "MIT" ]
null
null
null
"""Tests for the servo classes.""" from typing import List, Optional, Type import pytest from j5.backends import Backend from j5.boards import Board from j5.components.servo import Servo, ServoInterface, ServoPosition class MockServoDriver(ServoInterface): """A testing driver for servos.""" def get_servo_p...
26.634615
81
0.652708
1,280
0.462094
0
0
677
0.244404
0
0
809
0.292058
a99e9b3110ca912a6a3fdcacc3a5951f95d02cb7
327
py
Python
Desafios/des029.py
vitormrts/ExerciciosPython
176b1c21e147670f7495678bdd4fc97241440d28
[ "MIT" ]
1
2021-02-07T18:58:57.000Z
2021-02-07T18:58:57.000Z
Desafios/des029.py
vitormrts/ExerciciosPython
176b1c21e147670f7495678bdd4fc97241440d28
[ "MIT" ]
null
null
null
Desafios/des029.py
vitormrts/ExerciciosPython
176b1c21e147670f7495678bdd4fc97241440d28
[ "MIT" ]
null
null
null
frase = str(input('Digite uma frase: ')).lower() print('Sobre a letra "a": \nQuantas vezes ela aparece? {} vezes;'.format(frase.count('a'))) print('Em que posição ela aparece pela primeira vez? {};'.format(frase.strip().index('a')+1)) print('Em que posição ela aparece pela última vez? {}.'.format(frase.strip().rfind('a...
65.4
93
0.678899
0
0
0
0
0
0
0
0
193
0.581325
a9a00c334939540391cc64f13f7f530cabcf615a
7,546
py
Python
unfold/transactions/views.py
wesny/unfold
6594054f7408ac142fc6e902093b6fc8cbfda94e
[ "MIT" ]
null
null
null
unfold/transactions/views.py
wesny/unfold
6594054f7408ac142fc6e902093b6fc8cbfda94e
[ "MIT" ]
null
null
null
unfold/transactions/views.py
wesny/unfold
6594054f7408ac142fc6e902093b6fc8cbfda94e
[ "MIT" ]
null
null
null
from django.contrib.auth.mixins import LoginRequiredMixin from django.views import View from django.views.generic import ListView from django.utils.http import is_safe_url from django.contrib import messages from rest_framework import status from django.core.exceptions import ObjectDoesNotExist from django.shortcuts im...
39.507853
111
0.658362
6,326
0.838325
0
0
278
0.036841
0
0
781
0.103499
a9a1965586fb4160c10932687996645bcd809a1c
1,843
py
Python
interviewbit/Programming/Arrays/Rotate Matrix/solution.py
pablotrinidad/competitive-programming
de16d007ca276330cd0a92bd5b75ce4e9e75fb59
[ "MIT" ]
null
null
null
interviewbit/Programming/Arrays/Rotate Matrix/solution.py
pablotrinidad/competitive-programming
de16d007ca276330cd0a92bd5b75ce4e9e75fb59
[ "MIT" ]
null
null
null
interviewbit/Programming/Arrays/Rotate Matrix/solution.py
pablotrinidad/competitive-programming
de16d007ca276330cd0a92bd5b75ce4e9e75fb59
[ "MIT" ]
null
null
null
"""InterviewBit. Programming > Arrays > Rotate Matrix. """ class Solution: """Solution.""" def rotate(self, A): """Rotate matrix.""" n = len(A) for l in range(0, n // 2): # l = level for o in range(0, n - (l * 2) - 1): # o = offset tlr, tlc = l, l + o #...
26.328571
119
0.429192
672
0.364623
0
0
0
0
0
0
340
0.184482
a9a1ee58b00c556118c2fed52b5d79faa8995835
2,334
py
Python
integration-tests/src/test/resources/model-in-image/scripts/verify-jdbc-resource.py
tanmaygarg-oracle/weblogic-kubernetes-operator
2920cf3d9ba5c63ef1af6d9e4a574995286f524e
[ "UPL-1.0", "MIT" ]
null
null
null
integration-tests/src/test/resources/model-in-image/scripts/verify-jdbc-resource.py
tanmaygarg-oracle/weblogic-kubernetes-operator
2920cf3d9ba5c63ef1af6d9e4a574995286f524e
[ "UPL-1.0", "MIT" ]
null
null
null
integration-tests/src/test/resources/model-in-image/scripts/verify-jdbc-resource.py
tanmaygarg-oracle/weblogic-kubernetes-operator
2920cf3d9ba5c63ef1af6d9e4a574995286f524e
[ "UPL-1.0", "MIT" ]
null
null
null
# Copyright (c) 2019, 2020, Oracle Corporation and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. connect('weblogic', 'welcome1', 't3://DOMAINNAME-admin-server:7001') # get all JDBC Properties dsCounter = 0 allJDBCResources = cmo.getJDBCSyst...
61.421053
184
0.711225
0
0
0
0
0
0
0
0
868
0.371894
a9a32c0822386523441969c6648b6dd0e0b1aae2
682
py
Python
Projeto_2/no.py
claudiodacruz/Projetos-ED
4495ed792be77f988b12c63f356f68ca709005fe
[ "MIT" ]
null
null
null
Projeto_2/no.py
claudiodacruz/Projetos-ED
4495ed792be77f988b12c63f356f68ca709005fe
[ "MIT" ]
null
null
null
Projeto_2/no.py
claudiodacruz/Projetos-ED
4495ed792be77f988b12c63f356f68ca709005fe
[ "MIT" ]
null
null
null
class No: def __init__(self, dado): self._dado = dado self._direita = None self._esquerda = None self._pai = None def get_dado(self): return self._dado def get_direita(self): return self._direita def get_esquerda(self): return self._...
22
42
0.592375
681
0.998534
0
0
0
0
0
0
0
0
a9a3856b6e71069b01f3d5066c6f323c68f21ce5
1,283
py
Python
tests/dao_tests/test_stored_sample_dao.py
all-of-us/raw-data-repository
d28ad957557587b03ff9c63d55dd55e0508f91d8
[ "BSD-3-Clause" ]
39
2017-10-13T19:16:27.000Z
2021-09-24T16:58:21.000Z
tests/test_stored_sample_dao.py
all-of-us/raw-data-repository
d28ad957557587b03ff9c63d55dd55e0508f91d8
[ "BSD-3-Clause" ]
312
2017-09-08T15:42:13.000Z
2022-03-23T18:21:40.000Z
tests/test_stored_sample_dao.py
all-of-us/raw-data-repository
d28ad957557587b03ff9c63d55dd55e0508f91d8
[ "BSD-3-Clause" ]
19
2017-09-15T13:58:00.000Z
2022-02-07T18:33:20.000Z
from rdr_service import clock from rdr_service.dao.biobank_stored_sample_dao import BiobankStoredSampleDao from rdr_service.dao.participant_dao import ParticipantDao from rdr_service.model.biobank_stored_sample import BiobankStoredSample from rdr_service.model.participant import Participant from tests.helpers.unittest_...
37.735294
92
0.694466
935
0.728761
0
0
0
0
0
0
111
0.086516
a9a3934109af932f3d04644fe8eb5b82a3bf255d
2,769
py
Python
server/pantryflask/__init__.py
jernaumorat/IntelligentPantry
33d1ee867a5b6e0169fb44918069fbec5bfde259
[ "MIT" ]
null
null
null
server/pantryflask/__init__.py
jernaumorat/IntelligentPantry
33d1ee867a5b6e0169fb44918069fbec5bfde259
[ "MIT" ]
null
null
null
server/pantryflask/__init__.py
jernaumorat/IntelligentPantry
33d1ee867a5b6e0169fb44918069fbec5bfde259
[ "MIT" ]
1
2021-11-11T09:25:34.000Z
2021-11-11T09:25:34.000Z
import socket, os, atexit from flask import Flask, jsonify, request from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask.helpers import send_from_directory, url_for from zeroconf import ServiceInfo, Zeroconf from pantryflask.config import FlaskConfig from pantryflask.auth import token_a...
29.457447
91
0.669195
0
0
0
0
1,340
0.483929
0
0
263
0.09498
8d10162b60dc80362847021a74c900fd613e0ff7
39,370
py
Python
lingua_franca/lang/parse_eu.py
OpenVoiceOS/ovos-lingua-franca
392cc37cbfde3b8d6f11258c1e148e63ba2fb951
[ "Apache-2.0" ]
null
null
null
lingua_franca/lang/parse_eu.py
OpenVoiceOS/ovos-lingua-franca
392cc37cbfde3b8d6f11258c1e148e63ba2fb951
[ "Apache-2.0" ]
13
2022-01-26T03:43:46.000Z
2022-03-25T17:00:18.000Z
lingua_franca/lang/parse_eu.py
OpenVoiceOS/ovos-lingua-franca
392cc37cbfde3b8d6f11258c1e148e63ba2fb951
[ "Apache-2.0" ]
1
2022-01-18T21:11:44.000Z
2022-01-18T21:11:44.000Z
# # Copyright 2017 Mycroft AI 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 required by applicable law or agreed to in writ...
36.218951
132
0.436297
0
0
0
0
0
0
0
0
7,733
0.196394
8d1326f81b702308f07d05eaa330ea71663f64ad
6,976
py
Python
path-generation/velocity_profile.py
iqzprvagbv/path-planning
c5b1099dbe1aadbd78a1fdb16c0a2f82245c19bc
[ "MIT" ]
null
null
null
path-generation/velocity_profile.py
iqzprvagbv/path-planning
c5b1099dbe1aadbd78a1fdb16c0a2f82245c19bc
[ "MIT" ]
1
2021-06-01T21:26:25.000Z
2021-06-01T21:26:25.000Z
path-generation/velocity_profile.py
iqzprvagbv/path-planning
c5b1099dbe1aadbd78a1fdb16c0a2f82245c19bc
[ "MIT" ]
null
null
null
# Defines a velocity profile, which is the big object we've been # working towards. from math import sqrt, ceil import json class PlanningPoint(object): # pylint: disable=too-many-instance-attributes # planning points unfortunately require this much data def __init__(self, position, time, radius, distanc...
38.32967
96
0.591886
6,845
0.981221
0
0
0
0
0
0
881
0.12629
8d1378b3e67d5a0964ccf48994e4da6105c0ae60
472
py
Python
move_py_files.py
rune-l/coco-annotator
a7ae8004c5e1ca74e5bbc41d09edc5cfab117a14
[ "MIT" ]
null
null
null
move_py_files.py
rune-l/coco-annotator
a7ae8004c5e1ca74e5bbc41d09edc5cfab117a14
[ "MIT" ]
null
null
null
move_py_files.py
rune-l/coco-annotator
a7ae8004c5e1ca74e5bbc41d09edc5cfab117a14
[ "MIT" ]
null
null
null
import os import subprocess test_set_path = '/Users/runelangergaard/Documents/SmartAnnotation/data/test_set' test_imgs = os.listdir(test_set_path) test_imgs cwd_path = '/Users/runelangergaard' os.chdir(cwd_path) for img in test_imgs: full_path = os.path.join(test_set_path, img) subprocess.run([ "scp",...
23.6
83
0.684322
0
0
0
0
0
0
0
0
187
0.396186
8d13e8253f51474a77c77b964813f16a0d1c345f
304
py
Python
examples/apply.py
PictElm/grom
52e28efad1edae447347dd396e80a665c283b05d
[ "Apache-2.0" ]
1
2019-06-29T18:53:31.000Z
2019-06-29T18:53:31.000Z
examples/apply.py
PictElm/grom
52e28efad1edae447347dd396e80a665c283b05d
[ "Apache-2.0" ]
null
null
null
examples/apply.py
PictElm/grom
52e28efad1edae447347dd396e80a665c283b05d
[ "Apache-2.0" ]
null
null
null
import random import grom grom.debug(False) dirName = "dump\\" inputName = "example.bmp" outputName = "output.bmp" g = grom.Genome(dirName + inputName, partition=[ ('head', 0x76), ('raw') ]) print(g) print(g.partition) g.apply(lambda x: 255 - x, ['raw']) g(dirName + outputName, pause=False)
16
48
0.661184
0
0
0
0
0
0
0
0
49
0.161184
8d14a69daed26d53510912624929725162594aec
3,351
py
Python
statefun-sdk-python/statefun/statefun_builder.py
MartijnVisser/flink-statefun
66b2fc5a178d916756428f65a197095fbb43f57d
[ "Apache-2.0" ]
null
null
null
statefun-sdk-python/statefun/statefun_builder.py
MartijnVisser/flink-statefun
66b2fc5a178d916756428f65a197095fbb43f57d
[ "Apache-2.0" ]
7
2022-02-24T17:20:28.000Z
2022-03-25T13:18:44.000Z
statefun-sdk-python/statefun/statefun_builder.py
MartijnVisser/flink-statefun
66b2fc5a178d916756428f65a197095fbb43f57d
[ "Apache-2.0" ]
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...
39.423529
118
0.640107
2,177
0.649657
0
0
0
0
0
0
1,709
0.509997
8d17091c2b65264aa06f866332b484a8ae11e68d
2,195
py
Python
Solutions/236.py
ruppysuppy/Daily-Coding-Problem-Solutions
37d061215a9af2ce39c51f8816c83039914c0d0b
[ "MIT" ]
70
2021-03-18T05:22:40.000Z
2022-03-30T05:36:50.000Z
Solutions/236.py
ungaro/Daily-Coding-Problem-Solutions
37d061215a9af2ce39c51f8816c83039914c0d0b
[ "MIT" ]
null
null
null
Solutions/236.py
ungaro/Daily-Coding-Problem-Solutions
37d061215a9af2ce39c51f8816c83039914c0d0b
[ "MIT" ]
30
2021-03-18T05:22:43.000Z
2022-03-17T10:25:18.000Z
""" Problem: You are given a list of N points (x1, y1), (x2, y2), ..., (xN, yN) representing a polygon. You can assume these points are given in order; that is, you can construct the polygon by connecting point 1 to point 2, point 2 to point 3, and so on, finally looping around to connect point N to point 1. Determin...
29.662162
87
0.596811
0
0
0
0
0
0
0
0
927
0.422323
8d199b44ca6bfd408aa35f9d1da7c224cc1e44a1
968
py
Python
tests/modules/generate/fake_package_repository_resolver.py
goldstar611/appimage-builder
62e4b8781e604545817eb47c058f5be0c0d27d15
[ "MIT" ]
155
2019-12-16T00:04:03.000Z
2022-03-28T11:22:55.000Z
tests/modules/generate/fake_package_repository_resolver.py
goldstar611/appimage-builder
62e4b8781e604545817eb47c058f5be0c0d27d15
[ "MIT" ]
151
2019-11-22T13:13:22.000Z
2022-03-30T21:27:32.000Z
tests/modules/generate/fake_package_repository_resolver.py
goldstar611/appimage-builder
62e4b8781e604545817eb47c058f5be0c0d27d15
[ "MIT" ]
28
2020-01-15T15:30:43.000Z
2022-03-22T08:58:06.000Z
# Copyright 2021 Alexis Lopez Zubieta # # 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 limitation the # rights to use, copy, modify, merge, publi...
44
93
0.759298
236
0.243802
0
0
0
0
0
0
698
0.721074
8d19a458c0aeddafe12f42faf41b63a52a85ae7f
2,546
py
Python
Oblig3/test_benchmark.py
fabiorodp/IN5550_Neural_Methods_in_Natural_Language_Processing
4d3b2ed56b56e016413ae1544e19ad2a2c0ef047
[ "MIT" ]
null
null
null
Oblig3/test_benchmark.py
fabiorodp/IN5550_Neural_Methods_in_Natural_Language_Processing
4d3b2ed56b56e016413ae1544e19ad2a2c0ef047
[ "MIT" ]
null
null
null
Oblig3/test_benchmark.py
fabiorodp/IN5550_Neural_Methods_in_Natural_Language_Processing
4d3b2ed56b56e016413ae1544e19ad2a2c0ef047
[ "MIT" ]
null
null
null
# Author: Fabio Rodrigues Pereira # E-mail: fabior@uio.no # Author: Per Morten Halvorsen # E-mail: pmhalvor@uio.no # Author: Eivind Grønlie Guren # E-mail: eivindgg@ifi.uio.no try: from Oblig3.packages.preprocess import load_raw_data, filter_raw_data, pad from Oblig3.packages.preprocess import OurCONLLUData...
24.480769
78
0.749411
0
0
0
0
0
0
0
0
598
0.234786
8d1acd1c8212f19c55510b4dd8c3544bf2548519
11,176
py
Python
test/test_box/test_box_storage.py
cmc333333/parsons
50804a3627117797570f1e9233c9bbad583f7831
[ "Apache-2.0" ]
null
null
null
test/test_box/test_box_storage.py
cmc333333/parsons
50804a3627117797570f1e9233c9bbad583f7831
[ "Apache-2.0" ]
2
2021-11-24T19:39:57.000Z
2022-01-03T23:03:35.000Z
test/test_box/test_box_storage.py
cmc333333/parsons
50804a3627117797570f1e9233c9bbad583f7831
[ "Apache-2.0" ]
null
null
null
import logging import os import random import string import unittest import warnings from boxsdk.exception import BoxAPIException, BoxOAuthException from parsons.box import Box from parsons.etl import Table """Prior to running, you should ensure that the relevant environment variables have been set, e.g. via # Note...
42.656489
97
0.642895
10,209
0.913475
0
0
10,296
0.92126
0
0
3,660
0.327487
8d1b66ad840bf7a208b29ea852c07fe8f18d11de
3,961
py
Python
Task2.py
sahil7pathak/Image_Segmentation_and_Point_Detection
7cf00f1c0a10ee0384eba7cbbb17f0779642cfa3
[ "MIT" ]
null
null
null
Task2.py
sahil7pathak/Image_Segmentation_and_Point_Detection
7cf00f1c0a10ee0384eba7cbbb17f0779642cfa3
[ "MIT" ]
null
null
null
Task2.py
sahil7pathak/Image_Segmentation_and_Point_Detection
7cf00f1c0a10ee0384eba7cbbb17f0779642cfa3
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np import cv2 '''Erosion Method''' def erosion(image, kernel): img_height = image.shape[0] img_width = image.shape[1] kernel_height = kernel.shape[0] kernel_width = kernel.shape[1] h = kernel_height//2 w = kernel_width//2 ...
30.705426
85
0.578642
0
0
0
0
0
0
0
0
819
0.206766
8d1f2e38cdfd31edc3acb7a262903d61da73d831
1,652
py
Python
Subjects/migrations/0001_initial.py
Mithzyl/Master-college-selecting-api
ec8f36067fb648238df4faeaa6a65e5a78740e6c
[ "MIT" ]
null
null
null
Subjects/migrations/0001_initial.py
Mithzyl/Master-college-selecting-api
ec8f36067fb648238df4faeaa6a65e5a78740e6c
[ "MIT" ]
null
null
null
Subjects/migrations/0001_initial.py
Mithzyl/Master-college-selecting-api
ec8f36067fb648238df4faeaa6a65e5a78740e6c
[ "MIT" ]
null
null
null
# Generated by Django 3.1.5 on 2021-02-07 08:19 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='FirstMajorSubject', fields=[ ('id', models....
35.148936
114
0.552663
1,559
0.943705
0
0
0
0
0
0
206
0.124697
8d1f97cb6d168a2c8e3c97a6da76772adf11469f
239
py
Python
app/__init__.py
pahumadad/flask-oauth
309e235da8d72bb4e33d6fb68eb90b2f5392823a
[ "MIT" ]
1
2017-04-27T09:23:48.000Z
2017-04-27T09:23:48.000Z
app/__init__.py
pahumadad/flask-oauth
309e235da8d72bb4e33d6fb68eb90b2f5392823a
[ "MIT" ]
null
null
null
app/__init__.py
pahumadad/flask-oauth
309e235da8d72bb4e33d6fb68eb90b2f5392823a
[ "MIT" ]
null
null
null
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager app = Flask(__name__) app.config.from_object('config') db = SQLAlchemy(app) lm = LoginManager(app) from app import views, models, oauth
21.727273
39
0.803347
0
0
0
0
0
0
0
0
8
0.033473
8d212f11594f7ae449b95c565655219888507326
511
py
Python
Python/toLowerCase.py
dianeyeo/LeetCode
b814831e7a4296a4e95785b75ea5c540a3fca63d
[ "MIT" ]
null
null
null
Python/toLowerCase.py
dianeyeo/LeetCode
b814831e7a4296a4e95785b75ea5c540a3fca63d
[ "MIT" ]
null
null
null
Python/toLowerCase.py
dianeyeo/LeetCode
b814831e7a4296a4e95785b75ea5c540a3fca63d
[ "MIT" ]
null
null
null
""" https://leetcode.com/problems/to-lower-case/ Difficulty: Easy Given a string s, return the string after replacing every uppercase letter with the same lowercase letter. Example 1: Input: s = "Hello" Output: "hello" Example 2: Input: s = "here" Output: "here" Example 3: Input: s = "LOVELY" Outp...
17.033333
106
0.661448
86
0.168297
0
0
0
0
0
0
422
0.825832
8d213f69d083136ed499e8028606ef1e8d49f01e
2,495
py
Python
covid_phylo/src/analysis.py
mrubio-chavarria/covidMonitor
8d59b17dbff46a781527de181f22b115565e5c2d
[ "MIT" ]
1
2021-03-22T17:05:52.000Z
2021-03-22T17:05:52.000Z
covid_phylo/src/analysis.py
mrubio-chavarria/covidMonitor
8d59b17dbff46a781527de181f22b115565e5c2d
[ "MIT" ]
6
2020-06-06T01:51:21.000Z
2022-01-13T02:39:02.000Z
covid_phylo/src/analysis.py
mrubio-chavarria/covidMonitor
8d59b17dbff46a781527de181f22b115565e5c2d
[ "MIT" ]
null
null
null
import align_tools as at import matplotlib.pyplot as plt import numpy as np from collections import Counter def h(x): if x>0: return 1 else: return 0 def get_counter(arr, lower_sat=None, upper_sat=None): result = {} for val in arr: if (upper_sat is None or val < upper_sat) and ...
34.178082
161
0.658116
0
0
0
0
0
0
0
0
441
0.176612
8d21b09432278f9368a292eca49b25d9da12e492
88
py
Python
apps/salt/apps.py
plsof/tabops_api
39f5d2fd5158ae0c22e43ab6ff7e2b07a68a62d8
[ "MIT" ]
1
2019-07-31T07:34:38.000Z
2019-07-31T07:34:38.000Z
apps/salt/apps.py
plsof/tabops_api
39f5d2fd5158ae0c22e43ab6ff7e2b07a68a62d8
[ "MIT" ]
9
2019-12-05T00:39:29.000Z
2022-02-10T14:13:29.000Z
apps/salt/apps.py
plsof/tabops_api
39f5d2fd5158ae0c22e43ab6ff7e2b07a68a62d8
[ "MIT" ]
null
null
null
from django.apps import AppConfig class SaltConfig(AppConfig): name = 'apps.salt'
14.666667
33
0.738636
51
0.579545
0
0
0
0
0
0
11
0.125
8d21d5ac301b7c2c83e332f0f0cea5a96ae6d81d
1,266
py
Python
pygears_vivado/vivmod.py
Anari-AI/pygears-vivado
a9d928d9914b479739ff8fc1e208813292c4b711
[ "MIT" ]
1
2022-03-19T02:11:12.000Z
2022-03-19T02:11:12.000Z
pygears_vivado/vivmod.py
Anari-AI/pygears-vivado
a9d928d9914b479739ff8fc1e208813292c4b711
[ "MIT" ]
null
null
null
pygears_vivado/vivmod.py
Anari-AI/pygears-vivado
a9d928d9914b479739ff8fc1e208813292c4b711
[ "MIT" ]
1
2021-06-01T13:21:12.000Z
2021-06-01T13:21:12.000Z
import os from pygears.hdl.sv import SVModuleInst from .ip_resolver import IPResolver class SVVivModuleInst(SVModuleInst): def __init__(self, node, lang=None): resolver = IPResolver(node) super().__init__(node, resolver.lang, resolver) @property def is_generated(self): return True...
30.878049
59
0.553712
1,177
0.9297
0
0
138
0.109005
0
0
207
0.163507
8d24383aba0b77760774f695ed82a4ade6ace738
1,841
py
Python
commodore/inventory/render.py
projectsyn/commodore
afd924a2aa8abb79cd6a8970ff225756469dd2b3
[ "BSD-3-Clause" ]
39
2019-12-17T13:40:19.000Z
2021-12-31T08:22:52.000Z
commodore/inventory/render.py
projectsyn/commodore
afd924a2aa8abb79cd6a8970ff225756469dd2b3
[ "BSD-3-Clause" ]
161
2020-02-14T18:32:49.000Z
2022-03-25T09:23:35.000Z
commodore/inventory/render.py
projectsyn/commodore
afd924a2aa8abb79cd6a8970ff225756469dd2b3
[ "BSD-3-Clause" ]
12
2019-12-18T15:43:09.000Z
2021-06-28T11:51:59.000Z
import shutil import tempfile from pathlib import Path from typing import Dict import click from commodore.config import Config from .parameters import ClassNotFound, InventoryFactory, InventoryFacts def _cleanup_work_dir(cfg: Config, work_dir: Path): if not cfg.debug: # Clean up work dir if we're not...
30.683333
86
0.674633
0
0
0
0
0
0
0
0
475
0.258012
8d2771d9640e1def0fa9d63283dfdac05afbee62
25,468
py
Python
nova/pci/stats.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
null
null
null
nova/pci/stats.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
null
null
null
nova/pci/stats.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
2
2017-07-20T17:31:34.000Z
2020-07-24T02:42:19.000Z
begin_unit comment|'# Copyright (c) 2013 Intel, Inc.' nl|'\n' comment|'# Copyright (c) 2013 OpenStack Foundation' nl|'\n' comment|'# All Rights Reserved.' nl|'\n' comment|'#' nl|'\n' comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may' nl|'\n' comment|'# not use this file except in ...
14.37246
1,148
0.61167
0
0
0
0
0
0
0
0
14,664
0.575781
8d29d50d0c950b859290e95b7cb057e02fb60ee8
4,045
py
Python
profit/models/torch/vae.py
ayushkarnawat/profit
f3c4d601078b52513af6832c3faf75ddafc59ac5
[ "MIT" ]
null
null
null
profit/models/torch/vae.py
ayushkarnawat/profit
f3c4d601078b52513af6832c3faf75ddafc59ac5
[ "MIT" ]
1
2021-09-15T13:13:12.000Z
2021-09-15T13:13:12.000Z
profit/models/torch/vae.py
ayushkarnawat/profit
f3c4d601078b52513af6832c3faf75ddafc59ac5
[ "MIT" ]
null
null
null
"""Variational autoencoder model.""" from typing import Tuple import torch from torch import nn from torch.nn import functional as F class BaseVAE(nn.Module): """Base class for creating variational autoencoders (VAEs). The module is designed to connect user-specified encoder/decoder layers to form a la...
36.116071
90
0.634611
3,904
0.965142
0
0
0
0
0
0
1,979
0.489246
8d2ae38a47c725cb399a9f327008d51a718980eb
2,037
py
Python
backend/export/views.py
dmryutov/otus-python-0319-final
de07f36ee4bbd57dbfb16defaf762b08ec41fb0e
[ "Apache-2.0" ]
null
null
null
backend/export/views.py
dmryutov/otus-python-0319-final
de07f36ee4bbd57dbfb16defaf762b08ec41fb0e
[ "Apache-2.0" ]
6
2020-06-05T23:05:14.000Z
2022-02-10T10:42:31.000Z
backend/export/views.py
dmryutov/otus-python-0319-final
de07f36ee4bbd57dbfb16defaf762b08ec41fb0e
[ "Apache-2.0" ]
null
null
null
from django.http.response import HttpResponse from rest_framework import serializers, viewsets from rest_framework.decorators import action from rest_framework.permissions import IsAuthenticated from .excel import Excel XLSX_MIME = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' class ExportVie...
32.333333
92
0.650957
1,731
0.849779
0
0
1,578
0.774669
0
0
725
0.355916
8d2b9627ee560b695980d399a9b852afb9663aac
1,593
py
Python
tests/test_clamp.py
josemolinagarcia/maya-math-nodes
1f83eef1d1efe0b0c3dbb1477ca31ed9f8911ee4
[ "MIT" ]
148
2018-01-12T20:30:45.000Z
2022-02-28T05:20:46.000Z
tests/test_clamp.py
josemolinagarcia/maya-math-nodes
1f83eef1d1efe0b0c3dbb1477ca31ed9f8911ee4
[ "MIT" ]
13
2018-01-17T18:02:13.000Z
2021-11-23T06:06:24.000Z
tests/test_clamp.py
josemolinagarcia/maya-math-nodes
1f83eef1d1efe0b0c3dbb1477ca31ed9f8911ee4
[ "MIT" ]
41
2018-01-16T01:41:29.000Z
2021-08-24T01:27:56.000Z
# Copyright (c) 2018 Serguei Kalentchouk et al. All rights reserved. # Use of this source code is governed by an MIT license that can be found in the LICENSE file. from node_test_case import NodeTestCase, cmds class TestClamp(NodeTestCase): def test_clamp(self): node = self.create_node('Clamp', {'input': ...
44.25
114
0.595731
1,380
0.86629
0
0
0
0
0
0
503
0.315756
8d2bec83c642f547afb331d447ae8ff19041fd5a
1,111
py
Python
src/tests/tests_get_formatted_items.py
kazqvaizer/checklistbot
f715280fbe7035bc2ce4f69cbf95595d9fe3a225
[ "MIT" ]
5
2020-10-06T13:42:45.000Z
2021-12-21T07:35:08.000Z
src/tests/tests_get_formatted_items.py
kazqvaizer/checklistbot
f715280fbe7035bc2ce4f69cbf95595d9fe3a225
[ "MIT" ]
null
null
null
src/tests/tests_get_formatted_items.py
kazqvaizer/checklistbot
f715280fbe7035bc2ce4f69cbf95595d9fe3a225
[ "MIT" ]
null
null
null
import pytest from models import TodoItem pytestmark = [ pytest.mark.usefixtures("use_db"), ] @pytest.fixture def chat(factory): return factory.chat() @pytest.fixture def items(factory, chat): return [ factory.item(chat=chat, text="Hello"), factory.item(chat=chat, text="Nice!"), ] ...
20.574074
74
0.640864
0
0
0
0
214
0.192619
0
0
103
0.092709
8d2cd1060b91fea7d66c9afe4a0c6e646802593b
3,945
py
Python
web/multilingual/database.py
mahoyen/web
1d190a86e3277315804bfcc0b8f9abd4f9c1d780
[ "MIT" ]
null
null
null
web/multilingual/database.py
mahoyen/web
1d190a86e3277315804bfcc0b8f9abd4f9c1d780
[ "MIT" ]
null
null
null
web/multilingual/database.py
mahoyen/web
1d190a86e3277315804bfcc0b8f9abd4f9c1d780
[ "MIT" ]
null
null
null
import copy import json from django.contrib import admin from django.db import models from web.multilingual.data_structures import MultiLingualTextStructure from web.multilingual.form import MultiLingualFormField, MultiLingualRichTextFormField, \ MultiLingualRichTextUploadingFormField from web.multilingual.widget...
39.848485
119
0.694043
3,529
0.89455
0
0
0
0
0
0
1,249
0.316603
8d2fec927240532eb03988da6b6277edf3bec73d
2,859
py
Python
cart/tests/test_views.py
mohsenamoon1160417237/ECommerce-app
4cca492214b04b56f625aef2a2979956a8256710
[ "MIT" ]
null
null
null
cart/tests/test_views.py
mohsenamoon1160417237/ECommerce-app
4cca492214b04b56f625aef2a2979956a8256710
[ "MIT" ]
null
null
null
cart/tests/test_views.py
mohsenamoon1160417237/ECommerce-app
4cca492214b04b56f625aef2a2979956a8256710
[ "MIT" ]
null
null
null
from django.test import TestCase from shop.models import Product from django.contrib.auth.models import User from coupons.forms import CouponForm class CartAddViewTest(TestCase): def setUp(self): self.data = {"quantity" : 2, "update" : False} self.product = Pro...
28.878788
77
0.550892
2,679
0.937041
0
0
0
0
0
0
233
0.081497
8d341997147380f82b39848b173c8f836285f331
2,134
py
Python
tests/conftest.py
gpontesss/botus_receptus
bf29f5f70a2e7ae3548a44287c636515f78e7e77
[ "BSD-3-Clause" ]
3
2019-04-15T01:45:46.000Z
2020-04-07T13:31:19.000Z
tests/conftest.py
gpontesss/botus_receptus
bf29f5f70a2e7ae3548a44287c636515f78e7e77
[ "BSD-3-Clause" ]
244
2020-04-20T22:10:23.000Z
2022-03-31T23:03:48.000Z
tests/conftest.py
gpontesss/botus_receptus
bf29f5f70a2e7ae3548a44287c636515f78e7e77
[ "BSD-3-Clause" ]
1
2021-11-08T08:52:32.000Z
2021-11-08T08:52:32.000Z
from __future__ import annotations import asyncio from typing import Any import asynctest.mock # type: ignore import pytest # type: ignore import pytest_mock._util # type: ignore pytest_mock._util._mock_module = asynctest.mock class EventLoopClockAdvancer: """ A helper object that when called will advan...
28.837838
79
0.680412
1,450
0.679475
0
0
436
0.204311
666
0.31209
915
0.428772
8d352ba96be56207cce46e2dc458765a09de6f97
1,247
py
Python
Shark_Training/pyimagesearch/preprocessing/meanpreprocessor.py
crpurcell/MQ_DPI_Release
97444513e8b8d48ec91ff8a43b9dfaed0da029f9
[ "MIT" ]
null
null
null
Shark_Training/pyimagesearch/preprocessing/meanpreprocessor.py
crpurcell/MQ_DPI_Release
97444513e8b8d48ec91ff8a43b9dfaed0da029f9
[ "MIT" ]
null
null
null
Shark_Training/pyimagesearch/preprocessing/meanpreprocessor.py
crpurcell/MQ_DPI_Release
97444513e8b8d48ec91ff8a43b9dfaed0da029f9
[ "MIT" ]
null
null
null
#=============================================================================# # # # MODIFIED: 15-Jan-2019 by C. Purcell # # # ...
35.628571
79
0.36648
753
0.603849
0
0
0
0
0
0
634
0.50842
8d36012ec39c8b5de0335c08778adaf22f20af3c
985
py
Python
aiida_quantumespresso/parsers/constants.py
unkcpz/aiida-quantumespresso
fbac0993bb8b6cdeba85717453debcf0ab062b5a
[ "MIT" ]
null
null
null
aiida_quantumespresso/parsers/constants.py
unkcpz/aiida-quantumespresso
fbac0993bb8b6cdeba85717453debcf0ab062b5a
[ "MIT" ]
null
null
null
aiida_quantumespresso/parsers/constants.py
unkcpz/aiida-quantumespresso
fbac0993bb8b6cdeba85717453debcf0ab062b5a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Physical or mathematical constants. Since every code has its own conversion units, this module defines what QE understands as for an eV or other quantities. Whenever possible, we try to use the constants defined in :py:mod:aiida.common.constants:, but if some constants are slightly differen...
31.774194
77
0.700508
0
0
0
0
0
0
0
0
786
0.79797
8d3e794674c7c132a4877a4a375649bf2399c45b
2,639
py
Python
venv/lib/python3.8/site-packages/keras/api/_v2/keras/applications/__init__.py
JIANG-CX/data_labeling
8d2470bbb537dfc09ed2f7027ed8ee7de6447248
[ "MIT" ]
1
2021-05-24T10:08:51.000Z
2021-05-24T10:08:51.000Z
venv/lib/python3.8/site-packages/keras/api/_v2/keras/applications/__init__.py
JIANG-CX/data_labeling
8d2470bbb537dfc09ed2f7027ed8ee7de6447248
[ "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/keras/api/_v2/keras/applications/__init__.py
JIANG-CX/data_labeling
8d2470bbb537dfc09ed2f7027ed8ee7de6447248
[ "MIT" ]
null
null
null
# This file is MACHINE GENERATED! Do not edit. # Generated by: tensorflow/python/tools/api/generator/create_python_api.py script. """Public API for tf.keras.applications namespace. """ from __future__ import print_function as _print_function import sys as _sys from keras.api._v2.keras.applications import densenet fr...
47.981818
82
0.869269
0
0
0
0
0
0
0
0
182
0.068966
8d3ebf8c27b4787edb5db6336b9fad286f003b92
97
py
Python
flash/vision/embedding/__init__.py
alvin-chang/lightning-flash
481d4d369ff0a5d8c2b2d9e4970c5608a92b3ff5
[ "Apache-2.0" ]
2
2021-06-25T08:42:36.000Z
2021-06-25T08:49:29.000Z
flash/vision/embedding/__init__.py
alvin-chang/lightning-flash
481d4d369ff0a5d8c2b2d9e4970c5608a92b3ff5
[ "Apache-2.0" ]
null
null
null
flash/vision/embedding/__init__.py
alvin-chang/lightning-flash
481d4d369ff0a5d8c2b2d9e4970c5608a92b3ff5
[ "Apache-2.0" ]
null
null
null
from flash.vision.embedding.image_embedder_model import ImageEmbedder, ImageEmbedderDataPipeline
48.5
96
0.907216
0
0
0
0
0
0
0
0
0
0
8d3f8941dd6434ce1537415533cd51f289916f52
5,554
py
Python
configstruct/config_struct.py
bradrf/configstruct
aeea8fbba1e2daa0a0c38eeb9622d1716c0bb3e8
[ "MIT" ]
null
null
null
configstruct/config_struct.py
bradrf/configstruct
aeea8fbba1e2daa0a0c38eeb9622d1716c0bb3e8
[ "MIT" ]
16
2016-10-13T09:53:46.000Z
2022-03-24T15:04:51.000Z
configstruct/config_struct.py
bradrf/configstruct
aeea8fbba1e2daa0a0c38eeb9622d1716c0bb3e8
[ "MIT" ]
null
null
null
import os import sys import logging from configparser import ConfigParser from .open_struct import OpenStruct from .section_struct import SectionStruct # TODO: use file lock when read/write def choose_theirs(section, option, mine, theirs): '''Always prefer values for keys from file.''' return theirs def c...
40.540146
100
0.659705
4,982
0.897011
0
0
0
0
0
0
2,203
0.396651
8d4042ed9b0586457ce903d2cc6db6a880c03485
10,327
py
Python
test_apps/python_app/tests/compiler_test.py
Origen-SDK/o2
5b0f9a6d113ddebc73c7ee224931e8b2d0301794
[ "MIT" ]
null
null
null
test_apps/python_app/tests/compiler_test.py
Origen-SDK/o2
5b0f9a6d113ddebc73c7ee224931e8b2d0301794
[ "MIT" ]
127
2019-11-23T17:09:35.000Z
2021-09-02T11:06:20.000Z
test_apps/python_app/tests/compiler_test.py
Origen-SDK/o2
5b0f9a6d113ddebc73c7ee224931e8b2d0301794
[ "MIT" ]
null
null
null
import origen # pylint: disable=import-error import pytest, pathlib, os, stat, abc from os import access, W_OK, X_OK, R_OK from tests.shared import clean_falcon, clean_compiler, tmp_dir def user_compiler(): ''' End users should access the compiler via ``origen.app.compiler``. ''' return origen.app.co...
39.117424
97
0.637165
8,743
0.846616
0
0
2,216
0.214583
0
0
1,614
0.156289
8d42c2702dd5a391e27f8a389f8a934778ba0c95
999
py
Python
api/api.py
devSessions/crvi
1ecc68d6c968294bcc5ceea747604ee237f6080c
[ "MIT" ]
25
2017-12-31T06:51:54.000Z
2021-11-17T11:29:30.000Z
api/api.py
amittomar-1/crvi
1ecc68d6c968294bcc5ceea747604ee237f6080c
[ "MIT" ]
23
2020-01-28T21:34:12.000Z
2022-03-11T23:11:54.000Z
api/api.py
amittomar-1/crvi
1ecc68d6c968294bcc5ceea747604ee237f6080c
[ "MIT" ]
11
2018-01-04T12:30:33.000Z
2020-12-01T18:08:59.000Z
from flask import Flask, jsonify, request import predict import socket app = Flask(__name__) @app.route('/') @app.route('/home') def home(): """Renders the home page.""" return ( "Welcome Guest!!!" ) #to spedicy route after url @app.route('/api', methods=['POST']) def get_tasks(): #get url fro...
19.211538
51
0.58959
0
0
0
0
684
0.684685
0
0
470
0.47047
8d4484e9d066b90a85e8763af3ea488f55a3ae34
68
py
Python
exe/__init__.py
whisperaven/0ops.exed
ab9f14868fec664fe78edab6fb7eb572b3048c58
[ "MIT" ]
10
2017-03-17T02:15:18.000Z
2019-10-26T23:54:21.000Z
exe/__init__.py
whisperaven/0ops
ab9f14868fec664fe78edab6fb7eb572b3048c58
[ "MIT" ]
1
2017-03-20T03:17:17.000Z
2017-03-20T04:04:26.000Z
exe/__init__.py
whisperaven/0ops
ab9f14868fec664fe78edab6fb7eb572b3048c58
[ "MIT" ]
3
2017-03-17T02:46:23.000Z
2018-04-14T15:49:56.000Z
# (c) 2016, Hao Feng <whisperaven@gmail.com> __version__ = '0.1.0'
17
44
0.661765
0
0
0
0
0
0
0
0
51
0.75
8d4492744de35276bcea0bf1ccb409c9aa59295e
418
py
Python
Special_Viewer.py
Akivamelka/unsupervised_mid_semester
5393185d7b0327bbb7cd4b3700d4d00704a5623f
[ "MIT" ]
null
null
null
Special_Viewer.py
Akivamelka/unsupervised_mid_semester
5393185d7b0327bbb7cd4b3700d4d00704a5623f
[ "MIT" ]
null
null
null
Special_Viewer.py
Akivamelka/unsupervised_mid_semester
5393185d7b0327bbb7cd4b3700d4d00704a5623f
[ "MIT" ]
null
null
null
from Dimension_Reduction import Viewer import pandas as pd view_tool = Viewer() reduc = 'pca' suffix = '5' data_plot = pd.read_csv(f"{reduc}_dim2_{suffix}.csv", delimiter=",") models = ['km', 'fuzz', 'gmm', 'dbsc', 'hier', 'spec' ] for model in models: print(model) labels = pd.read_csv(f"labels_{mo...
32.153846
72
0.669856
0
0
0
0
0
0
0
0
105
0.251196
8d481fde3510821315275850b3a25299bc9b350d
6,621
py
Python
pytumblr/types.py
9999years/pytumblr
fe9b2fb60866785141fc0deb5a357a773c0f4229
[ "Apache-2.0" ]
null
null
null
pytumblr/types.py
9999years/pytumblr
fe9b2fb60866785141fc0deb5a357a773c0f4229
[ "Apache-2.0" ]
null
null
null
pytumblr/types.py
9999years/pytumblr
fe9b2fb60866785141fc0deb5a357a773c0f4229
[ "Apache-2.0" ]
null
null
null
from collections import UserList from dataclasses import dataclass, field from datetime import datetime from typing import List, Dict, Any, Optional, Type DATE_FORMAT = '%Y-%m-%d %H:%M:%S %Z' def parse_date(tumblr_date: str) -> datetime: return datetime.strptime(tumblr_date, DATE_FORMAT) @dataclass class Link:...
19.247093
71
0.661683
5,493
0.829633
0
0
5,867
0.88612
0
0
263
0.039722
8d4876f42fc49dd8332e5b4739b6a7de0c8b9bb2
311
py
Python
simple_jobs_scraper.py
Engnation/Jobs-Scraper
6f8b1207731da9f187db406a5be6916774ba3bc5
[ "MIT" ]
null
null
null
simple_jobs_scraper.py
Engnation/Jobs-Scraper
6f8b1207731da9f187db406a5be6916774ba3bc5
[ "MIT" ]
null
null
null
simple_jobs_scraper.py
Engnation/Jobs-Scraper
6f8b1207731da9f187db406a5be6916774ba3bc5
[ "MIT" ]
null
null
null
from jobs_scraper import JobsScraper # Let's create a new JobsScraper object and perform the scraping for a given query. position_var = "Python" scraper = JobsScraper(country="ca", position=position_var, location="Toronto", pages=3) df = scraper.scrape() df.to_csv(rf'{position_var} jobs.csv', index = False)
34.555556
87
0.768489
0
0
0
0
0
0
0
0
131
0.421222
8d4a0164b56629bd4e65dd24b9c1a1fba70a5ea1
810
py
Python
mac/redRMacUpdater.py
PiRSquared17/r-orange
6bc383f1db3c10c59e16b39daffc44df904ce031
[ "Apache-2.0" ]
1
2019-04-15T13:50:30.000Z
2019-04-15T13:50:30.000Z
mac/redRMacUpdater.py
PiRSquared17/r-orange
6bc383f1db3c10c59e16b39daffc44df904ce031
[ "Apache-2.0" ]
null
null
null
mac/redRMacUpdater.py
PiRSquared17/r-orange
6bc383f1db3c10c59e16b39daffc44df904ce031
[ "Apache-2.0" ]
1
2016-01-21T23:00:21.000Z
2016-01-21T23:00:21.000Z
import tarfile, sys,os from PyQt4.QtCore import * from PyQt4.QtGui import * app = QApplication(sys.argv) try: zfile = tarfile.open(sys.argv[1], "r:gz" ) zfile.extractall(sys.argv[2]) zfile.close() mb = QMessageBox('Red-R Updated', "Red-R has been updated'", QMessageBox.Informa...
30
105
0.646914
0
0
0
0
0
0
0
0
117
0.144444
8d4be9a3c0385e4ebdfd3712a699e128c38acafc
9,346
py
Python
darknet_websocket_demo.py
wutianze/darknet-superb-service
fdee5a932c8a3898701c1e302e4642fbff853630
[ "MIT" ]
null
null
null
darknet_websocket_demo.py
wutianze/darknet-superb-service
fdee5a932c8a3898701c1e302e4642fbff853630
[ "MIT" ]
null
null
null
darknet_websocket_demo.py
wutianze/darknet-superb-service
fdee5a932c8a3898701c1e302e4642fbff853630
[ "MIT" ]
null
null
null
from ctypes import * #from multiprocessing import Process, Queue import queue import time from threading import Lock,Thread from fastapi import FastAPI from fastapi import Request from fastapi import WebSocket, WebSocketDisconnect import uvicorn #from yolo_service import * import socket import random from typing import...
35.003745
180
0.652044
873
0.092892
0
0
2,295
0.244201
1,912
0.203448
1,236
0.131517
8d4d42f7498f1a4af52daeaede069016fb2ef667
2,389
py
Python
tests/unit/test_sherman_morrison.py
willwheelera/pyqmc
0c8d1f308bbccb1560aa680a5a75e7a4fe7a69fb
[ "MIT" ]
44
2019-06-04T13:53:26.000Z
2022-03-31T08:36:30.000Z
tests/unit/test_sherman_morrison.py
willwheelera/pyqmc
0c8d1f308bbccb1560aa680a5a75e7a4fe7a69fb
[ "MIT" ]
121
2019-05-13T14:05:20.000Z
2022-02-16T19:24:37.000Z
tests/unit/test_sherman_morrison.py
willwheelera/pyqmc
0c8d1f308bbccb1560aa680a5a75e7a4fe7a69fb
[ "MIT" ]
35
2019-04-26T21:57:50.000Z
2022-02-14T07:56:34.000Z
import numpy as np from pyqmc.slater import sherman_morrison_row from pyqmc.slater import sherman_morrison_ms def test_sherman_morrison(): ratio_err, inv_err = run_sherman_morrison() assert ratio_err < 1e-13, f"ratios don't match {ratio_err}" assert inv_err < 1e-13, f"inverses don't match {inv_err}" ...
30.628205
78
0.631226
0
0
0
0
0
0
0
0
337
0.141063
8d4df1f93edc3b8bb4e583e03cb8610d1cc0439f
1,543
py
Python
script/licel-plotter.py
FedeVerstraeten/smn-lidar-controller
7850fd48702d5f2e00d07b499812b3b2fb2b7676
[ "MIT" ]
null
null
null
script/licel-plotter.py
FedeVerstraeten/smn-lidar-controller
7850fd48702d5f2e00d07b499812b3b2fb2b7676
[ "MIT" ]
1
2021-10-05T03:53:55.000Z
2021-10-05T03:53:55.000Z
script/licel-plotter.py
FedeVerstraeten/smnar-lidar-controller
7850fd48702d5f2e00d07b499812b3b2fb2b7676
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys import socket import time import numpy as np import matplotlib.pyplot as plt HOST = '10.49.234.234' PORT = 2055 def command_to_licel(licelcommand): data=None with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.connect((HOST, PORT)) s.sendall(bytes(licelcommand+...
24.109375
70
0.644848
0
0
0
0
0
0
0
0
389
0.252106
8d500786de7e53c7c13f50132e8ecbc760d095db
13,860
py
Python
horizon/openstack_dashboard/dashboards/identity/account/tables.py
yianjiajia/openstack_horizon
9e36a4c3648ef29d0df6912d990465f51d6124a6
[ "Apache-2.0" ]
null
null
null
horizon/openstack_dashboard/dashboards/identity/account/tables.py
yianjiajia/openstack_horizon
9e36a4c3648ef29d0df6912d990465f51d6124a6
[ "Apache-2.0" ]
null
null
null
horizon/openstack_dashboard/dashboards/identity/account/tables.py
yianjiajia/openstack_horizon
9e36a4c3648ef29d0df6912d990465f51d6124a6
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 Nebula, 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 required by applicable law or agree...
37.258065
165
0.581818
12,695
0.915945
0
0
956
0.068975
0
0
3,529
0.254618
8d5291b6a1ce7e03aab2c5b10e8c178dc0212bb3
2,278
py
Python
3Sum.py
Muthu2093/Algorithms-practice
999434103a9098a4361104fd39cba5913860fa9d
[ "MIT" ]
null
null
null
3Sum.py
Muthu2093/Algorithms-practice
999434103a9098a4361104fd39cba5913860fa9d
[ "MIT" ]
null
null
null
3Sum.py
Muthu2093/Algorithms-practice
999434103a9098a4361104fd39cba5913860fa9d
[ "MIT" ]
null
null
null
## Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. ## Note: ## The solution set must not contain duplicate triplets. ## Example: ## Given array nums = [-1, 0, 1, 2, -1, -4], ## A solution set is: ## [ ## ...
27.780488
164
0.368306
1,893
0.830992
0
0
0
0
0
0
459
0.201493
8d52b06f889e9040ed2102aec6867ed5ea6a3b70
684
py
Python
moim/models.py
gyukebox/django-tutorial-moim
ea9bea85dadf22bff58ae26ee1ac59171bbe0240
[ "MIT" ]
null
null
null
moim/models.py
gyukebox/django-tutorial-moim
ea9bea85dadf22bff58ae26ee1ac59171bbe0240
[ "MIT" ]
4
2018-01-01T09:26:30.000Z
2018-01-06T07:13:01.000Z
moim/models.py
gyukebox/django-tutorial-moim
ea9bea85dadf22bff58ae26ee1ac59171bbe0240
[ "MIT" ]
null
null
null
from django.db import models from user.models import UserModel class MoimModel(models.Model): title = models.CharField(max_length=20) creator = models.ForeignKey(UserModel, on_delete=models.CASCADE) created_at = models.DateTimeField(auto_now_add=True) starts_at = models.DateTimeField() max_attende...
36
68
0.730994
618
0.903509
0
0
0
0
0
0
34
0.049708
8d5338ad6760bdfbd08440494b1ea9d0eab1dc53
1,809
py
Python
developers_chamber/scripts/gitlab.py
dstlmrk/developers-chamber
93f928048f57c049f1c85446d18078b73376462a
[ "MIT" ]
8
2019-08-23T15:46:30.000Z
2021-03-23T20:12:21.000Z
developers_chamber/scripts/gitlab.py
dstlmrk/developers-chamber
93f928048f57c049f1c85446d18078b73376462a
[ "MIT" ]
14
2019-09-17T20:24:18.000Z
2021-05-18T21:10:12.000Z
developers_chamber/scripts/gitlab.py
dstlmrk/developers-chamber
93f928048f57c049f1c85446d18078b73376462a
[ "MIT" ]
6
2019-08-23T15:46:21.000Z
2022-02-18T11:01:18.000Z
import os import click from developers_chamber.git_utils import get_current_branch_name from developers_chamber.gitlab_utils import \ create_merge_request as create_merge_request_func from developers_chamber.scripts import cli DEFAULT_API_URL = os.environ.get('GITLAB_API_URL', 'https://gitlab.com/api/v4') DEFAUL...
38.489362
116
0.726368
0
0
0
0
1,320
0.729685
0
0
585
0.323383
8d5577a30127caeb2ef24f4e9b841abc050103d0
15,790
py
Python
tests_pytest/state_machines/autoinstall/test_autoinstall_smbase.py
tessia-project/tessia
b9ded8dc7f0b9a7a0ea00d95b5ccc4af4d2e7540
[ "Apache-2.0" ]
5
2020-06-04T10:20:33.000Z
2020-10-26T15:09:19.000Z
tests_pytest/state_machines/autoinstall/test_autoinstall_smbase.py
tessia-project/tessia
b9ded8dc7f0b9a7a0ea00d95b5ccc4af4d2e7540
[ "Apache-2.0" ]
null
null
null
tests_pytest/state_machines/autoinstall/test_autoinstall_smbase.py
tessia-project/tessia
b9ded8dc7f0b9a7a0ea00d95b5ccc4af4d2e7540
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 IBM Corp. # # 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, sof...
34.326087
82
0.664155
3,663
0.231982
499
0.031602
2,804
0.177581
0
0
5,652
0.357948
8d5578255a37005da9d4bcc07955742be9a91579
2,261
py
Python
tests/test_command/test_cat_command.py
bbglab/openvariant
ea1e1b6edf0486b0dea34f43227ba333df1071cc
[ "BSD-3-Clause" ]
null
null
null
tests/test_command/test_cat_command.py
bbglab/openvariant
ea1e1b6edf0486b0dea34f43227ba333df1071cc
[ "BSD-3-Clause" ]
null
null
null
tests/test_command/test_cat_command.py
bbglab/openvariant
ea1e1b6edf0486b0dea34f43227ba333df1071cc
[ "BSD-3-Clause" ]
null
null
null
import unittest from os import getcwd from click.testing import CliRunner from openvariant.commands.openvar import cat class TestCatCommand(unittest.TestCase): def test_cat_command(self): runner = CliRunner() result = runner.invoke(cat, [f'{getcwd()}/tests/data/dataset']) self.assertEqu...
37.065574
121
0.640867
2,137
0.945157
0
0
0
0
0
0
531
0.234852
8d559eab2b8075257716e7bc85f5c9d82b0d3221
4,766
py
Python
resnet.py
rVSaxena/VAE
26aa3452a0c8f663153d8cfc8bf1686e242d2fac
[ "Unlicense" ]
null
null
null
resnet.py
rVSaxena/VAE
26aa3452a0c8f663153d8cfc8bf1686e242d2fac
[ "Unlicense" ]
null
null
null
resnet.py
rVSaxena/VAE
26aa3452a0c8f663153d8cfc8bf1686e242d2fac
[ "Unlicense" ]
null
null
null
import torch import torch.nn as nn class ResidualEncoderBlock(nn.Module): """ Implements ResidualBlock for rectangular feature maps with input shape == output shape OR input shape == (output shape)*2 ie in all dimensions (except the batch dimension). In the latter case, input_shape must be even i...
34.042857
170
0.640579
4,724
0.991188
0
0
0
0
0
0
1,479
0.310323
8d56bf9a638e31e26421d0d5ccd052c3c7de5f95
246
py
Python
camknows/camknows.py
dreoporto/camknows
769aeb91ff16ff654aa1b182f3564dd26a0f7ad6
[ "MIT" ]
2
2021-09-20T12:29:57.000Z
2021-09-28T11:09:06.000Z
camknows/camknows.py
dreoporto/camknows
769aeb91ff16ff654aa1b182f3564dd26a0f7ad6
[ "MIT" ]
null
null
null
camknows/camknows.py
dreoporto/camknows
769aeb91ff16ff654aa1b182f3564dd26a0f7ad6
[ "MIT" ]
null
null
null
from camera import Camera def main() -> None: try: camera = Camera() camera.start_camera_loop() except KeyboardInterrupt: print('Application closed (KeyboardInterrupt)') if __name__ == '__main__': main()
15.375
55
0.630081
0
0
0
0
0
0
0
0
50
0.203252