blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0d3f80353293037531fe39851af113901615a950 | 3d4317328b6b14cff222b68da9a2518e2581f2f1 | /polyglot/tests/managers.py | cb5c4caf212e2f3d8081b56f7a119e70c75f2025 | [] | no_license | Anue/django-polyglot | c657dd1e4506d715fa6b060d97f4ce235cab5b9d | 712d77b9900a15dbad4acf60c9fb089b5008dd1b | refs/heads/master | 2021-01-18T00:12:28.494913 | 2010-12-23T17:10:49 | 2010-12-23T17:10:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 636 | py | managers.py | #! -*- coding: utf-8 -*-
from django.db import models
import unittest
from django.conf import settings
from polyglot.models import *
class ManagersTestCase(unittest.TestCase):
def setUp(self):
self.test_en = TestManager.objects.create(test='english', language='en')
self.test_es = TestManager.objec... |
7a5e7c32052b9e2e119ae362490025ecaff5f1dc | 2269d983a2c10ec619fc289e65ed9cbdffa455c2 | /08_Get_Prime_Number/08_1.py | 582a76784f7199ed80c8ad3de1ec3318c474c47d | [] | no_license | gausser/DailyTopic | fca6aca65de4aeddfcfd6f9c81f4d55b7744dfe6 | daabf79d68db0e2eb74e6dc946a38f6434ac9a2c | refs/heads/master | 2021-01-23T07:08:55.702827 | 2017-09-24T10:11:10 | 2017-09-24T10:11:10 | 102,500,111 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 364 | py | 08_1.py | import math
# True: the number is prime; False: the number is not prime
def JudgePrimeNumber(number):
sqrt_number = int(math.sqrt(number))
for i in range(2, sqrt_number + 1):
if number % i == 0:
return False
return True
print "Prime number is: "
for i in range(101, 201):
if JudgeP... |
a94071c35c80041a80931084ad92b0c36ee0c0a4 | 9637d77b144eaf969b1bcf4c8a53b92333ee6e66 | /2019/08_01.py | bc739ecfb3103932531a7dbb825104f92c9062a4 | [] | no_license | yknot/adventOfCode | 4a9b610767ed7b7be36b31221c4506c0af5696a8 | b1688431de1c5ab60659bc632c1a7131c3c7aad5 | refs/heads/main | 2023-01-05T21:30:27.565999 | 2023-01-01T18:57:35 | 2023-01-01T18:57:35 | 47,586,500 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 49 | py | 08_01.py | """
Day 8
"""
from utils import read_integers
|
7db7a7e6bfa4a0ca9d5ff91165c6eb6ff514874e | 1f320cdaf8dc46079b0e55af07edcd66b2d43fea | /shapes/produce_shapes_2018.py | 753a007f8e7dcdb53d150a5d9fab3f47ad8e96e7 | [] | no_license | KIT-CMS/TauIDSF_measurement | 38277c64feb347c8e11b2e395b5ccd887c0d0524 | 74ff6d15b90e85947c0f9232778ce9634b3fc3a1 | refs/heads/master | 2022-03-29T14:11:03.900745 | 2020-01-27T15:14:31 | 2020-01-27T15:14:31 | 198,225,212 | 0 | 1 | null | 2019-07-23T09:05:02 | 2019-07-22T13:06:22 | null | UTF-8 | Python | false | false | 30,264 | py | produce_shapes_2018.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import ROOT
ROOT.PyConfig.IgnoreCommandLineOptions = True # disable ROOT internal argument parser
ROOT.gErrorIgnoreLevel = ROOT.kError
from shape_producer.cutstring import Cut, Cuts, Weight
from shape_producer.systematics import Systematics, Systematic
from shape_produce... |
8d119639dc8341a5fb6c8f361b7e1431d6eee0da | 8574094da8e8ad4bd65e1bbe67dd1abd5003d6a9 | /zopen.plone.project/src/zopen/plone/project/browser/dashboard.py | 64cd55a55ff63cd3d73ec94d1848bbcbfdf302f7 | [] | no_license | madfrog2018/everydo-project | 5b948f8b04c04773163eb5193e45604b1fe4a74e | d2ea5b83513cf4191e29ba70a1fc8b1d9950599f | refs/heads/master | 2021-01-17T06:33:26.229787 | 2010-07-15T01:45:19 | 2010-07-15T01:45:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,517 | py | dashboard.py | from Products.Five import BrowserView
from zope.interface import implements
from zope.component import getUtility
from DateTime import DateTime
from Products.CMFCore.utils import getToolByName
from plone.memoize.instance import memoize
from zopen.plone.project.config import typesToShow
import logging; info = logging.g... |
62818034817409963d653eaf026c1f2de5344624 | 221950ab02dd5e79ff909bf9037edb181f3c250d | /gravity.py | f683033775f239c2ac00c125c20dad9d439c2dbd | [] | no_license | khrissianjoi/Gravity | 583c19c9b3060fc7fa375d19b0b5c1cdbd16e621 | 0a27ff35b78e3b0bfbfc24760196c27b1084f8f9 | refs/heads/master | 2020-03-26T04:03:36.709635 | 2018-10-08T18:44:56 | 2018-10-08T18:44:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,137 | py | gravity.py | import pygame
pygame.init()
white = (255,255,255)
black = (0,0,0)
red = (255,0,0)
green = (0,155,0)
blue = (0,0,255)
pink = (255,114,187)
display_width = 800
display_height = 600
FPS = 60
gameDisplay = pygame.display.set_mode([display_width,display_height])
pygame.display.set_caption('G R A V... |
402fc225d9dad4a8eb6ca33e794e26bdc201925a | 5a7c4b3b92ee843848cb8fd2c0224cec0ea22349 | /algo_python8.py | 31d7eb0f684a45f4576f1217e000566d39d6a56b | [] | no_license | joysn/python_algorithms | e52b5af838f77d2bc9f9b3e8cb0d8ee43422aa61 | c0461c943c6b564ceffb89c3aa9831d566721576 | refs/heads/master | 2020-04-17T10:25:32.834644 | 2019-05-13T17:19:26 | 2019-05-13T17:19:26 | 143,180,968 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,005 | py | algo_python8.py | # Validate Parenthesis In a String
def isOpen(c):
if c == '{':
return True
if c == '(':
return True
if c == '[':
return True
else:
return False
def isClose(c):
if c == '}':
return True
if c == ')':
return True
if c == ']':
return True
else:
return False
def findCor... |
71e76f46f66853bf949d5004a5c20f1c4061bb3c | 7358088b5e1b07fe63c8ace16aa32d310d4f48c6 | /poster_search/tests.py | 95b703cb7d9145975ddfc8b534f5525678835889 | [] | no_license | MyroslavGryshyn/PosterMev | e07bb22ecbcf40776e51a43ca1383683eba3effe | 660b248f513b89b25872513a4c6114d7512a0b53 | refs/heads/master | 2021-01-10T16:24:55.775956 | 2016-03-28T09:54:36 | 2016-03-28T09:54:36 | 54,552,805 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,428 | py | tests.py | from django.test import TestCase
from .models import Poster, SearchHistory
class HomeTestCase(TestCase):
def test_home_page_uses_home_template(self):
response = self.client.get('/')
self.assertTemplateUsed(response, 'poster.html')
def test_home_page_is_clean(self):
response = self.c... |
02d614b902f96e5a8e8f330e18b3233fab350e57 | 2e7dab032caaa0a4712c19e4b8b69e3471e3dd4f | /buyer/views.py | 16ffa8e3dd45b372e6486174de18ed1e3e871e3f | [] | no_license | atchanagamounika05/Real_Estate | 40c2f856b239c3c6d2b120a9bfcdecc7f454d9fb | ba9f2cfd1204bffd6395ab7e6dd28bedfcbca554 | refs/heads/master | 2022-11-21T04:58:13.525699 | 2020-07-23T10:46:33 | 2020-07-23T10:46:33 | 281,916,135 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,930 | py | views.py | from django.shortcuts import render, redirect, get_object_or_404
from django.contrib.auth.decorators import login_required
from seller.models import PropertyDetails, LocationDetails
from general.models import Profile
from .forms import PropertyRequestsForm
from agent.forms import ChatForm
from .models import PropertyRe... |
8dee819ffe0e2805a7a87cc1a58a20716e318198 | 64f0cb26c48105e025ac6cfc6e611df91588d0c3 | /PMBook/PMBook/Models/migrations/0004_auto_20150820_0943.py | e88de049a7355b74065bf2f2799ddaf19e146268 | [] | no_license | 13accus/PMbook | 3a15df7c815175d29a36cf2db8045be29086e3b2 | a43f932ee4087fb3bb53e35b6c27e8da78fd803b | refs/heads/master | 2016-09-11T08:10:12.209659 | 2015-08-26T16:48:37 | 2015-08-26T16:48:37 | 41,311,210 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,861 | py | 0004_auto_20150820_0943.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('Models', '0003_history'),
]
operations = [
migrations.CreateModel(
name='RIdeck',
fields=[
... |
111fa590882ff04205c3498d4135a37138cad8ff | 639f4b12f100c72bc4a8f67c8c230128a0e87777 | /section_086.py | 6ee64da889ab72d62e4179398bc1d1af68693925 | [] | no_license | cetusmira/totally_easy_python | 081c3aff4735605653724b0d9c4e4dd8102d91e4 | 07689e867b87d86ceb35a02bb7ab210cc644cdc5 | refs/heads/master | 2021-05-08T07:39:51.087438 | 2019-08-18T07:41:26 | 2019-08-18T07:41:26 | 106,784,360 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 369 | py | section_086.py | #section_086.py
myTup = (56, 79, 82, 1, 22, 99)
print(max(myTup), min(myTup))
print('영문자 중 가장 큰 문자:', max('abcde'))
print('서로 다른 문자들 중 큰 문자:', max('0Aa'))
print('문장 속 최댓값 문자:', max('I went to the zoo yesterday, 27 March.'))
print('문장 속 최솟값 문자:', min('I went to the zoo yesterday, 27 March.'))
|
50bf367d3fbde54aa50795f675917804eabf4db0 | 8763495b04398d1a9c6281aaea4382d465fa0d20 | /preprocessing/utils/io_manager.py | a1b0ec7ca8a2e467eb4cbc6ffe61657f4b005c7f | [] | no_license | silburt/ML_Music_Style_Transfer | adc01bc739823f8bd9f70f1f9aeccebbef535a23 | d7bc43cfdf6ae9022eeacfba5b71979f472340cb | refs/heads/master | 2023-01-15T08:43:59.447113 | 2020-11-10T01:49:08 | 2020-11-10T01:49:08 | 298,717,321 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,345 | py | io_manager.py | import pretty_midi
import os
#from pretty_midi_roll_to_midi import piano_roll_to_pretty_midi
from utils.pretty_midi_roll_to_midi import piano_roll_to_pretty_midi
import soundfile as sf
import argparse
# string to bool
def str2bool(v):
if isinstance(v, bool):
return v
if v.lower() in ('yes', 'true', 't'... |
1cb9e4ab89e853c6704f24007f35bfc1f850f0fa | 637c2df9ae79166fcdea081ca4e99b42b4f93650 | /rpi/asthma_files_site/content/image_artifact.py | 1d3595c5233fa1fa76afd077934ad677e5891571 | [] | no_license | mateolan/rpi.asthma_files_site | 0dd16b650eb611d10584c82cba9ea3ecd8cdf0b7 | cecfd10c42ccde5bcd6767b01fc6291c2de79576 | refs/heads/master | 2020-05-16T03:20:04.976612 | 2013-08-28T20:47:30 | 2013-08-28T20:47:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,099 | py | image_artifact.py | from collective.cover.tiles.banner import BannerTile
from plone.directives import form
from plone.namedfile.field import NamedBlobImage
from zope.schema import TextLine
class IImageArtifact(form.Schema):
"""
Content type
"""
image = NamedBlobImage(title=u"Image Artifact")
coverage = TextLine(tit... |
3039a5c64dcd02bb8b71bdf6ded3ada16a7c8877 | 50aff1041f0a3b03f1c39ada53092e0ddf61be78 | /applications/markov/markov.py | 310ff0a642dac764d334eaf3e3e827db1dcc91b6 | [] | no_license | dtauraso/Hash-Tables | 2e916bb113a6442f3b3ad126e735391efc201d06 | 02a3a23d760929e97c68e9577bc2e2b447449cef | refs/heads/master | 2022-07-31T06:54:48.467272 | 2020-05-21T16:00:00 | 2020-05-21T16:00:00 | 261,232,605 | 0 | 0 | null | 2020-05-21T16:00:02 | 2020-05-04T16:06:36 | Python | UTF-8 | Python | false | false | 2,261 | py | markov.py | import random
my_words = []
# Read in all the words in one go
with open("input.txt") as f:
words = f.read()
# for word in words:
# my_words.append(word)
# print(words)
# if word not in word_table:
my_words = words.split(' ')
my_words2 = []
for word in my_words:
for split_words in wo... |
381715f8d65c6f2ae4462e5be25201951d0ef199 | 904845b8965d8a528b3946730db4105fecc3c60c | /ex47.py | 0d848b0bda90377ea88e28fd90442985d5268410 | [] | no_license | Raipagnin/Python.exercises | 9f1a9f114d52d86a735803d61b09d3b393f4b15d | 024e7968a6d49e21d0f3ed58363b664ec6ee3ddc | refs/heads/master | 2022-06-27T03:36:11.832365 | 2020-05-08T13:43:36 | 2020-05-08T13:43:36 | 260,485,922 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 375 | py | ex47.py | #mostre todos os numeros pares de 1-50
print('Numeros pares de 1 - 50')
for c in range(2, 51, 2):
print(c, end=' ') # vc poderia usar uma formula matematica em que vc pega o modulo % por 2 == 0, nesse caso
# o processador faria mais movimentos ao inves de fazer como no exemplo a cima... pense que as vezes nao e... |
1934404fa9e3ace2566bc221593d968525f233e0 | a243bbc0361e271d9f5f6e75fd782f65638d3308 | /extractCDSfromGB.py | c42d9b032b132a54a727c0441f6beaa71bcef9e7 | [] | no_license | gisleDK/LocalDB_with_gene_synteny | 285833f358325225ede7af8cc4756010b489512a | 4974b7bd0c42448658c1f59381c472a40f880f33 | refs/heads/main | 2023-03-18T15:07:27.895789 | 2021-01-08T13:47:14 | 2021-01-08T13:47:14 | 313,325,231 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 956 | py | extractCDSfromGB.py | #!/usr/bin/env python
# Written for biopython under python 3.8.5
# V0.01 Written by Gisle Vestergaard (gislevestergaard@gmail.com)
# This script will read a genbank file and extract CDS with a unique identifier
import argparse
from Bio import SeqIO
parser = argparse.ArgumentParser(description='extract CDS from concate... |
0b42ca8ec5f393a8b592e6eb495af0bf9a8a4c4e | 1c095c9eeef78ad7ce550ea88657601b622bc7a1 | /code+output/project1.py | 5238dfff2d8fb5af0d7772fca239a0f26f871d99 | [] | no_license | Zomma2/Ciphers | e89080fa41c91b04514667ecd936eaecae885343 | 002f47be46ce5c6080f11c21b941439d4ea52d64 | refs/heads/main | 2022-12-20T03:14:04.920273 | 2020-10-21T04:07:13 | 2020-10-21T04:07:13 | 305,897,532 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,612 | py | project1.py | import numpy as np
def caeser(plain,key):
plain = plain.upper()
cipher = str()
for p in plain:
cipher += chr(((ord(p) - ord('A') + key) % 26) + ord('A'))
return cipher
def playfair(plain,key):
key = key.upper()
plain = str(plain).upper().replace("J","I")
posdic = dict() # r... |
afd6592d7a108b4e19a071cde22ed2bda9bb73d9 | b643abbcfb5dc46a2d311f179f740cbe44f6a922 | /users/models.py | 7223ebf50d5c630dc05d1c60c882ef1d27e506d8 | [] | no_license | safwanvk/productivity | e7126d2ce77649e80ada365ab4616baa91b289ec | 141598632da0acd6c47ff34446ccbef9f7b980ac | refs/heads/main | 2023-03-10T19:06:57.589215 | 2021-03-01T14:41:24 | 2021-03-01T14:41:24 | 342,141,156 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 530 | py | models.py | from django.db import models
# Create your models here.
class User(models.Model):
id = models.AutoField(primary_key=True)
name = models.CharField(max_length=255)
image = models.ImageField(upload_to='users/%Y/%m/%d/', blank=True)
fb_profile = models.CharField(max_length=255)
twitter_profile = models... |
d3f04047013a6faa4dc61a4348c7993282ac17ec | d3a7c677dcb6181320ba564396c6e838f35dcb15 | /website_md.py | 1089b4d6db89588644a3ba21893e7e49ee2a9913 | [] | no_license | BohemianMatrices/characteristic-polynomial-database | 8ba3c1cf46a529d06402c74ea64732071552ef62 | 773b522a7b613762866de86d8eddff2a74109bf7 | refs/heads/master | 2020-06-01T21:57:29.277086 | 2019-06-08T22:46:36 | 2019-06-08T22:46:36 | 141,832,522 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,562 | py | website_md.py | import os
import glob
def get_properties(property_file = 'Properties.csv'):
properties_dict = dict()
index_to_property_map = list()
# Min/Max matrix dimension
n_min = 10000
n_max = 0
with open(property_file, 'r') as f:
# Process header
header_line = next(f)
h... |
1f68032b70538147f208e01e9e8ec3223212c576 | 452f755eca16e87b61040294c97996966b1acff9 | /03.MEDICAL_ES_WordEmbeddings_LSTM_CNN_Attention.py | bf3d8c6295c067bf636fe8dac22bab8e44fb9758 | [] | no_license | marcopoli/CODIESP-10 | 374bf0c2e441c9150e0478cd253c6c7ee2f6f43b | 322e68bb3aaf9980865df426ae5b2871406aee21 | refs/heads/master | 2022-11-28T10:40:42.610405 | 2020-07-14T12:39:50 | 2020-07-14T12:39:50 | 256,451,868 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 9,827 | py | 03.MEDICAL_ES_WordEmbeddings_LSTM_CNN_Attention.py | import joblib
import pandas as pd
from keras import Sequential
from keras_preprocessing.sequence import pad_sequences
from keras_preprocessing.text import Tokenizer
from sklearn.metrics import accuracy_score, f1_score
from sklearn.model_selection import train_test_split
import pickle
import numpy as np
import random
fr... |
44224985dbfa6234eff406149ce25e1d00b512e9 | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/anagram/8c59015fed6440e49749ec3876ed3e45.py | e41293b094f95f15ca183fc946efb9b9c12233f6 | [] | no_license | itsolutionscorp/AutoStyle-Clustering | 54bde86fe6dbad35b568b38cfcb14c5ffaab51b0 | be0e2f635a7558f56c61bc0b36c6146b01d1e6e6 | refs/heads/master | 2020-12-11T07:27:19.291038 | 2016-03-16T03:18:00 | 2016-03-16T03:18:42 | 59,454,921 | 4 | 0 | null | 2016-05-23T05:40:56 | 2016-05-23T05:40:56 | null | UTF-8 | Python | false | false | 390 | py | 8c59015fed6440e49749ec3876ed3e45.py | class Anagram(object):
def __init__(self, word):
self.word = word
self.canonical = self._canonicalize(word)
def _canonicalize(self, word):
return sorted(word.lower())
def _is_anagram(self, word):
return word != self.word and self._canonicalize(word) == self.canonical
d... |
c2839046592469dfae7526f72be947126960ba19 | 3f7157285af068d5805534e75aea321deec2b186 | /social/views.py | 7c87f1ae713b2f3dbd668ecfd7fcf0b4ca4d8926 | [] | no_license | ayush113/CompanyManagement | d8b5cc10b98817ff0f5c9786a7d4d223b7fd60ad | d31cd94b94ae6f8e1c5361c0c998d21157c608b4 | refs/heads/master | 2020-03-24T00:15:55.132399 | 2018-10-29T10:31:58 | 2018-10-29T10:31:58 | 142,282,860 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,272 | py | views.py | from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.views.decorators.csrf import csrf_exempt
# Create your views here.
from projects.models import Project
from django.db import connection
from .utils import namedtuplefetchall
from django.http import JsonResponse
fro... |
1431a0049c05a99e0b68052f56bf8e2e3c48e1aa | 5181b918b7392fa8ce57d709ec0f1161ff479633 | /gm/main/resources/metrics.py | 10be59fb3745f0f3dd1195befe63d1de6593342b | [] | no_license | pedrodeoliveira/gm-service | c4167f9c57ad55baaa181629caee7d9bbfda73f1 | c9df5ad9c22dd9a0675e4169a201b45c0470d72f | refs/heads/master | 2022-11-30T06:28:45.292034 | 2020-08-22T15:10:35 | 2020-08-22T15:10:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,257 | py | metrics.py | from flask import request
from flask_restful import abort
from sqlalchemy.exc import SQLAlchemyError
from gm.main.models.model import db, Metric, QuantModelMetricSchema, \
MlModelMetricSchema, Frequency, QuantModelMetric, MlModelMetric, \
ThresholdType
from gm.main.resources import success, get_metric_b... |
4a136a6284add3bcbd7f9546e18e79151cea685f | 208b3b32ea434dcdca379c79f53632f0063236e2 | /pix2latent/optimizer/base_ng_optimizer.py | 5fad0b4ecaf97a36a71e03c0d7063c1442647cbb | [
"Apache-2.0"
] | permissive | Sadam1195/pix2latent | 1a07d24a846285084a51fb6825a41e891d29c2ab | 82ad7f563b4ae8d218e976cd0ceb3e4556fbc681 | refs/heads/master | 2023-05-26T01:17:56.678813 | 2021-06-02T19:59:37 | 2021-06-02T19:59:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,812 | py | base_ng_optimizer.py | import nevergrad as ng
import numpy as np
import torch
from pix2latent.utils.image import binarize
class _BaseNevergradOptimizer():
"""
Base template for NeverGrad optimization. Should be used jointly with
BaseOptimizer.
For full list of available optimizers
> https://github.com... |
1bf79319613ca1454f3a9ed21068bd899616395c | baf4429974f4b32d810aa4c8c5fe0e25f3d52c95 | /python2.7/hello_20200130/exception1.py | 6743e72f7cb379c1a8a5bcbb6cfa9fd78d3f4cdd | [] | no_license | devpup/python | 47a05b39aba479c174332ddedc8825526db250ca | ad01d7a0ca610d32d351d95bc5b630d04b28f87f | refs/heads/master | 2020-06-27T01:55:55.689689 | 2020-03-06T14:06:57 | 2020-03-06T14:06:57 | 199,814,456 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 575 | py | exception1.py | #-*- coding: utf-8 -*-
s = "123"
try:
print(int(s) + 1)
print(int(s) / 1)
except ValueError as ve:
print("ValueError occurs!!!", ve)
except ZeroDivisionError as e:
print("ValueError occurs!!!", e)
except :
print("Error occurs!!!")
else:
print("elseeeeeeeeeeeeeee")
finally:
print("ABCDE... |
40bc8122d98d407341a56251f9abfab019e0acd8 | 3fa0ccc37e7e594754deb9e0d8bb30839fff67de | /python/yacht/yacht.py | b40aab796bea7b198ebd425870d0c8c265fa7c21 | [] | no_license | moredatarequired/exercism-solutions | 33f94cb59a7bcef45f89b67267aa26873085a57d | ef2ea4e3a2a0fb778b829a7d28b22f9e88bee5c3 | refs/heads/master | 2023-01-14T06:09:57.509615 | 2020-05-07T14:52:15 | 2020-05-07T14:52:15 | 239,385,613 | 0 | 0 | null | 2023-01-05T08:14:05 | 2020-02-09T22:42:19 | Python | UTF-8 | Python | false | false | 1,132 | py | yacht.py | from collections import Counter
from enum import auto, Enum
class Category(Enum):
ONES = 1
TWOS = 2
THREES = 3
FOURS = 4
FIVES = 5
SIXES = 6
YACHT = auto()
FULL_HOUSE = auto()
FOUR_OF_A_KIND = auto()
LITTLE_STRAIGHT = auto()
BIG_STRAIGHT = auto()
CHOICE = auto()
def s... |
3e07a2a2d0a810c016720fa41d71d0771cbccfef | babebd3b42a3a179d0461697859819a4146cf86d | /preprocess/preprocess_physionet2012.py | 0edd6e7fc94ee51fa7dc094254b3fd6e25e2c97b | [] | no_license | hadisaadat/STraTS | b94262f6cd3cf26e5e7a8b4a1f1c44c25d5c1127 | f283e7976c60cbb12a82d44a4bcca0f5447a8c8e | refs/heads/main | 2023-04-19T15:47:32.136170 | 2021-05-05T16:38:24 | 2021-05-05T16:38:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,017 | py | preprocess_physionet2012.py | from tqdm import tqdm
import os
import pandas as pd
import pickle
import numpy as np
def inv_list(l, start=0):
d = {}
for i in range(len(l)):
d[l[i]] = i+start
return d
raw_data_path = '/home/reddy/sindhu/datasets/physionet_2012/'
def read_dataset(d):
ts = []
pbar = tqdm(os.listdir(raw_dat... |
3668e8009dca4ea261bdfbd325331c338fdac5a9 | 2904ae7f49ed579ce7a1fbbb142eb491c4a89409 | /web/parseLog.py | e7371f4a75b8e9e72d91c6abd1a7110c2ab16006 | [] | no_license | MimiProject/tetris_mcts | 079a28e8c0e522ff50e3cdd6eadd7b94fb0a2b0f | 7f24f8dbea26c1ef33a317070535ca8f5d0377bf | refs/heads/master | 2023-07-17T23:28:56.359009 | 2020-08-30T16:54:32 | 2020-08-30T16:54:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,464 | py | parseLog.py | import torch
import re
import sys
import os
import shutil
import filecmp
import numpy as np
from collections import defaultdict
from shutil import copyfile
sys.path.append('../')
class BoardParser:
def __init__(self):
self.file = open('../board_output', 'rb')
self.data = None
def update(se... |
32b3e65add5fb44320898b682e8f94f1460a32e7 | cd95336dba2c49d6b642c63cf378667da0eabcf8 | /memegenerator/meme.py | e7214afde728671ea91b3632ce3d29f19ecb3e0b | [] | no_license | gmanchon/memegenerator | 648561e86691a3b3c99275899018b643e74002b4 | e0a21f9cdfe34ce5a907976d474db1c50cd4458d | refs/heads/master | 2023-01-11T17:46:49.393325 | 2020-11-16T21:04:13 | 2020-11-16T21:04:13 | 291,747,006 | 0 | 0 | null | 2020-08-31T15:15:54 | 2020-08-31T15:04:30 | Python | UTF-8 | Python | false | false | 75 | py | meme.py |
def create_meme(word):
return f'this is your meme NEW VERSION {word}'
|
a714ac227d5185d7b4a932695ba6698e18d96341 | 1801a7a9cdef86cefe68af4cf43fc0ec1f3c8785 | /Final-generateTestFiles.py | 1b622b79cd20a245be8c48a13baf65d44e8d5855 | [] | no_license | sponsar/CS541-AI | f5bfa8d74d253e4e1bbea800bcd06f7737623dca | f907275d479a4c91d3a705f425ddd422faccf9e2 | refs/heads/master | 2021-01-10T03:42:55.612575 | 2016-02-16T00:40:23 | 2016-02-16T00:40:23 | 51,796,161 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,823 | py | Final-generateTestFiles.py | # -*- coding: utf-8 -*-
import sys
from os import listdir, makedirs, unlink
from os.path import isdir, join, isfile, exists
from shutil import copy
import random
def clearDirectory( path ):#将dataset里面的文件都删除
for the_file in listdir(path):
file_path = join(path, the_file)
try:
if isfile(file_path):
... |
8f6aff4671315c6cf09eecbdeb8740d4bba6aa28 | 2e4d33bad14ab88195fc9aac3b2d0841bacfa767 | /python-udemy/Assessments_and_Challenges/OOP/oop_challenge.py | 261611509d191540481848a02eb6af57b4429d2c | [] | no_license | Richiewong07/Python-Exercises | 062ea8386abad50efccfe398ca61972435f9e218 | a99816b23ad6fd338b26d66b5ccfd09bf6ddc527 | refs/heads/master | 2018-07-09T01:48:36.777998 | 2018-06-01T03:55:10 | 2018-06-01T03:55:10 | 103,578,685 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,255 | py | oop_challenge.py | # For this challenge, create a bank account class that has two attributes:
# owner
# balance
# and two methods:
# deposit
# withdraw
# As an added requirement, withdrawals may not exceed the available balance.
# Instantiate your class, make several deposits and withdrawals, and test to make sure the a... |
f1f8505390596caf6efe6840cd54ba9462d27c34 | e4353caa796d645857db2df9c9ffd666407dc677 | /Scripts/graphBuilder_Final.py | d5427117542a3bd32190487650d2d366427a5140 | [
"MIT"
] | permissive | CNCA-CeNAT/comm-patterns-clustering | 1f3dceecd25819d099259be57082f445d66678e4 | de91ad28a7bde621f37ef7666fd49bd29ff56be8 | refs/heads/master | 2021-05-07T03:59:38.068222 | 2018-03-14T17:00:12 | 2018-03-14T17:00:12 | 110,976,888 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,834 | py | graphBuilder_Final.py | #!/usr/bin/env python
# University of Pittsburgh
# Center for Simulation and Modeling
# Esteban Meneses
# Creates a graph representation from a set of logs.
# Date: 01-20-2015
from __future__ import division
import sys
import re
import datetime
import time
import matplotlib.pyplot as plt
import matplotlib.cm as cm
imp... |
1e1e6ff8c6c14d5ce936c4af4044e6ab5393206a | e1a7bbfc7ab3ec2ee0991ea6cfdd59f7f936c756 | /tf/ckpt_to_npy.py | 9235e85fbb6424cc84b76480468c7bc1f0a100f3 | [
"MIT"
] | permissive | laiguokun/fairseq | 0247068de72fa9360a28fbbeb2cb153239c3e4d9 | 6c01c91aac81eb2e3173add4463dfa45c404ffa5 | refs/heads/master | 2020-08-05T08:18:57.911610 | 2020-01-04T05:19:59 | 2020-01-04T05:19:59 | 212,462,353 | 1 | 0 | MIT | 2019-10-02T23:39:28 | 2019-10-02T23:39:28 | null | UTF-8 | Python | false | false | 1,269 | py | ckpt_to_npy.py | """Clean a ckpt to remove optimizer states."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
from absl import flags
import six
from six.moves import zip
import tensorflow as tf
import numpy as np
flags.DEFINE_string("input_ckpt", "",
... |
13bc165ab124d3e39cd162c66111bfe771019aff | c996b63688a389c2e751a2b9ed07c05c20a9bc34 | /SConstruct | 16ff3e55865510f2b5b94ae6aafb03f9300290c5 | [
"ISC"
] | permissive | LWSS/cpuid | 3380f2666e584e73dcad16e27440525b77f43974 | ad764c424495932aa224c5e91dc1e62967e8f76b | refs/heads/master | 2021-01-16T00:03:16.470780 | 2017-08-10T17:56:05 | 2017-08-10T17:56:05 | 99,950,805 | 2 | 0 | null | 2017-08-10T17:54:16 | 2017-08-10T17:54:16 | null | UTF-8 | Python | false | false | 4,828 | SConstruct | import os
import platform
import re
import subprocess
def subprocess_output(cmdline):
p = subprocess.Popen(cmdline.split(" "), stdout=subprocess.PIPE)
stdout, stderr = p.communicate()
return stdout.rstrip()
def read_whole_file(path):
f = open(path)
r = f.read().rstrip()
f.close()
return r
def describe_revisio... | |
f65329f70a26133fa37f16e4232574b5bb02780e | 18122a00ecb65396deb0fddf7c1e037172b4549e | /tests/test_data.py | ef0c9eef37be4118e47ca3faa4e54da9dc904e4f | [
"BSD-3-Clause"
] | permissive | djfurman/wmd-business-applications | bfc9a76958dc3ca8a1ccfa9b9ecc55d399d7988c | 96ea0795e030b5d75de1b2925a7a1c8b6f9bfa51 | refs/heads/main | 2023-05-29T21:48:54.947551 | 2021-06-14T00:28:40 | 2021-06-14T00:28:40 | 376,183,237 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 941 | py | test_data.py | from mypy_boto3_dynamodb.service_resource import Table
from wmd.data import create_business_application
from wmd.models import BusinessApplication
def test_it_creates_a_business_application(dynamo_table_business_applications: Table):
new_app = BusinessApplication(
name="BusinessAppWMD",
is_active... |
29b3ad679f53b2386f66690144e1883070fbf662 | 9eb8e0181f8dd990532919854b20162f11069d75 | /Question4a.py | ab894d8c17336fddf698a438ab8ff1e254485b89 | [] | no_license | matthijsthoolen/ICS-Lab6 | 0a4db195a1656cea3be206665835314784440fe0 | a7dcabd7d8d224b604513a3f93da1b9b0d52ee22 | refs/heads/master | 2021-05-29T16:59:54.080714 | 2015-10-25T20:54:35 | 2015-10-25T20:54:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,025 | py | Question4a.py | import networkx as nx
import matplotlib.pyplot as plt
import numpy as np
import math as Math
import random
import Question1 as Erdos
class erdos:
def __init__(self, N, i, k, prevalence, repeat):
self.N = N
self.i = i
self.k = k
self.e = 2.5
self.prevalence = prevalence
... |
372d0c43a4b0451742d59c6c891c9a38fbfb2856 | ed0cb6b55375c350a00633f50e4e0efe76decd75 | /projects/Hamming Graphs/cartesian_product.py | d9dde3bfde6903247f3b38750557daaa01829249 | [] | no_license | sonapraneeth-a/praneethas.github.io | 9bb9bee8aadcac834654a10127dca118c80c48da | b62052fa897e489204ecc3f9628052ee9cabb292 | refs/heads/master | 2021-05-01T13:59:35.170398 | 2015-07-23T21:27:56 | 2015-07-23T21:27:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,931 | py | cartesian_product.py | # Cartesian product of hamming graph
#-------How to run---
# Input Data-
#1. Enter the value of n1 and d1 for graph G(n1,d1)
#2. Enter the value of n2 and d2 for graph G(n2,d2)
#It will print the number of vertices of the cartesian product followed by vertices.
#Then, the edges between the vertices of the cart... |
44d6bd16a16686e52038c31d25ca1706a44f3269 | ff8562fe988f7f456f649aea09310133c1b39538 | /network_analysis.py | a18817791f8682841bc2a969695ad963ec0f06c2 | [] | no_license | UberHowley/research-networks | 097d2cf389571272b2153344a02da52c8f919903 | 872a360880dde846b34aa537816c37c2c37f06d6 | refs/heads/master | 2020-03-30T02:59:24.148730 | 2018-10-12T15:36:12 | 2018-10-12T15:36:12 | 150,662,283 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,521 | py | network_analysis.py | __author__ = 'ihowley'
__project__ = 'networks'
"""
This module takes in a list of authors (rather, strings) to query
on Google Scholar, finds all their co-authors, and constructs a
network file to be visualized as a social network analysis.
(c) 2018 ihowley
"""
import scholarly
import datetime
CONST_DELIMITER = "," ... |
3785197ba21457b94ba883a5c3d195c5c0e95bd9 | 27f404eb7eccd48fb2557578f13d87a6e9c32023 | /depend/code/copyT2_stress_wm.py | de874d15fafbbdbf4006a1fc4a552635269ec088 | [] | no_license | MoonJoseph/Kmeans_try | ba5297d640ade052e76e5349866bbce18f638a5f | d014ce539317b56f3799304f889996e25e35cbff | refs/heads/master | 2020-07-06T02:28:26.225586 | 2019-08-27T03:01:10 | 2019-08-27T03:01:10 | 202,858,160 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 580 | py | copyT2_stress_wm.py | import os
import shutilc
import re
src = '/lustre/iCAN/data/2011'
dst = '/lustre/iCAN/data/genghaiyang/nback/h18_l18/conn_FC/T1Img'
sublistpath = '/lustre/iCAN/data/genghaiyang/nback/sublist/sublist_TA_36.txt'
sublist= open(sublistpath,"a+")
n2=[]
for j in sublist.readlines():
n2.append(j.split()[0])
sublist.close... |
814d794af3db0b082602fb0561f8d4a10ed9185e | 35eb66be22c490d36b3c6622d85c8c763d89cda3 | /CompositeVSE/handlers_high_bit_depth.py | c368bc0032a35ce2f3aeafec74c7b1f34b62fc49 | [] | no_license | tin2tin/Blender_Addons | d8d55ac41f34f72b243c322633805541d6b2cce2 | 8647fffb78dee29decfd05ff96453c31f0ea10c1 | refs/heads/master | 2022-07-20T23:54:03.871120 | 2022-07-14T06:41:02 | 2022-07-14T06:41:02 | 260,388,852 | 0 | 0 | null | 2020-05-01T05:46:45 | 2020-05-01T05:46:45 | null | UTF-8 | Python | false | false | 7,844 | py | handlers_high_bit_depth.py | ##### Handlers for High Bit Depth Fix
LABEL_ID = 'HighBitDepth_'
import shutil
from os import path, makedirs
import bpy
import subprocess
from bpy.app.handlers import persistent
# todo: delete frames post render
@persistent
def render_pre_sequencer(scene):
if scene.eswc_info.bool_use_high_bit_depth_fix:
... |
c1a1f6b53e363d0152253a8b6732ebe2b36e01b0 | 5162be1f10623e0b69a4c8e2ac00401bced8c57d | /HW040.py | 84bd08559eeff8890fe6cf33b109a6f797144e73 | [] | no_license | AndyLee0310/108-1_Programming | 488b48bdc2d7a8b0615e3287f65a5a2faf9cf744 | 49ab850d3a02c9f3a2bc4aad3b8db20cea16a4fe | refs/heads/master | 2023-07-25T10:58:57.828634 | 2020-09-25T01:38:50 | 2020-09-25T01:38:50 | 298,433,456 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,013 | py | HW040.py | """
摩斯密碼
請使用Dictionary製作摩斯密碼對應表(使用"."和"-"),
把文字加密為摩斯密碼後分行輸出。
摩斯密碼對應表:https://zh.wikipedia.org/wiki/%E6%91%A9%E5%B0%94%E6%96%AF%E7%94%B5%E7%A0%81
輸入說明:
輸入一行欲加密的英數字。
註:只會有大寫英文字、數字不會有空格、其他字元
輸出說明:
將英數字加密後分行印出。
註:不用空格隔開!
Sample Input:
ABCD0
Sample Output:
.-
-...
-.-.
-..
-----
"""
morse_code=... |
5d738e074b3cd6a912e08991fac989f03e253aac | 014e07547cb780af5a68ea073b455466f9a44799 | /cookie_clicker/buildings/factory.py | 6b3bec38304293ac62fa1a9d6b6fa54be804443d | [] | no_license | chtheiss/cookie_clicker_simulator | 2fe989c6c65c0a059f0a71fd721b39b1f7b4d87e | e862ca517c2381f04bf1dc31e5d4fcad0ea2b525 | refs/heads/master | 2022-02-16T21:56:44.852517 | 2019-08-23T21:18:12 | 2019-08-24T19:31:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,144 | py | factory.py | """"""
from __future__ import annotations
import copy
import math
from typing import List, Union, Dict
from dataclasses import dataclass, field
from decimal import Decimal
from cookie_clicker.utils import Config
# from cookie_clicker.clicker_state import ClickerState
D = Decimal
class BuildingFactory:
""""""
... |
9dc3a5d8edde76679293ab89704c80b49eb5c2c8 | bff39fe6eb99452202b79da3c8bf5454fdf23d23 | /flask_test/web/flask_API_resources.py | cd30a1415e7fbd4e043bd3d9f3c794e4a76d1a20 | [] | no_license | RushiSoni/docker_flask_app | 9f13c6b5998adffb3f36657de7ae8cb7697b278f | b943fbc66b8ad79eabaa64fcecae131f43de83f3 | refs/heads/master | 2021-01-09T14:05:13.007851 | 2020-02-22T11:50:49 | 2020-02-22T11:50:49 | 242,330,229 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,682 | py | flask_API_resources.py | # -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
from flask_restful import Api, Resource
from flask import Flask, jsonify, request
app = Flask(__name__)
api = Api(app)
def checkPostedData(postedData, functionName):
if functionName in ["add", "subtract", "multiply"]:
if ("x" ... |
208419472fd979952b728f28b8dc1f89a6a20014 | 17e7343389218fa10e97120dc27bf1dcc5e0ec9b | /crawler_spider/run.py | 4b984d9817f32759548ecaeed91922b246831391 | [] | no_license | HaManhDong/Distributed-Crawl | ee53292bbee178dbf86a7cc2ff4e4d7a6052af91 | 02d25a71d4b0703b3e0281a98605be12d7201279 | refs/heads/master | 2021-01-20T04:42:51.335163 | 2017-05-25T19:02:25 | 2017-05-25T19:02:25 | 89,720,195 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 438 | py | run.py | import os
import threading
from scrapy.crawler import Crawler
import time
def foo():
# time.sleep(4)
command = 'scrapy crawl abcnews -a url="http://abcnews.go.com/Politics/trump-asked-nsa-director-publicly-push-back-fbis/story?id=47578374&cid=clicksource_77_null_headlines_hed"'
os.system(command)
t = thr... |
91e9826d482622f844c720d8dbc887880b2ab8ab | d1b05bbbf49f01813659397f96be8a2f9f36093f | /andablog/tests/test_templatetags.py | c8fcee3dbe7957cfce4892dec05c87280a5d4719 | [
"BSD-2-Clause"
] | permissive | NeolithEra/django-andablog | 0f0ca78b42d7c3dc038bc69134da5a199078559e | e15b9af397d05ab3fd1649020a798df3b7df5041 | refs/heads/master | 2022-07-03T13:52:50.449373 | 2020-04-15T12:36:24 | 2020-04-15T12:36:24 | 262,945,794 | 0 | 0 | BSD-2-Clause | 2020-05-11T05:20:08 | 2020-05-11T05:20:08 | null | UTF-8 | Python | false | false | 2,004 | py | test_templatetags.py | from django.test import SimpleTestCase
from django.utils.safestring import SafeString
from .. templatetags import andablog_tags
class TestAuthorDisplay(SimpleTestCase):
def setUp(self):
class MockAuthor(object):
def get_short_name(self):
return 'ShyGuy'
self.author = ... |
9935aacebb5ab764acfdef89b26ff8e75406c94a | 9abc1fe64663e658c1926f0e238004ce890437bf | /torcms/handlers/static_handler.py | 7a334bafdbbe25d38a058ff23c5873190fd4cc87 | [
"MIT"
] | permissive | bukun/TorCMS | e7a8a3a0e4e728e64d2a34c56d694e48e0e3a098 | f9afae46a5029d213d5fb60850c93b37b813ae15 | refs/heads/master | 2023-08-31T05:37:35.861174 | 2023-08-29T02:41:12 | 2023-08-29T02:41:12 | 30,642,412 | 256 | 105 | MIT | 2023-07-20T02:24:20 | 2015-02-11T10:22:06 | CSS | UTF-8 | Python | false | false | 814 | py | static_handler.py | # -*- coding:utf-8 -*-
'''
All other static pages.
'''
import os
from torcms.core.base_handler import BaseHandler
class StaticHandler(BaseHandler):
'''
All other static pages.
'''
def initialize(self):
super().initialize()
def get(self, *args, **kwargs):
url_str = args[0]
... |
7addcdfd544ddc8fead1dcb6dd4232b68e73b563 | 2d7bd9dd19724359d4ce7abe82ab3513cd312fb7 | /dev/rigging/ui/rigBuilder/nodeEditor/node/graphicsNodeItem.py | 3a6355bb190b85aa19766e5a7a56e27344a3e3e4 | [] | no_license | harriswu/_pipeline | d3095a05ea8ed6545fa7b80d694350b18d065895 | 3c84be29d2e59ea94c5c4698bab9607c202db5ee | refs/heads/main | 2021-12-01T20:15:04.338371 | 2021-10-04T07:35:10 | 2021-10-04T07:35:10 | 100,880,805 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,625 | py | graphicsNodeItem.py | from dev.package.ui.qt import *
class GraphicsNodeItem(QGraphicsItem):
"""
node's graphic object, handle how node should visually behave in viewport
"""
def __init__(self, node, parent=None):
super(GraphicsNodeItem, self).__init__(parent)
# store node edge class for easier access later... |
2f15936f7568b0a06ad5da58b9511217f1d3f566 | 9375af6c9b913a79a31d7263b80499bed9d36893 | /Scripts/mol_anim/state.py | a4752a658dbe5d31328c0bc9e49bfe6e58a0f6ff | [] | no_license | sept64/blend_mol | 210ff007b69e1fc07206fcf0076be686a5406f72 | 2a93f97aa5cb4ef5a72db0edd137ccdc613dab38 | refs/heads/master | 2021-06-05T21:13:53.998928 | 2020-05-20T07:51:49 | 2020-05-20T07:51:49 | 139,825,111 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,568 | py | state.py | #!/usr/bin/env python
# -*- coding: utf8 -*-
"""
Class State of the blend_mol project, contain all the data corresponding to a state of the molecule (atom and bond to create, to move and to destroy
"""
from blend_mol.atom import Atom
from blend_mol.bond import Bond
TYPES = ['cis', 'cis_detach', 'trans_detach', 'trans... |
68c2425d9ce1c57f08e3a24c8922ed0dd0ebcb24 | 920ad367b7fdd86c170dd33ea24a364277a47d33 | /Prototypes/PYTHON/Sandbox/DC_OOP/Datastructures/Dataset.py | 8356e59a6ddef85af915817eb9e33664faa6f557 | [] | no_license | yadala1998/BGCEGit | 361a33b3e09b1b8a6e30ace3f77f9752235cbd70 | ad92eb9b0f4eb07308b3cea73f5684cc2f6dbd01 | refs/heads/master | 2020-04-09T03:06:18.120511 | 2016-04-27T07:53:42 | 2016-04-27T07:53:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,074 | py | Dataset.py | import numpy as np
import matplotlib.pyplot as plt
from Datapoint import Datapoint2, Datapoint3
__author__ = 'benjamin'
class AbstractDataset(object):
# parses data from a dictionary with {(position): datavalue} and constructs Dataset object out of it.
# position has to be a tuple!
_dimension = None
... |
da22c112b5c5a1b034724d9363bcb802d36dc888 | 15fbbece6a7a96cb31b1e9f675fbe1c706076e43 | /ConvE.py | 93cbb193bfc483f7fd8becf6da7a2ce699b0de6b | [] | no_license | aolimelo/ConvE | 7a0275ddbc7db40ee1db9e8953995138294f84b6 | d8163eb6d97f3edd6ffdab3f306b44d235845386 | refs/heads/master | 2021-01-22T21:22:30.142866 | 2017-07-14T14:12:47 | 2017-07-14T14:12:47 | 85,419,282 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,168 | py | ConvE.py | from linkpredictor import LinkPredictor
from keras.layers import Dense, Dropout, Embedding, Activation, Merge, Input, merge, Flatten, Lambda, \
Conv2D, MaxPooling2D, Conv1D, MaxPooling1D, Conv3D, MaxPooling3D, Reshape, LocallyConnected1D, LocallyConnected2D, \
AveragePooling2D
from keras.models import Sequentia... |
2729154c77d383bc8e6a0410a67189defb52b2b5 | fbbdd397943b5f158c0d8ffe97cfd53d4728a9ef | /avatar/src/blender_control/src/ros_blender_bridge.py | ea0b37433c76680ea572a94df365d8dbaee73b58 | [
"MIT"
] | permissive | DLMdevelopments/Hologram-pyramid | b434040bee919162cb71a0c88528909f20e3f92f | 8eb8cd7549c126bd078c5fd45f942506c4c04282 | refs/heads/master | 2021-01-25T10:56:58.954308 | 2018-03-13T16:46:41 | 2018-03-13T16:46:41 | 123,377,029 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,670 | py | ros_blender_bridge.py | #!/usr/bin/env python
import rospy
import socket
import time
import sys
from avatar_msg.msg import AUlist
# initial face position
rostro = { 'AU0': 1, 'AU1': 1, 'AU2': 1, 'AU4': 1, 'AU5': 1, 'AU9': 1, 'AU12': 1, 'AU15': 1, 'AU25': 1,'AU27': 1, 'AU45': 1, 'AU51': 1, 'AU52': 1, 'AU53': 1, 'AU54': 1, 'AU61': 1, 'AU62'... |
903171700166f279754050db8330560ce618bc02 | b667a751f1205eb5b0acb0654756ca30633a8da5 | /tests/test_loto.py | 9918467d8bb452ab3f876a8dae9f4916645036b7 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | baychimo/loto | c63cc52ab79ea4f25e08ec890898f9a6066003fe | a3dbcd016c5dbcbcadb3707b209240de319c8718 | refs/heads/master | 2022-03-03T11:50:11.158640 | 2022-02-13T09:56:03 | 2022-02-13T09:56:03 | 180,145,855 | 8 | 2 | MIT | 2022-02-13T09:55:03 | 2019-04-08T12:37:42 | Python | UTF-8 | Python | false | false | 32,351 | py | test_loto.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
I wanted to familiarize with the Hypothesis library. So...many tests are probably a little over the
top.
Run the tests like so to get more interesting info::
pytest -v --durations=0 --hypothesis-show-statistics tests/
"""
import contextlib
import csv
import multi... |
6ac78771ababc0081f9483a66c4ef83d405026e6 | f8de402da961f2dbb984f18acec24d753f0b2ce5 | /app.py | 4be7b7a35de6791bb791933cbac64ea4d910b18e | [] | no_license | yandeqing/flask-aceadmin | 237c3cb7ace3bfd761c00eebcb0f045f3f3f8842 | 0bde90d14bb16d594688532e99826897f073db21 | refs/heads/master | 2020-06-02T02:46:55.951434 | 2019-07-29T07:33:46 | 2019-07-29T07:33:46 | 191,010,486 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,827 | py | app.py | from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html')
if __name__ == '__main__':
app.run()
@app.route('/blank')
def blank():
return render_template('blank.html')
@app.route('/buttons')
def buttons():
return render_templat... |
da601ec772505760cc8097c958f1c029c3b32d95 | 962b9e111f76f7f455ce569fb54f33ec4b0c0c12 | /Week 1/My own notes/package/subpackage/submodule_2.py | f9a6d473aac8a599dba097611e4ff0b2d104fe18 | [] | no_license | Wagenod/Diving-in-Python | 9001441824efdb1844e698f7c1c5f12dd4ff498c | 54bfb9664540df2216b02ab367f891496b69f595 | refs/heads/master | 2021-03-17T22:56:50.286917 | 2020-05-28T14:07:13 | 2020-05-28T14:07:13 | 247,024,316 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 39 | py | submodule_2.py | #module.py
print("submodule_2") |
e301d317926782b09ac53bfce32b1dbf9d993d98 | e7abcedc58da14bbcb998963fb0722ace3b482cc | /QueueUsingArray/Main.py | 98b8c4253e2028850e8659b1520072c69b6604c9 | [] | no_license | jhashuva/DataStructureswithPython | 5ab051544c40474542d10bae4c88fb5b7f7b9607 | d02dd5dd33f2d79941a100078f1b76ef0ffc862a | refs/heads/master | 2022-11-09T01:54:03.929781 | 2020-07-02T15:17:42 | 2020-07-02T15:17:42 | 269,635,952 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 673 | py | Main.py | from Queue import Queue
q = Queue()
a = """
1. Enqueue
2. Dequeue
3. Empty3
"""
choice = 'Yes'
while choice:
print(a)
inp = int(input("Enter correct choice: "))
if inp == 1 :
b = int(input('Enter the element to insert in the queue: '))
q.enqueue(b)
print('Queue is... |
c0f673e198a4fdb9a1a3a1c8dcddc94fff266354 | 5612fdaf75d995f212d2d9a200a58a31623960d7 | /POO/Person.py | f086815fd2098a18fb99ebe170cd2bb1811040b5 | [] | no_license | DevWebJr/Udemy | 366ff63851f2d46e8358cc7e24d5e6c705e04eee | 9ab3f150bd32ce7cabc78b36c4f8b9d0f1baad90 | refs/heads/master | 2023-08-16T04:15:17.963087 | 2021-10-23T10:27:54 | 2021-10-23T10:27:54 | 419,447,042 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,308 | py | Person.py | class Person:
def __init__(self,first_name:str, nick_name:str, age:int,gender:bool):
self.first_name = first_name
self.nick_name = nick_name
self.age = age
self.gender = gender
def Is_Adult(self):
return self.age >= 18 #__adult__# or #__child__#
# def... |
65016a7b3a49d8f0b09e7517957a910777d51454 | 23dfd3b379d54255cd5a028804eeeae510bd7561 | /Sesion14/14.4_concatenar.py | 357a61bca8ca76013fc9bcbe422580928c06df83 | [] | no_license | sebbas711/mision_tic_G11 | 80ee343ccae58db4a78412a1aec4ee88ba8e9da4 | fb4413b48ebe82051d636ec95606ad85a1937ea1 | refs/heads/master | 2023-05-25T15:10:30.853942 | 2021-06-14T22:20:04 | 2021-06-14T22:20:04 | 369,695,517 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 144 | py | 14.4_concatenar.py | frase1 ="Uniendo"
frase2 = "Palabras"
frase3 = "Python"
nueva_frase = frase1+" "+frase2+" "+frase3+" "
print(nueva_frase)
print(nueva_frase*3) |
3283d373add4dd4af2ab4b7788719d520206f895 | 0e4ba06b8c0622dace861f03863d6f2853ab751f | /e89_security/tools.py | d8bfcb69b640b3673df1810047e6e8f8163f8327 | [] | no_license | estudio89/e89-security | 8caa7196d189ece6463c40f13dc688d8fac489c5 | 8775d511c2dba49f9f5372f2fa787b5736926089 | refs/heads/master | 2021-07-11T11:59:49.796714 | 2021-03-04T22:20:38 | 2021-03-04T22:20:38 | 35,898,869 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,450 | py | tools.py | from __future__ import absolute_import
from __future__ import unicode_literals
from future import standard_library
standard_library.install_aliases()
from django.http import HttpResponse, Http404
from .data_parser import RawPostParser
from e89_security import decrypt_message, encrypt_message, _gzip_string, _ungzip_stri... |
932ebda04ab2dba756649e0e1535a6c719a8dc2b | 3e403826bd51ba6acaec0282ef03486b6db054be | /task6.py | ec6c9711af7005f124ecf75c7ca0cc02f766f684 | [] | no_license | DevAqsaShahzad/Python | 4e88c1f936ebf36511db8b9b9f231e5bf3bacbe4 | c4a17d8c7cf7466d792825e37ccf05a3fc780b2e | refs/heads/master | 2022-02-28T14:24:22.596836 | 2019-10-20T09:45:52 | 2019-10-20T09:45:52 | 214,393,285 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 907 | py | task6.py | player1=str(input())
player2=str(input())
if(player1=='S' or player1=='s' and player2=='S' or player2=='s'):
print("Game Draw")
if(player2=='R' or player2=='r' and player1=='R' or player1=='r'):
print("Game Draw")
if(player2=='P' or player2=='p' and player1=='P' or player1=='p'):
print("Game Draw")
if(play... |
d4ca085c1cc16028ae7c34b2af5896c014d58a2e | f20840ac771d18a4cf82c36e87339fd8c73da88d | /Women/Outstanding_matches_list.py | 12d543efece7968b4b122e781599c25a8fde798e | [] | no_license | carlosror/Boricuas_NCAA_Season_Summary_2019_2020 | 96716e25127504f2638f680ea870fe60bda0e750 | 1284ea823f8b3f1b78e737547bd18ea4bd89d3df | refs/heads/master | 2023-06-04T11:12:23.235847 | 2021-06-20T22:48:39 | 2021-06-20T22:48:39 | 299,508,324 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,991 | py | Outstanding_matches_list.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from scribus import *
margins = (36, 36, 0, 0)
def draw_line(x1, y1, x2, y2, line_type = LINE_DASH, width = 1, color = "Map Blue"):
this_line = createLine(x1, y1, x2, y2); setLineStyle(line_type, this_line); setLineColor(color, this_line)
setLineWidth(width, this_line... |
b11867e33654635ac43799249c3998985a22539d | dba3055f5bfd981b6327fe713d489b458ad2ea94 | /okregi2.py | a30ccdd603d756e7a821ac8684cc444bada775f5 | [] | no_license | DamianS6/exam-preparation | f4e64c7da8c23cfb41a9df2674eb9b93fb2cdbed | 1be2ca37d7cde3450b3c1eed18bd1e4c792f81cd | refs/heads/master | 2021-05-15T02:51:08.767935 | 2020-06-17T08:08:46 | 2020-06-17T08:08:46 | 250,620,280 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,954 | py | okregi2.py | with open(r'Arkusze/Probna_2016/dane.txt') as dane:
okregi = [__.rstrip().split() for __ in dane.readlines()]
# 4.1.
def najkrotszy():
with open(r'Arkusze/Probna_2016/wynik1.txt', 'w') as wynik:
promien = int(okregi[0][2])
for okrag in okregi:
if int(okrag[2]) < promien:
... |
0df4c400eeef435a72bd7b7b6892a82904c68939 | 81544df6f03417a21426c0291d817971e5d298b5 | /createPlot.py | b78ae5fcdc02ef2a4d0a858f330f65db5d5d54de | [] | no_license | sauravbiswasiupr/login-app | e95e0e2d1bccbd6182a952b18eb30412e0973960 | f3b470baef0db4423620ed0bee890c24bc4c5575 | refs/heads/master | 2018-12-29T18:58:00.977613 | 2014-10-21T01:57:52 | 2014-10-21T01:57:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 605 | py | createPlot.py | import json
from matplotlib import pyplot as plt
data = open('data.txt')
data = json.load(data)
keys = data.keys()
print keys, len(keys)
length = len(data[keys[0]])
y = [0] * length
for key in keys:
userResp = data[key]
for i in range(len(y)):
if userResp[i] != None:
y[i] += int(userResp[i])
result =... |
9fd2204877d5de8adfcd7bad88aec62bbde3c911 | bebb8924f2f9b5f449c994abff347c1cade73a44 | /0x0F-python-object_relational_mapping/relationship_city.py | a1a6eab5a4197f82c5f1a7c0324c28b77214203a | [] | no_license | amacharla/holbertonschool-higher_level_programming | 09e642a846a8fa42b3cb7a4ac7aefa69065ea5d3 | 5a6c56ce2bf1ddb99c125f0043d53846cb85a663 | refs/heads/master | 2020-06-28T20:03:44.063217 | 2018-03-13T01:25:09 | 2018-03-13T01:25:09 | 98,936,407 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 627 | py | relationship_city.py | #!/usr/bin/python3
""" Module with SQLAlchemy """
from sqlalchemy import Column
from sqlalchemy import Integer
from sqlalchemy import String
from sqlalchemy import ForeignKey # new attr
from relationship_state import Base
class City(Base):
""" Creating a Table for 'cities' """
__tablename__ = 'cities' # na... |
cdf1e1a5de85b1722bc56a3d07dfc1b8cc590b2e | 8874a74d905246a0fd88b3660f8b779d190e0053 | /app/persistencia/diccionario.py | e241e9b6161a56ff3c37017178bdd183f8a0907e | [] | no_license | janetmancha/api-personas | 74b6d4dfde6861d34525b87fc60db2b959e5e9ba | f4f1ea3086573586b9591f246caba699cc325e7f | refs/heads/master | 2023-02-20T13:26:04.832254 | 2021-01-21T12:20:51 | 2021-01-21T12:20:51 | 331,611,530 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 490 | py | diccionario.py |
personas = {}
def insertarPersona(nombre, edad):
personas[nombre]={"edad":edad}
def listarPersonas():
#return personas
# convertir el diccionario de personas en lista
listaPersonas = []
for persona in personas:
listaPersonas.append({"nombre": persona,"edad":personas[persona]["edad"]... |
f05a15b37fedafc35d1a1c9619b578def17a4c3b | 64baaa31b9afea50921d1a3678e3f57442e0da45 | /recitations/recitation-4/code/ffnnmodel.py | 69c71e7b37baead4818e559a4602a6767478e8f7 | [] | no_license | cyber-rhythms/cmu-11-785-deep-learning-spring-2019 | 47cde324d20c6cbe56cb264083776a3758fe1b37 | de95148b89b7c7e983d3486e1d9975fa98ff511f | refs/heads/master | 2023-05-12T13:18:01.607281 | 2021-06-03T17:22:29 | 2021-06-03T17:22:29 | 254,970,278 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 752 | py | ffnnmodel.py | import config
import paths
import torch
import torch.nn as nn
class FFNN(nn.Sequential):
def __init__(self):
l = []
sizes = [config.input_size] + config.hidden + [config.nclasses]
for i in range(len(sizes)-2):
l.append(nn.Linear(sizes[i], sizes[i+1]))
if config.dr... |
441f535a27b3c6002ceebb574c092f86f73e5b37 | 5dcac308696d104fb95819b58196348d219b68aa | /gntp/lookup/base.py | 9c0caf6f7458074f300d7610ad31695648170e4c | [
"MIT"
] | permissive | BayLee001/gntp | 7447919c5df0429e825f875f4d90b2e910b0c594 | e02908ba77640d96598c29a010973463fe00eb78 | refs/heads/master | 2022-03-27T21:16:43.600303 | 2020-01-11T19:17:52 | 2020-01-11T19:17:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 498 | py | base.py | # -*- coding: utf-8 -*-
from abc import ABC, abstractmethod
import numpy as np
import logging
logger = logging.getLogger(__name__)
class BaseLookupIndex(ABC):
def __init__(self):
pass
@abstractmethod
def query(self,
data: np.ndarray,
k: int = 10,
is_t... |
6a8178db427966dfe3f9635b9dfb80db756643d7 | 483e0706196f6af53e092d650e8a41d9a971449e | /08_slugify.py | c74aff59601d799c5d4f6577010ccb45dbbbbf77 | [] | no_license | wastemaster/ellx_test | 1be92a0968ce1adbf2d2510aa3d5c3a7afef8678 | 315832b20ecbfd9664a73606f2d8e55d7233fc96 | refs/heads/master | 2023-06-12T23:06:03.929366 | 2021-07-01T04:38:59 | 2021-07-01T04:38:59 | 381,795,189 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 981 | py | 08_slugify.py | from slugify import slugify
items = """Channel
Region
Division
Headquarter
Category
Package Segment
Year
Year month
Sales Headquarters Code
Sales Division
District headquarters code
District headquarters
CCBJI channel Lv.1 code
CCBJI Channel Lv.1
CCBJI channel Lv.2 code
CCBJI Channel Lv.2
CCBJI channel Lv.3 code
CCBJI... |
10cee7cc3040bf8d7cf169e71bfd49ff72705e9e | 07cb3f6ff10c69c517e7028e1c37d037f4088abb | /src/draft/laplacian_esn.py | 2c187c3a1159253a8dd69fc03d788fb32bd42bfd | [] | no_license | zimmerrol/rcp_spatio_temporal | b8e684f6bd94424257cbb13f91ab9779eaba5d8e | 306d069ed891c599cddf0e177d416f64c78b9b6e | refs/heads/master | 2021-03-27T18:23:06.433523 | 2018-05-02T18:52:17 | 2018-05-02T18:52:17 | 83,151,603 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,328 | py | laplacian_esn.py | import numpy as np
import scipy.sparse.linalg as linalg
import scipy as sp
N = 150
n_units = N*N
np.set_printoptions(threshold=n_units*n_units+10, linewidth=200)
W = np.zeros((n_units, n_units))
W[0, 0] = 1.0
W[0, 1] = 1.0
for i in range(1, N - 1):
W[i, i] = 1.0
W[i, i-1] = 1.0
W[i, i+1] = 1.0
W[i,... |
80b0560f0d0b84860a325977f405b234d99b0508 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/verbs/_retreating.py | 652292dcb1fee335fdfaec0311521699d908b14b | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 249 | py | _retreating.py |
from xai.brain.wordbase.verbs._retreat import _RETREAT
#calss header
class _RETREATING(_RETREAT, ):
def __init__(self,):
_RETREAT.__init__(self)
self.name = "RETREATING"
self.specie = 'verbs'
self.basic = "retreat"
self.jsondata = {}
|
d42ebcb2f3ee8941f369af09d3e5d3479d9d7b60 | 483ba8689248908eab1bdf58a44954b40f637fd6 | /src/rosdepthtest/script/test_camera.py | 7f892a6e123d356f98e7e89a3e9ee44def937a1b | [
"MIT"
] | permissive | iiisrobotics/bulldog_ws | d46fa798dab8626734190c369d2fe619cacd4afe | 5bf3c48fd9c51fdee7c36705ce99e59e4abd96ed | refs/heads/master | 2023-07-19T08:06:08.001318 | 2019-07-26T11:42:34 | 2019-07-26T11:42:34 | 223,537,300 | 0 | 0 | MIT | 2023-07-06T21:17:04 | 2019-11-23T05:38:41 | Python | UTF-8 | Python | false | false | 922 | py | test_camera.py | #!/usr/bin/env python
import rospy
from sensor_msgs.msg import Image
from sensor_msgs.msg import PointCloud2
def callback(data):
print("height: " + str(data.height))
print("width: " + str(data.width))
print("point_step: " + str(data.point_step))
print("row_step: " + str(data.row_step))
print("feild1: " + data.fi... |
8bc206e88309cd14db3ffa63a6f98879a487939a | ab1b161607a6e80d9b60de7d114f012d24a093cd | /data/__init__.py | 6f774670ac2af9eae5dff3c54af856853bce0ef5 | [] | no_license | CS-3560-02-2/cppenrollmentsystem | 552423781a1ae0148c6e05bed98329762b882634 | b4ac6c8b8dd80de66d99d9d0aa74c2cb046dbde7 | refs/heads/main | 2023-09-06T08:15:52.381777 | 2021-11-18T23:03:12 | 2021-11-18T23:03:12 | 414,800,605 | 0 | 0 | null | 2021-11-18T23:03:13 | 2021-10-08T00:50:35 | Python | UTF-8 | Python | false | false | 44 | py | __init__.py | """Package contains data access classes
"""
|
a4fcf591922f5f182ab8727ddb840dbbd288fc28 | 71014b101f55cc95e478f51f10cd1ee11ab0ef52 | /freight_cli.py | bfc6c7428887e711f3f882368730a5e292f304ff | [
"Apache-2.0"
] | permissive | getsentry/freight-cli | abe585f5770ea7f3b02172843d9d3497e91440fc | 7518a8bb9c0ac8a0b5b239df8a6d6f9e65f4a224 | refs/heads/master | 2023-08-22T06:00:51.449590 | 2022-09-27T17:17:29 | 2022-09-27T17:17:29 | 30,809,530 | 25 | 5 | Apache-2.0 | 2022-09-27T17:17:30 | 2015-02-14T21:35:13 | Python | UTF-8 | Python | false | false | 8,178 | py | freight_cli.py | import json
import re
import sys
from collections import namedtuple
from time import sleep
from urllib.parse import urlsplit
import click
from urllib3.connectionpool import connection_from_url
Task = namedtuple("Task", ["app", "env", "number"])
class ApiError(Exception):
def __init__(self, code, error=None, err... |
5ebc6a2a61cc409c76a5ce3790b9341e7f021e99 | 1e62f30f75a256c3e766f234a47fd344fed10b05 | /Clause Level Analyses/Clause Classification/batch_classifier.py | ebee6c51a27b2ce1b08ce61d585f962a49dd5f51 | [] | no_license | BabakHemmatian/Marijuana_Legalization_Corpus_Study | 0b3bd95bde6515e12e736177a3ea7049783db69f | 2ee46f0ca380e53ef245ad314ea1c8ddafc7ad19 | refs/heads/master | 2021-11-04T18:59:55.758084 | 2021-09-21T23:05:26 | 2021-09-21T23:05:26 | 189,859,591 | 6 | 3 | null | 2021-09-21T23:05:27 | 2019-06-02T14:56:09 | Jupyter Notebook | UTF-8 | Python | false | false | 782 | py | batch_classifier.py | import argparse
import io
import os
if __name__ == "__main__":
argparser = argparse.ArgumentParser()
argparser.add_argument('--array', type = int)
args = argparser.parse_args()
# array is the id of the node running
array = args.array
segmented_file = '/users/asriva11/data/asriva11/comments_se... |
40b54ed790e683ae186417460fcf182505230543 | 73738d29d2932fd73d8265b86df846d074e05530 | /lecture_7/utility.py | b5010eab87c2bc6c79b77b5418ac01784b34b6ab | [] | no_license | BADAL244/3d-pointclouds | d6f47af324277e21254c97897289f8843419f6c2 | 87f29153e7f850cef668c9bab4b388fc2d2cbda1 | refs/heads/main | 2023-06-10T14:24:24.968711 | 2021-07-06T17:04:46 | 2021-07-06T17:04:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,108 | py | utility.py | import open3d as o3d
def read_pointcloud(path):
"""
读取ModelNet 40中的点云文件
:param path: 点云文件路径
:return: 返回列表格式的点云数据
"""
with open(path) as file_object:
off_line = file_object.readline()
if len(off_line) > 4:
num_point = int(off_line[3: -1].split(' ')[0])
else:... |
7311382876d19b6a001e7376703053ae0fb8388a | 9c02c3e764f697b280d1ac062feb69588dfca592 | /Lesson1_InsertionSort.py | c4916b30695e9ee3cb96fc43461e6e6101e881e7 | [] | no_license | Chucooleg/UW_Algorithms_and_Data_Structures_2 | 0e69dcb462ea33b427cdb1969bff8e2e4e6091e9 | 6a3d36dfa967be1f13ae6e6940cea33b3902b260 | refs/heads/main | 2023-06-04T16:11:20.572611 | 2021-06-18T17:04:59 | 2021-06-18T17:04:59 | 358,432,414 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,046 | py | Lesson1_InsertionSort.py | from typing import List
class InsertionSort:
@staticmethod
def insertion_sort(A:List[int], recursive:bool=False):
if recursive:
print("Insertion sort recursive")
InsertionSort.in_sort_recursive(A, len(A) - 1)
else:
print("Insertion sort iterative")
... |
0ecbfb354d1f76a6bb4ebade6bd79da371c7ca2f | 0182e2165942fba64cac011f8d0baf3cb4ff6097 | /UserStory/views.py | cfdea42350031719d844cd05f0e33714c2b92ceb | [] | no_license | CarlosRiquelme/GestorProjectPIC | b7298ed6ba4687193eb049831d31d6dbf401546c | eeb2ef85d07ec6e12c5daf54584a472a2b287dcc | refs/heads/master | 2021-01-25T08:49:15.877826 | 2018-06-23T21:12:50 | 2018-06-23T21:12:50 | 32,768,150 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,592 | py | views.py | # coding=UTF-8
from mx.DateTime.DateTime import today
from django.contrib.auth.models import User
from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage
from django.shortcuts import render_to_response
from django.template.context import RequestContext
from django.http import HttpResponseRedirect
from ... |
e49f2f124d2ee3a1288bc98a63853711b57dd13e | 2eff8c125cfae58e1ad2b3764cdd0e62939ec0c3 | /focus_detect2.py | c0e52248a339fede4027e1664886763eeeab889b | [] | no_license | cogpp/image-exp | 2d0128e2d349d6547ed42b8f48dbb700ff8bdc4e | 07b4b6e33c63c41d0af4ccf82fe8b31a27908605 | refs/heads/master | 2021-01-01T16:05:11.307963 | 2014-06-25T14:33:44 | 2014-06-25T14:33:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 284 | py | focus_detect2.py | __author__ = 'phillg07'
import cv2
import scipy.ndimage.filters as flt
import numpy as np
img = cv2.imread('/Users/phillg07/Pictures/tennis2.jpg', 0)
img_res = cv2.subtract(img, cv2.GaussianBlur(img, (65, 65), 5))
cv2.imshow('image', img_res)
cv2.waitKey(0)
cv2.destroyAllWindows() |
01760e4c7bf0a1c6d31488c9225a19d1f0b4b89e | b6a0eabe5c027c767664d593822dd7d569df837d | /PythonFunctions.py | a17ba6fdac9de0264b5d0807f266577f82d4e916 | [] | no_license | izhanh/PythonLiteSelenium | 2bbc87a96f8e72653787288561a36c7bdfe272b1 | 170b668250d5f4d6e803c27f480a6343aae9da2c | refs/heads/master | 2022-12-10T11:38:17.602713 | 2020-02-27T17:20:40 | 2020-02-27T17:20:40 | 243,330,825 | 0 | 0 | null | 2022-11-22T02:42:07 | 2020-02-26T18:05:25 | Python | UTF-8 | Python | false | false | 15,187 | py | PythonFunctions.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# =================================================================================================================== #
# IMPORTS
# =================================================================================================================== #
import os
import re
im... |
12a8387885195e461d5c341826f9b73754817770 | 1d6d0c35a4cba23e084a7422c7355ed9f022dcfe | /A20 TP/TP2/email_analyzer.py | 118c6374f6f77b9fc939e6e374492469b714c147 | [] | no_license | ninalara/log3430 | ffd5eb9306a020747f87c06de8e277feb0149b1e | 3bb1e22768769d33829b1c43563e5aea77f491f5 | refs/heads/master | 2023-04-01T18:13:26.298993 | 2021-04-12T01:52:30 | 2021-04-12T01:52:30 | 334,298,585 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,674 | py | email_analyzer.py | import json
from text_cleaner import TextCleaning
from vocabulary_creator import VocabularyCreator
class EmailAnalyzer:
"""Classe pour classifier les e-mails comme spam ou non spam (ham)"""
def __init__(self):
self.vocab = "vocabulary.json"
self.cleaning = TextCleaning()
self.words = ... |
b78ae9a60b427c3abad5786a39a19a47e067cb57 | 88dd2d9233aede5f186a1f3608187bf6756b2349 | /omc3/optics_measurements/chromatic.py | 8c58879249fb0c178e7f1767dc42ca484c48d372 | [
"MIT"
] | permissive | pylhc/omc3 | d6462e3a7c4d8cffca20a9f9d2de7e37c0f4dcf9 | f8180791c20c27dbe3f717c0681f379cd13d03cc | refs/heads/master | 2023-09-01T08:07:29.940932 | 2023-08-29T09:19:41 | 2023-08-29T09:19:41 | 145,120,244 | 13 | 5 | MIT | 2023-09-13T20:23:25 | 2018-08-17T12:53:09 | Python | UTF-8 | Python | false | false | 4,636 | py | chromatic.py | """
Chromatic
----------------
This module contains chromatic calculations functionality of ``optics_measurements``.
It provides functions to compute various chromatic beam properties.
"""
import numpy as np
import pandas as pd
from omc3.optics_measurements.constants import DELTA, ERR, MDL
from omc3.optics_measuremen... |
6af5faaaa9d894dd2b882cfe1bb8b8225780743c | 2e744d7a15b7845d2dde101dd125ef93768bad8d | /VariableScope.py | b4b4b99ff4a097d7a405cd433e235c22f1d89a0d | [] | no_license | leezhm/PythonSerials | 3fbe3477d333be6c01b56546a933b9cdfdbc5088 | 2897735ce19704fb16b62e3bdc42e26a3d722060 | refs/heads/master | 2021-01-13T02:10:26.438842 | 2012-03-19T16:14:43 | 2012-03-19T16:14:43 | 3,647,250 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,166 | py | VariableScope.py | '''
# VariableScope.py
#
# Written by leezhm on 13th March, 2012.
#
# Copyright (C) leezhm(c)126.com. All Right Reserved.
#
# For Chapter 6 Dragon Realm
#
# <<Invent Your Own Computer Games with Python>>
'''
print('Why not ?')
print(True and not False)
# A global variable named "spam"
spam = 1208
# This b... |
98bd4eb25a76fb9184f9abfcb920a6fbe46b9394 | b9750b45fcabed8bc793df2199b20200e4149f6a | /te_py/sub_minifier.py | 5050ef081bd1c2a69de20f79ddf7b8a10b2a80c1 | [] | no_license | gsb-gurpreet/resultAnalyzer | 037d7bf2cd8976236c5088f004c51efee4932121 | cd800327247b6a3df34076a5b1d5691f6c36527d | refs/heads/master | 2020-04-05T23:41:34.209491 | 2015-07-30T05:30:45 | 2015-07-30T05:30:45 | 31,417,018 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 160 | py | sub_minifier.py | import json
subjects = []
with open("sub.json", 'r') as subject_file:
subjects = json.load(subject_file)
print(json.dumps(subjects, separators=(',',':')))
|
168a12e6653a0526f29c163913def50147481154 | 23dac9c14e1c7a45bf86e186e234e7737d9f1bcc | /main.py | bcf4353df6f4a1af010e3e514588db041a85c7cd | [] | no_license | jordankooyman/Todo-List | 56111bba4aa7c504586a0f1506a23359a45bfe65 | 3f472bd7aa794bb6ce098dd52d134df76ba5fb5b | refs/heads/main | 2023-04-04T10:52:48.200853 | 2021-04-18T17:58:35 | 2021-04-18T17:58:35 | 346,876,767 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 29,823 | py | main.py | """This program displays a customizable list of items by priority value,
with priority 1 being the highest. Allows the user to add, edit,
mark complete, show completed (hidden), and remove items. Stores the list of
items in a .txt file located where this program's main.py file is. All
changes are automatically save... |
b7ccb41c43a0db6f1bf9e6ba5cef1b9b1417e297 | b378950c5ec10db8c7921df1261d62b5b74581e8 | /gae/lib/django/tests/regressiontests/urlpatterns_reverse/tests.py | 8f571ac66c277c5c29f890c7b9fc4a27400463fe | [
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | towerjoo/CS-notes | 11e78395423ec097840e354c6571400db149e807 | a5704ceea72caab2a458b0f212d69041c4c2a3ce | refs/heads/master | 2020-06-02T19:26:11.524649 | 2010-09-08T02:08:16 | 2010-09-08T02:08:16 | 895,186 | 6 | 4 | null | null | null | null | UTF-8 | Python | false | false | 1,912 | py | tests.py | "Unit tests for reverse URL lookup"
from django.core.urlresolvers import reverse_helper, NoReverseMatch
import re, unittest
test_data = (
('^places/(\d+)/$', 'places/3/', [3], {}),
('^places/(\d+)/$', 'places/3/', ['3'], {}),
('^places/(\d+)/$', NoReverseMatch, ['a'], {}),
('^places/(\d+)/$', NoRevers... |
778cf8064fa45e3e25a66f2165dcf6885c72fb8a | 17703b9d2429624656f8713cc251bca948542272 | /ESRI_27/copy_files_with_extentions_27.py | 49940a9c154ec6e1bd4860fa1104051abf87c388 | [] | no_license | SPINLab/AIS_barcin_hoyuk | 801087642c765992a443ed31eabd705fed8e3532 | c381c47345777200f55a0cfac1505bc9a350bd54 | refs/heads/master | 2023-04-25T22:18:48.391525 | 2023-04-16T12:17:12 | 2023-04-16T12:17:12 | 217,049,696 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 906 | py | copy_files_with_extentions_27.py | # This script allows you to copy all files with a certain extention to a new folder without integrating the sub folders
# Created by Maurice de Kleijn Vrije Universiteit Amsterdam Spatial Information laboratory for the datamanagement of the the archaological project Barin Hoyuk
# 22062016 Python 2.7
import shutil
impo... |
56d3e59e3e077b1febb834668aba44ce8dba13ae | e71b0e75b6fbe7dca1b81db21850e4e26dd8889c | /code.py | 67f91f68eebbe869c3428c9419d5e5efe760db34 | [] | no_license | HilJiang/idshwk7 | 54ce352e8c1345cffa3b6a4a3cb71339803993b1 | d08a5c02ca336b3990ea3ee54875994e18b59f1e | refs/heads/master | 2022-10-15T13:15:12.148777 | 2020-06-06T16:40:45 | 2020-06-06T16:40:45 | 270,029,744 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,961 | py | code.py | clear ;
clc;
%-----------------------读入图像-------------------------------------%
markbefore=imread('p203.bmp');
markbefore2=rgb2gray(markbefore);
mark=im2bw(markbefore2);
figure(1);
subplot(2,3,1);
imshow(mark),title('水印图像');
[rm,cm]=size(mark);
cover=imread('pic.bmp');
cover1=imresize(cover,[512... |
5eb4c71869b077dac0d61072c99d801030395fc2 | 53def173f44b9665d1194195577c50058c1f698a | /angstromctf/2019/binary/weeb_hunting/solve.py | 00d0b257ccef42c7ea01cacc6c2ba859ca42735e | [] | no_license | blairsec/challenges | 3558f2b7f6866718c4f1ad026d84b6651e31e7d0 | 928345a6175adf0e88017b28fe895bc924527853 | refs/heads/master | 2023-05-24T09:44:17.779099 | 2023-05-17T17:03:34 | 2023-05-17T17:03:34 | 184,929,220 | 17 | 6 | null | 2023-03-03T17:21:31 | 2019-05-04T18:12:01 | JavaScript | UTF-8 | Python | false | false | 1,733 | py | solve.py | from pwn import *
p = process("./weeb_hunting")
elf = ELF("/lib/x86_64-linux-gnu/libc-2.23.so")
pwnlib.gdb.attach(p)
r = p.recv()
while "You found a" not in r:
r = p.recvuntil(">")
p.send("AAAA\n")
p.send("AAAA\n")
r = p.recv()
while "You found a" not in r:
r = p.recvuntil(">")
p.send("AAAA\n")
p.send("AAAA\n")... |
383d3b35fbfb7921111b28c3160173ce1c200387 | 7a0ea773d250f737f8514f658f5c607b6141a169 | /tests/utils/boletoPayment.py | 943e54f294978bb5b6710f55f06057ff3c6afe6d | [
"MIT"
] | permissive | starkbank/sdk-python | 029f869d8ff87513772a461520bfd1227c8bd3d0 | 6e62bc315d3255bcdf765ea74049ca3472f90445 | refs/heads/master | 2023-08-31T09:28:08.765626 | 2023-08-29T14:02:55 | 2023-08-29T14:02:55 | 209,409,755 | 10 | 6 | MIT | 2023-09-14T21:27:36 | 2019-09-18T21:48:19 | Python | UTF-8 | Python | false | false | 954 | py | boletoPayment.py | from copy import deepcopy
from datetime import date, timedelta
from hashlib import sha256
import starkbank
from starkbank import BoletoPayment
from .boleto import generateExampleBoletosJson
example_payment = BoletoPayment(
line="34191.09008 61713.957308 71444.640008 2 83430000984732",
scheduled="2020-02-29",
... |
b05a5fcbba74bf4108bc953c6f868eb1f5ca298f | a44fc19a68d1bab04bf527a723b5418438561df7 | /tests/simpletests.py | 54051cdadc92800b80ee9a996f5433f9aa2876c0 | [
"MIT"
] | permissive | sirsgriffin/pymarketo | 023912b5aae7f8bc5f6b870495bc8a417eb8a5f9 | c2b7fd684b267dab8e4794412168de6eeed38472 | refs/heads/master | 2021-01-15T20:12:56.603829 | 2013-03-13T23:11:46 | 2013-03-13T23:11:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,803 | py | simpletests.py | from pymarketo.client import MarketoClientFactory
import os
import sys #@UnusedImport
import time #@UnusedImport
import datetime #@UnusedImport
from pprint import pprint #@UnresolvedImport
TESTDIR = os.path.split(__file__)[0]
PACKAGEDIR = os.path.join(TESTDIR,"..")
INIFILE = os.path.join(PACKAGEDIR,"marketo.ini")
DATA... |
e2c69191d81724cac44bebba3111a773e408b7c8 | b08b3e8ee82dbc62b5b4c64fccf4bb0b9cc8b399 | /Lab/Task/Lab02/Lab2_Task1_TableLoop.py | 4417ce3f59ffae8b34c9185f8064779dae2d5b09 | [] | no_license | M-Usamah/PythonOPPFall2020-M-Usamah-BAIM-S20-002 | 919e9105ef36c076dce9ef217f9aa15c3e9f35f1 | 4cdd1a88d135419531ddbce78241e685bd9ae14f | refs/heads/master | 2023-01-04T19:08:10.422374 | 2020-11-05T17:33:17 | 2020-11-05T17:33:17 | 290,845,037 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 680 | py | Lab2_Task1_TableLoop.py | #Print table using while loop
tablenumber = int(input("Enter a number: "))
upperlimit = int(input("Enter a upper limit: "))
lowerlimit = int(input("Enter a lower limit: "))
i = upperlimit
while (i <= lowerlimit):
print (i,"*",tablenumber,"=",i*tablenumber)
i=i+1
print("========================================... |
603f19f71bf6157e1083934d0dedef352f95840e | db02805634a85b83ff6f2712b9e9b7632913dd64 | /summary/services/domain_handler.py | 797d74d1dcd69e92eac45b404e8c244d108f9789 | [] | no_license | zero20121222/WebTester | 4ca1028831145142527c6b2d0e5915380463e7ec | 43b381532c5e795d623a499457a7cf8c5d8e6142 | refs/heads/master | 2021-01-25T05:16:28.355635 | 2016-01-04T08:22:50 | 2016-01-04T08:22:50 | 29,585,222 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 558 | py | domain_handler.py | #! /usr/bin/env python
# -*- encoding: utf8 -*-
__author__ = 'MichaelZhao'
from app.lib.basic_handler import BasicHandler
from summary.daos.domain_dao import DomainDao
class DomainHandler(BasicHandler):
def get(self):
pass
def post(self, *args, **kwargs):
test_domain = self.get_argument("test... |
5d1cbb1c97ab0897874ec16fe81ca32d964d9df1 | 244a9f2e8ba5de0eeba70f9b726f5237903f7b2d | /rpi/messaging/util/__init__.py | 705b5dd35c9ad3a46b3dd5cacb467c9193cb1fb3 | [] | no_license | sondregs/eit-vr-gruppe4 | 585899ae2029053f2b4f14a6423990f9ffbc7f51 | dec1916ea5de965e922481b4462b96d38b191809 | refs/heads/master | 2023-08-22T12:56:15.738996 | 2020-04-01T16:52:47 | 2020-04-01T16:52:47 | 238,409,565 | 0 | 0 | null | 2023-08-03T16:39:37 | 2020-02-05T09:11:54 | Python | UTF-8 | Python | false | false | 248 | py | __init__.py | import sys
if sys.platform.startswith('win32'):
from multiprocess import popen_spawn_win32
# Fixes "No module named 'multiprocess'" error when calling functions with `wrapt_timeout_decorator.timeout`
popen_spawn_win32.WINENV = False
|
33b2dce619df38f1167f7d7549ea2bf7dfb5f82e | fed3e563b256480034786aba91e7911376ec3ff1 | /login.py | de86511de7076f92b7b4ac2ab8cba6560f8f80bf | [] | no_license | hilalguler111/FlashCards | 2124b70738746a6d0632f7788539417e75d3551f | 37905a1fff091559510d2bacc62fe459b85221f6 | refs/heads/main | 2023-09-06T02:18:30.339648 | 2021-11-10T20:31:42 | 2021-11-10T20:31:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,294 | py | login.py | from PyQt5 import QtWidgets, uic, QtCore
import sys
import os
import json
import menu
class Login(QtWidgets.QDialog):
user_name = ""
def __init__(self):
super(Login, self).__init__()
uic.loadUi('ui/login.ui', self)
self.pushButton.clicked.connect(self.login)
# ... |
96a032b4010ca26276fc53e882d6e4e83296b975 | 8f85ad4eb4eee9324e7f56405de4511544013fcd | /yoflow/decorators.py | e2aef437395ad9d0e3af13bbde29f873d1f17704 | [
"MIT"
] | permissive | shun-liang/yoflow | 4c38c483706d4760f97328b18821f77e26783677 | fa8f753546bb07907889f3bd909b301de2ade6ec | refs/heads/master | 2020-05-17T23:58:47.701718 | 2018-10-19T11:36:49 | 2018-10-19T11:36:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 697 | py | decorators.py | from functools import wraps
def transition(to_state):
def decorator(view):
@wraps(view)
def wrapper(self, *args, **kwargs):
flow = self.flow()
# process custom validation logic
meta = flow.validate(self)
# fetch instance
obj = self.get_ob... |
36b8b5f85f5508b2ec1547c027d73bc662005512 | 3b7a435e48e98f4251f775a221b4762cc9d7db26 | /main.py | e7aa7d0e2796f82e18859b78b01eec8dffdf03b5 | [] | no_license | cole-wilson/echo1 | a300182588b2f38136f42df3b0e7f8c6487d1b0d | 8012c58ad4f77f7f39ead042162fa06903731a19 | refs/heads/master | 2021-01-07T11:58:00.118662 | 2020-02-19T17:46:41 | 2020-02-19T17:46:41 | 241,684,286 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,611 | py | main.py | def search(word):
length = len(word)
t= False
for x in range(len(insult)):
if insult[x:x+length] == word:
return True
t = True
if t != True:
return False
import random
import time
y = ''
name = ''
print('Hello, I am Echo. Insult me if you dare!')
while True:
insult = input('>>>')
insul... |
9f3ee8e03d52307bb00d341f2c5726bdbd9d2e74 | b8fa6e0a088c371b7dc69001d2ac745c960601ca | /Exercicios/secao04_variaveis_e_tipos_de_dados/exercicio21.py | c9df6c32f288d0fbecd4d3b06f151cae60714cf1 | [] | no_license | DanielMalheiros/geekuniversity_programacao_em_python_essencial | 45fb5265c8e0a4e8d435f8341f2b2eb23cfd3f73 | 0e4590defb2510ef71f4ce7039c29873f87d399f | refs/heads/master | 2020-08-05T20:05:04.765817 | 2019-10-09T01:20:35 | 2019-10-09T01:20:35 | 212,689,293 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 298 | py | exercicio21.py | """21- Leia um valor de massa em libras e apresente-o convertido em quilogramas. A fórmula de
conversão é K = L * 0,45, sendo K a massa em quilogramas e L a massa em libras."""
l = float(input("Defina um valor de massa em libras: "))
print(f"{l} libras equivalem a {l * 0.45:.f} quilogramas.")
|
5d87211d5e7e6f5a372201799f54e1d0002c84e7 | c596fad20771dadba78c4be2b4ffb02ac62526f8 | /Lektion 2/opgave1.py | 20140100d47f38a3190523bec86455a5a8a15524 | [] | no_license | PanTroglodytes/pythonkursus | 717b34d3c97c89c38f6a0eb5508a2ba72b20133b | cdf6faecc37feef7679c470e1656952fe047315f | refs/heads/master | 2020-04-23T08:43:07.659029 | 2019-03-25T06:03:21 | 2019-03-25T06:03:21 | 171,046,155 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 285 | py | opgave1.py | """Dette program udskriver en liste af forfattere på hver deres linje"""
#Dette er listen over forfattere
yndlingsforfattere = ["Poulsen","Hansen","Jensen","Andersen","Møller"]
#her printer vi dem med et for-loop
for forfatter in yndlingsforfattere:
print(forfatter)
|
0360e8c589ac0bce09c01758889153be25e9df20 | 9e4bd9a0ce6cb323585ca020b4335aa6850ad211 | /server/repositories/review_repsotory.py | 2013550df69d739cf6d8d9b2756dcaf348524ad9 | [] | no_license | UZHASE/bnbexplorer-backend | 6b6a8ffeba087e7fa06988d92a6992bfcb18f737 | d8624c3386c1e4c43b251f7dc1e7b917cdb1e4fa | refs/heads/main | 2023-05-11T12:24:30.593446 | 2021-05-23T10:11:41 | 2021-05-23T10:11:41 | 350,692,324 | 0 | 0 | null | 2021-05-23T10:11:42 | 2021-03-23T11:48:37 | Python | UTF-8 | Python | false | false | 1,441 | py | review_repsotory.py | from pypika import Query, Table
from server.repositories.base_repository import Repository
from server.models.review import Review as Review_Model
class Review(Repository):
""" Repository for Review object access"""
def get_all_by_listing_id(self, listing_id):
""" Retrieve all Reviews for a given Li... |
bd618aabd5286c7979391ae99e1920947fa1af51 | 82019bb3cc654900c0eabb358ce263b784432f82 | /posts/api.py | 06cb9e4f064918e81264c2cfbcdf176e9bca3ee2 | [] | no_license | Mihail12/starnavi_test | 6eff38882aa9bd311bebfd0ebe22224b69d39a21 | dd7ae54d3f76266e02af97584ee98db7fe0fbb35 | refs/heads/master | 2023-08-05T01:38:45.038355 | 2020-04-20T22:05:17 | 2020-04-20T22:05:17 | 256,707,276 | 0 | 0 | null | 2021-09-22T18:54:37 | 2020-04-18T08:47:38 | Python | UTF-8 | Python | false | false | 851 | py | api.py | from django.db.models import Prefetch
from rest_framework.permissions import IsAuthenticated
from rest_framework.viewsets import ModelViewSet
from posts.models import Post, Like
from posts.serializers import LikeSerializer, PostSerializer
class PostViewSet(ModelViewSet):
queryset = Post.objects.all()
seriali... |
9e9e7411ff68dd05f2c0c21af92ad20da9c9e689 | 08894f3c6d2f59d9248e909fdc7dd6a66564b0c3 | /project/__init__.py | ecb03fb0df55b5d009e525afe5615bf3561cb058 | [] | no_license | tigarcia/lettuce-be-friends | 7b46ca6a8b3762b5d3769a084762095be407ed82 | 2d2d080c0a391af24d8728ae18a623a8e04bd0ef | refs/heads/master | 2020-06-16T11:42:28.288441 | 2017-06-13T20:45:35 | 2017-06-13T20:45:35 | 94,145,477 | 0 | 0 | null | 2017-06-12T22:17:05 | 2017-06-12T22:17:05 | null | UTF-8 | Python | false | false | 1,727 | py | __init__.py | from flask import Flask, render_template
from flask_sqlalchemy import SQLAlchemy
from flask_modus import Modus
from flask_bcrypt import Bcrypt
from flask_login import LoginManager, current_user
import os
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URL') or 'postgres://localh... |