Skip to content

Instantly share code, notes, and snippets.

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/had/projects/gitnolia/main/magnolia-core/src/test/java/info/magnolia/objectfactory/guice/lifecycle/LifecycleOverrides.java:[36,24] cannot find symbol
symbol: class PostConstruct
location: package javax.annotation
[ERROR] /Users/had/projects/gitnolia/main/magnolia-core/src/test/java/info/magnolia/objectfactory/guice/lifecycle/LifecycleOverrides.java:[37,24] cannot find symbol
symbol: class PreDestroy
location: package javax.annotation
[ERROR] /Users/had/projects/gitnolia/main/magnolia-core/src/test/java/info/magnolia/objectfactory/guice/lifecycle/LifecycleSimple.java:[36,24] cannot find symbol
@rah003
rah003 / VirtualUriMappingEval.groovy
Created November 11, 2019 14:06 — forked from mkgl/VirtualUriMappingEval.groovy
Show all Virtual URI mappings that matched a given URI and their associated weights
@Field private registry
import groovy.transform.Field
import info.magnolia.objectfactory.Components
import info.magnolia.virtualuri.VirtualUriRegistry
import static java.util.stream.Collectors.joining
registry = Components.getComponent(VirtualUriRegistry.class)
File "aws-cost-and-usage-report.py", line 64, in <module>
out.write('\t'.join([str(result_by_time['TimePeriod']['Start']), '\t'.join(group['Keys']), amount, unit ,result_by_time['Estimated']]) + '\n')
TypeError: sequence item 4: expected str instance, bool found
data = cd.get_cost_and_usage(TimePeriod={'Start': start, 'End': end},
Granularity='MONTHLY', Metrics=['UnblendedCost'],
Filter={ "And" : [
{"Dimensions": {
"Key": "LINKED_ACCOUNT",
"Values": [ "791540823040" ] }},
{"Tags": {
"Key": "Organization",
"Values": ["swissre-webpresence"] }}
]},
def retrieveData(self, results, filter):
data = cd.get_cost_and_usage(TimePeriod={'Start': start, 'End': end},
Granularity='MONTHLY', Metrics=['UnblendedCost'],
**filter,
GroupBy=[{'Type': 'DIMENSION', 'Key': 'LINKED_ACCOUNT'}, {'Type': 'DIMENSION', 'Key': 'SERVICE'}], **kwargs)
filter = Filter={ "And" : [
{"Dimensions": {
"Key": "LINKED_ACCOUNT",
"Values": [ "791540823040" ] }},
{"Tags": {
"Key": "Organization",
"Values": ["swissre-webpresence"] }}
]}
Traceback (most recent call last):
File "aws-cost-and-usage-report.py", line 102, in <module>
retrieveData(results, filter)
TypeError: retrieveData() missing 1 required positional argument: 'filter'
filter = {Filter={ "And" : [
{"Dimensions": {
"Key": "LINKED_ACCOUNT",
"Values": [ "791540823040" ] }},
{"Tags": {
"Key": "Organization",
"Values": ["swissre-webpresence"] }}
]}}
File "aws-cost-and-usage-report.py", line 18
filter = {Filter={ "And" : [
^
SyntaxError: invalid syntax
import os
from pydub import AudioSegment
# main body
folder_path = "audio-samples"
for filename in os.listdir(folder_path):
sound = AudioSegment.from_wav(os.path.join(folder_path,filename))
sound = sound.set_channels(1)
sound.export(os.path.join(folder_path+ "-mono","mono_"+filename), format="wav", bitrate="16k")