hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
71d8ae81fc5cc4e5cfdae9050c0caf054c81bfb5 | 48 | py | Python | GermanOK/run.py | romainledru/GermanOK | 77bc86de0eabbd3d7413382a288fea286d608540 | [
"MIT"
] | null | null | null | GermanOK/run.py | romainledru/GermanOK | 77bc86de0eabbd3d7413382a288fea286d608540 | [
"MIT"
] | null | null | null | GermanOK/run.py | romainledru/GermanOK | 77bc86de0eabbd3d7413382a288fea286d608540 | [
"MIT"
] | null | null | null | from Pages import *
app = App()
app.mainloop()
| 9.6 | 19 | 0.666667 |
71d94b479d90dc462de92906e5d1f18653ee665b | 433 | py | Python | cauldron/cli/server/routes/ui_statuses.py | JohnnyPeng18/cauldron | 09120c2a4cef65df46f8c0c94f5d79395b3298cd | [
"MIT"
] | 90 | 2016-09-02T15:11:10.000Z | 2022-01-02T11:37:57.000Z | cauldron/cli/server/routes/ui_statuses.py | JohnnyPeng18/cauldron | 09120c2a4cef65df46f8c0c94f5d79395b3298cd | [
"MIT"
] | 86 | 2016-09-23T16:52:22.000Z | 2022-03-31T21:39:56.000Z | cauldron/cli/server/routes/ui_statuses.py | JohnnyPeng18/cauldron | 09120c2a4cef65df46f8c0c94f5d79395b3298cd | [
"MIT"
] | 261 | 2016-12-22T05:36:48.000Z | 2021-11-26T12:40:42.000Z | import flask
from cauldron.cli.server import run as server_runner
from cauldron.ui import arguments
from cauldron.ui import statuses
| 28.866667 | 64 | 0.750577 |
71dbada9e9753ae2bf8f715ece9e73e4bfe13daa | 418 | py | Python | google_search.py | Jaram2019/minwoo | d98ce8a84675281e237368cbe97d8a2120ce5840 | [
"MIT"
] | null | null | null | google_search.py | Jaram2019/minwoo | d98ce8a84675281e237368cbe97d8a2120ce5840 | [
"MIT"
] | null | null | null | google_search.py | Jaram2019/minwoo | d98ce8a84675281e237368cbe97d8a2120ce5840 | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
import re
rq = requests.get("https://play.google.com/store/apps/category/GAME_MUSIC?hl=ko")
rqctnt = rq.content
soup = BeautifulSoup(rqctnt,"html.parser")
soup = soup.find_all(attrs={'class':'title'})
blacklsit = ["","/TV","","","","",""]
for link in soup:
if link.te... | 24.588235 | 81 | 0.674641 |
71dbf8ffa644ff16bfd38b31d3b7d01cb8ab4ea8 | 203 | py | Python | pygall/tests/test_photos.py | bbinet/PyGall | 4d83165e50ca927d664aa6b7b716eb8f484c3cd6 | [
"BSD-3-Clause"
] | 1 | 2021-05-09T16:43:49.000Z | 2021-05-09T16:43:49.000Z | pygall/tests/test_photos.py | bbinet/PyGall | 4d83165e50ca927d664aa6b7b716eb8f484c3cd6 | [
"BSD-3-Clause"
] | null | null | null | pygall/tests/test_photos.py | bbinet/PyGall | 4d83165e50ca927d664aa6b7b716eb8f484c3cd6 | [
"BSD-3-Clause"
] | 3 | 2015-10-04T20:53:04.000Z | 2017-11-20T21:51:21.000Z | from unittest import TestCase
from pyramid import testing
| 14.5 | 37 | 0.679803 |
71dd434a3adaa696a17ec425e131077b6639bbec | 2,995 | py | Python | Chapter_4/lists_data_type.py | alenasf/AutomateTheBoringStuff | 041e56221eb98d9893c24d22497034e6344c0490 | [
"Apache-2.0"
] | null | null | null | Chapter_4/lists_data_type.py | alenasf/AutomateTheBoringStuff | 041e56221eb98d9893c24d22497034e6344c0490 | [
"Apache-2.0"
] | null | null | null | Chapter_4/lists_data_type.py | alenasf/AutomateTheBoringStuff | 041e56221eb98d9893c24d22497034e6344c0490 | [
"Apache-2.0"
] | null | null | null | #Negative Indexes
spam = ['cat', 'bat', 'rat', 'elephant']
spam[-1] # elepant
spam[-3] # bat
# Getting a List from another List with Slices
spam = ['cat', 'bat', 'rat', 'elephant']
spam[0:4] # ['cat', 'bat', 'rat', 'elephant']
spam[1:3] # ['bat', 'rat']
spam[0:-1] # ['cat', 'bat', 'rat']
spam[:2] # ['cat', 'bat']
spa... | 26.043478 | 94 | 0.600334 |
71de0e1236a03e6cfb4186e21a5012996969d350 | 130 | py | Python | WebVisualizations/data.py | chuhaovince/Web-Design-Challenge | 1826a0e2dfbe4e11feb78f0ecce02e0f8a0a7eb5 | [
"ADSL"
] | null | null | null | WebVisualizations/data.py | chuhaovince/Web-Design-Challenge | 1826a0e2dfbe4e11feb78f0ecce02e0f8a0a7eb5 | [
"ADSL"
] | null | null | null | WebVisualizations/data.py | chuhaovince/Web-Design-Challenge | 1826a0e2dfbe4e11feb78f0ecce02e0f8a0a7eb5 | [
"ADSL"
] | null | null | null | import pandas as pd
path = "Resources/cities.csv"
data = pd.read_csv(path)
data_html = data.to_html("data.html", bold_rows = True) | 32.5 | 55 | 0.746154 |
71dfbd47e154641ea34b44a5f3aa8459312d608f | 3,268 | py | Python | qemu/scripts/codeconverter/codeconverter/test_patching.py | hyunjoy/scripts | 01114d3627730d695b5ebe61093c719744432ffa | [
"Apache-2.0"
] | 44 | 2022-03-16T08:32:31.000Z | 2022-03-31T16:02:35.000Z | qemu/scripts/codeconverter/codeconverter/test_patching.py | hyunjoy/scripts | 01114d3627730d695b5ebe61093c719744432ffa | [
"Apache-2.0"
] | 1 | 2022-03-29T02:30:28.000Z | 2022-03-30T03:40:46.000Z | qemu/scripts/codeconverter/codeconverter/test_patching.py | hyunjoy/scripts | 01114d3627730d695b5ebe61093c719744432ffa | [
"Apache-2.0"
] | 18 | 2022-03-19T04:41:04.000Z | 2022-03-31T03:32:12.000Z | # Copyright (C) 2020 Red Hat Inc.
#
# Authors:
# Eduardo Habkost <ehabkost@redhat.com>
#
# This work is licensed under the terms of the GNU GPL, version 2. See
# the COPYING file in the top-level directory.
from tempfile import NamedTemporaryFile
from .patching import FileInfo, FileMatch, Patch, FileList
from .regexp... | 31.12381 | 71 | 0.597613 |
71e063f198be6d799932aa28d7e46247d3e2c98f | 634 | py | Python | Traversy Media/Python Django Dev to Deployment/Python Fundamentals/Tuples and Sets.py | Anim-101/CourseHub | 570ddc2bca794c14921991d24fdf1b4a7d0beb68 | [
"MIT"
] | 3 | 2019-11-01T17:07:13.000Z | 2020-04-01T10:27:05.000Z | Traversy Media/Python Django Dev to Deployment/Python Fundamentals/Tuples and Sets.py | Anim-101/CourseHub | 570ddc2bca794c14921991d24fdf1b4a7d0beb68 | [
"MIT"
] | 18 | 2020-08-10T05:11:24.000Z | 2021-12-03T15:13:40.000Z | Traversy Media/Python Django Dev to Deployment/Python Fundamentals/Tuples and Sets.py | Anim-101/CourseHub | 570ddc2bca794c14921991d24fdf1b4a7d0beb68 | [
"MIT"
] | null | null | null | # # Simple Tuple
# fruits = ('Apple', 'Orange', 'Mango')
# # Using Constructor
# fruits = tuple(('Apple', 'Orange', 'Mango'))
# # Getting a Single Value
# print(fruits[1])
# Trying to change based on position
# fruits[1] = 'Grape'
# Tuples with one value should have trailing comma
# fruits = ('Apple')
# fruits = ('... | 16.25641 | 50 | 0.652997 |
71e0e6976164ccf999455f35ac70c3e13a0fe3ef | 20,146 | py | Python | nerblackbox/modules/ner_training/metrics/ner_metrics.py | flxst/nerblackbox | 7612b95850e637be258f6bfb01274453b7372f99 | [
"Apache-2.0"
] | null | null | null | nerblackbox/modules/ner_training/metrics/ner_metrics.py | flxst/nerblackbox | 7612b95850e637be258f6bfb01274453b7372f99 | [
"Apache-2.0"
] | null | null | null | nerblackbox/modules/ner_training/metrics/ner_metrics.py | flxst/nerblackbox | 7612b95850e637be258f6bfb01274453b7372f99 | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass
from dataclasses import asdict
from typing import List, Tuple, Callable
import numpy as np
from sklearn.metrics import accuracy_score as accuracy_sklearn
from sklearn.metrics import precision_score as precision_sklearn
from sklearn.metrics import recall_score as recall_sklearn
from sk... | 36.299099 | 116 | 0.538469 |
71e128bd284f8fc2eb997551cf3f8ee9632b562a | 2,192 | py | Python | Assignments/hw4/rank_feat_by_chi_square.py | spacemanidol/CLMS572 | f0380de9912c984ec21607cdb3b1f190853c5ca8 | [
"MIT"
] | null | null | null | Assignments/hw4/rank_feat_by_chi_square.py | spacemanidol/CLMS572 | f0380de9912c984ec21607cdb3b1f190853c5ca8 | [
"MIT"
] | null | null | null | Assignments/hw4/rank_feat_by_chi_square.py | spacemanidol/CLMS572 | f0380de9912c984ec21607cdb3b1f190853c5ca8 | [
"MIT"
] | 1 | 2020-12-26T01:28:41.000Z | 2020-12-26T01:28:41.000Z | import sys
if __name__ == "__main__":
data, all_features, labelCount= readInput()
results = rankByChiSquared(data, all_features, labelCount) | 56.205128 | 323 | 0.656022 |
71e26509acc4657f75e6829c9ddc1b7eeabb62a1 | 2,530 | py | Python | Files/joinfiles.py | LeoCruzG/4chan-thread-downloader | d449e50fc7f2a6273a11da3d8ff2f46aad4951d2 | [
"MIT"
] | null | null | null | Files/joinfiles.py | LeoCruzG/4chan-thread-downloader | d449e50fc7f2a6273a11da3d8ff2f46aad4951d2 | [
"MIT"
] | null | null | null | Files/joinfiles.py | LeoCruzG/4chan-thread-downloader | d449e50fc7f2a6273a11da3d8ff2f46aad4951d2 | [
"MIT"
] | null | null | null | # Importamos la librera para leer archivos json
import json
# Abrimos el archivo master en modo lectura ('r') con todos los id de los archivos descargados
with open('master.json', 'r') as f:
# Guardamos en la variable lista el contenido de master
lista = json.load(f)
# En este ejemplo se representa cmo se asi... | 42.166667 | 94 | 0.633992 |
71e353fb7e64c4a4a126f497726d3763f4f1a40c | 2,860 | py | Python | pycopula/archimedean_generators.py | SvenSerneels/pycopula | 27c703ab0d25356f6e78b7cc16c8ece1ed80f871 | [
"Apache-2.0"
] | 2 | 2020-05-09T21:08:34.000Z | 2021-02-23T06:58:51.000Z | pycopula/archimedean_generators.py | SvenSerneels/pycopula | 27c703ab0d25356f6e78b7cc16c8ece1ed80f871 | [
"Apache-2.0"
] | null | null | null | pycopula/archimedean_generators.py | SvenSerneels/pycopula | 27c703ab0d25356f6e78b7cc16c8ece1ed80f871 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file contains the generators and their inverses for common archimedean copulas.
"""
import numpy as np
| 37.142857 | 114 | 0.642308 |
71e38c0bb4ea71106c0ea08a5cac097ca0ed5c4c | 126 | py | Python | app/admin/__init__.py | blackboard/BBDN-Base-Python-Flask | 710b82bfb45217798d9e9edda13d5e0f632e2284 | [
"MIT"
] | null | null | null | app/admin/__init__.py | blackboard/BBDN-Base-Python-Flask | 710b82bfb45217798d9e9edda13d5e0f632e2284 | [
"MIT"
] | 2 | 2022-03-16T01:34:51.000Z | 2022-03-16T01:34:56.000Z | app/admin/__init__.py | Eddyjim/BB-BaseTool | 39fd41cc503b7c31886426b8b017c5f9acfe5072 | [
"MIT"
] | null | null | null | """
"""
from admin import routes
def init_app(app):
"""
:param app:
:return:
"""
routes.init_app(app)
| 9 | 24 | 0.52381 |
71e43b48b96fcad3e7e8029cf7b4f49e58e53fda | 243 | py | Python | output/models/nist_data/list_pkg/decimal/schema_instance/nistschema_sv_iv_list_decimal_pattern_2_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/list_pkg/decimal/schema_instance/nistschema_sv_iv_list_decimal_pattern_2_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/list_pkg/decimal/schema_instance/nistschema_sv_iv_list_decimal_pattern_2_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.nist_data.list_pkg.decimal.schema_instance.nistschema_sv_iv_list_decimal_pattern_2_xsd.nistschema_sv_iv_list_decimal_pattern_2 import NistschemaSvIvListDecimalPattern2
__all__ = [
"NistschemaSvIvListDecimalPattern2",
]
| 40.5 | 186 | 0.888889 |
e07b1d529111d4e2e89b3b1cd2c58ff9446e312f | 6,642 | py | Python | fem/fem.py | Pengeace/DGP-PDE-FEM | 64b7f42ca7083b05f05c42baa6cad21084068d8c | [
"MIT"
] | 7 | 2019-06-26T07:25:33.000Z | 2021-06-25T03:40:22.000Z | fem/fem.py | Pengeace/DGP-PDE-FEM | 64b7f42ca7083b05f05c42baa6cad21084068d8c | [
"MIT"
] | null | null | null | fem/fem.py | Pengeace/DGP-PDE-FEM | 64b7f42ca7083b05f05c42baa6cad21084068d8c | [
"MIT"
] | null | null | null | import numpy as np
import pyamg
from scipy import sparse
from scipy.spatial import Delaunay
from linsolver import sparse_solver
from triangulation.delaunay import delaunay
| 40.012048 | 141 | 0.643029 |
e07c0e48507e0965db82bd0823c76af3d0ebb993 | 2,745 | py | Python | custom_components/tahoma/climate_devices/dimmer_exterior_heating.py | MatthewFlamm/ha-tahoma | 794e8e4a54a8e5f55622b88bb1ab5ffc3ecb0d1b | [
"MIT"
] | null | null | null | custom_components/tahoma/climate_devices/dimmer_exterior_heating.py | MatthewFlamm/ha-tahoma | 794e8e4a54a8e5f55622b88bb1ab5ffc3ecb0d1b | [
"MIT"
] | null | null | null | custom_components/tahoma/climate_devices/dimmer_exterior_heating.py | MatthewFlamm/ha-tahoma | 794e8e4a54a8e5f55622b88bb1ab5ffc3ecb0d1b | [
"MIT"
] | null | null | null | """Support for Atlantic Electrical Heater IO controller."""
import logging
from typing import List
from homeassistant.components.climate import ClimateEntity
from homeassistant.components.climate.const import (
HVAC_MODE_HEAT,
HVAC_MODE_OFF,
SUPPORT_TARGET_TEMPERATURE,
)
from homeassistant.const import ATT... | 31.918605 | 82 | 0.687796 |
e07c5c23f946a28e4cc418a3bd4c6debbb0d6123 | 3,271 | py | Python | elit/components/mtl/attn/joint_encoder.py | emorynlp/stem-cell-hypothesis | 48a628093d93d653865fbac6409d179cddd99293 | [
"Apache-2.0"
] | 4 | 2021-09-17T15:23:31.000Z | 2022-02-28T10:18:04.000Z | elit/components/mtl/attn/joint_encoder.py | emorynlp/stem-cell-hypothesis | 48a628093d93d653865fbac6409d179cddd99293 | [
"Apache-2.0"
] | null | null | null | elit/components/mtl/attn/joint_encoder.py | emorynlp/stem-cell-hypothesis | 48a628093d93d653865fbac6409d179cddd99293 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
# Author: hankcs
# Date: 2021-03-02 13:32
from typing import Optional, Union, Dict, Any
import torch
from torch import nn
from transformers import PreTrainedTokenizer
from elit.components.mtl.attn.attn import TaskAttention
from elit.components.mtl.attn.transformer import JointEncoder
from elit.... | 53.622951 | 120 | 0.63956 |
e07c7e8ff8aa0c1088ab724943f3572b8b2fff02 | 68 | py | Python | simulation/sensors/__init__.py | salinsiim/petssa-simulation | 8f0f128d462831f86664bb8d246f2c7b659a0b8d | [
"MIT"
] | null | null | null | simulation/sensors/__init__.py | salinsiim/petssa-simulation | 8f0f128d462831f86664bb8d246f2c7b659a0b8d | [
"MIT"
] | null | null | null | simulation/sensors/__init__.py | salinsiim/petssa-simulation | 8f0f128d462831f86664bb8d246f2c7b659a0b8d | [
"MIT"
] | null | null | null | from sensors.sensors import sense_characteristics, sense_pedestrians | 68 | 68 | 0.911765 |
e07ce9c764d3c52f1697472892d9c4a14a2d9b6a | 5,140 | py | Python | jaxrl/agents/sac_v1/sac_v1_learner.py | anuragajay/jaxrl | a37414aea9e281f19719ccfc09702b32e1ef4e44 | [
"MIT"
] | 157 | 2021-03-12T04:30:53.000Z | 2021-06-10T11:28:48.000Z | jaxrl/agents/sac_v1/sac_v1_learner.py | anuragajay/jaxrl | a37414aea9e281f19719ccfc09702b32e1ef4e44 | [
"MIT"
] | 3 | 2021-09-23T21:13:28.000Z | 2021-11-19T12:32:34.000Z | jaxrl/agents/sac_v1/sac_v1_learner.py | anuragajay/jaxrl | a37414aea9e281f19719ccfc09702b32e1ef4e44 | [
"MIT"
] | 17 | 2021-06-15T13:38:35.000Z | 2022-03-17T15:25:23.000Z | """Implementations of algorithms for continuous control."""
import functools
from typing import Optional, Sequence, Tuple
import jax
import jax.numpy as jnp
import numpy as np
import optax
from jaxrl.agents.sac import temperature
from jaxrl.agents.sac.actor import update as update_actor
from jaxrl.agents.sac.critic ... | 35.694444 | 107 | 0.596887 |
e07cfc67fee77a3b15475a7b5db3f7fe4ab08200 | 14,515 | py | Python | rbc/libfuncs.py | plures/rbc | 57c170c148000e7b56f0cda2f0dbea7bdcfa0e1b | [
"BSD-3-Clause"
] | 1 | 2019-02-15T14:14:58.000Z | 2019-02-15T14:14:58.000Z | rbc/libfuncs.py | plures/rbc | 57c170c148000e7b56f0cda2f0dbea7bdcfa0e1b | [
"BSD-3-Clause"
] | null | null | null | rbc/libfuncs.py | plures/rbc | 57c170c148000e7b56f0cda2f0dbea7bdcfa0e1b | [
"BSD-3-Clause"
] | null | null | null | """Collections of library function names.
"""
def drop_suffix(f):
s = f.rsplit('.', 1)[-1]
if s in ['p0i8', 'f64', 'f32', 'i1', 'i8', 'i16', 'i32', 'i64', 'i128']:
f = f[:-len(s)-1]
return drop_suffix(f)
return f
def get_llvm_name(f, prefix='llvm.'):
"""Return normalized name of... | 46.822581 | 98 | 0.759904 |
e07d1faf3d069567748feca41784098709e225b2 | 1,143 | py | Python | quick_pandas.py | chenmich/google-ml-crash-course-exercises | d610f890d53b1537a3ce80531ce1ff2df1f5dc84 | [
"MIT"
] | null | null | null | quick_pandas.py | chenmich/google-ml-crash-course-exercises | d610f890d53b1537a3ce80531ce1ff2df1f5dc84 | [
"MIT"
] | null | null | null | quick_pandas.py | chenmich/google-ml-crash-course-exercises | d610f890d53b1537a3ce80531ce1ff2df1f5dc84 | [
"MIT"
] | null | null | null | import pandas as pd
print(pd.__version__)
city_names = pd.Series(['San Francisco', 'San Jose', 'Sacramento'])
population = pd.Series([852469, 1015785, 485199])
#city_population_table = pd.DataFrame(({'City name': city_names, 'Population': population}))
california_houseing_dataframe = pd.read_csv("https://storage.google... | 40.821429 | 130 | 0.750656 |
e07ee60ec4a6fab177a6c8363ef9dc2508bf69c5 | 91 | py | Python | src/helloworld/__main__.py | paulproteus/briefcase-toga-button-app-with-hacks | 61ec41b154204bb4a7a59f55374193dd4f9ca377 | [
"BSD-3-Clause"
] | 2 | 2020-05-01T23:41:55.000Z | 2020-07-01T00:26:19.000Z | src/helloworld/__main__.py | paulproteus/briefcase-toga-button-app-with-hacks | 61ec41b154204bb4a7a59f55374193dd4f9ca377 | [
"BSD-3-Clause"
] | null | null | null | src/helloworld/__main__.py | paulproteus/briefcase-toga-button-app-with-hacks | 61ec41b154204bb4a7a59f55374193dd4f9ca377 | [
"BSD-3-Clause"
] | null | null | null | from helloworld.app import main
if True or __name__ == '__main__':
main().main_loop()
| 18.2 | 34 | 0.703297 |
e081143f3b7d183dce44c075a5350bb5aba51e51 | 797 | py | Python | backend/app/main.py | ianahart/blog | fc52e15a8b56bd4c6482065de7e21f8b31f5d765 | [
"MIT"
] | null | null | null | backend/app/main.py | ianahart/blog | fc52e15a8b56bd4c6482065de7e21f8b31f5d765 | [
"MIT"
] | null | null | null | backend/app/main.py | ianahart/blog | fc52e15a8b56bd4c6482065de7e21f8b31f5d765 | [
"MIT"
] | null | null | null | from fastapi import FastAPI
from dotenv import load_dotenv
from fastapi.middleware.cors import CORSMiddleware
from app.api.api_v1.api import api_router
from app.core.config import settings
app = FastAPI()
load_dotenv()
app.include_router(api_router, prefix=settings.API_V1_STR)
# Set all CORS enabled origins
if sett... | 27.482759 | 68 | 0.711418 |
e083bd5dc380bfdfeec4ef47f0529d4de1bded9d | 658 | py | Python | test_data/samples/alembic_template_output.py | goldstar611/ssort | 05c35ec89dd9ff391ae824c17ed974340e2f5597 | [
"MIT"
] | 238 | 2021-04-25T11:45:54.000Z | 2022-03-30T10:49:58.000Z | test_data/samples/alembic_template_output.py | goldstar611/ssort | 05c35ec89dd9ff391ae824c17ed974340e2f5597 | [
"MIT"
] | 54 | 2021-03-29T21:40:00.000Z | 2022-03-29T20:26:31.000Z | test_data/samples/alembic_template_output.py | goldstar611/ssort | 05c35ec89dd9ff391ae824c17ed974340e2f5597 | [
"MIT"
] | 4 | 2022-02-09T02:37:11.000Z | 2022-02-23T03:07:50.000Z | """Example revision
Revision ID: fdf0cf6487a3
Revises:
Create Date: 2021-08-09 17:55:19.491713
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "fdf0cf6487a3"
down_revision = None
branch_labels = None
depends_on = None
| 20.5625 | 65 | 0.668693 |
e085ecf717371ed12e23c9cc1a56cd7685b27bf6 | 790 | py | Python | .archived/snakecode/0173.py | gearbird/calgo | ab48357100de2a5ea47fda2d9f01ced6dc73fa79 | [
"MIT"
] | 4 | 2022-01-13T03:39:01.000Z | 2022-03-15T03:16:33.000Z | .archived/snakecode/0173.py | gearbird/calgo | ab48357100de2a5ea47fda2d9f01ced6dc73fa79 | [
"MIT"
] | null | null | null | .archived/snakecode/0173.py | gearbird/calgo | ab48357100de2a5ea47fda2d9f01ced6dc73fa79 | [
"MIT"
] | 1 | 2021-12-09T12:33:07.000Z | 2021-12-09T12:33:07.000Z | from __future__ import annotations
from typing import Optional
# Definition for a binary tree node.
| 27.241379 | 104 | 0.606329 |
e086489d041ecf108f68b331e71375202940ac34 | 2,768 | py | Python | .leetcode/506.relative-ranks.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/506.relative-ranks.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/506.relative-ranks.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=506 lang=python3
#
# [506] Relative Ranks
#
# https://leetcode.com/problems/relative-ranks/description/
#
# algorithms
# Easy (53.46%)
# Likes: 188
# Dislikes: 9
# Total Accepted: 71.1K
# Total Submissions: 132.4K
# Testcase Example: '[5,4,3,2,1]'
#
# You are given an integer array score of... | 22.322581 | 79 | 0.600795 |
e08673d5cfeabd8f8dd35fbf0c18643dc03a42fd | 1,933 | py | Python | test/msan/lit.cfg.py | QuarkTheAwesome/compiler-rt-be-aeabi | 79e7d2bd981b0f38d60d90f8382c6cd5389b95d0 | [
"Apache-2.0"
] | 118 | 2016-02-29T01:55:45.000Z | 2021-11-08T09:47:46.000Z | test/msan/lit.cfg.py | QuarkTheAwesome/compiler-rt-be-aeabi | 79e7d2bd981b0f38d60d90f8382c6cd5389b95d0 | [
"Apache-2.0"
] | 27 | 2016-06-20T23:47:01.000Z | 2019-10-25T17:41:37.000Z | test/msan/lit.cfg.py | QuarkTheAwesome/compiler-rt-be-aeabi | 79e7d2bd981b0f38d60d90f8382c6cd5389b95d0 | [
"Apache-2.0"
] | 73 | 2016-03-01T00:50:56.000Z | 2021-12-05T03:30:35.000Z | # -*- Python -*-
import os
# Setup config name.
config.name = 'MemorySanitizer' + getattr(config, 'name_suffix', 'default')
# Setup source root.
config.test_source_root = os.path.dirname(__file__)
# Setup default compiler flags used with -fsanitize=memory option.
clang_msan_cflags = (["-fsanitize=memory",
... | 40.270833 | 88 | 0.685463 |
e086d33095f9872583586fa709b215338a8bb617 | 8,084 | py | Python | application/core/migrations/0001_initial.py | victor-freitas/ProjetoNCS | 7c80fad11e49f4ed00eefb90638730d340d78e1f | [
"Apache-2.0"
] | null | null | null | application/core/migrations/0001_initial.py | victor-freitas/ProjetoNCS | 7c80fad11e49f4ed00eefb90638730d340d78e1f | [
"Apache-2.0"
] | 2 | 2020-06-05T18:58:17.000Z | 2021-06-10T20:50:12.000Z | application/core/migrations/0001_initial.py | victor-freitas/ProjetoNCS | 7c80fad11e49f4ed00eefb90638730d340d78e1f | [
"Apache-2.0"
] | 1 | 2018-09-17T18:14:18.000Z | 2018-09-17T18:14:18.000Z | # Generated by Django 2.0.6 on 2018-06-17 04:47
from django.db import migrations, models
| 44.662983 | 120 | 0.530678 |
e087918e3b0a051f5fa5fa67e1527b89fc1bd61b | 9,606 | py | Python | dataschema/entity.py | vingkan/sql_tools | 5d6ab6a0ae31dc51e51ac1629f83f7bbf91396c1 | [
"Apache-2.0"
] | 1 | 2022-03-30T19:47:16.000Z | 2022-03-30T19:47:16.000Z | dataschema/entity.py | vingkan/sql_tools | 5d6ab6a0ae31dc51e51ac1629f83f7bbf91396c1 | [
"Apache-2.0"
] | null | null | null | dataschema/entity.py | vingkan/sql_tools | 5d6ab6a0ae31dc51e51ac1629f83f7bbf91396c1 | [
"Apache-2.0"
] | 1 | 2022-03-30T04:07:12.000Z | 2022-03-30T04:07:12.000Z | #
# nuna_sql_tools: Copyright 2022 Nuna 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... | 36.249057 | 80 | 0.636581 |
e087f1cb73d38e79a6d1863be5eb904e7f3b6261 | 1,541 | py | Python | Data_and_Dicts.py | melkisedeath/Harmonic_Analysis_and_Trajectory | a5a2819c053ddd287dcb668fac2f1be7e44f6c59 | [
"MIT"
] | null | null | null | Data_and_Dicts.py | melkisedeath/Harmonic_Analysis_and_Trajectory | a5a2819c053ddd287dcb668fac2f1be7e44f6c59 | [
"MIT"
] | null | null | null | Data_and_Dicts.py | melkisedeath/Harmonic_Analysis_and_Trajectory | a5a2819c053ddd287dcb668fac2f1be7e44f6c59 | [
"MIT"
] | null | null | null | """HERE are the base Points for all valid Tonnetze Systems.
A period of all 12 notes divided by mod 3, mod 4 (always stable)
"""
# x = 4, y = 3
NotePointsT345 = {
0: (0, 0),
1: (1, 3),
2: (2, 2),
3: (0, 1),
4: (1, 0),
5: (2, 3),
6: (0, 2),
7: (1, 1),
8: (2, 0),
9: (0, 3),
1... | 14.817308 | 64 | 0.345879 |
e088029d2dd84f5afa6eb4738d0ecbd65b7b7d99 | 3,718 | py | Python | awacs/proton.py | alanjjenkins/awacs | 0065e1833eae6a6070edb4ab4f180fd10b26c19a | [
"BSD-2-Clause"
] | null | null | null | awacs/proton.py | alanjjenkins/awacs | 0065e1833eae6a6070edb4ab4f180fd10b26c19a | [
"BSD-2-Clause"
] | null | null | null | awacs/proton.py | alanjjenkins/awacs | 0065e1833eae6a6070edb4ab4f180fd10b26c19a | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2012-2021, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from .aws import Action as BaseAction
from .aws import BaseARN
service_name = "AWS Proton"
prefix = "proton"
CreateEnvironment = Action("CreateEnvironment")
CreateEnvironmentTemplate = Action("Create... | 49.573333 | 88 | 0.839161 |
e089b61952e1f4d0f2fb6443737c623fe7ff04be | 10,577 | py | Python | jaxline/utils_test.py | lorenrose1013/jaxline | 29fca9944651d42139d4103fe12ef29b24812eb6 | [
"Apache-2.0"
] | 1 | 2022-01-07T02:44:07.000Z | 2022-01-07T02:44:07.000Z | jaxline/utils_test.py | SuperXiang/jaxline | f1503f6a06d46aa9eb2eab8eed6130895148ffa2 | [
"Apache-2.0"
] | null | null | null | jaxline/utils_test.py | SuperXiang/jaxline | f1503f6a06d46aa9eb2eab8eed6130895148ffa2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 DeepMind Technologies Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 32.345566 | 80 | 0.681573 |
e08bf2bd2a9a71b40e56dae49102323a555d5695 | 3,664 | py | Python | test/unit/mysql_class/slaverep_isslverror.py | deepcoder42/mysql-lib | d3d2459e0476fdbc4465e1d9389612e58d36fb25 | [
"MIT"
] | 1 | 2022-03-23T04:53:19.000Z | 2022-03-23T04:53:19.000Z | test/unit/mysql_class/slaverep_isslverror.py | deepcoder42/mysql-lib | d3d2459e0476fdbc4465e1d9389612e58d36fb25 | [
"MIT"
] | null | null | null | test/unit/mysql_class/slaverep_isslverror.py | deepcoder42/mysql-lib | d3d2459e0476fdbc4465e1d9389612e58d36fb25 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Classification (U)
"""Program: slaverep_isslverror.py
Description: Unit testing of SlaveRep.is_slv_error in mysql_class.py.
Usage:
test/unit/mysql_class/slaverep_isslverror.py
Arguments:
"""
# Libraries and Global Variables
# Standard
import sys
import os
if sys.version... | 24.264901 | 74 | 0.570142 |
e08cc87c4cfc35f91dfef4447a5dc8af61c7fede | 545 | py | Python | problems/108.py | mengshun/Leetcode | 8bb676f2fff093e1417a4bed13d9ad708149be78 | [
"MIT"
] | null | null | null | problems/108.py | mengshun/Leetcode | 8bb676f2fff093e1417a4bed13d9ad708149be78 | [
"MIT"
] | null | null | null | problems/108.py | mengshun/Leetcode | 8bb676f2fff093e1417a4bed13d9ad708149be78 | [
"MIT"
] | null | null | null | """
108.
"""
from TreeNode import TreeNode
t = [-10,-3,0,5,9]
obj = Solution()
node = obj.sortedArrayToBST(t)
node.preorderTraversal()
| 18.793103 | 56 | 0.543119 |
e08cf0fb5bb3a579c0b07a1fe1738a0670a18bc7 | 10,230 | py | Python | src/sage/tests/books/computational-mathematics-with-sagemath/domaines_doctest.py | hsm207/sage | 020bd59ec28717bfab9af44d2231c53da1ff99f1 | [
"BSL-1.0"
] | 1,742 | 2015-01-04T07:06:13.000Z | 2022-03-30T11:32:52.000Z | src/sage/tests/books/computational-mathematics-with-sagemath/domaines_doctest.py | hsm207/sage | 020bd59ec28717bfab9af44d2231c53da1ff99f1 | [
"BSL-1.0"
] | 66 | 2015-03-19T19:17:24.000Z | 2022-03-16T11:59:30.000Z | src/sage/tests/books/computational-mathematics-with-sagemath/domaines_doctest.py | hsm207/sage | 020bd59ec28717bfab9af44d2231c53da1ff99f1 | [
"BSL-1.0"
] | 495 | 2015-01-10T10:23:18.000Z | 2022-03-24T22:06:11.000Z | ## -*- encoding: utf-8 -*-
"""
This file (./domaines_doctest.sage) was *autogenerated* from ./domaines.tex,
with sagetex.sty version 2011/05/27 v2.3.1.
It contains the contents of all the sageexample environments from this file.
You should be able to doctest this file with:
sage -t ./domaines_doctest.sage
It is always ... | 22.93722 | 127 | 0.607527 |
e091211c57418837730aea76bfdd4d9fd710e048 | 1,978 | py | Python | src/riotwatcher/riotwatcher.py | TheBoringBakery/Riot-Watcher | 6e05fffe127530a75fd63e67da37ba81489fd4fe | [
"MIT"
] | 2 | 2020-10-06T23:33:01.000Z | 2020-11-22T01:58:43.000Z | src/riotwatcher/riotwatcher.py | TheBoringBakery/Riot-Watcher | 6e05fffe127530a75fd63e67da37ba81489fd4fe | [
"MIT"
] | null | null | null | src/riotwatcher/riotwatcher.py | TheBoringBakery/Riot-Watcher | 6e05fffe127530a75fd63e67da37ba81489fd4fe | [
"MIT"
] | null | null | null | from .Deserializer import Deserializer
from .RateLimiter import RateLimiter
from .Handlers import (
DeprecationHandler,
DeserializerAdapter,
DictionaryDeserializer,
RateLimiterAdapter,
ThrowOnErrorHandler,
TypeCorrectorHandler,
)
from .Handlers.RateLimit import BasicRateLimiter
from ._apis imp... | 31.396825 | 104 | 0.637513 |
e09178ade395a6b6c4b0853c972ab7664e0aa556 | 4,175 | py | Python | webots_ros2_core/webots_ros2_core/devices/gps_device.py | TaoYibo1866/webots_ros2 | a72c164825663cebbfd27e0649ea51d3abf9bbed | [
"Apache-2.0"
] | 176 | 2019-09-06T07:02:05.000Z | 2022-03-27T12:41:10.000Z | webots_ros2_core/webots_ros2_core/devices/gps_device.py | TaoYibo1866/webots_ros2 | a72c164825663cebbfd27e0649ea51d3abf9bbed | [
"Apache-2.0"
] | 308 | 2019-08-20T12:56:23.000Z | 2022-03-29T09:49:22.000Z | webots_ros2_core/webots_ros2_core/devices/gps_device.py | omichel/webots_ros2 | 5b59d0b1fbeff4c3f75a447bd152c10853f4691b | [
"Apache-2.0"
] | 67 | 2019-11-03T00:58:09.000Z | 2022-03-18T07:11:28.000Z | # Copyright 1996-2021 Cyberbotics Ltd.
#
# 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... | 37.954545 | 84 | 0.648144 |
e091b9679a6111bb854970806d6dc9286999927c | 127 | py | Python | ML/complete_model/setlist.py | saisankargochhayat/doot | 00bd74463a065f23886e829aae677267b7619e13 | [
"MIT"
] | null | null | null | ML/complete_model/setlist.py | saisankargochhayat/doot | 00bd74463a065f23886e829aae677267b7619e13 | [
"MIT"
] | null | null | null | ML/complete_model/setlist.py | saisankargochhayat/doot | 00bd74463a065f23886e829aae677267b7619e13 | [
"MIT"
] | null | null | null | setlist = [['a','m','n','s','t','g','q','o','x'],['b','e','c'],['h','k','u','v'],
['d','r','p'],['f'],['l'],['i'],['w'],['y']]
| 42.333333 | 81 | 0.244094 |
e091f0178c86f87d30aea273c60c55d5d07a1bdf | 24,241 | py | Python | players/jeff.py | jtreim/cant-stop | 0ef1a2da67e4232a4ad2be150e950e8f1914a851 | [
"MIT"
] | null | null | null | players/jeff.py | jtreim/cant-stop | 0ef1a2da67e4232a4ad2be150e950e8f1914a851 | [
"MIT"
] | null | null | null | players/jeff.py | jtreim/cant-stop | 0ef1a2da67e4232a4ad2be150e950e8f1914a851 | [
"MIT"
] | 2 | 2020-12-29T21:30:54.000Z | 2021-01-02T05:23:23.000Z | from .player import Player
| 35.806499 | 95 | 0.413143 |
e09320dd89276dff3fa36b0f354e1b3cd7cffc60 | 1,767 | py | Python | Python2/src/main.py | nataddrho/digicueblue | 246c87129e6a70d384b1553688672bb3d5c6643e | [
"MIT"
] | 8 | 2017-11-02T16:04:15.000Z | 2021-11-21T18:36:18.000Z | Python2/src/main.py | nataddrho/digicueblue | 246c87129e6a70d384b1553688672bb3d5c6643e | [
"MIT"
] | 2 | 2018-01-09T15:15:12.000Z | 2018-10-11T23:56:59.000Z | Python2/src/main.py | nataddrho/digicueblue | 246c87129e6a70d384b1553688672bb3d5c6643e | [
"MIT"
] | 5 | 2018-01-08T16:06:45.000Z | 2021-11-21T19:50:20.000Z | #!/usr/bin/env python
# Nathan Rhoades 10/13/2017
import serial
import serialport
import bgapi
import gui
import digicueblue
import traceback
import time
import threading
import sys
if sys.version_info[0] < 3:
import Tkinter as Tk
else:
import tkinter as Tk
if __name__ == '__main__':
main()
| 24.887324 | 88 | 0.612903 |
e093e95399d65bf6f2743e6fc81bac4c0cc5d9b1 | 138 | py | Python | messager.py | plasticruler/newshound | c97ef09165eabb27ac65682e4893cf72dae7f3fb | [
"Apache-2.0"
] | null | null | null | messager.py | plasticruler/newshound | c97ef09165eabb27ac65682e4893cf72dae7f3fb | [
"Apache-2.0"
] | null | null | null | messager.py | plasticruler/newshound | c97ef09165eabb27ac65682e4893cf72dae7f3fb | [
"Apache-2.0"
] | null | null | null | import requests
#newspi key c2d941c74c144421945618d97a458144
| 12.545455 | 44 | 0.73913 |
e09525abcb7cde902261ff8255cd7d2143781fb5 | 8,471 | py | Python | PyMaSC/handler/mappability.py | ronin-gw/PyMaSC | 70c32b647017e162e0b004cadcf4f59a2d4012b6 | [
"MIT"
] | 2 | 2018-04-20T13:34:16.000Z | 2021-07-13T16:20:28.000Z | PyMaSC/handler/mappability.py | ronin-gw/PyMaSC | 70c32b647017e162e0b004cadcf4f59a2d4012b6 | [
"MIT"
] | 1 | 2021-03-16T11:08:46.000Z | 2021-03-16T17:26:15.000Z | PyMaSC/handler/mappability.py | ronin-gw/PyMaSC | 70c32b647017e162e0b004cadcf4f59a2d4012b6 | [
"MIT"
] | null | null | null | import logging
import os
import json
from multiprocessing import Process, Queue, Lock
import numpy as np
from PyMaSC.core.mappability import MappableLengthCalculator
from PyMaSC.utils.progress import ProgressHook, MultiLineProgressManager
from PyMaSC.utils.compatible import tostr, xrange
from PyMaSC.utils.output impo... | 37.816964 | 107 | 0.613387 |
e0979923ac060ab5145d8b58681ac366fea606f9 | 1,190 | py | Python | courses/backend/django-for-everybody/Web Application Technologies and Django/resources/dj4e-samples/tmpl/views.py | Nahid-Hassan/fullstack-software-development | 892ffb33e46795061ea63378279a6469de317b1a | [
"CC0-1.0"
] | 297 | 2019-01-25T08:44:08.000Z | 2022-03-29T18:46:08.000Z | courses/backend/django-for-everybody/Web Application Technologies and Django/resources/dj4e-samples/tmpl/views.py | Nahid-Hassan/fullstack-software-development | 892ffb33e46795061ea63378279a6469de317b1a | [
"CC0-1.0"
] | 22 | 2019-05-06T14:21:04.000Z | 2022-02-21T10:05:25.000Z | courses/backend/django-for-everybody/Web Application Technologies and Django/resources/dj4e-samples/tmpl/views.py | Nahid-Hassan/fullstack-software-development | 892ffb33e46795061ea63378279a6469de317b1a | [
"CC0-1.0"
] | 412 | 2019-02-12T20:44:43.000Z | 2022-03-30T04:23:25.000Z | from django.shortcuts import render
from django.views import View
# Create your views here.
# Call this with a parameter number
# Using inheritance (extend)
| 27.045455 | 56 | 0.595798 |
e098554863c066d539fc03234656fd767444cd09 | 477 | py | Python | webapp/ex.py | jykim-rust/python | 50efe51733976d9f8ae3be47d628601ad002d836 | [
"MIT"
] | null | null | null | webapp/ex.py | jykim-rust/python | 50efe51733976d9f8ae3be47d628601ad002d836 | [
"MIT"
] | null | null | null | webapp/ex.py | jykim-rust/python | 50efe51733976d9f8ae3be47d628601ad002d836 | [
"MIT"
] | null | null | null | from flask import escape
'''with open('ex') as full:
for line in full:
print(line,end='**')
'''
'''
a=[]
with open('ex') as full:
for line in full:
a.append(line.split('|'))
print(a)
'''
'''
with open('ex') as full:
for line in full.readline():
print(line)
'''
contents=[]
with o... | 14.90625 | 36 | 0.540881 |
e0986b7dc3912a34a19f7612f40be9b6072d9a7e | 15,310 | py | Python | lib/twitter_utils.py | Vman45/ask-alexa-twitter | 1711005e51db1f66beb2e41e762c39ee003273aa | [
"MIT"
] | 310 | 2015-07-30T17:05:06.000Z | 2020-12-19T18:39:39.000Z | lib/twitter_utils.py | Vman45/ask-alexa-twitter | 1711005e51db1f66beb2e41e762c39ee003273aa | [
"MIT"
] | 29 | 2015-12-08T22:10:47.000Z | 2017-10-06T16:40:05.000Z | lib/twitter_utils.py | Vman45/ask-alexa-twitter | 1711005e51db1f66beb2e41e762c39ee003273aa | [
"MIT"
] | 73 | 2015-11-12T06:56:53.000Z | 2020-09-13T22:23:44.000Z | import requests
import jsonpickle
from requests_oauthlib import OAuth1
from urllib.parse import parse_qs, urlencode
import cherrypy
from collections import defaultdict
import json
import os
import re
from collections import defaultdict
# For readable serializations
jsonpickle.set_encoder_options('json', sort_keys=Tr... | 36.279621 | 150 | 0.615741 |
e09899e15fdc6c14c2bf5b2ab6389520f9a3d9b7 | 1,399 | py | Python | sundry/serializable.py | jamesabel/sundry | 4f63bfa0624c88a3cd05adf2784e9e3e66e094f4 | [
"MIT"
] | 2 | 2019-10-02T06:30:27.000Z | 2021-07-10T22:39:30.000Z | sundry/serializable.py | jamesabel/sundry | 4f63bfa0624c88a3cd05adf2784e9e3e66e094f4 | [
"MIT"
] | 3 | 2019-03-13T17:15:58.000Z | 2019-06-04T20:26:57.000Z | sundry/serializable.py | jamesabel/sundry | 4f63bfa0624c88a3cd05adf2784e9e3e66e094f4 | [
"MIT"
] | 1 | 2019-03-08T21:37:29.000Z | 2019-03-08T21:37:29.000Z | import json
from enum import Enum
from decimal import Decimal
def convert_serializable_special_cases(o):
"""
Convert an object to a type that is fairly generally serializable (e.g. json serializable).
This only handles the cases that need converting. The json module handles all the rest.
For JSON, ... | 36.815789 | 97 | 0.709078 |
e09a1b7388131ca361a24a122df607870ceb2f36 | 5,249 | py | Python | legacy/neural_qa/train.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | 4 | 2020-01-04T13:15:02.000Z | 2021-07-21T07:50:02.000Z | legacy/neural_qa/train.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | 2 | 2019-06-26T03:21:49.000Z | 2019-09-19T09:43:42.000Z | legacy/neural_qa/train.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | 3 | 2019-10-31T07:18:49.000Z | 2020-01-13T03:18:39.000Z | import sys
import os
import argparse
import numpy as np
import paddle.v2 as paddle
import reader
import utils
import network
import config
from utils import logger
def show_parameter_init_info(parameters):
"""
Print the information of initialization mean and standard deviation of
parameters
:param... | 33.864516 | 79 | 0.638407 |
e09a68dcd0689137530fb16dbc35c12c92deee70 | 36,880 | py | Python | yggdrasil/drivers/MatlabModelDriver.py | astro-friedel/yggdrasil | 5ecbfd083240965c20c502b4795b6dc93d94b020 | [
"BSD-3-Clause"
] | null | null | null | yggdrasil/drivers/MatlabModelDriver.py | astro-friedel/yggdrasil | 5ecbfd083240965c20c502b4795b6dc93d94b020 | [
"BSD-3-Clause"
] | null | null | null | yggdrasil/drivers/MatlabModelDriver.py | astro-friedel/yggdrasil | 5ecbfd083240965c20c502b4795b6dc93d94b020 | [
"BSD-3-Clause"
] | null | null | null | import subprocess
import uuid as uuid_gen
import logging
from datetime import datetime
import os
import psutil
import warnings
import weakref
from yggdrasil import backwards, tools, platform, serialize
from yggdrasil.languages import get_language_dir
from yggdrasil.config import ygg_cfg
from yggdrasil.drivers.Interpret... | 40.086957 | 85 | 0.585195 |
e09cac0b5e9ae4638a705a4871a79857b3f43a52 | 1,049 | py | Python | analysis/migrations/0032_auto_20210409_1333.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 5 | 2021-01-14T03:34:42.000Z | 2022-03-07T15:34:18.000Z | analysis/migrations/0032_auto_20210409_1333.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 551 | 2020-10-19T00:02:38.000Z | 2022-03-30T02:18:22.000Z | analysis/migrations/0032_auto_20210409_1333.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | null | null | null | # Generated by Django 3.1.3 on 2021-04-09 04:03
import django.db.models.deletion
from django.db import migrations, models
| 33.83871 | 163 | 0.613918 |
e09ce665126d9b3d2e1a629422eb3823667146fa | 3,453 | py | Python | ted_sws/mapping_suite_processor/services/conceptual_mapping_generate_sparql_queries.py | meaningfy-ws/ted-sws | d1e351eacb2900f84ec7edc457e49d8202fbaff5 | [
"Apache-2.0"
] | 1 | 2022-03-21T12:32:52.000Z | 2022-03-21T12:32:52.000Z | ted_sws/mapping_suite_processor/services/conceptual_mapping_generate_sparql_queries.py | meaningfy-ws/ted-sws | d1e351eacb2900f84ec7edc457e49d8202fbaff5 | [
"Apache-2.0"
] | 24 | 2022-02-10T10:43:56.000Z | 2022-03-29T12:36:21.000Z | ted_sws/mapping_suite_processor/services/conceptual_mapping_generate_sparql_queries.py | meaningfy-ws/ted-sws | d1e351eacb2900f84ec7edc457e49d8202fbaff5 | [
"Apache-2.0"
] | null | null | null | import pathlib
from typing import Iterator
import pandas as pd
from ted_sws.resources.prefixes import PREFIXES_DEFINITIONS
import re
CONCEPTUAL_MAPPINGS_RULES_SHEET_NAME = "Rules"
RULES_SF_FIELD_ID = 'Standard Form Field ID (M)'
RULES_SF_FIELD_NAME = 'Standard Form Field Name (M)'
RULES_E_FORM_BT_ID = 'eForm BT-ID (O)... | 46.662162 | 250 | 0.705763 |
e09eabe2c9581024fbbd8098d315804c81879f55 | 205 | py | Python | src/__init__.py | codeKgu/BiLevel-Graph-Neural-Network | ed89c7d39baca757411cf333c595ac464e991a8e | [
"MIT"
] | 20 | 2020-07-22T03:56:13.000Z | 2021-12-02T01:13:09.000Z | src/__init__.py | codeKgu/BiLevel-Graph-Neural-Network | ed89c7d39baca757411cf333c595ac464e991a8e | [
"MIT"
] | 1 | 2020-07-28T17:47:17.000Z | 2020-08-03T15:38:40.000Z | src/__init__.py | codeKgu/BiLevel-Graph-Neural-Network | ed89c7d39baca757411cf333c595ac464e991a8e | [
"MIT"
] | 5 | 2020-08-09T11:14:49.000Z | 2020-12-10T11:37:44.000Z | import sys
from os.path import dirname, abspath, join
cur_folder = dirname(abspath(__file__))
sys.path.insert(0, join(dirname(cur_folder), 'src'))
sys.path.insert(0, dirname(cur_folder))
print(cur_folder) | 29.285714 | 52 | 0.77561 |
e0a0f22bfda8fa26025e7c4065f5e2b941f28ecf | 3,892 | py | Python | src/controllers/serie.py | igormotta92/gta-desafio-python-flask-api | 7c048239359e8a21d777109bdb0d58b6c2c18450 | [
"MIT"
] | null | null | null | src/controllers/serie.py | igormotta92/gta-desafio-python-flask-api | 7c048239359e8a21d777109bdb0d58b6c2c18450 | [
"MIT"
] | null | null | null | src/controllers/serie.py | igormotta92/gta-desafio-python-flask-api | 7c048239359e8a21d777109bdb0d58b6c2c18450 | [
"MIT"
] | null | null | null | # https://stackoverflow.com/questions/3300464/how-can-i-get-dict-from-sqlite-query
# from flask import Flask
from flask_restful import Resource, reqparse
from src.model.serie import SerieModel
from src.server.instance import server
from db import db
# books_db = [{"id": 0, "title": "War and Peace"}, {"id": 1, "title"... | 29.938462 | 93 | 0.573741 |
e0a33a3a50dffea3e1b1459aa66fc2a300fcaf7e | 879 | py | Python | tests/test_random.py | hirnimeshrampuresoftware/python-tcod | c82d60eaaf12e50b405d55df1026c1d00dd283b6 | [
"BSD-2-Clause"
] | 231 | 2018-06-28T10:07:41.000Z | 2022-03-20T16:17:19.000Z | tests/test_random.py | hirnimeshrampuresoftware/python-tcod | c82d60eaaf12e50b405d55df1026c1d00dd283b6 | [
"BSD-2-Clause"
] | 66 | 2018-06-27T19:04:25.000Z | 2022-03-30T21:15:15.000Z | tests/test_random.py | hirnimeshrampuresoftware/python-tcod | c82d60eaaf12e50b405d55df1026c1d00dd283b6 | [
"BSD-2-Clause"
] | 31 | 2018-09-12T00:35:42.000Z | 2022-03-20T16:17:22.000Z | import copy
import pickle
import tcod
| 30.310345 | 76 | 0.675768 |
e0a616cc9e84aa1cf90226b12de930157c9cb478 | 2,538 | py | Python | src/Products/Five/viewlet/viewlet.py | rbanffy/Zope | ecf6770219052e7c7f8c9634ddf187a1e6280742 | [
"ZPL-2.1"
] | 289 | 2015-01-05T12:38:21.000Z | 2022-03-05T21:20:39.000Z | src/Products/Five/viewlet/viewlet.py | rbanffy/Zope | ecf6770219052e7c7f8c9634ddf187a1e6280742 | [
"ZPL-2.1"
] | 732 | 2015-02-09T23:35:57.000Z | 2022-03-31T09:10:13.000Z | src/Products/Five/viewlet/viewlet.py | rbanffy/Zope | ecf6770219052e7c7f8c9634ddf187a1e6280742 | [
"ZPL-2.1"
] | 102 | 2015-01-12T14:03:35.000Z | 2022-03-30T11:02:44.000Z | ##############################################################################
#
# Copyright (c) 2006 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | 29.511628 | 78 | 0.648542 |
e0a621c3b559223c04896e67f79d61f3971a7ebf | 920 | py | Python | problema21.py | bptfreitas/Project-Euler | 02b3ef8f8e3754b886b266fcd5eee7fd00d97dde | [
"MIT"
] | null | null | null | problema21.py | bptfreitas/Project-Euler | 02b3ef8f8e3754b886b266fcd5eee7fd00d97dde | [
"MIT"
] | null | null | null | problema21.py | bptfreitas/Project-Euler | 02b3ef8f8e3754b886b266fcd5eee7fd00d97dde | [
"MIT"
] | null | null | null | #Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n).
#If d(a) = b and d(b) = a, where a b, then a and b are an amicable pair and each of a and b are called amicable numbers.
#For example, the proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110; th... | 20.444444 | 181 | 0.661957 |
e0a7f01f58bb59078e58b00112eda388117b8294 | 1,590 | py | Python | python-3.6.0/Doc/includes/email-unpack.py | emacslisp/python | 5b89ddcc504108f0dfa1081e338e6475cf6ccd2f | [
"Apache-2.0"
] | 854 | 2017-09-11T16:42:28.000Z | 2022-03-27T14:17:09.000Z | python-3.6.0/Doc/includes/email-unpack.py | emacslisp/python | 5b89ddcc504108f0dfa1081e338e6475cf6ccd2f | [
"Apache-2.0"
] | 164 | 2017-09-24T20:40:32.000Z | 2021-10-30T01:35:05.000Z | python-3.6.0/Doc/includes/email-unpack.py | emacslisp/python | 5b89ddcc504108f0dfa1081e338e6475cf6ccd2f | [
"Apache-2.0"
] | 73 | 2017-09-13T18:07:48.000Z | 2022-03-17T13:02:29.000Z | #!/usr/bin/env python3
"""Unpack a MIME message into a directory of files."""
import os
import email
import mimetypes
from email.policy import default
from argparse import ArgumentParser
if __name__ == '__main__':
main()
| 29.444444 | 78 | 0.611321 |
e0a80310257c1b06b4c2e9dcba5929214b903c35 | 1,400 | py | Python | src/streetview/logging_facility.py | juliantrue/Streetview-Segmenting | 337740e6ebd2284c880ace09a11032c5914b39a4 | [
"MIT"
] | 1 | 2021-02-27T07:39:05.000Z | 2021-02-27T07:39:05.000Z | src/streetview/logging_facility.py | juliantrue/Streetview-Segmenting | 337740e6ebd2284c880ace09a11032c5914b39a4 | [
"MIT"
] | null | null | null | src/streetview/logging_facility.py | juliantrue/Streetview-Segmenting | 337740e6ebd2284c880ace09a11032c5914b39a4 | [
"MIT"
] | 1 | 2021-12-06T23:35:34.000Z | 2021-12-06T23:35:34.000Z | import sys, os
import logging
import datetime
module_name = 'Streetview_Module'
debug_mode = True
| 32.55814 | 93 | 0.597857 |
e0a906006c6cdb005397afa90c409162626abaca | 536 | py | Python | tkinter_examples/draw_chess_board.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 117 | 2015-12-18T07:18:27.000Z | 2022-03-28T00:25:54.000Z | tkinter_examples/draw_chess_board.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 8 | 2018-10-03T09:38:46.000Z | 2021-12-13T19:51:09.000Z | tkinter_examples/draw_chess_board.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 28 | 2016-08-02T17:43:47.000Z | 2022-03-21T08:31:12.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'ipetrash'
from tkinter import *
root = Tk()
root.title('Chess board')
canvas = Canvas(root, width=700, height=700, bg='#fff')
canvas.pack()
fill = '#fff'
outline = '#000'
size = 88
for i in range(8):
for j in range(8):
x1, y1, x2, y2 = i * ... | 18.482759 | 77 | 0.606343 |
e0ab0941f48814dab8b198e84e5c5153cca3e066 | 7,827 | py | Python | sandbox_api/asandbox.py | PremierLangage/sandbox-api | 7150ddcb92ac2304ff1d7b23571ec5e20459747b | [
"MIT"
] | 4 | 2020-01-27T19:06:05.000Z | 2021-06-01T08:27:30.000Z | sandbox_api/asandbox.py | qcoumes/sandbox-api | 7150ddcb92ac2304ff1d7b23571ec5e20459747b | [
"MIT"
] | null | null | null | sandbox_api/asandbox.py | qcoumes/sandbox-api | 7150ddcb92ac2304ff1d7b23571ec5e20459747b | [
"MIT"
] | null | null | null | # asandbox.py
#
# Authors:
# - Coumes Quentin <coumes.quentin@gmail.com>
"""An asynchronous implementation of the Sandbox API."""
import io
import json
import os
from contextlib import AbstractAsyncContextManager
from typing import BinaryIO, Optional, Union
import aiohttp
from .exceptions import status_exception... | 38.55665 | 94 | 0.609046 |
e0ab889f41c5f27938c1c1068877196809ff21fd | 4,928 | py | Python | api/services/usuarios_services.py | jhonnattan123/fastapi_crud_example | 24e1c295d41ad364ef839a4756e85b5bd640385a | [
"MIT"
] | 1 | 2022-03-25T17:37:46.000Z | 2022-03-25T17:37:46.000Z | api/services/usuarios_services.py | jhonnattan123/fastapi_crud_example | 24e1c295d41ad364ef839a4756e85b5bd640385a | [
"MIT"
] | null | null | null | api/services/usuarios_services.py | jhonnattan123/fastapi_crud_example | 24e1c295d41ad364ef839a4756e85b5bd640385a | [
"MIT"
] | null | null | null | import datetime
from uuid import UUID
from api.actions import storage
from fastapi import HTTPException
from api.models.usuario import Usuario
from starlette.requests import Request
from api.dependencies import validar_email, validar_formato_fecha,validar_edad
FORMATO_FECHA = "%Y-%m-%d"
EDAD_MINIMA = 18
EDAD_MAXIMA = ... | 32.421053 | 109 | 0.584416 |
e0ad08c2a04080e6246b307168d37bc9b104e50c | 10,204 | py | Python | certau/util/taxii/client.py | thisismyrobot/cti-toolkit | faf6e912af69376f5c55902c1592f7eeb0ce03dd | [
"BSD-3-Clause"
] | 12 | 2016-07-11T07:53:05.000Z | 2021-07-19T12:20:21.000Z | certau/util/taxii/client.py | thisismyrobot/cti-toolkit | faf6e912af69376f5c55902c1592f7eeb0ce03dd | [
"BSD-3-Clause"
] | null | null | null | certau/util/taxii/client.py | thisismyrobot/cti-toolkit | faf6e912af69376f5c55902c1592f7eeb0ce03dd | [
"BSD-3-Clause"
] | 4 | 2016-11-13T22:38:10.000Z | 2022-01-15T08:21:15.000Z | import os
import logging
import dateutil
import pickle
from six.moves.urllib.parse import urlparse
from libtaxii import get_message_from_http_response, VID_TAXII_XML_11
from libtaxii.messages_11 import PollRequest, PollFulfillmentRequest
from libtaxii.messages_11 import PollResponse, generate_message_id
from libtaxii... | 38.217228 | 78 | 0.591141 |
e0ada93a5debd6b2509b477f0b39c69cfae7e923 | 768 | py | Python | tutorials/registration/data.py | YipengHu/MPHY0041 | 6e9706eba2b9f9a2449539d7dea5f91dde807584 | [
"Apache-2.0"
] | 1 | 2022-02-21T23:05:49.000Z | 2022-02-21T23:05:49.000Z | tutorials/registration/data.py | YipengHu/MPHY0041 | 6e9706eba2b9f9a2449539d7dea5f91dde807584 | [
"Apache-2.0"
] | 2 | 2022-01-07T11:43:06.000Z | 2022-03-17T02:11:58.000Z | tutorials/registration/data.py | YipengHu/MPHY0041 | 6e9706eba2b9f9a2449539d7dea5f91dde807584 | [
"Apache-2.0"
] | null | null | null |
import os
import zipfile
import requests
DATA_PATH = './data'
RESULT_PATH = './result'
if not os.path.exists(DATA_PATH):
os.makedirs(DATA_PATH)
print('Downloading and extracting data...')
url = 'https://weisslab.cs.ucl.ac.uk/WEISSTeaching/datasets/-/archive/hn2dct/datasets-hn2dct.zip'
r = requests.get(url,all... | 27.428571 | 105 | 0.736979 |
e0ae282e70b49bf571087a6d88c319ae9d3cc9d4 | 3,774 | py | Python | insights/parsers/tests/test_freeipa_healthcheck_log.py | lhuett/insights-core | 1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8 | [
"Apache-2.0"
] | null | null | null | insights/parsers/tests/test_freeipa_healthcheck_log.py | lhuett/insights-core | 1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8 | [
"Apache-2.0"
] | null | null | null | insights/parsers/tests/test_freeipa_healthcheck_log.py | lhuett/insights-core | 1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8 | [
"Apache-2.0"
] | null | null | null | import doctest
from insights.parsers import freeipa_healthcheck_log
from insights.parsers.freeipa_healthcheck_log import FreeIPAHealthCheckLog
from insights.tests import context_wrap
LONG_FREEIPA_HEALTHCHECK_LOG_OK = """
[{"source": "ipahealthcheck.ipa.roles", "check": "IPACRLManagerCheck",
"result": "SUCCESS", "uuid"... | 35.942857 | 98 | 0.673026 |
e0aedd632aed5a57b006b298a3c339eedfc172f6 | 3,484 | py | Python | recipes/recipes/windows_image_builder/winpe_customization.py | xswz8015/infra | f956b78ce4c39cc76acdda47601b86794ae0c1ba | [
"BSD-3-Clause"
] | null | null | null | recipes/recipes/windows_image_builder/winpe_customization.py | xswz8015/infra | f956b78ce4c39cc76acdda47601b86794ae0c1ba | [
"BSD-3-Clause"
] | 4 | 2022-03-17T18:58:21.000Z | 2022-03-17T18:58:22.000Z | recipes/recipes/windows_image_builder/winpe_customization.py | xswz8015/infra | f956b78ce4c39cc76acdda47601b86794ae0c1ba | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2021 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from recipe_engine import post_process
from PB.recipes.infra.windows_image_builder import windows_image_builder as wib
from PB.recipes.infra.windows_image_b... | 35.55102 | 80 | 0.705798 |
e0afd7d06dd45ec0003e8757b057e5c949b8d859 | 374 | py | Python | back/lollangCompiler/main.py | wonjinYi/lollang-playground | 2df07ccc2518e6dc9f9aa00b2f38ad8d62cdb507 | [
"MIT"
] | 11 | 2022-03-12T06:41:29.000Z | 2022-03-15T06:15:52.000Z | back/lollangCompiler/main.py | wonjinYi/lollang-playground | 2df07ccc2518e6dc9f9aa00b2f38ad8d62cdb507 | [
"MIT"
] | 4 | 2022-03-14T12:01:09.000Z | 2022-03-26T20:19:52.000Z | back/lollangCompiler/main.py | wonjinYi/lollang-playground | 2df07ccc2518e6dc9f9aa00b2f38ad8d62cdb507 | [
"MIT"
] | null | null | null | from lollangCompiler.compiler import Compiler
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--file", required=True, help=" .")
parser.add_argument("--out", default="out.py", help=" ")
args = parser.parse_args()
cmp = Compiler()
cmp.compile... | 37.4 | 78 | 0.708556 |
e0b07a325b5b8caffedac977ee80452502819e41 | 4,103 | py | Python | reproducing/generator_datacreation/data/readers/SEReader.py | UKPLab/emnlp2019-duplicate_question_detection | 17a9d97c2414666fcc08015a58619fe9722daf2b | [
"Apache-2.0"
] | 5 | 2019-09-30T11:09:39.000Z | 2020-07-17T07:32:17.000Z | reproducing/generator_datacreation/data/readers/SEReader.py | UKPLab/emnlp2019-duplicate_question_detection | 17a9d97c2414666fcc08015a58619fe9722daf2b | [
"Apache-2.0"
] | 1 | 2020-07-17T07:32:46.000Z | 2020-07-17T07:34:19.000Z | reproducing/generator_datacreation/data/readers/SEReader.py | UKPLab/emnlp2019-duplicate_question_detection | 17a9d97c2414666fcc08015a58619fe9722daf2b | [
"Apache-2.0"
] | 2 | 2020-04-09T01:27:50.000Z | 2022-03-12T07:53:15.000Z | import logging
import subprocess
import xml.etree.ElementTree as ET
from tqdm import tqdm
logger = logging.getLogger('root')
POST_TYPE_QUESTION = '1'
POST_TYPE_ANSWER = '2'
| 55.445946 | 1,284 | 0.604436 |
e0b0e0083223143424e08a5e2722940882568d5e | 2,174 | py | Python | src/add_2_zip_imports.py | goubertbrent/oca-backend | b9f59cc02568aecb55d4b54aec05245790ea25fd | [
"Apache-2.0"
] | null | null | null | src/add_2_zip_imports.py | goubertbrent/oca-backend | b9f59cc02568aecb55d4b54aec05245790ea25fd | [
"Apache-2.0"
] | null | null | null | src/add_2_zip_imports.py | goubertbrent/oca-backend | b9f59cc02568aecb55d4b54aec05245790ea25fd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Green Valley Belgium NV
#
# 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 appl... | 36.233333 | 117 | 0.731831 |
e0b1290a0ccf26bc0c338627492bdd788761baa7 | 8,396 | py | Python | lib/galaxy/model/migrate/versions/0026_cloud_tables.py | Galaxyinternship/Galaxy | 204be086a8c16d6684584cefa9053ed7c86a1784 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/model/migrate/versions/0026_cloud_tables.py | Galaxyinternship/Galaxy | 204be086a8c16d6684584cefa9053ed7c86a1784 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/model/migrate/versions/0026_cloud_tables.py | Galaxyinternship/Galaxy | 204be086a8c16d6684584cefa9053ed7c86a1784 | [
"CC-BY-3.0"
] | null | null | null | """
This script adds tables needed for Galaxy cloud functionality.
"""
from __future__ import print_function
import datetime
import logging
from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT
now = datetime.datetime.utcnow
log = logging.getLogger( __name__ )
metadata = MetaDa... | 54.167742 | 132 | 0.488328 |
e0b1b9a256ca71156990f5651aa970e6f745d293 | 1,524 | py | Python | apps/user/urls.py | mrf-foundation/ckios_v1 | 3556a99ba5e01f00e137fd124903ace77d2cba28 | [
"Apache-2.0"
] | null | null | null | apps/user/urls.py | mrf-foundation/ckios_v1 | 3556a99ba5e01f00e137fd124903ace77d2cba28 | [
"Apache-2.0"
] | null | null | null | apps/user/urls.py | mrf-foundation/ckios_v1 | 3556a99ba5e01f00e137fd124903ace77d2cba28 | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
Copyright (c) 2021 ronyman.com
"""
from django.contrib import admin
from django.contrib.auth import views as auth_views
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from apps.user import views as user_views
from.views im... | 47.625 | 146 | 0.75 |
e0b36f9e11e7c9c01752718dbe837832a4596d2c | 533 | py | Python | sra_django_api/user/migrations/0003_auto_20180914_1242.py | tflati/ncbi-search | 2f31c57ffb95c2c874b65c03c58edd96eb822dfb | [
"MIT"
] | null | null | null | sra_django_api/user/migrations/0003_auto_20180914_1242.py | tflati/ncbi-search | 2f31c57ffb95c2c874b65c03c58edd96eb822dfb | [
"MIT"
] | null | null | null | sra_django_api/user/migrations/0003_auto_20180914_1242.py | tflati/ncbi-search | 2f31c57ffb95c2c874b65c03c58edd96eb822dfb | [
"MIT"
] | null | null | null | # Generated by Django 2.0.3 on 2018-09-14 12:42
from django.db import migrations, models
| 22.208333 | 58 | 0.572233 |
e0b5c736d3e79ca55e6b015bca8f2bcfa9bec4d1 | 30,844 | py | Python | image_misc.py | frankgh/deep-visualization-toolbox | c9bb26eacae0b4d1a25d3844538c2830026add76 | [
"MIT"
] | null | null | null | image_misc.py | frankgh/deep-visualization-toolbox | c9bb26eacae0b4d1a25d3844538c2830026add76 | [
"MIT"
] | null | null | null | image_misc.py | frankgh/deep-visualization-toolbox | c9bb26eacae0b4d1a25d3844538c2830026add76 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
import cv2
import matplotlib.pyplot as plt
import skimage
import skimage.io
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
from matplotlib.pyplot import cm
from mpl_toolkits.axes_grid1 import make_axes_locatable
from numpy import ... | 34.617284 | 208 | 0.57191 |
e0b6b0833654d657edf6b38b5e343a5dbb47c6d9 | 825 | py | Python | text.py | Kedyn/PingPong | 47e39a9d30e1a3a7b828c5b5e85b0666d67b0d7b | [
"MIT"
] | null | null | null | text.py | Kedyn/PingPong | 47e39a9d30e1a3a7b828c5b5e85b0666d67b0d7b | [
"MIT"
] | null | null | null | text.py | Kedyn/PingPong | 47e39a9d30e1a3a7b828c5b5e85b0666d67b0d7b | [
"MIT"
] | null | null | null | import pygame.font
import copy
| 27.5 | 76 | 0.604848 |
e0b78d074db83725adcb792c0532db942f29eb42 | 5,702 | py | Python | py/test/selenium/webdriver/common/window_tests.py | ey-advisory-technology-testing/selenium | 7e342d3b8eb913a9626475a158c4bc6ae5d68315 | [
"Apache-2.0"
] | 1 | 2020-10-06T16:55:46.000Z | 2020-10-06T16:55:46.000Z | py/test/selenium/webdriver/common/window_tests.py | ey-advisory-technology-testing/selenium | 7e342d3b8eb913a9626475a158c4bc6ae5d68315 | [
"Apache-2.0"
] | 2 | 2020-10-12T13:27:19.000Z | 2020-10-12T15:32:45.000Z | py/test/selenium/webdriver/common/window_tests.py | ey-advisory-technology-testing/selenium | 7e342d3b8eb913a9626475a158c4bc6ae5d68315 | [
"Apache-2.0"
] | 1 | 2019-03-18T14:38:08.000Z | 2019-03-18T14:38:08.000Z | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 38.268456 | 122 | 0.708699 |
e0b811e924c93fc02a9d9d5f223ad493413f5e6c | 21,307 | py | Python | psydac/cad/geometry.py | mayuri-dhote/psydac | 01ddbe2d049a599684c45060912d01c2658160a3 | [
"MIT"
] | 5 | 2018-03-13T13:50:26.000Z | 2018-12-22T14:04:11.000Z | psydac/cad/geometry.py | mayuri-dhote/psydac | 01ddbe2d049a599684c45060912d01c2658160a3 | [
"MIT"
] | 3 | 2019-02-08T13:29:47.000Z | 2019-03-06T17:23:08.000Z | psydac/cad/geometry.py | mayuri-dhote/psydac | 01ddbe2d049a599684c45060912d01c2658160a3 | [
"MIT"
] | 1 | 2018-12-15T09:55:12.000Z | 2018-12-15T09:55:12.000Z | # coding: utf-8
#
# a Geometry class contains the list of patches and additional information about
# the topology i.e. connectivity, boundaries
# For the moment, it is used as a container, that can be loaded from a file
# (hdf5)
from itertools import product
from collections import abc
import numpy as np
import string
... | 31.659733 | 112 | 0.546487 |
e0b8df2c0cc835ac66fd2676a3d3a8a967b603f8 | 6,098 | py | Python | utils.py | ok1zjf/AMNet | 51b163eec63d6d1e2e3dbc140d19afdc7b4273ee | [
"MIT"
] | 40 | 2018-06-20T20:33:38.000Z | 2022-03-21T02:00:34.000Z | utils.py | RMSnow/AMNet-Rumor | 95321bb30a303994cfae769801207bbde91d77fb | [
"MIT"
] | 5 | 2018-07-26T17:23:07.000Z | 2020-05-05T15:30:18.000Z | utils.py | RMSnow/AMNet-Rumor | 95321bb30a303994cfae769801207bbde91d77fb | [
"MIT"
] | 10 | 2018-04-10T09:42:55.000Z | 2021-04-19T19:01:27.000Z | __author__ = 'Jiri Fajtl'
__email__ = 'ok1zjf@gmail.com'
__version__= '2.2'
__status__ = "Research"
__date__ = "28/1/2018"
__license__= "MIT License"
import os
import numpy as np
import glob
import subprocess
import platform
import sys
import pkg_resources
import torch
import PIL as Image
try:
import cv2
except:... | 30.49 | 120 | 0.611512 |
e0b92dd95f8f3eb4f67617f41703129b86326aae | 1,823 | py | Python | python/aghast/aghast_generated/Slice.py | HDembinski/aghast | f3d45a6960033f48fb8f6b7e906cb36b9d9d8e95 | [
"BSD-3-Clause"
] | 18 | 2019-04-15T14:39:35.000Z | 2021-12-21T15:01:02.000Z | python/aghast/aghast_generated/Slice.py | HDembinski/aghast | f3d45a6960033f48fb8f6b7e906cb36b9d9d8e95 | [
"BSD-3-Clause"
] | 27 | 2019-04-12T20:24:00.000Z | 2021-12-03T08:51:56.000Z | python/aghast/aghast_generated/Slice.py | diana-hep/stagg | ed97e9abc870e729d300622253aa7e9c870f77ec | [
"BSD-3-Clause"
] | 11 | 2019-04-15T14:41:00.000Z | 2021-11-16T13:28:10.000Z | # automatically generated by the FlatBuffers compiler, do not modify
# namespace: aghast_generated
import flatbuffers
| 26.808824 | 79 | 0.641251 |
e0b9af8b61e8657e680602511286b7396f0d35fe | 1,075 | py | Python | axelrod/tests/strategies/test_mystrategy.py | AleksaLuka/Axelrod | 5f2fefcb2bf8f371ef489382f90f116b46ac1023 | [
"MIT"
] | null | null | null | axelrod/tests/strategies/test_mystrategy.py | AleksaLuka/Axelrod | 5f2fefcb2bf8f371ef489382f90f116b46ac1023 | [
"MIT"
] | null | null | null | axelrod/tests/strategies/test_mystrategy.py | AleksaLuka/Axelrod | 5f2fefcb2bf8f371ef489382f90f116b46ac1023 | [
"MIT"
] | null | null | null | import axelrod as axl
from .test_player import TestPlayer
C, D = axl.Action.C, axl.Action.D
| 28.289474 | 71 | 0.563721 |
e0ba84d4c91d76772295ffa29072d6de02d1a1ae | 4,516 | py | Python | analyzer/BannerTool.py | Gr1ph00n/staticwebanalyzer | 8bf6337a77192b85913d75778830ccbb9006081f | [
"MIT"
] | null | null | null | analyzer/BannerTool.py | Gr1ph00n/staticwebanalyzer | 8bf6337a77192b85913d75778830ccbb9006081f | [
"MIT"
] | null | null | null | analyzer/BannerTool.py | Gr1ph00n/staticwebanalyzer | 8bf6337a77192b85913d75778830ccbb9006081f | [
"MIT"
] | null | null | null | #FILE NAME: BannerTool.py
#created by: Ciro Veneruso
#purpose: banner localization
#last edited by: Ciro Veneruso
#INSTALL: BeautifulSoup
#TODO: this code is a blob, must be refactorized!!!!
import re
import mechanize
import socket
import urllib
from tools import BaseTool
from bs4 import BeautifulSoup
from pprint i... | 31.802817 | 125 | 0.601639 |
e0bae7400e763d4fa86d93ab435117f871afbd18 | 49 | py | Python | rhea/build/toolflow/xilinx/__init__.py | meetps/rhea | f8a9a08fb5e14c5c4488ef68a2dff4d18222c2c0 | [
"MIT"
] | 1 | 2022-03-16T23:56:09.000Z | 2022-03-16T23:56:09.000Z | rhea/build/toolflow/xilinx/__init__.py | meetps/rhea | f8a9a08fb5e14c5c4488ef68a2dff4d18222c2c0 | [
"MIT"
] | null | null | null | rhea/build/toolflow/xilinx/__init__.py | meetps/rhea | f8a9a08fb5e14c5c4488ef68a2dff4d18222c2c0 | [
"MIT"
] | null | null | null |
from .ise import ISE
from .vivado import Vivado
| 12.25 | 26 | 0.77551 |
e0bb4548a5ce53a84a9faca646cafe6530aa2def | 12,725 | py | Python | app/AccountManagment.py | fredpan/Prosopagnosia_Web_Server | b56b58eccdbbde6b158802d49f7bcc1b44b18b69 | [
"Apache-2.0"
] | null | null | null | app/AccountManagment.py | fredpan/Prosopagnosia_Web_Server | b56b58eccdbbde6b158802d49f7bcc1b44b18b69 | [
"Apache-2.0"
] | null | null | null | app/AccountManagment.py | fredpan/Prosopagnosia_Web_Server | b56b58eccdbbde6b158802d49f7bcc1b44b18b69 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 EraO Prosopagnosia Helper Dev Team, Liren Pan, Yixiao Hong, Hongzheng Xu, Stephen Huang, Tiancong Wang
#
# Supervised by Prof. Steve Mann (http://www.eecg.toronto.edu/~mann/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with th... | 41.9967 | 124 | 0.659018 |
e0bd2b8b9279c8dd18c9c1094fe6466b3d0d10be | 1,403 | py | Python | scripts/slice.py | priyablue/lidar_navigation | 39cd44a44043fa001c9d797ddea6c19e3376276c | [
"Apache-2.0"
] | 2 | 2017-12-19T16:16:50.000Z | 2018-03-15T12:41:03.000Z | scripts/slice.py | athenian-programming/lidar_navigation | 39cd44a44043fa001c9d797ddea6c19e3376276c | [
"Apache-2.0"
] | null | null | null | scripts/slice.py | athenian-programming/lidar_navigation | 39cd44a44043fa001c9d797ddea6c19e3376276c | [
"Apache-2.0"
] | 1 | 2021-05-08T11:27:10.000Z | 2021-05-08T11:27:10.000Z | import math
from point2d import Point2D
| 28.06 | 101 | 0.655025 |
e0be43ac7d66987096cd0a5bf59621233ca9d1a8 | 37,056 | py | Python | src/audio_korpora_pipeline/inputadapter/adapters.py | WernerDreier/audio-korpora-pipeline | ac171cdfb0663c7b6250c06cc9c70a951b908251 | [
"MIT"
] | 1 | 2020-09-11T05:27:58.000Z | 2020-09-11T05:27:58.000Z | src/audio_korpora_pipeline/inputadapter/adapters.py | WernerDreier/audio-korpora-pipeline | ac171cdfb0663c7b6250c06cc9c70a951b908251 | [
"MIT"
] | null | null | null | src/audio_korpora_pipeline/inputadapter/adapters.py | WernerDreier/audio-korpora-pipeline | ac171cdfb0663c7b6250c06cc9c70a951b908251 | [
"MIT"
] | null | null | null | import concurrent
import os
import re
import shutil
import xml.etree.ElementTree as ET # TODO do we have this as requirement?
from concurrent.futures import as_completed
from concurrent.futures._base import as_completed
from pathlib import Path
import ffmpeg
import pandas as pd
import webrtcvad
from audio_korpora_pi... | 48.312907 | 152 | 0.725658 |
e0beee4ee459f085172a97b3c88ddde9059df51b | 14,085 | py | Python | development/multiImage_pytorch/experiment.py | anaikawadi/svbrdf-estimation | c977aa8448b2131af3960895afd1105d29e5484a | [
"MIT"
] | null | null | null | development/multiImage_pytorch/experiment.py | anaikawadi/svbrdf-estimation | c977aa8448b2131af3960895afd1105d29e5484a | [
"MIT"
] | null | null | null | development/multiImage_pytorch/experiment.py | anaikawadi/svbrdf-estimation | c977aa8448b2131af3960895afd1105d29e5484a | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import math
import shutil
import torch
from accelerate import Accelerator
from tensorboardX import SummaryWriter
from cli import parse_args
from dataset import SvbrdfDataset
from losses import MixedLoss, MixedLoss2, MixedLoss3
from models import MultiViewModel, SingleViewModel
from pathl... | 34.437653 | 244 | 0.637061 |
e0bfc9b4798ab097e11ab7694665e7ba80ac9336 | 220 | py | Python | src/rekognition_online_action_detection/engines/__init__.py | amazon-research/long-short-term-transformer | a425be4b52ab68fddd85c91d26571e4cdfe8379a | [
"Apache-2.0"
] | 52 | 2021-11-19T01:35:10.000Z | 2022-03-24T11:48:10.000Z | src/rekognition_online_action_detection/engines/__init__.py | amazon-research/long-short-term-transformer | a425be4b52ab68fddd85c91d26571e4cdfe8379a | [
"Apache-2.0"
] | 9 | 2021-11-24T18:50:13.000Z | 2022-03-10T05:13:53.000Z | src/rekognition_online_action_detection/engines/__init__.py | amazon-research/long-short-term-transformer | a425be4b52ab68fddd85c91d26571e4cdfe8379a | [
"Apache-2.0"
] | 8 | 2022-01-15T08:01:33.000Z | 2022-03-20T22:08:29.000Z | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
from .engines import do_train, do_inference
from .lstr.lstr_trainer import *
from .lstr.lstr_inference import *
| 31.428571 | 68 | 0.786364 |
e0c1de96552a87c4acd6be415b90d60425c9c9cb | 64,469 | py | Python | nuage_tempest_plugin/tests/api/test_nuage_ports.py | nuagenetworks/nuage-tempest-plugin | ac1bfb0709c7bbaf04017af3050fb3ed1ad1324a | [
"Apache-1.1"
] | 1 | 2021-01-03T01:47:51.000Z | 2021-01-03T01:47:51.000Z | nuage_tempest_plugin/tests/api/test_nuage_ports.py | nuagenetworks/nuage-tempest-plugin | ac1bfb0709c7bbaf04017af3050fb3ed1ad1324a | [
"Apache-1.1"
] | null | null | null | nuage_tempest_plugin/tests/api/test_nuage_ports.py | nuagenetworks/nuage-tempest-plugin | ac1bfb0709c7bbaf04017af3050fb3ed1ad1324a | [
"Apache-1.1"
] | 1 | 2020-10-16T12:04:39.000Z | 2020-10-16T12:04:39.000Z | # Copyright 2017 NOKIA
# All Rights Reserved.
from netaddr import IPNetwork
import testtools
from tempest.common import waiters
from tempest.lib import exceptions
from tempest.scenario import manager
from tempest.test import decorators
from nuage_tempest_plugin.lib.test.nuage_test import NuageAdminNetworksTest
from ... | 41.220588 | 79 | 0.560114 |
e0c1ea88aed755291844e1e991a6d2f5cdb34cdd | 8,924 | py | Python | advent_of_code/2019/11_space_police/aoc_2019_11.py | thanosa/coding-challenges | a10b0de51da076a4bcc798b4a3d5a08e29c5af01 | [
"MIT"
] | null | null | null | advent_of_code/2019/11_space_police/aoc_2019_11.py | thanosa/coding-challenges | a10b0de51da076a4bcc798b4a3d5a08e29c5af01 | [
"MIT"
] | null | null | null | advent_of_code/2019/11_space_police/aoc_2019_11.py | thanosa/coding-challenges | a10b0de51da076a4bcc798b4a3d5a08e29c5af01 | [
"MIT"
] | null | null | null | ''' Advent of code 2019 Day 11 - Space police '''
from typing import NamedTuple
from enum import Enum
INPUT_FILE=__file__.replace('.py', '.dat')
def run_robot(code: dict, start_on_white: bool = False) -> int:
DIRECTIONS_COUNT = 4
direction = Direction.UP
panels = {}
seen... | 29.647841 | 91 | 0.438256 |
e0c4cc4a632d487744596824e2338a9f0399ee17 | 814 | py | Python | nicos_mlz/mira/setups/mezeiflip.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_mlz/mira/setups/mezeiflip.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_mlz/mira/setups/mezeiflip.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | description = 'Mezei spin flipper using TTI power supply'
group = 'optional'
tango_base = 'tango://miractrl.mira.frm2:10000/mira/'
devices = dict(
dct1 = device('nicos.devices.entangle.PowerSupply',
description = 'current in first channel of supply (flipper current)',
tangodevice = tango_base + 't... | 32.56 | 83 | 0.63145 |
e0c51c1373dbb36d56025f69dde451b4d208bab8 | 16,817 | py | Python | mars/learn/cluster/_k_means_init.py | hxri/mars | f7864f00911883b94800b63856f0e57648d3d9b4 | [
"Apache-2.0"
] | 2,413 | 2018-12-06T09:37:11.000Z | 2022-03-30T15:47:39.000Z | mars/learn/cluster/_k_means_init.py | hxri/mars | f7864f00911883b94800b63856f0e57648d3d9b4 | [
"Apache-2.0"
] | 1,335 | 2018-12-07T03:06:18.000Z | 2022-03-31T11:45:57.000Z | mars/learn/cluster/_k_means_init.py | hxri/mars | f7864f00911883b94800b63856f0e57648d3d9b4 | [
"Apache-2.0"
] | 329 | 2018-12-07T03:12:41.000Z | 2022-03-29T21:49:57.000Z | # Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 37.288248 | 94 | 0.634477 |
e0c54a43da9d2d5736bbbaf25b05dc7746829f11 | 2,157 | py | Python | wikipedia_parser/infobox/wikitext_parser.py | ojones/wikipedia_parser | db548290fbc392299bba8adfda9fe18baa1e66fe | [
"MIT"
] | 9 | 2016-02-24T20:09:26.000Z | 2019-03-10T11:33:34.000Z | wikipedia_parser/infobox/wikitext_parser.py | ojones/wikipedia_parser | db548290fbc392299bba8adfda9fe18baa1e66fe | [
"MIT"
] | 1 | 2019-02-13T17:38:50.000Z | 2019-02-13T17:38:50.000Z | wikipedia_parser/infobox/wikitext_parser.py | ojones/wikipedia_parser | db548290fbc392299bba8adfda9fe18baa1e66fe | [
"MIT"
] | 1 | 2016-04-05T05:28:51.000Z | 2016-04-05T05:28:51.000Z | import re
from wikipedia_parser.infobox import clean_text as clean_help
from wikipedia_parser.infobox import wikitext_helpers as wtext_help
from wikipedia_parser.third_party_adapters import parserfromhell_adapter as adapter
__author__ = 'oswaldjones'
| 30.380282 | 90 | 0.592953 |
e0c5b44a98d273699a00386bb7674bf23a762723 | 227 | py | Python | sandbox/lib/jumpscale/JumpscaleLibs/clients/graphql/GraphQLFactory.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | null | null | null | sandbox/lib/jumpscale/JumpscaleLibs/clients/graphql/GraphQLFactory.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | 117 | 2019-09-01T11:59:19.000Z | 2020-07-14T11:10:08.000Z | sandbox/lib/jumpscale/JumpscaleLibs/clients/graphql/GraphQLFactory.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | 2 | 2020-04-06T15:21:23.000Z | 2020-05-07T04:29:53.000Z | from .GraphQLClient import GraphQLClient
from Jumpscale import j
JSConfigs = j.baseclasses.object_config_collection
| 18.916667 | 50 | 0.801762 |
e0c98eb51566d8d4d1edda624372a00af1731e11 | 1,339 | py | Python | src/video_transcoding/defaults.py | tumb1er/django-video-transcoding | 54c85fb4a3b58b3f3b82e461b2f54f3c8dd5fcc6 | [
"MIT"
] | 21 | 2020-02-07T17:40:16.000Z | 2021-09-02T18:56:21.000Z | src/video_transcoding/defaults.py | just-work/django-video-transcoding | c88d88de8301cd65eda95db941d72028aac57aa9 | [
"MIT"
] | 184 | 2020-02-09T10:46:17.000Z | 2022-03-28T00:53:04.000Z | src/video_transcoding/defaults.py | just-work/django-video-transcoding | c88d88de8301cd65eda95db941d72028aac57aa9 | [
"MIT"
] | 6 | 2020-02-07T13:58:33.000Z | 2021-07-27T16:24:56.000Z | from os import getenv as e
from kombu import Queue
CELERY_APP_NAME = 'video_transcoding'
VIDEO_TRANSCODING_CELERY_CONF = {
'broker_url': e('VIDEO_TRANSCODING_CELERY_BROKER_URL',
'amqp://guest:guest@rabbitmq:5672/'),
'result_backend': e('VIDEO_TRANSCODING_CELERY_RESULT_BACKEND', None),
... | 31.139535 | 75 | 0.726662 |
e0c9c572e013959cc1791ab9408e2433e6b096c4 | 5,104 | py | Python | wordSenseByContext.py | jmboettcher/fall2019_sentiment_in_alternative_words | d88fd0ed7d1396bb3755431d6aff85b880ffe149 | [
"Apache-2.0"
] | null | null | null | wordSenseByContext.py | jmboettcher/fall2019_sentiment_in_alternative_words | d88fd0ed7d1396bb3755431d6aff85b880ffe149 | [
"Apache-2.0"
] | null | null | null | wordSenseByContext.py | jmboettcher/fall2019_sentiment_in_alternative_words | d88fd0ed7d1396bb3755431d6aff85b880ffe149 | [
"Apache-2.0"
] | null | null | null | from collections import defaultdict
from nltk.tokenize import sent_tokenize
from nltk.corpus import wordnet as wn
from nltk.corpus import semcor as sc
from nltk.corpus import stopwords
import mywordtokenizer
"""===================================================================
Place all function calls below the foll... | 36.985507 | 125 | 0.587187 |
e0c9fc5ceee51e40ba7758705226014b71dd06d7 | 3,138 | py | Python | paymentmethods/stripejs/tests.py | tjwalch/django-restshop | 569b57a5694e76a365556d7c4c9a97dd293d96c6 | [
"MIT"
] | null | null | null | paymentmethods/stripejs/tests.py | tjwalch/django-restshop | 569b57a5694e76a365556d7c4c9a97dd293d96c6 | [
"MIT"
] | null | null | null | paymentmethods/stripejs/tests.py | tjwalch/django-restshop | 569b57a5694e76a365556d7c4c9a97dd293d96c6 | [
"MIT"
] | null | null | null | import decimal
from unittest import mock
from django.conf import settings
from django.test import modify_settings
from rest_framework import test
from rest_framework.reverse import reverse
import stripe
from restshop import serializers
from restshop.models import Order
from paymentmethods.stripejs.models import Strip... | 31.069307 | 78 | 0.593372 |
e0cbddbdfa807e2e3192b9b0f5e91d704ca43fe7 | 1,684 | py | Python | tnnt/uniqdeaths.py | tnnt-devteam/python-backend | 1ecb0ddaccf176726739b64212831d038a7463a0 | [
"MIT"
] | null | null | null | tnnt/uniqdeaths.py | tnnt-devteam/python-backend | 1ecb0ddaccf176726739b64212831d038a7463a0 | [
"MIT"
] | 10 | 2021-07-19T13:04:20.000Z | 2021-12-02T18:36:29.000Z | tnnt/uniqdeaths.py | tnnt-devteam/python-backend | 1ecb0ddaccf176726739b64212831d038a7463a0 | [
"MIT"
] | 1 | 2021-10-17T10:36:51.000Z | 2021-10-17T10:36:51.000Z | from tnnt.settings import UNIQUE_DEATH_REJECTIONS, UNIQUE_DEATH_NORMALIZATIONS
import re
# post 2021 TODO: showing unique deaths of a player or clan:
# 1. list(Game.objects.values_list('death', 'player__name', 'endtime'))
# 2. iterate through list, filtering any death for which reject is True, and
# normalizing all... | 42.1 | 80 | 0.726841 |
e0cbe510c57f6be47472391d90b71a872f267467 | 9,887 | py | Python | qutip/graph.py | anubhavvardhan/qutip | daf384840efbb44b86e39d8bda64d907d9f6b47f | [
"BSD-3-Clause"
] | null | null | null | qutip/graph.py | anubhavvardhan/qutip | daf384840efbb44b86e39d8bda64d907d9f6b47f | [
"BSD-3-Clause"
] | null | null | null | qutip/graph.py | anubhavvardhan/qutip | daf384840efbb44b86e39d8bda64d907d9f6b47f | [
"BSD-3-Clause"
] | null | null | null | # This file is part of QuTiP: Quantum Toolbox in Python.
#
# Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
... | 33.402027 | 79 | 0.670982 |
e0ccb86ce9db729b21b4c70f3e21fc86885bf209 | 83 | py | Python | test/source_dir/comments_blank_lines_code.py | Pierre-Thibault/neo-insert-imports | c20399d5666b2c3590be7f40c8be1130343bbadc | [
"MIT"
] | 1 | 2015-05-07T02:44:52.000Z | 2015-05-07T02:44:52.000Z | test/source_dir/comments_blank_lines_code.py | Pierre-Thibault/neo-insert-imports | c20399d5666b2c3590be7f40c8be1130343bbadc | [
"MIT"
] | null | null | null | test/source_dir/comments_blank_lines_code.py | Pierre-Thibault/neo-insert-imports | c20399d5666b2c3590be7f40c8be1130343bbadc | [
"MIT"
] | null | null | null | # comments------------------
if True:
a(10) | 10.375 | 28 | 0.337349 |
e0cd77f1011874355803f2699f0949c70a877b16 | 286 | py | Python | locan/data/hulls/__init__.py | super-resolution/Locan | 94ed7759f7d7ceddee7c7feaabff80010cfedf30 | [
"BSD-3-Clause"
] | 8 | 2021-11-25T20:05:49.000Z | 2022-03-27T17:45:00.000Z | locan/data/hulls/__init__.py | super-resolution/Locan | 94ed7759f7d7ceddee7c7feaabff80010cfedf30 | [
"BSD-3-Clause"
] | 4 | 2021-12-15T22:39:20.000Z | 2022-03-11T17:35:34.000Z | locan/data/hulls/__init__.py | super-resolution/Locan | 94ed7759f7d7ceddee7c7feaabff80010cfedf30 | [
"BSD-3-Clause"
] | 1 | 2022-03-22T19:53:13.000Z | 2022-03-22T19:53:13.000Z | """
Hull objects of localization data.
Submodules:
-----------
.. autosummary::
:toctree: ./
hull
alpha_shape
"""
from locan.data.hulls.alpha_shape import *
from locan.data.hulls.hull import *
__all__ = []
__all__.extend(hull.__all__)
__all__.extend(alpha_shape.__all__)
| 13.619048 | 42 | 0.688811 |
e0cde222a5f5dbe6545c933dad99fd36f05f5531 | 9,183 | py | Python | tests/test_workflow_build_combinations.py | tschoonj/cgat-daisy | f85a2c82ca04f352aad00660cfc14a9aa6773168 | [
"MIT"
] | 1 | 2020-06-29T14:39:42.000Z | 2020-06-29T14:39:42.000Z | tests/test_workflow_build_combinations.py | tschoonj/cgat-daisy | f85a2c82ca04f352aad00660cfc14a9aa6773168 | [
"MIT"
] | 1 | 2019-05-15T20:50:37.000Z | 2019-05-15T20:50:37.000Z | tests/test_workflow_build_combinations.py | tschoonj/cgat-daisy | f85a2c82ca04f352aad00660cfc14a9aa6773168 | [
"MIT"
] | 1 | 2021-11-11T13:22:56.000Z | 2021-11-11T13:22:56.000Z | import pytest
from daisy.workflow import build_combinations
| 38.746835 | 92 | 0.516607 |
e0d0af5cc2acc44430f9c71988996b1fd3a8a91a | 8,473 | py | Python | src/train_vae.py | katnoria/world-models | 6584f35fa9508c991050ddc9c17f5862a00008fe | [
"Apache-2.0"
] | null | null | null | src/train_vae.py | katnoria/world-models | 6584f35fa9508c991050ddc9c17f5862a00008fe | [
"Apache-2.0"
] | null | null | null | src/train_vae.py | katnoria/world-models | 6584f35fa9508c991050ddc9c17f5862a00008fe | [
"Apache-2.0"
] | null | null | null | # class Encoder:
# pass
# class Decoder:
# pass
# class VariationAutoEncoder:
# pass
import os
os.environ['CUDA_VISIBLE_DEVICES'] = "0"
import pickle
import logging
from glob import glob
import numpy as np
from time import time
from datetime import datetime
from PIL import Image
import matplotlib.pyplot ... | 36.521552 | 130 | 0.690901 |
e0d2d2e5b75b0d0e7b995b20657ba25ef18190ee | 1,351 | py | Python | login.py | harryzcy/canvas-file-syncer | 16b98ee164df8570605b1a274c02f0dc7403730e | [
"MIT"
] | null | null | null | login.py | harryzcy/canvas-file-syncer | 16b98ee164df8570605b1a274c02f0dc7403730e | [
"MIT"
] | null | null | null | login.py | harryzcy/canvas-file-syncer | 16b98ee164df8570605b1a274c02f0dc7403730e | [
"MIT"
] | null | null | null | import time
from config import get_password, get_username
from playwright.sync_api import Page
| 29.369565 | 78 | 0.635085 |